BSV blockchainBSV blockchain

Find or create a sync state record for a foreign storage provider.

POST/sync/state

Body application/json

storageIdentityKeystringrequired
storageNamestringrequired

Response

Sync state and isNew flag.

syncStateobject
Show syncState properties
created_atstring<date-time>
updated_atstring<date-time>
isNewboolean

Authentication required or token invalid.

errorstring
codestring

Machine-readable error code (see specs/errors.md).

Request
curl -X POST "https://{host}/storage/v1/sync/state" \
  -H "Content-Type: application/json" \
  -d '{
  "storageIdentityKey": "string",
  "storageName": "string"
}'
Response
{
  "syncState": {
    "created_at": "1970-01-01T00:00:00.000Z",
    "updated_at": "1970-01-01T00:00:00.000Z"
  },
  "isNew": true
}