Cotal
DocsAPI Reference

Issue tool result consent

POST
/tool-result-consent/issue

Issue signed consent for the exact holder and target after verifying a fresh human proof. This route never returns private result content. ttlMs is bounded to 24 hours. Source parser and contract are packages/core/src/private-tool-results.ts and implementations/auth/src/tool-result-consent.ts.

Authorization

HostCapability
headerAuthorizationBearer <token>

Exact exchange capability from the owner-private auth-service discovery record. This is not an IdP JWT or actor bearer.

Request Body

application/json
  1. body
id*string
Match^[A-Za-z0-9_-]{1,200}$
idpToken*string
Length1 <= length <= 16384
subject*string
Length1 <= length <= 512
accountPublicKey*string
holder*
target*
ttlMs*integer
Range1 <= value <= 86400000

Response Body

The host decision completed.

application/json
  1. response
consent*
Example Request
curl -X POST 'http://127.0.0.1:12345/tool-result-consent/issue' \  -H 'Content-Type: application/json' \  -d '{  "id": "string",  "idpToken": "string",  "subject": "string",  "accountPublicKey": "string",  "holder": {    "actor": "string",    "lifecycleUid": "string"  },  "target": {    "owner": "string",    "actor": "string",    "lifecycleUid": "string"  },  "ttlMs": 1}'
Example Response
{  "consent": {    "v": 1,    "kind": "tool-result-consent",    "id": "string",    "space": "string",    "target": {      "owner": "string",      "actor": "string",      "lifecycleUid": "string"    },    "holder": {      "owner": "string",      "actor": "string"    },    "iat": 0,    "exp": 0,    "issuer": {      "keyId": "string"    },    "sig": "string"  }}

See the HTTP interface overview for authentication and access requirements.

Complete HTTP contract
POST /tool-result-consent/issue

Issue signed consent for the exact holder and target after verifying a fresh human proof. This route never returns private result content. ttlMs is bounded to 24 hours. Source parser and contract are packages/core/src/private-tool-results.ts and implementations/auth/src/tool-result-consent.ts.

Parameters

No operation parameters.

Request body

The request uses the schema below.

Required: yes.

Content type: application/json.

{
  "$ref": "#/components/schemas/ConsentRequest"
}

Responses

HTTP 200

The host decision completed.

Cache-Control: Consent responses are not cached.

Content type: application/json.

{
  "type": "object",
  "properties": {
    "consent": {
      "$ref": "#/components/schemas/Consent"
    }
  },
  "required": [
    "consent"
  ],
  "additionalProperties": false
}

HTTP 400

Malformed input or any request-body read failure, including a body over 65536 bytes.

Content type: application/json.

{
  "$ref": "#/components/schemas/Error"
}

HTTP 401

Missing or invalid loopback capability.

Content type: application/json.

{
  "$ref": "#/components/schemas/Error"
}

HTTP 403

An Origin header or failed authority/proof check is refused.

Content type: application/json.

{
  "$ref": "#/components/schemas/Error"
}

HTTP 405

Only POST is accepted.

Content type: application/json.

{
  "$ref": "#/components/schemas/Error"
}

HTTP 409

The consent ID is already recorded.

Content type: application/json.

{
  "$ref": "#/components/schemas/Error"
}

HTTP 415

Content-Type must be application/json.

Content type: application/json.

{
  "$ref": "#/components/schemas/Error"
}

HTTP 429

Invalid-capability attempts exceeded the rolling-minute limit.

Content type: application/json.

{
  "$ref": "#/components/schemas/Error"
}

HTTP 503

Consent signer is unavailable or issuance outcome is unknown.

Content type: application/json.

{
  "$ref": "#/components/schemas/Error"
}

Authentication and access: Host-only HTTP operations of the stock auth service. These six routes exist only on the loopback listener and return 404 on the public listener. The owner-private auth-service discovery record supplies its port and exchange capability. Every operation requires the exact Authorization bearer capability, application/json and no Origin header. Requests match the exact target, so query strings and trailing slashes return 404. Bodies default to 65536 bytes. More than 30 invalid capability attempts in a rolling minute receive 429.

The loopback listener also serves /health, /jwks, /exchange, /manager-service-authority, /manager-instances, /service-endpoint-authority, /service-endpoint-host and /chat-session/open, /chat-session/bearer, /chat-session/retire. Their public request and response shapes are in the Auth HTTP API. Proof operations additionally require the loopback capability. The loopback /health handler also accepts other methods. Elevated exchange views and operator host operations are loopback-only. Mesh discovery is public-listener-only. This implementation reference does not establish a stable cloud API.

OpenAPI specification contains the referenced response schemas. Complete Markdown reference.