API Reference¶
Complete API reference for capiscio-server. Interactive documentation is available at /swagger/index.html when the server is running.
Interactive Docs
For the best experience, use the Swagger UI when running locally.
Base URL¶
| Environment | URL |
|---|---|
| Production | https://registry.capisc.io |
| Local | http://localhost:8080 |
Authentication¶
All /v1/* endpoints require authentication via API key:
Public endpoints (JWKS, DID resolution) do not require authentication.
Agents¶
List Agents¶
Retrieve all agents for the authenticated user.
Response:
{
"success": true,
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "My Agent",
"domain": "my-agent.example.com",
"status": "enabled",
"trustLevel": "2",
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-01-15T10:30:00Z"
}
]
}
Create Agent¶
Register a new agent.
Request Body:
{
"name": "My Agent",
"domain": "my-agent.example.com",
"description": "Production agent for task processing"
}
Response:
{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "My Agent",
"domain": "my-agent.example.com",
"status": "enabled",
"createdAt": "2025-01-15T10:30:00Z"
},
"message": "Agent created successfully"
}
Get Agent¶
Retrieve a specific agent by ID.
Parameters:
| Name | Type | Description |
|---|---|---|
id | path | Agent UUID |
Update Agent¶
Update an existing agent.
Delete Agent¶
Delete an agent.
Disable Agent¶
Disable an agent (prevents badge issuance).
Enable Agent¶
Re-enable a disabled agent.
Badges¶
Issue Badge¶
Issue a new trust badge for an agent. The badge is signed by the CapiscIO CA.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | Agent's verified domain |
trustLevel | string | No | Trust level: "1", "2", "3", or "4" (default: "1") |
audience | string[] | No | Allowed verifier URLs |
ttl | int | No | Badge TTL in seconds (default: 300) |
Response:
{
"success": true,
"data": {
"token": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9...",
"jti": "badge-uuid-here",
"subject": "did:web:registry.capisc.io:agents:550e8400-e29b-41d4-a716-446655440000",
"trustLevel": "2",
"expiresAt": "2025-01-15T10:35:00Z"
}
}
Error Responses:
| Status | Description |
|---|---|
| 400 | Invalid request (missing domain, invalid trust level) |
| 403 | Agent is disabled |
| 404 | Agent not found |
Verify Badge¶
Verify a trust badge token.
Request Body:
Response:
{
"success": true,
"data": {
"valid": true,
"claims": {
"iss": "https://registry.capisc.io",
"sub": "did:web:registry.capisc.io:agents:550e8400",
"exp": 1705316100,
"iat": 1705315800,
"vc": {
"credentialSubject": {
"domain": "my-agent.example.com",
"level": "2"
}
}
}
}
}
Get JWKS¶
Get the CA's public key set for badge verification. This endpoint is public.
Response:
{
"keys": [
{
"kty": "OKP",
"crv": "Ed25519",
"x": "base64url-encoded-public-key",
"kid": "capiscio-ca-1705315800",
"alg": "EdDSA",
"use": "sig"
}
]
}
DID Resolution¶
Get DID Document¶
Retrieve the W3C DID Document for an agent. Used for did:web resolution.
Response:
{
"@context": [
"https://www.w3.org/ns/did/v1",
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"id": "did:web:registry.capisc.io:agents:550e8400",
"verificationMethod": [
{
"id": "did:web:registry.capisc.io:agents:550e8400#key-1",
"type": "Ed25519VerificationKey2020",
"controller": "did:web:registry.capisc.io:agents:550e8400",
"publicKeyMultibase": "z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK"
}
],
"authentication": [
"did:web:registry.capisc.io:agents:550e8400#key-1"
],
"assertionMethod": [
"did:web:registry.capisc.io:agents:550e8400#key-1"
]
}
API Keys¶
List API Keys¶
List all API keys for the authenticated user.
Create API Key¶
Create a new API key.
Request Body:
Response:
{
"success": true,
"data": {
"id": "key-uuid",
"name": "Production Key",
"key": "cpsc_live_abc123...",
"createdAt": "2025-01-15T10:30:00Z"
},
"message": "API key created. Save it now - it won't be shown again."
}
Save Your Key
The full API key is only shown once at creation time. Store it securely.
Delete API Key¶
Delete an API key.
Error Responses¶
All error responses follow this format:
| Status | Description |
|---|---|
| 400 | Bad Request - Invalid input |
| 401 | Unauthorized - Missing or invalid API key |
| 403 | Forbidden - Action not allowed |
| 404 | Not Found - Resource doesn't exist |
| 500 | Internal Server Error |
Rate Limiting¶
API requests are rate-limited:
| Endpoint | Limit |
|---|---|
| Badge issuance | 100/min per agent |
| Other endpoints | 1000/min per API key |
Rate limit headers are included in responses:
OpenAPI Specification¶
The full OpenAPI 2.0 (Swagger) specification is available at:
- JSON:
/swagger/doc.json - Interactive UI:
/swagger/index.html
Download the spec: