Skip to main content
POST
/
agents
/
{agentId}
/
did
/
rotate
cURL
curl --request POST \
  --url https://api.useanima.sh/v1/agents/{agentId}/did/rotate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "did": "<string>",
  "didDocument": {
    "@context": [
      "<string>"
    ],
    "id": "<string>",
    "verificationMethod": [
      {
        "id": "<string>",
        "type": "<string>",
        "controller": "<string>",
        "publicKeyJwk": {}
      }
    ],
    "authentication": [
      "<string>"
    ],
    "controller": "<string>",
    "assertionMethod": [
      "<string>"
    ],
    "service": [
      {
        "id": "<string>",
        "type": "<string>",
        "serviceEndpoint": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer

Path Parameters

agentId
required

Agent identifier

Pattern: ^[0-9a-z]+$

Body

application/json

Input for rotating an agent's DID keys

Response

200 - application/json

OK

Output after rotating agent keys

did
string
required

The agent's DID

didDocument
object
required

Updated DID Document with new keys