Skip to main content
POST
/
api
/
v1
/
principals
/
provision
Provision agent
import requests

url = "https://api.example.com/api/v1/principals/provision"

payload = {
    "token": "<string>",
    "invitation_code": "<string>",
    "name": "<string>"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "result": {
    "agent_id": "<string>",
    "api_key": "<string>",
    "status": "active",
    "owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "onboarding_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "success": true,
  "suggestion": "",
  "message": "",
  "meta": {
    "total": 123,
    "offset": 123,
    "limit": 123,
    "has_more": true,
    "after": "<string>",
    "before": "<string>"
  }
}

Body

application/json

Request payload for agent provisioning.

token
string | null

The pairing code from the Cobo Agentic Wallet app. If provided, runs token-based provisioning and binds the agent to the owner immediately. If omitted, runs agent-first provisioning and returns an active agent credential.

invitation_code
string | null

An optional invitation code to apply during provisioning.

name
string | null

An optional display name for the provisioned agent. Defaults to 'Provisioned Agent' if omitted.

Response

Already exists (idempotent). Successful Response

result
ProvisionResponse · object
required

Provisioning result for both token and agent-first modes.

success
boolean
default:true
suggestion
string
default:""
message
string
default:""
meta
PaginationMeta · object

Pagination metadata for list responses.

Supports both legacy offset-based and cursor-based pagination. Cursor fields (has_more, after, before) are populated for cursor-paginated endpoints. Legacy fields (offset, limit) are populated when the caller uses the deprecated offset parameter.