Skip to main content
POST
/
credentials
/
issue-on-behalf
Issue credential on behalf
curl --request POST \
  --url https://api.sandbox.mocachain.org/v1/credentials/issue-on-behalf \
  --header 'Content-Type: application/json' \
  --header 'x-partner-auth: <api-key>' \
  --data '
{
  "issuerDid": "did:air:id:test:5P44fsVUhPctDTWH2Nz26pZJFsg6CqyiAELTGeVQDB",
  "credentialId": "c21s70g0i54sn0023172Cv",
  "credentialSubject": {
    "age": 25,
    "location": "United States",
    "isMember": true
  },
  "onDuplicate": "revoke"
}
'
{
  "coreClaimHash": "239704895d0c4693d33ee7ab9e37c6eb295f178d80074a32d4ace53b1a779c44",
  "credentialId": "c21s70g0i54sn0023172Cv",
  "userUuid": "7f01c42c-02cf-4325-96ed-ba034700f724"
}

Documentation Index

Fetch the complete documentation index at: https://docs.moca.network/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-partner-auth
string
header
required

A signed Partner JWT containing partnerId, email, scope, and exp claims. See Partner Authentication for setup.

Body

application/json
issuerDid
string
required

Your Issuer DID from the Developer Dashboard.

credentialId
string
required

The Issuance Program ID.

credentialSubject
object
required

Credential data matching your schema definition. Add your own key-value pairs.

onDuplicate
enum<string>
default:revoke

ignore returns the existing credential. revoke revokes the old credential and issues a new one.

Available options:
ignore,
revoke

Response

Credential issuance submitted. Use the coreClaimHash to poll for on-chain status.

coreClaimHash
string

Unique issuance identifier. Use this to poll the status endpoint.

credentialId
string

The Issuance Program ID (echoed from request).

userUuid
string<uuid>

UUID of the user who received the credential.