diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 27a3bc57..683d1f7a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,16 +26,19 @@ jobs: outputs: full_tag: ${{ steps.set_version_tag.outputs.TAG }} version_tag: ${{ steps.set_version_tag.outputs.VERSION }} + semver: ${{ steps.set_version_tag.outputs.SEMVER }} service_name: ${{ steps.set_version_tag.outputs.SERVICE }} service_matrix: ${{ steps.set_version_tag.outputs.SERVICE_MATRIX }} valid_semver: ${{ steps.set_version_tag.outputs.valid }} test_run: ${{ steps.set_version_tag.outputs.test_run }} + npm_tag: ${{ steps.set_version_tag.outputs.npm_tag }} steps: - name: Extract and Validate Version Tag id: set_version_tag run: | valid=false test_run=false + npm_tag=latest ENTIRE_TAG_RE="^(([[:alpha:]\-]+)-)?(.*)$" VERSION_TAG_RE="^v[\.]?([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+(-[[:alpha:][:digit:]\.]+)*)$" TAG="${FULL_TAG}" @@ -49,6 +52,10 @@ jobs: if [[ ${version} = "0.0.1" ]] ; then test_run=true fi + + if [[ -n "${BASH_REMATCH[2]}" ]] ; then + npm_tag=next + fi if [[ -z "${SERVICE}" ]] ; then SERVICE_MATRIX="${ALL_SERVICES}" @@ -58,10 +65,12 @@ jobs: echo "TAG=${TAG}" >> $GITHUB_OUTPUT echo "VERSION=${VERSION_TAG}" >> $GITHUB_OUTPUT + echo "SEMVER=${version}" >> $GITHUB_OUTPUT echo "SERVICE=${SERVICE}" >> $GITHUB_OUTPUT echo "SERVICE_MATRIX=${SERVICE_MATRIX}" >> $GITHUB_OUTPUT echo "valid=${valid}" >> $GITHUB_OUTPUT echo "test_run=${test_run}" >> $GITHUB_OUTPUT + echo "npm_tag=${npm_tag}" >> $GITHUB_OUTPUT fi fi if [[ "${valid}" = false ]] @@ -129,3 +138,25 @@ jobs: password: ${{secrets.DOCKERHUB_TOKEN}} repository: ${{env.DOCKER_HUB_PROFILE}}/${{matrix.service}}-service readme-filepath: Docker/${{matrix.service}}-service.overview.md + + build-and-publish-client-js-package: + name: Build and Publish 'frequency-gateway-apis' Package + needs: set_variables + runs-on: ubuntu-latest + if: needs.set_variables.outputs.valid_semver == 'true' + steps: + + - name: Build Client API JS Package + id: build-client-api + run: npm run openapi-specs + + - name: Version Package + id: version-package + working-directory: openapi-specs + run: npm version ${{ needs.set_variables.outputs.semver }} --no-git-tag-version + + - name: Publish Package + id: publish-openapi-specs-rc + if: needs.set_variables.outputs.test_run != 'true' + working-directory: openapi-specs + run: npm publish --tag ${{ needs.set_variables.outputs.npm_tag }} diff --git a/.gitignore b/.gitignore index 47e66c8b..10c5fb8f 100644 --- a/.gitignore +++ b/.gitignore @@ -152,3 +152,8 @@ CLAUDE.local.md .clinic .DS_Store + +# Generated files for API package +openapi-specs/src/index.ts +openapi-specs/src/modules +openapi-specs/dist diff --git a/docs/account-worker/index.html b/docs/account-worker/index.html index de33556a..69a7591f 100644 --- a/docs/account-worker/index.html +++ b/docs/account-worker/index.html @@ -12,245 +12,245 @@ margin: 0; } - -

Account Worker Service (2.0)

Download OpenAPI specification:

Account Worker Service API

-

health

Check the health status of the service

Responses

Check the live status of the service

Responses

Check the ready status of the service

Responses

+ " fill="currentColor">

Account Worker Service (2.0)

Download OpenAPI specification:

Account Worker Service API

+

health

Check the health status of the service

Responses

Check the live status of the service

Responses

Check the ready status of the service

Responses

-

Account Service (2.0)

Download OpenAPI specification:

Account Service API

-

v1/accounts

Fetch an account given an MSA Id

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

-

Responses

Response samples

Content type
application/json
{
  • "msaId": "string",
  • "handle": {
    }
}

Fetch an account given an Account Id

path Parameters
accountId
required
string
Example: 1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N

AccountId in hex or SS58 format

-

Responses

Response samples

Content type
application/json
{
  • "msaId": "string",
  • "handle": {
    }
}

Get a retireMsa unsigned, encoded extrinsic payload.

path Parameters
accountId
required
string
Example: 1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N

AccountId in hex or SS58 format

-

Responses

Response samples

Content type
application/json
{
  • "encodedExtrinsic": "0x1234",
  • "payloadToSign": "0x1234",
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N"
}

Request to retire an MSA ID.

Request Body schema: application/json
required
encodedExtrinsic
required
string

Hex-encoded representation of the "RetireMsa" extrinsic

-
payloadToSign
required
string

payload to be signed

-
accountId
required
string

AccountId in hex or SS58 format

-
signature
required
string

signature of the owner

-

Responses

Request samples

Content type
application/json
{
  • "encodedExtrinsic": "0x1234",
  • "payloadToSign": "0x1234",
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "signature": "0x01065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

Response samples

Content type
application/json
{
  • "state": "waiting",
  • "referenceId": "string"
}

v2/accounts

Get the Sign In With Frequency Redirect URL

query Parameters
credentials
Array of strings
Example: credentials=VerifiedGraphKeyCredential&credentials=VerifiedEmailAddressCredential&credentials=VerifiedPhoneNumberCredential

List of credentials using the types: "VerifiedGraphKeyCredential", "VerifiedEmailAddressCredential", and "VerifiedPhoneNumberCredential". Note that Contact related verifiable credentials will be nested into an anyOf request form.

-
permissions
Array of strings
Example: permissions=dsnp.broadcast@v2&permissions=dsnp.private-follows@v1&permissions=dsnp.reply@v2&permissions=dsnp.reaction@v1&permissions=dsnp.tombstone@v2&permissions=dsnp.update@v2&permissions=frequency.default-token-address@v1

The list of permissions using the Frequency Schema names and versions. Pattern: <namespace>.<name>@v<version integer> e.g. dsnp.broadcast@v2

-
callbackUrl
required
string
Example: callbackUrl=http://localhost:3000/login/callback

The URL that will be called when the authentication process is completed

-

Responses

Response samples

Content type
application/json
{}

Process the result of a Sign In With Frequency v2 callback

Request Body schema: application/json
required
authorizationCode
string

The code returned from the SIWF v2 Authentication service that can be exchanged for the payload. Required unless an authorizationPayload is provided.

-
authorizationPayload
string

The SIWF v2 Authentication payload as a JSON stringified and base64url encoded value. Required unless an authorizationCode is provided.

-

Responses

Request samples

Content type
application/json
{
  • "authorizationCode": "680a0a68-6d3b-4d6d-89b7-0b01a6f7e86f",
  • "authorizationPayload": "ew0KICAidXNlclB1YmxpY0tleSI6IHsNCiAgICAiZW5jb2RlZFZhbHVlIjogIjVIWUhaOGU4a3lMRUJ1RWJzRmEyYndLWWJWU01nYVVoeW1mUlZnSDdDdU00VkNIdiIsDQogICAgImVuY29kaW5nIjogImJhc2U1OCIsDQogICAgImZvcm1hdCI6ICJzczU4IiwNCiAgICAidHlwZSI6ICJTcjI1NTE5Ig0KICB9LA0KICAidXNlcktleXMiOiBbDQogICAgew0KICAgICAgImVuY29kZWRQdWJsaWNLZXlWYWx1ZSI6ICIweGJkODk2ZmQ1NTAxZWVhMjU5ZjQ3OTg0MTVjOWZhNDQ3ZDU4ODIwZDk5YjkyNDA2NzFhNmYzNGYwYmMwM2IwMzAiLA0KICAgICAgImVuY29kZWRQcml2YXRlS2V5VmFsdWUiOiAiMHhmODExNWQzZTUwYzg2MTYzODZmMDY2ZjY1OTdlZmYwYzU3MGQ2N2M3ZTVjZDkzNjU1Njg4NGJjYzk5NDNmNDY0IiwNCiAgICAgICJlbmNvZGluZyI6ICJiYXNlMTYiLA0KICAgICAgImZvcm1hdCI6ICJiYXJlIiwNCiAgICAgICJ0eXBlIjogIlgyNTUxOSIsDQogICAgICAia2V5VHlwZSI6ICJkc25wLnB1YmxpYy1rZXkta2V5LWFncmVlbWVudCINCiAgICB9DQogIF0sDQogICJwYXlsb2FkcyI6IFsNCiAgICB7DQogICAgICAic2lnbmF0dXJlIjogew0KICAgICAgICAiYWxnbyI6ICJTUjI1NTE5IiwNCiAgICAgICAgImVuY29kaW5nIjogImJhc2UxNiIsDQogICAgICAgIC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WkNvQVZHIiwNCiAgICAgICAgImNyeXB0b3N1aXRlIjogImVkZHNhLXJkZmMtMjAyMiIsDQogICAgICAgICJwcm9vZlB1cnBvc2UiOiAiYXNzZXJ0aW9uTWV0aG9kIiwNCiAgICAgICAgInByb29mVmFsdWUiOiAiejI5YWRmdG5lSG5LeHdSOWI3Z3RSanlrTFJlR0VwdU1pWTljS0hWQ0JTejZtWThjd0ZaaUZpQVdaSGV4R3R2Qjh0YmRwZmoyRzQzeFF6dFJ6dFdhd21IRjIiDQogICAgICB9DQogICAgfQ0KICBdDQp9"
}

Response samples

Content type
application/json
{
  • "controlKey": "f6cL4wq1HUNx11TcvdABNf9UNXXoyH47mVUwT59tzSFRW8yDH",
  • "signUpReferenceId": "MjY3MjI3NWZlMGM0NTZmYjY3MWU0ZjQxN2ZiMmY5ODkyYzc1NzNiYQo",
  • "signUpStatus": "waiting",
  • "msaId": "314159265358979323846264338",
  • "email": "user@example.com",
  • "phoneNumber": "555-867-5309",
  • "graphKey": "f6Y86vfvou3d4RGjYJM2k5L7g1HMjVTDMAtVMDh8g67i3VLZi",
  • "recoverySecret": "69EC-2382-E1E6-76F3-341F-3414-9DD5-CFA5-6932-E418-9385-0358-31DF-AFEA-9828-D3B7",
  • "rawCredentials": []
}

v1/delegation

Get the delegation information associated with an MSA Id

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

-

Responses

Response samples

Content type
application/json
{
  • "providerId": "string",
  • "schemaPermissions": { },
  • "revokedAt": { }
}

Get a properly encoded RevokeDelegationPayload that can be signed

path Parameters
accountId
required
string
Example: 1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N

AccountId in hex or SS58 format

-
providerId
required
string
Example: 1

Msa Id of provider

-

Responses

Response samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "providerId": "3",
  • "encodedExtrinsic": "0x1234",
  • "payloadToSign": "0x1234"
}

Request to revoke a delegation

Request Body schema: application/json
required
accountId
required
string

AccountId in hex or SS58 format

-
providerId
required
string

MSA Id of the provider to whom the requesting user wishes to delegate

-
encodedExtrinsic
required
string

Hex-encoded representation of the "revokeDelegation" extrinsic

-
payloadToSign
required
string

payload to be signed

-
signature
required
string

signature of the owner

-

Responses

Request samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "providerId": "3",
  • "encodedExtrinsic": "0x1234",
  • "payloadToSign": "0x1234",
  • "signature": "0x01065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

Response samples

Content type
application/json
{
  • "state": "waiting",
  • "referenceId": "string"
}

v2/delegations

Get all delegation information associated with an MSA Id

path Parameters
msaId
required
string
Example: 3

MSA Id of the user requesting the delegation

-

Responses

Response samples

Content type
application/json
{
  • "msaId": "string",
  • "delegations": [
    ]
}

Get an MSA's delegation information for a specific provider

path Parameters
msaId
required
string
Example: 3

MSA Id of the user requesting the delegation

-
providerId
string
Example: 1

MSA Id of the provider to whom the requesting user wishes to delegate

-

Responses

Response samples

Content type
application/json
{
  • "msaId": "string",
  • "delegations": [
    ]
}

v1/handles

Request to create a new handle for an account

Request Body schema: application/json
required
accountId
required
string

AccountId in hex or SS58 format

-
required
object (HandlePayloadDto)
proof
required
string

proof is the signature for the payload

-

Responses

Request samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "payload": {
    },
  • "proof": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

Response samples

Content type
application/json
{
  • "state": "waiting",
  • "referenceId": "string"
}

Request to change a handle

Request Body schema: application/json
required
accountId
required
string

AccountId in hex or SS58 format

-
required
object (HandlePayloadDto)
proof
required
string

proof is the signature for the payload

-

Responses

Request samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "payload": {
    },
  • "proof": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

Response samples

Content type
application/json
{
  • "state": "waiting",
  • "referenceId": "string"
}

Get a properly encoded ClaimHandlePayload that can be signed.

path Parameters
newHandle
required
string >= 3 characters
Example: handle

newHandle in the request

-

Responses

Response samples

Content type
application/json
{
  • "payload": {
    },
  • "encodedPayload": "0x012345"
}

Fetch a handle given an MSA Id

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

-

Responses

Response samples

Content type
application/json
{
  • "base_handle": "string",
  • "canonical_base": "string",
  • "suffix": 0
}

v1/ics

IcsControllerV1_publishAll_v1

path Parameters
accountId
required
string
Example: 1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N

AccountId in hex or SS58 format

-
Request Body schema: application/json
required
required
object (AddNewPublicKeyAgreementRequestDto)
required
object (AddNewPublicKeyAgreementRequestDto)
required
object (UpsertPagePayloadDto)

Responses

Request samples

Content type
application/json
{
  • "addIcsPublicKeyPayload": {
    },
  • "addContextGroupPRIDEntryPayload": {
    },
  • "addContentGroupMetadataPayload": {
    }
}

health

Check the health status of the service

Responses

Check the live status of the service

Responses

Check the ready status of the service

Responses

v1/keys

Add new control keys for an MSA Id

Request Body schema: application/json
required
msaOwnerAddress
required
string

msaOwnerAddress representing the target of this request

-
msaOwnerSignature
required
string

msaOwnerSignature is the signature by msa owner

-
newKeyOwnerSignature
required
string

newKeyOwnerSignature is the signature with new key

-
required
object (KeysRequestPayloadDto)

Responses

Request samples

Content type
application/json
{
  • "msaOwnerAddress": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "msaOwnerSignature": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85",
  • "newKeyOwnerSignature": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85",
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "state": "waiting",
  • "referenceId": "string"
}

Fetch public keys given an MSA Id

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

-

Responses

Response samples

Content type
application/json
{
  • "msaKeys": { }
}

Get a properly encoded StatefulStorageItemizedSignaturePayloadV2 that can be signed.

query Parameters
msaId
required
string
Example: msaId=3

MSA Id representing the target of this request

-
newKey
required
string
Example: newKey=0x0ed2f8c714efcac51ca2325cfe95637e5e0b898ae397aa365978b7348a717d0b

New public key to be added to the account (32-byte value in hex format)

-

Responses

Response samples

Content type
application/json
{
  • "payload": {
    },
  • "encodedPayload": "0x1234"
}

Request to add a new public Key

Request Body schema: application/json
required
accountId
required
string

AccountId in hex or SS58 format

-
required
object (ItemizedSignaturePayloadDto)
proof
required
string

proof is the signature for the payload

-

Responses

Request samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "payload": {
    },
  • "proof": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

Response samples

Content type
application/json
{
  • "state": "waiting",
  • "referenceId": "string"
}
+ " fill="currentColor">

Account Service (2.0)

Download OpenAPI specification:

Account Service API

+

v1/accounts

Fetch an account given an MSA Id

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

+

Responses

Response samples

Content type
application/json
{
  • "msaId": "string",
  • "handle": {
    }
}

Fetch an account given an Account Id

path Parameters
accountId
required
string
Example: 1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N

AccountId in hex or SS58 format

+

Responses

Response samples

Content type
application/json
{
  • "msaId": "string",
  • "handle": {
    }
}

Get a retireMsa unsigned, encoded extrinsic payload.

path Parameters
accountId
required
string
Example: 1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N

AccountId in hex or SS58 format

+

Responses

Response samples

Content type
application/json
{
  • "encodedExtrinsic": "0x1234",
  • "payloadToSign": "0x1234",
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N"
}

Request to retire an MSA ID.

Request Body schema: application/json
required
encodedExtrinsic
required
string

Hex-encoded representation of the "RetireMsa" extrinsic

+
payloadToSign
required
string

payload to be signed

+
accountId
required
string

AccountId in hex or SS58 format

+
signature
required
string

signature of the owner

+

Responses

Request samples

Content type
application/json
{
  • "encodedExtrinsic": "0x1234",
  • "payloadToSign": "0x1234",
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "signature": "0x01065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

Response samples

Content type
application/json
{
  • "state": "waiting",
  • "referenceId": "string"
}

v2/accounts

Get the Sign In With Frequency Redirect URL

query Parameters
credentials
Array of strings
Example: credentials=VerifiedGraphKeyCredential&credentials=VerifiedEmailAddressCredential&credentials=VerifiedPhoneNumberCredential

List of credentials using the types: "VerifiedGraphKeyCredential", "VerifiedEmailAddressCredential", and "VerifiedPhoneNumberCredential". Note that Contact related verifiable credentials will be nested into an anyOf request form.

+
permissions
Array of strings
Example: permissions=dsnp.broadcast@v2&permissions=dsnp.private-follows@v1&permissions=dsnp.reply@v2&permissions=dsnp.reaction@v1&permissions=dsnp.tombstone@v2&permissions=dsnp.update@v2&permissions=frequency.default-token-address@v1

The list of permissions using the Frequency Schema names and versions. Pattern: <namespace>.<name>@v<version integer> e.g. dsnp.broadcast@v2

+
callbackUrl
required
string
Example: callbackUrl=http://localhost:3000/login/callback

The URL that will be called when the authentication process is completed

+

Responses

Response samples

Content type
application/json
{}

Process the result of a Sign In With Frequency v2 callback

Request Body schema: application/json
required
authorizationCode
string

The code returned from the SIWF v2 Authentication service that can be exchanged for the payload. Required unless an authorizationPayload is provided.

+
authorizationPayload
string

The SIWF v2 Authentication payload as a JSON stringified and base64url encoded value. Required unless an authorizationCode is provided.

+

Responses

Request samples

Content type
application/json
{
  • "authorizationCode": "680a0a68-6d3b-4d6d-89b7-0b01a6f7e86f",
  • "authorizationPayload": "ew0KICAidXNlclB1YmxpY0tleSI6IHsNCiAgICAiZW5jb2RlZFZhbHVlIjogIjVIWUhaOGU4a3lMRUJ1RWJzRmEyYndLWWJWU01nYVVoeW1mUlZnSDdDdU00VkNIdiIsDQogICAgImVuY29kaW5nIjogImJhc2U1OCIsDQogICAgImZvcm1hdCI6ICJzczU4IiwNCiAgICAidHlwZSI6ICJTcjI1NTE5Ig0KICB9LA0KICAidXNlcktleXMiOiBbDQogICAgew0KICAgICAgImVuY29kZWRQdWJsaWNLZXlWYWx1ZSI6ICIweGJkODk2ZmQ1NTAxZWVhMjU5ZjQ3OTg0MTVjOWZhNDQ3ZDU4ODIwZDk5YjkyNDA2NzFhNmYzNGYwYmMwM2IwMzAiLA0KICAgICAgImVuY29kZWRQcml2YXRlS2V5VmFsdWUiOiAiMHhmODExNWQzZTUwYzg2MTYzODZmMDY2ZjY1OTdlZmYwYzU3MGQ2N2M3ZTVjZDkzNjU1Njg4NGJjYzk5NDNmNDY0IiwNCiAgICAgICJlbmNvZGluZyI6ICJiYXNlMTYiLA0KICAgICAgImZvcm1hdCI6ICJiYXJlIiwNCiAgICAgICJ0eXBlIjogIlgyNTUxOSIsDQogICAgICAia2V5VHlwZSI6ICJkc25wLnB1YmxpYy1rZXkta2V5L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3JpdHlQcm9vZiIsDQogICAgICAgICJ2ZXJpZmljYXRpb25NZXRob2QiOiAiZGlkOndlYjp0ZXN0bmV0LmZyZXF1ZW5jeWFjY2Vzcy5jb20jejZNa3c0eVg0YzJaM3NlU1NkblI5c3ZFTjZGdjdVa1U4anJOUE1rTXd0WkNvQVZHIiwNCiAgICAgICAgImNyeXB0b3N1aXRlIjogImVkZHNhLXJkZmMtMjAyMiIsDQogICAgICAgICJwcm9vZlB1cnBvc2UiOiAiYXNzZXJ0aW9uTWV0aG9kIiwNCiAgICAgICAgInByb29mVmFsdWUiOiAiejI5YWRmdG5lSG5LeHdSOWI3Z3RSanlrTFJlR0VwdU1pWTljS0hWQ0JTejZtWThjd0ZaaUZpQVdaSGV4R3R2Qjh0YmRwZmoyRzQzeFF6dFJ6dFdhd21IRjIiDQogICAgICB9DQogICAgfQ0KICBdDQp9"
}

Response samples

Content type
application/json
{
  • "controlKey": "f6cL4wq1HUNx11TcvdABNf9UNXXoyH47mVUwT59tzSFRW8yDH",
  • "signUpReferenceId": "MjY3MjI3NWZlMGM0NTZmYjY3MWU0ZjQxN2ZiMmY5ODkyYzc1NzNiYQo",
  • "signUpStatus": "waiting",
  • "msaId": "314159265358979323846264338",
  • "email": "user@example.com",
  • "phoneNumber": "555-867-5309",
  • "graphKey": "f6Y86vfvou3d4RGjYJM2k5L7g1HMjVTDMAtVMDh8g67i3VLZi",
  • "recoverySecret": "69EC-2382-E1E6-76F3-341F-3414-9DD5-CFA5-6932-E418-9385-0358-31DF-AFEA-9828-D3B7",
  • "rawCredentials": []
}

v3/delegations

Get all delegation information associated with an MSA Id

path Parameters
msaId
required
string
Example: 3

MSA Id of the user requesting the delegation

+

Responses

Response samples

Content type
application/json
{
  • "msaId": "string",
  • "delegations": [
    ]
}

Get an MSA's delegation information for a specific provider

path Parameters
msaId
required
string
Example: 3

MSA Id of the user requesting the delegation

+
providerId
string
Example: 1

MSA Id of the provider to whom the requesting user wishes to delegate

+

Responses

Response samples

Content type
application/json
{
  • "msaId": "string",
  • "delegations": [
    ]
}

Get a properly encoded RevokeDelegationPayload that can be signed

path Parameters
accountId
required
string
Example: 1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N

AccountId in hex or SS58 format

+
providerId
required
string
Example: 1

Msa Id of provider

+

Responses

Response samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "providerId": "3",
  • "encodedExtrinsic": "0x1234",
  • "payloadToSign": "0x1234"
}

Request to revoke a delegation

Request Body schema: application/json
required
accountId
required
string

AccountId in hex or SS58 format

+
providerId
required
string

MSA Id of the provider to whom the requesting user wishes to delegate

+
encodedExtrinsic
required
string

Hex-encoded representation of the "revokeDelegation" extrinsic

+
payloadToSign
required
string

payload to be signed

+
signature
required
string

signature of the owner

+

Responses

Request samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "providerId": "3",
  • "encodedExtrinsic": "0x1234",
  • "payloadToSign": "0x1234",
  • "signature": "0x01065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

Response samples

Content type
application/json
{
  • "state": "waiting",
  • "referenceId": "string"
}

v1/handles

Request to create a new handle for an account

Request Body schema: application/json
required
accountId
required
string

AccountId in hex or SS58 format

+
required
object (HandlePayloadDto)
proof
required
string

proof is the signature for the payload

+

Responses

Request samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "payload": {
    },
  • "proof": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

Response samples

Content type
application/json
{
  • "state": "waiting",
  • "referenceId": "string"
}

Request to change a handle

Request Body schema: application/json
required
accountId
required
string

AccountId in hex or SS58 format

+
required
object (HandlePayloadDto)
proof
required
string

proof is the signature for the payload

+

Responses

Request samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "payload": {
    },
  • "proof": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

Response samples

Content type
application/json
{
  • "state": "waiting",
  • "referenceId": "string"
}

Get a properly encoded ClaimHandlePayload that can be signed.

path Parameters
newHandle
required
string >= 3 characters
Example: handle

newHandle in the request

+

Responses

Response samples

Content type
application/json
{
  • "payload": {
    },
  • "encodedPayload": "0x012345"
}

Fetch a handle given an MSA Id

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

+

Responses

Response samples

Content type
application/json
{
  • "base_handle": "string",
  • "canonical_base": "string",
  • "suffix": 0
}

v1/ics

IcsControllerV1_publishAll_v1

path Parameters
accountId
required
string
Example: 1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N

AccountId in hex or SS58 format

+
Request Body schema: application/json
required
required
object (AddNewPublicKeyAgreementRequestDto)
required
object (AddNewPublicKeyAgreementRequestDto)
required
object (UpsertPagePayloadDto)

Responses

Request samples

Content type
application/json
{
  • "addIcsPublicKeyPayload": {
    },
  • "addContextGroupPRIDEntryPayload": {
    },
  • "addContentGroupMetadataPayload": {
    }
}

health

Check the health status of the service

Responses

Check the live status of the service

Responses

Check the ready status of the service

Responses

v1/keys

Add new control keys for an MSA Id

Request Body schema: application/json
required
msaOwnerAddress
required
string

msaOwnerAddress representing the target of this request

+
msaOwnerSignature
required
string

msaOwnerSignature is the signature by msa owner

+
newKeyOwnerSignature
required
string

newKeyOwnerSignature is the signature with new key

+
required
object (KeysRequestPayloadDto)

Responses

Request samples

Content type
application/json
{
  • "msaOwnerAddress": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "msaOwnerSignature": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85",
  • "newKeyOwnerSignature": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85",
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "state": "waiting",
  • "referenceId": "string"
}

Fetch public keys given an MSA Id

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

+

Responses

Response samples

Content type
application/json
{
  • "msaKeys": { }
}

Get a properly encoded StatefulStorageItemizedSignaturePayloadV2 that can be signed.

query Parameters
msaId
required
string
Example: msaId=3

MSA Id representing the target of this request

+
newKey
required
string
Example: newKey=0x0ed2f8c714efcac51ca2325cfe95637e5e0b898ae397aa365978b7348a717d0b

New public key to be added to the account (32-byte value in hex format)

+

Responses

Response samples

Content type
application/json
{
  • "payload": {
    },
  • "encodedPayload": "0x1234"
}

Request to add a new public Key

Request Body schema: application/json
required
accountId
required
string

AccountId in hex or SS58 format

+
required
object (ItemizedSignaturePayloadDto)
proof
required
string

proof is the signature for the payload

+

Responses

Request samples

Content type
application/json
{
  • "accountId": "1LSLqpLWXo7A7xuiRdu6AQPnBPNJHoQSu8DBsUYJgsNEJ4N",
  • "payload": {
    },
  • "proof": "0x065d733ca151c9e65b78f2ba77348224d31647e6913c44ad2765c6e8ba06f834dc21d8182447d01c30f84a41d90a8f2e58001d825c6f0d61b0afe89f984eec85"
}

Response samples

Content type
application/json
{
  • "state": "waiting",
  • "referenceId": "string"
}
-

Transaction Notification API (1.0.0)

Download OpenAPI specification:

Notify transaction

Request Body schema: application/json
required
One of
providerId
required
string
referenceId
required
string
msaId
required
string
"CREATE_HANDLE" (string) or "CHANGE_HANDLE" (string)
handle
required
string

Responses

Request samples

Content type
application/json
Example
{
  • "providerId": "string",
  • "referenceId": "string",
  • "msaId": "string",
  • "transactionType": "CREATE_HANDLE",
  • "handle": "string"
}
+ " fill="currentColor">

Transaction Notification API (1.0.0)

Download OpenAPI specification:

Notify transaction

Request Body schema: application/json
required
One of
providerId
required
string
referenceId
required
string
msaId
required
string
"CREATE_HANDLE" (string) or "CHANGE_HANDLE" (string)
handle
required
string

Responses

Request samples

Content type
application/json
Example
{
  • "providerId": "string",
  • "referenceId": "string",
  • "msaId": "string",
  • "transactionType": "CREATE_HANDLE",
  • "handle": "string"
}
-

Content Publishing Worker Service (2.0)

Download OpenAPI specification:

Content Publishing Worker Service API

-

health

Check the health status of the service

Responses

Check the live status of the service

Responses

Check the ready status of the service

Responses

+ " fill="currentColor">

Content Publishing Worker Service (2.0)

Download OpenAPI specification:

Content Publishing Worker Service API

+

health

Check the health status of the service

Responses

Check the live status of the service

Responses

Check the ready status of the service

Responses

-

Content Publishing Service API (1.0)

Download OpenAPI specification:

Content Publishing Service API

-

v1/asset

Upload asset files [deprecated; use `POST /v2/asset/upload` instead] Deprecated

Request Body schema: multipart/form-data
required

Asset files

-
files
required
Array of strings <binary> [ items <binary > ]

Responses

Response samples

Content type
application/json
{
  • "assetIds": [
    ]
}

v2/asset

Upload asset files

Request Body schema: multipart/form-data
required

Asset files

-
files
required
Array of strings <binary> [ items <binary > ]

Responses

Response samples

Content type
application/json
{
  • "files": [
    ]
}

v1/content

Create DSNP Broadcast for user

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

-
Request Body schema: application/json
required
required
object (NoteActivityDto)

Responses

Request samples

Content type
application/json
{
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

Create DSNP Reply for user

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

-
Request Body schema: application/json
required
inReplyTo
required
string

Target DSNP Content URI

-
required
object (NoteActivityDto)

Responses

Request samples

Content type
application/json
{
  • "inReplyTo": "dsnp://78187493520/bdyqdua4t4pxgy37mdmjyqv3dejp5betyqsznimpneyujsur23yubzna",
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

Create DSNP Reaction for user

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

-
Request Body schema: application/json
required
emoji
required
string non-empty DSNP_EMOJI_REGEX

the encoded reaction emoji

-
apply
required
number

Indicates whether the emoji should be applied and if so, at what strength

-
inReplyTo
required
string

Target DSNP Content URI

-

Responses

Request samples

Content type
application/json
{
  • "emoji": "😀",
  • "apply": 1,
  • "inReplyTo": "dsnp://78187493520/bdyqdua4t4pxgy37mdmjyqv3dejp5betyqsznimpneyujsur23yubzna"
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

Update DSNP Content for user

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

-
Request Body schema: application/json
required
targetAnnouncementType
required
string
Enum: "broadcast" "reply"

Target announcement type

-
targetContentHash
required
string

Target DSNP Content Hash

-
required
object (NoteActivityDto)

Responses

Request samples

Content type
application/json
{
  • "targetAnnouncementType": "broadcast",
  • "targetContentHash": "bdyqdua4t4pxgy37mdmjyqv3dejp5betyqsznimpneyujsur23yubzna",
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

Delete DSNP Content for user [deprecated; use `POST /v2/content/{msaId}/tombstones` instead] Deprecated

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

-
Request Body schema: application/json
required
targetAnnouncementType
required
string
Enum: "broadcast" "reply"

Target announcement type

-
targetContentHash
required
string

Target DSNP Content Hash

-

Responses

Request samples

Content type
application/json
{
  • "targetAnnouncementType": "broadcast",
  • "targetContentHash": "bdyqdua4t4pxgy37mdmjyqv3dejp5betyqsznimpneyujsur23yubzna"
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

v2/content

Create on-chain content for a given schema

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

-
Request Body schema: application/json
required
schemaId
required
number

Content Publishing Service API (1.0)

Download OpenAPI specification:

Content Publishing Service API

+

v1/asset

Upload asset files [deprecated; use `POST /v2/asset/upload` instead] Deprecated

Request Body schema: multipart/form-data
required

Asset files

+
files
required
Array of strings <binary> [ items <binary > ]

Responses

Response samples

Content type
application/json
{
  • "assetIds": [
    ]
}

v2/asset

Upload asset files

Request Body schema: multipart/form-data
required

Asset files

+
files
required
Array of strings <binary> [ items <binary > ]

Responses

Response samples

Content type
application/json
{
  • "files": [
    ]
}

v1/content

Create DSNP Broadcast for user

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

+
Request Body schema: application/json
required
required
object (NoteActivityDto)

Responses

Request samples

Content type
application/json
{
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

Create DSNP Reply for user

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

+
Request Body schema: application/json
required
inReplyTo
required
string

Target DSNP Content URI

+
required
object (NoteActivityDto)

Responses

Request samples

Content type
application/json
{
  • "inReplyTo": "dsnp://78187493520/bdyqdua4t4pxgy37mdmjyqv3dejp5betyqsznimpneyujsur23yubzna",
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

Create DSNP Reaction for user

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

+
Request Body schema: application/json
required
emoji
required
string non-empty DSNP_EMOJI_REGEX

the encoded reaction emoji

+
apply
required
number

Indicates whether the emoji should be applied and if so, at what strength

+
inReplyTo
required
string

Target DSNP Content URI

+

Responses

Request samples

Content type
application/json
{
  • "emoji": "😀",
  • "apply": 1,
  • "inReplyTo": "dsnp://78187493520/bdyqdua4t4pxgy37mdmjyqv3dejp5betyqsznimpneyujsur23yubzna"
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

Update DSNP Content for user

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

+
Request Body schema: application/json
required
targetAnnouncementType
required
string
Enum: "broadcast" "reply"

Target announcement type

+
targetContentHash
required
string

Target DSNP Content Hash

+
required
object (NoteActivityDto)

Responses

Request samples

Content type
application/json
{
  • "targetAnnouncementType": "broadcast",
  • "targetContentHash": "bdyqdua4t4pxgy37mdmjyqv3dejp5betyqsznimpneyujsur23yubzna",
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

Delete DSNP Content for user [deprecated; use `POST /v2/content/{msaId}/tombstones` instead] Deprecated

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

+
Request Body schema: application/json
required
targetAnnouncementType
required
string
Enum: "broadcast" "reply"

Target announcement type

+
targetContentHash
required
string

Target DSNP Content Hash

+

Responses

Request samples

Content type
application/json
{
  • "targetAnnouncementType": "broadcast",
  • "targetContentHash": "bdyqdua4t4pxgy37mdmjyqv3dejp5betyqsznimpneyujsur23yubzna"
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

v2/content

Create on-chain content for a given schema

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

+
Request Body schema: application/json
required
schemaId
required
number

Schema ID of the OnChain schema this message is being posted to. +" class="sc-iJnaPZ sc-cCjUiJ hhTNpj cUOEXs">

Schema ID of the OnChain schema this message is being posted to. @example: 16

-
payload
required
string/^0x/

Payload bytes encoded as a hex string using the schema defined by schemaId

-
published
required
string

The time of publishing ISO8601

-

Responses

Request samples

Content type
application/json
{
  • "schemaId": 0,
  • "payload": "string",
  • "published": "1970-01-01T00:00:00+00:00"
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

Create off-chain batch content announcements

Request Body schema: application/json
required
required
Array of objects (BatchFileDto)

Responses

Request samples

Content type
application/json
{
  • "batchFiles": [
    ]
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

Post an announcement that previously-announced content is invalid/revoked

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

-
Request Body schema: application/json
required
targetAnnouncementType
required
string
Enum: "broadcast" "reply"

Target announcement type

-
targetContentHash
required
string

Target DSNP Content Hash

-

Responses

Request samples

Content type
application/json
{
  • "targetAnnouncementType": "broadcast",
  • "targetContentHash": "bdyqdua4t4pxgy37mdmjyqv3dejp5betyqsznimpneyujsur23yubzna"
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

health

Check the health status of the service

Responses

Check the live status of the service

Responses

Check the ready status of the service

Responses

v1/profile

Update a user's Profile

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

-
Request Body schema: application/json
required
required
object (ProfileActivityDto)

Responses

Request samples

Content type
application/json
{
  • "profile": {
    }
}
+
payload
required
string/^0x/

Payload bytes encoded as a hex string using the schema defined by schemaId

+
published
required
string

The time of publishing ISO8601

+

Responses

Request samples

Content type
application/json
{
  • "schemaId": 0,
  • "payload": "string",
  • "published": "1970-01-01T00:00:00+00:00"
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

Create off-chain batch content announcements

Request Body schema: application/json
required
required
Array of objects (BatchFileDto)

Responses

Request samples

Content type
application/json
{
  • "batchFiles": [
    ]
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

Post an announcement that previously-announced content is invalid/revoked

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

+
Request Body schema: application/json
required
targetAnnouncementType
required
string
Enum: "broadcast" "reply"

Target announcement type

+
targetContentHash
required
string

Target DSNP Content Hash

+

Responses

Request samples

Content type
application/json
{
  • "targetAnnouncementType": "broadcast",
  • "targetContentHash": "bdyqdua4t4pxgy37mdmjyqv3dejp5betyqsznimpneyujsur23yubzna"
}

Response samples

Content type
application/json
{
  • "referenceId": "string"
}

health

Check the health status of the service

Responses

Check the live status of the service

Responses

Check the ready status of the service

Responses

v1/profile

Update a user's Profile

path Parameters
msaId
required
string
Example: 2

Msa Id of requested account

+
Request Body schema: application/json
required
required
object (ProfileActivityDto)

Responses

Request samples

Content type
application/json
{
  • "profile": {
    }
}
-

Content Watcher Service API (1.0)

Download OpenAPI specification:

Content Watcher Service API

-

health

Check the health status of the service

Responses

Check the live status of the service

Responses

Check the ready status of the service

Responses

v1/scanner

Reset blockchain scan to a specific block number or offset from the current position

Request Body schema: application/json
required
blockNumber
number [ 0 .. 4294967296 ]

The block number to reset the scanner to

-
rewindOffset
number [ 0 .. 4294967296 ]

Number of blocks to rewind the scanner to (from blockNumber if supplied; else from latest block)

-
immediate
boolean

Whether to schedule the new scan immediately or wait for the next scheduled interval

-

Responses

Request samples

Content type
application/json
{
  • "blockNumber": 0,
  • "rewindOffset": 100,
  • "immediate": true
}

Get the current watch options for the blockchain content event scanner

Responses

Response samples

Content type
application/json
{
  • "schemaIds": [
    ],
  • "dsnpIds": [
    ]
}

Set watch options to filter the blockchain content scanner by schemas or MSA Ids

Request Body schema: application/json
required
schemaIds
Array of numbers non-empty unique

Specific schema ids to watch for

-
dsnpIds
Array of strings non-empty unique

Specific dsnpIds (msa_id) to watch for

-

Responses

Request samples

Content type
application/json
{
  • "schemaIds": [
    ],
  • "dsnpIds": [
    ]
}

Pause the blockchain scanner

Responses

Resume the blockchain content event scanner

query Parameters
immediate
boolean

Immediate: whether to resume scan immediately (true), or wait until next scheduled scan (false)

-

Responses

v1/search

Search for DSNP content by id and filters, starting from `upperBound` block and going back for `blockCount` number of blocks

Request Body schema: application/json
required
clientReferenceId
string

An optional client-supplied reference ID by which it can identify the result of this search

-
upperBoundBlock
number [ 0 .. 4294967296 ]

The highest block number to start the backward search from

-
blockCount
required
number [ 0 .. 4294967296 ]

The number of blocks to scan (backwards)

-
object

The schemaIds/dsnpIds to filter by

-
webhookUrl
required
string <uri>

A webhook URL to be notified of the results of this search

-

Responses

Request samples

Content type
application/json
{
  • "clientReferenceId": "string",
  • "upperBoundBlock": 100,
  • "blockCount": 101,
  • "filters": {
    },
  • "webhookUrl": "https://example.com"
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "jobId": "7b02edd742a653a3cf63bb0c84e43d3678aa045f"
}

v1/webhooks

Register a webhook to be called when new content is encountered on the chain

Request Body schema: application/json
required
announcementTypes
required
Array of strings (AnnouncementTypeName) non-empty
Items Enum: "tombstone" "broadcast" "reply" "reaction" "profile" "update"

Announcement types to send to the webhook

-
url
required
string <uri>

Webhook URL

-

Responses

Request samples

Content type
application/json
{}

Clear all previously registered webhooks

Responses

Get the list of currently registered webhooks

Responses

Response samples

Content type
application/json
{
  • "status": 200,
  • "registeredWebhooks": []
}
+ " fill="currentColor">

Content Watcher Service API (1.0)

Download OpenAPI specification:

Content Watcher Service API

+

health

Check the health status of the service

Responses

Check the live status of the service

Responses

Check the ready status of the service

Responses

v1/scanner

Reset blockchain scan to a specific block number or offset from the current position

Request Body schema: application/json
required
blockNumber
number [ 0 .. 4294967296 ]

The block number to reset the scanner to

+
rewindOffset
number [ 0 .. 4294967296 ]

Number of blocks to rewind the scanner to (from blockNumber if supplied; else from latest block)

+
immediate
boolean

Whether to schedule the new scan immediately or wait for the next scheduled interval

+

Responses

Request samples

Content type
application/json
{
  • "blockNumber": 0,
  • "rewindOffset": 100,
  • "immediate": true
}

Get the current watch options for the blockchain content event scanner

Responses

Response samples

Content type
application/json
{
  • "intentIds": [
    ],
  • "dsnpIds": [
    ]
}

Set watch options to filter the blockchain content scanner by schemas or MSA Ids

Request Body schema: application/json
required
intentIds
Array of numbers non-empty unique

Specific Intent ids to watch for

+
dsnpIds
Array of strings non-empty unique

Specific dsnpIds (msa_id) to watch for

+

Responses

Request samples

Content type
application/json
{
  • "intentIds": [
    ],
  • "dsnpIds": [
    ]
}

Pause the blockchain scanner

Responses

Resume the blockchain content event scanner

query Parameters
immediate
boolean

Immediate: whether to resume scan immediately (true), or wait until next scheduled scan (false)

+

Responses

v1/search

Search for DSNP content by id and filters, starting from `upperBound` block and going back for `blockCount` number of blocks

Request Body schema: application/json
required
clientReferenceId
string

An optional client-supplied reference ID by which it can identify the result of this search

+
upperBoundBlock
number [ 0 .. 4294967296 ]

The highest block number to start the backward search from

+
blockCount
required
number [ 0 .. 4294967296 ]

The number of blocks to scan (backwards)

+
object

The schemaIds/dsnpIds to filter by

+
webhookUrl
required
string <uri>

A webhook URL to be notified of the results of this search

+

Responses

Request samples

Content type
application/json
{
  • "clientReferenceId": "string",
  • "upperBoundBlock": 100,
  • "blockCount": 101,
  • "filters": {
    },
  • "webhookUrl": "https://example.com"
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "jobId": "7b02edd742a653a3cf63bb0c84e43d3678aa045f"
}

v1/webhooks

Register a webhook to be called when new content is encountered on the chain

Request Body schema: application/json
required
announcementTypes
required
Array of strings (AnnouncementTypeName) non-empty
Items Enum: "tombstone" "broadcast" "reply" "reaction" "profile" "update"

Announcement types to send to the webhook

+
url
required
string <uri>

Webhook URL

+

Responses

Request samples

Content type
application/json
{}

Clear all previously registered webhooks

Responses

Get the list of currently registered webhooks

Responses

Response samples

Content type
application/json
{
  • "status": 200,
  • "registeredWebhooks": []
}
-

Content Announcement API (1.0.0)

Download OpenAPI specification:

Notify a webhook client of a content announcement found on the blockchain

Request Body schema: application/json
required
requestId
string or null

An optional identifier for the request, may be used for tracking or correlation

-
webhookUrl
string or null

An optional webhook URL registered as part of a specific search request

-
schemaId
required
integer

Identifier for the schema being used or referenced

-
blockNumber
required
integer

The block number on the blockchain where this announcement was recorded

-
required
TombstoneAnnouncement (object) or BroadcastAnnouncement (object) or ReplyAnnouncement (object) or ReactionAnnouncement (object) or ProfileAnnouncement (object) or UpdateAnnouncement (object)

Responses

Request samples

Content type
application/json
{
  • "requestId": "string",
  • "webhookUrl": "string",
  • "schemaId": 0,
  • "blockNumber": 0,
  • "announcement": {
    }
}
+ " fill="currentColor">

Content Announcement API (1.0.0)

Download OpenAPI specification:

Notify a webhook client of a content announcement found on the blockchain

Request Body schema: application/json
required
requestId
string or null

An optional identifier for the request, may be used for tracking or correlation

+
webhookUrl
string or null

An optional webhook URL registered as part of a specific search request

+
schemaId
required
integer

Identifier for the schema being used or referenced

+
blockNumber
required
integer

The block number on the blockchain where this announcement was recorded

+
required
TombstoneAnnouncement (object) or BroadcastAnnouncement (object) or ReplyAnnouncement (object) or ReactionAnnouncement (object) or ProfileAnnouncement (object) or UpdateAnnouncement (object)

Responses

Request samples

Content type
application/json
{
  • "requestId": "string",
  • "webhookUrl": "string",
  • "schemaId": 0,
  • "blockNumber": 0,
  • "announcement": {
    }
}