OpenClaw EnterpriseDOCSGitHub

Development OCC API reference

Version 0.1.0; OpenAPI 3.1.0.

This reference is generated from the checked-in OpenAPI contract. Run pnpm openapi:generate after changing an API route or schema; pnpm openapi:check verifies the generated contract, this reference, and the API cheat sheet.

The exported contract comes from the development-enabled OCC app, which is why the generated title is Development OCC API. Use POST /installation/bootstrap only for development or bootstrap flows that create the first Installation; production bootstraps through the Helm initialization Job before serving requests. After bootstrap, production uses the same authenticated controller resource operations through the selected Drivers and settings described in settings.

See authentication for supported credentials and their scope.

Table of contents

Error responses

Non-success JSON responses use the following envelope. Each operation lists its supported status codes. A NUL character or an unpaired UTF-16 surrogate in any request body string, object key or path parameter is refused with 400 INVALID_REQUEST. A JSON body with a value more than 24 levels below its root is refused with 400 INVALID_REQUEST and a TOO_DEEP detail before it is parsed, so that answer comes before any other body error. Operations that take a request body list 413 and 415. Any request whose declared body size exceeds the route's limit is refused with 413 PAYLOAD_TOO_LARGE, and any POST, PUT, PATCH or DELETE request with a body that is not JSON with 415 UNSUPPORTED_MEDIA_TYPE, even on an operation that takes no body. A query string sent to an operation that lists no query parameters is refused with 400 INVALID_REQUEST, except on the sign-in, sign-out, session and provider operations under /api/auth, which do not refuse one; most operations that take no body refuse a JSON body the same way. A detail path longer than 512 characters is cut to its leading whole segments (or the start of a long first key, keeping whole ~0 and ~1 escapes). When whole segments were dropped, a contract validation message says that the cut path contains the offending field. To fit the 256-character message cap, a message cuts long paths (ending them with …) and shows fewer problems before it cuts any problem wording; details keeps the paths.

Field Type Required Constraints
error object Yes —
error.code "INVALID_REQUEST" or "UNAUTHENTICATED" or "FORBIDDEN" or "NOT_FOUND" or "METHOD_NOT_ALLOWED" or "INSTALLATION_EXISTS" or "RESOURCE_CONFLICT" or "AGENT_DELETING" or "NAMESPACE_NOT_READY" or "NAMESPACE_NOT_EMPTY" or "PAYLOAD_TOO_LARGE" or "UNSUPPORTED_MEDIA_TYPE" or "UNKNOWN_OUTCOME" or "NOT_IMPLEMENTED" or "INTERNAL_ERROR" or "DEPENDENCY_UNAVAILABLE" or "CREDENTIAL_GATEWAY_NOT_CONFIGURED" or "CREDENTIAL_WITHDRAWAL_IN_PROGRESS" or "CREDENTIAL_TOKEN_UNSETTLED" or "SANDBOX_POLICY_PROTECTED_EXECUTION" or "REPOSITORY_GIT_SENDER_UNQUALIFIED" or "REPOSITORY_GIT_PROFILE_UNSUPPORTED" or "SERVICE_ACCOUNT_DRIVER_NOT_CONFIGURED" or "REPOSITORY_OPTIONS_UNAVAILABLE" or "MODEL_DISCOVERY_CREDENTIALS_REJECTED" or "MODEL_DISCOVERY_RATE_LIMITED" or "MODEL_DISCOVERY_UNAVAILABLE" or "MODEL_DISCOVERY_INVALID_RESPONSE" or "PLUGIN_DISCOVERY_CREDENTIALS_REJECTED" or "PLUGIN_DISCOVERY_RATE_LIMITED" or "PLUGIN_DISCOVERY_UNAVAILABLE" or "PLUGIN_DISCOVERY_INVALID_RESPONSE" or "CHANNEL_DIRECTORY_CREDENTIALS_REJECTED" or "CHANNEL_DIRECTORY_MISSING_SCOPE" or "CHANNEL_DIRECTORY_RATE_LIMITED" or "CHANNEL_DIRECTORY_INVALID_RESPONSE" or "CHANNEL_DIRECTORY_UNAVAILABLE" or "CHANNEL_CREDENTIAL_ROLE_MISMATCH" or "CHANNEL_CREDENTIAL_CREDENTIALS_REJECTED" or "CHANNEL_CREDENTIAL_UNAVAILABLE" or "CHANNEL_CREDENTIAL_BINDING_REQUIRED" or "RUNTIME_LOGS_CURSOR_INVALID" or "RUNTIME_LOGS_POD_INVALID" or "RUNTIME_LOGS_SOURCE_UNAVAILABLE" or "NATIVE_ADMIN_RETURN_RATE_LIMITED" or "RUNTIME_LOGS_RATE_LIMITED" or "RUNTIME_LOGS_CLUSTER_RBAC" or "RUNTIME_LOGS_SANDBOX_NOT_FOUND" or "RUNTIME_LOGS_UNAVAILABLE" or "RUNTIME_LOGS_AUDIT_UNAVAILABLE" or "RUNTIME_LOGS_TIMEOUT" or "RUNTIME_CREDENTIALS_CLUSTER_RBAC" Yes —
error.details array<object> No max items: 32
error.details[].code "REQUIRED" or "UNKNOWN_FIELD" or "INVALID_TYPE" or "INVALID_FORMAT" or "INVALID_VALUE" or "TOO_LONG" or "TOO_DEEP" or "INVALID_RANGE" or "OUTSIDE_CEILING" Yes —
error.details[].message string No max length: 512
error.details[].path string Yes max length: 512; pattern: ^(?:/(?:[^~/]|~0|~1)*)*$
error.message string Yes min length: 1; max length: 256
error.reason "credential_registration_pending" No On credential source DELETE with 503 DEPENDENCY_UNAVAILABLE, registration may still be completing. Retry after the whole seconds in the Retry-After header; the source remains until deletion completes.
error.remainingResources array<object> No max items: 7; Present for NAMESPACE_NOT_EMPTY. Each remaining resource kind reports its total count and up to 20 IDs, only of resources the caller can read. Pending Agent provisioning has no resource IDs. Remove the listed resources and retry to discover any others.
error.remainingResources[].count integer Yes minimum: 0
error.remainingResources[].ids array<string> Yes max items: 20
error.remainingResources[].kind string Yes min length: 1; max length: 64
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Browse interactive examples in the API explorer.

Resources

Resource Operations
Authentication 23 operations
Backends 1 operation
Connections 15 operations
Installation 5 operations
Namespaces 7 operations
Agents 53 operations
Agent deployments 4 operations
Agent revisions 2 operations
Configurations 4 operations
Credential sources 6 operations
IAM 11 operations
Presets 5 operations
Secrets 5 operations
Service accounts 6 operations

Operations

Authentication

Operation Summary
POST /api/auth/accounts Create a local auth account as an Installation administrator
GET /api/auth/accounts/{userId} Inspect current human account state
POST /api/auth/accounts/{userId}/disable Disable a human account
POST /api/auth/accounts/{userId}/enable Re-enable a disabled human account
POST /api/auth/accounts/{userId}/enrol Enrol an existing account that activation skipped
POST /api/auth/accounts/{userId}/methods/{methodId}/detach Detach an external sign-in identity from an account
POST /api/auth/accounts/{userId}/providers/google Attach an exact Google identity to an existing account
POST /api/auth/accounts/{userId}/providers/oidc Attach an exact OIDC identity to an existing account
POST /api/auth/accounts/{userId}/revoke Revoke all sessions for a human account
GET /api/auth/providers List configured browser sign-in methods
GET /api/auth/providers/google/callback Complete an enrolled Google sign-in
POST /api/auth/providers/google/result Confirm which session a Google sign-in created
POST /api/auth/providers/google/start Start Google sign-in for an enrolled account
GET /api/auth/providers/oidc/callback Complete an enrolled OIDC sign-in
POST /api/auth/providers/oidc/result Confirm which session an OIDC sign-in created
POST /api/auth/providers/oidc/start Start OIDC sign-in for an enrolled account
GET /api/auth/recovery Inspect the recovery account designation
POST /api/auth/recovery Move the recovery designation to another Installation administrator
POST /api/auth/service-keys Issue a service API key
DELETE /api/auth/service-keys/{keyId} Revoke a service API key
GET /api/auth/session Inspect authentication without revealing session tokens
POST /api/auth/sign-in/email Sign in with email and password
POST /api/auth/sign-out Sign out of the current session

POST /api/auth/accounts

Create a local auth account as an Installation administrator

Operation ID: createAuthAccount

Permissions: Requires administer permission on the Installation. Creates a Better Auth account and an explicit IAM Principal in one transaction. Supplying roleId also creates a binding to that existing IAM Role; omitting roleId creates no grants. Public signup remains disabled.

Action Resource Scope
administer installation requested
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
email string Yes min length: 3; max length: 320
name string No min length: 1; max length: 200
password string Yes min length: 12; max length: 128
roleId string No min length: 1; max length: 200

Example request

json
{  "email": "admin@example.com",  "name": "Documentation administrator",  "password": "replace-with-a-unique-password"}
Responses
Status Meaning
201 Created
400 Bad Request
401 Unauthorized
403 Forbidden
409 Conflict
413 Payload Too Large
415 Unsupported Media Type
429 Too many account creation requests; wait for Retry-After
503 Service Unavailable

201 response body: application/json

Field Type Required Constraints
data object Yes —
data.email string (email) Yes —
data.id string Yes —
data.name string Yes —
data.principalId string Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "email": "admin@example.com",    "id": "user-docs-admin",    "name": "Documentation administrator",    "principalId": "principal-administrator"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /api/auth/accounts/{userId}

Inspect current human account state

Operation ID: getAuthAccount

Permissions: Requires a current human Native IAM Installation administrator and trusted Origin. Returns guarded present state, not a receipt for any prior operation.

Action Resource Scope
administer installation requested
Parameters
Name In Type Required Constraints Example
userId path string Yes min length: 1; max length: 200 "user-docs-admin"
Responses
Status Meaning
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
409 Conflict
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.disabled boolean Yes —
data.methods array<object> Yes —
data.methods[].methodId string Yes —
data.methods[].providerId string Yes —
data.methods[].subject string Yes —
data.principalId string Yes —
data.userId string Yes —
data.version integer Yes minimum: 1
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "disabled": false,    "methods": [      {        "methodId": "method-password",        "providerId": "credential",        "subject": "user-docs-admin"      }    ],    "principalId": "principal-administrator",    "userId": "user-docs-admin",    "version": 1  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /api/auth/accounts/{userId}/disable

Disable a human account

Operation ID: disableAuthAccount

Permissions: Requires a current human Native IAM Installation administrator who holds every grant of the target account's Principal, trusted Origin and expectedVersion from a guarded account read. Commits state and audit together. An unknown outcome must be inspected without automatic retry; present state does not attribute the earlier request.

Action Resource Scope
administer installation requested
Parameters
Name In Type Required Constraints Example
userId path string Yes min length: 1; max length: 200 "user-docs-admin"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
expectedVersion integer Yes minimum: 1; maximum: 2147483647

Example request

json
{  "expectedVersion": 1}
Responses
Status Meaning
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
409 Conflict
413 Payload Too Large
415 Unsupported Media Type
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.userId string Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "userId": "user-docs-admin"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /api/auth/accounts/{userId}/enable

Re-enable a disabled human account

Operation ID: enableAuthAccount

Permissions: Requires a current human Native IAM Installation administrator who holds every grant of the target account's Principal, trusted Origin and expectedVersion from a guarded account read. Commits state and audit together. An unknown outcome must be inspected without automatic retry; present state does not attribute the earlier request.

Action Resource Scope
administer installation requested
Parameters
Name In Type Required Constraints Example
userId path string Yes min length: 1; max length: 200 "user-docs-admin"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
expectedVersion integer Yes minimum: 1; maximum: 2147483647

Example request

json
{  "expectedVersion": 2}
Responses
Status Meaning
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
409 Conflict
413 Payload Too Large
415 Unsupported Media Type
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.userId string Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "userId": "user-docs-admin"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /api/auth/accounts/{userId}/enrol

Enrol an existing account that activation skipped

Operation ID: enrolAuthAccount

Permissions: Requires a current human Native IAM Installation administrator and trusted Origin. The account must already have its IAM Principal and exactly one password. Idempotent; enrolment grants no access beyond the account's existing IAM bindings.

Action Resource Scope
administer installation requested
Parameters
Name In Type Required Constraints Example
userId path string Yes min length: 1; max length: 200 "user-docs-admin"
Responses
Status Meaning
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
409 Conflict
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.created boolean Yes —
data.principalId string Yes —
data.userId string Yes —
data.version integer Yes minimum: 1
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "created": true,    "principalId": "principal-administrator",    "userId": "user-docs-admin",    "version": 1  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /api/auth/accounts/{userId}/methods/{methodId}/detach

Detach an external sign-in identity from an account

Operation ID: detachAuthMethod

Permissions: Requires a current human Native IAM Installation administrator who holds every grant of the target account's Principal, trusted Origin and expectedVersion from a guarded account read. Commits state and audit together. An unknown outcome must be inspected without automatic retry; present state does not attribute the earlier request.

Action Resource Scope
administer installation requested
Parameters
Name In Type Required Constraints Example
userId path string Yes min length: 1; max length: 200 "user-docs-admin"
methodId path string Yes min length: 1; max length: 200 "method-password"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
expectedVersion integer Yes minimum: 1; maximum: 2147483647

Example request

json
{  "expectedVersion": 1}
Responses
Status Meaning
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
409 Conflict
413 Payload Too Large
415 Unsupported Media Type
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.userId string Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "userId": "user-docs-admin"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /api/auth/accounts/{userId}/providers/google

Attach an exact Google identity to an existing account

Operation ID: attachGoogleIdentity

Permissions: Requires a current human Native IAM Installation administrator who holds every grant of the target account's Principal, trusted Origin and expectedVersion from a guarded account read. Commits state and audit together. An unknown outcome must be inspected without automatic retry; present state does not attribute the earlier request.

Action Resource Scope
administer installation requested
Parameters
Name In Type Required Constraints Example
userId path string Yes min length: 1; max length: 200 "user-docs-admin"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
expectedVersion integer Yes minimum: 1; maximum: 2147483647
subject string Yes pattern: ^[\x21-\x7E]{1,255}$

Example request

json
{  "expectedVersion": 1,  "subject": "123456789012345678901"}
Responses
Status Meaning
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
409 Conflict
413 Payload Too Large
415 Unsupported Media Type
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.userId string Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "userId": "user-docs-admin"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /api/auth/accounts/{userId}/providers/oidc

Attach an exact OIDC identity to an existing account

Operation ID: attachOidcIdentity

Permissions: Requires a current human Native IAM Installation administrator who holds every grant of the target account's Principal, trusted Origin and expectedVersion from a guarded account read. Commits state and audit together. An unknown outcome must be inspected without automatic retry; present state does not attribute the earlier request.

Action Resource Scope
administer installation requested
Parameters
Name In Type Required Constraints Example
userId path string Yes min length: 1; max length: 200 "user-docs-admin"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
expectedVersion integer Yes minimum: 1; maximum: 2147483647
subject string Yes pattern: ^[\x21-\x7E]{1,255}$

Example request

json
{  "expectedVersion": 1,  "subject": "provider-subject-docs-admin"}
Responses
Status Meaning
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
409 Conflict
413 Payload Too Large
415 Unsupported Media Type
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.userId string Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "userId": "user-docs-admin"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /api/auth/accounts/{userId}/revoke

Revoke all sessions for a human account

Operation ID: revokeAuthAccountSessions

Permissions: Requires a current human Native IAM Installation administrator who holds every grant of the target account's Principal, trusted Origin and expectedVersion from a guarded account read. Commits state and audit together. An unknown outcome must be inspected without automatic retry; present state does not attribute the earlier request.

Action Resource Scope
administer installation requested
Parameters
Name In Type Required Constraints Example
userId path string Yes min length: 1; max length: 200 "user-docs-admin"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
expectedVersion integer Yes minimum: 1; maximum: 2147483647

Example request

json
{  "expectedVersion": 1}
Responses
Status Meaning
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
409 Conflict
413 Payload Too Large
415 Unsupported Media Type
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.userId string Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "userId": "user-docs-admin"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /api/auth/providers

List configured browser sign-in methods

Operation ID: getAuthProviders

Permissions: List configured browser sign-in methods

Responses
Status Meaning
200 OK
401 Unauthorized
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.google boolean Yes —
data.oidc boolean Yes —
data.oidcSignIn object No Present only when OIDC sign-in is configured: the Console's button label and the configured authorization endpoint that the start URL must use.
data.oidcSignIn.authorizationUrl string (uri) Yes —
data.oidcSignIn.label string Yes min length: 1; max length: 40
data.password boolean Yes False when password sign-in is recovery-only: ordinary accounts sign in with an external provider, and only the recovery account uses a password.
data.sessionBinding boolean Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "google": false,    "oidc": false,    "password": true,    "sessionBinding": false  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /api/auth/providers/google/callback

Complete an enrolled Google sign-in

Operation ID: completeGoogleSignIn

Permissions: Consumes the browser-bound attempt before provider exchange. Redirects to Console after session and audit commit or with a fixed failure classification.

Responses
Status Meaning
302 Redirect to Console

POST /api/auth/providers/google/result

Confirm which session a Google sign-in created

Operation ID: confirmGoogleSignIn

Permissions: Requires the configured browser Origin, the one-use login receipt cookie set by the callback, the matching attemptId and the session cookie that callback issued. Returns that session's sessionKey; never issues or extends a session.

Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
attemptId string Yes pattern: ^[A-Za-z0-9_-]{43}$

Example request

json
{  "attemptId": "example000000000000000000000000000000000000"}
Responses
Status Meaning
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
413 Payload Too Large
415 Unsupported Media Type
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.sessionKey string Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "sessionKey": "example-session-binding-not-a-credential"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /api/auth/providers/google/start

Start Google sign-in for an enrolled account

Operation ID: startGoogleSignIn

Permissions: Requires the exact configured browser Origin and, when Sec-Fetch-Site is present, same-origin. Creates a one-use browser-bound login attempt and returns its public attemptId for the result exchange; does not create an account or grant access.

Responses
Status Meaning
200 OK
401 Unauthorized
403 Forbidden
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.attemptId string Yes pattern: ^[A-Za-z0-9_-]{43}$
data.url string (uri) Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "attemptId": "example000000000000000000000000000000000000",    "url": "https://accounts.google.com/o/oauth2/v2/auth?client_id=example&state=example-browser-bound-state"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /api/auth/providers/oidc/callback

Complete an enrolled OIDC sign-in

Operation ID: completeOidcSignIn

Permissions: Consumes the browser-bound attempt before provider exchange. Redirects to Console after session and audit commit or with a fixed failure classification.

Responses
Status Meaning
302 Redirect to Console

POST /api/auth/providers/oidc/result

Confirm which session an OIDC sign-in created

Operation ID: confirmOidcSignIn

Permissions: Requires the configured browser Origin, the one-use login receipt cookie set by the callback, the matching attemptId and the session cookie that callback issued. Returns that session's sessionKey; never issues or extends a session.

Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
attemptId string Yes pattern: ^[A-Za-z0-9_-]{43}$

Example request

json
{  "attemptId": "example000000000000000000000000000000000000"}
Responses
Status Meaning
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
413 Payload Too Large
415 Unsupported Media Type
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.sessionKey string Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "sessionKey": "example-session-binding-not-a-credential"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /api/auth/providers/oidc/start

Start OIDC sign-in for an enrolled account

Operation ID: startOidcSignIn

Permissions: Requires the exact configured browser Origin and, when Sec-Fetch-Site is present, same-origin. Creates a one-use browser-bound login attempt and returns its public attemptId for the result exchange; does not create an account or grant access.

Responses
Status Meaning
200 OK
401 Unauthorized
403 Forbidden
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.attemptId string Yes pattern: ^[A-Za-z0-9_-]{43}$
data.url string (uri) Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "attemptId": "example000000000000000000000000000000000000",    "url": "https://identity.example.com/authorize?client_id=example&state=example-browser-bound-state"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /api/auth/recovery

Inspect the recovery account designation

Operation ID: getAuthRecovery

Permissions: Requires a current human Native IAM Installation administrator and trusted Origin. Returns the present designation, whose password the database protects; not a receipt for any prior operation.

Action Resource Scope
administer installation requested
Responses
Status Meaning
200 OK
401 Unauthorized
403 Forbidden
404 Not Found
409 Conflict
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.methodId string Yes —
data.principalId string Yes —
data.userId string Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "methodId": "method-password",    "principalId": "principal-administrator",    "userId": "user-docs-admin"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /api/auth/recovery

Move the recovery designation to another Installation administrator

Operation ID: replaceAuthRecovery

Permissions: Requires a current human Native IAM Installation administrator and trusted Origin who holds every IAM grant of the current holder's Principal (else 403). The target must be an enrolled, enabled account with one password whose Principal administers the Installation. expectedCurrentUserId comes from the recovery read and expectedVersion from the target's account read. Commits state and audit together; an unknown outcome must be inspected without automatic retry.

Action Resource Scope
administer installation requested
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
expectedCurrentUserId string Yes min length: 1; max length: 200
expectedVersion integer Yes minimum: 1; maximum: 2147483647
userId string Yes min length: 1; max length: 200

Example request

json
{  "expectedCurrentUserId": "user-docs-admin",  "expectedVersion": 1,  "userId": "user-recovery-admin"}
Responses
Status Meaning
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
409 Conflict
413 Payload Too Large
415 Unsupported Media Type
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.changed boolean Yes —
data.methodId string Yes —
data.principalId string Yes —
data.userId string Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "changed": true,    "methodId": "method-recovery-password",    "principalId": "principal-recovery-administrator",    "userId": "user-recovery-admin"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /api/auth/service-keys

Issue a service API key

Operation ID: createServiceKey

Permissions: Requires a session or Installation-scoped service key with administer on the Installation. Issues a Better Auth key for an existing non-Agent ServicePrincipal in its exact scope when the caller already holds every IAM grant of that ServicePrincipal at the same or a broader scope; creates no identity or IAM grant. The plaintext key is returned only here.

Action Resource Scope
administer installation requested
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
expiresIn integer No minimum: 86400; maximum: 31536000; Lifetime in seconds; defaults to 30 days.
name string Yes min length: 1; max length: 32; pattern: \S
namespaceId string No pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
servicePrincipalId string Yes min length: 1; max length: 200

Example request

json
{  "expiresIn": 86400,  "name": "Documentation automation",  "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",  "servicePrincipalId": "principal-docs-agent"}
Responses
Status Meaning
201 Created
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
409 Conflict
413 Payload Too Large
415 Unsupported Media Type
503 Service Unavailable

201 response body: application/json

Field Type Required Constraints
data object Yes —
data.expiresAt string (date-time) Yes —
data.id string Yes —
data.key string Yes —
data.name string Yes —
data.namespaceId string No —
data.servicePrincipalId string Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "expiresAt": "2026-10-02T12:00:00.000Z",    "id": "key-docs-automation",    "key": "example-key-not-valid-for-authentication",    "name": "Documentation automation",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "servicePrincipalId": "principal-docs-agent"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

DELETE /api/auth/service-keys/{keyId}

Revoke a service API key

Operation ID: revokeServiceKey

Permissions: Requires a session or Installation-scoped service key with administer on the Installation, plus every IAM grant of the key's ServicePrincipal, as for issuance. Deletes the stored Better Auth key; subsequent requests cannot authenticate with it.

Action Resource Scope
administer installation requested
Parameters
Name In Type Required Constraints Example
keyId path string Yes min length: 1; max length: 200 "key-docs-automation"
Responses
Status Meaning
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
409 Conflict
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.id string Yes —
data.revoked true Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "id": "key-docs-automation",    "revoked": true  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /api/auth/session

Inspect authentication without revealing session tokens

Operation ID: getAuthSession

Permissions: Returns authenticated status, public account identity, and a noncredential sessionKey that stays stable across reads and changes for a new session, or null without a valid session; session tokens and credentials are never returned.

Responses
Status Meaning
200 OK
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data null or object Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": null,  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /api/auth/sign-in/email

Sign in with email and password

Operation ID: signInEmail

Permissions: Authenticates a local account and issues a user session cookie. In both profiles, repeated failed attempts for one email, or from one client address behind a trusted proxy, spend the password budget and may return 429 once it is spent. A successful sign-in also sets an HttpOnly known-device cookie; later attempts for that email from the same browser spend the browser's own budget instead of the email's. The cookie never authenticates. An email with a NUL character or an unpaired UTF-16 surrogate is refused with 400 INVALID_REQUEST and spends budget like a rejected password; the password is not checked for either.

Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
email string Yes min length: 3; max length: 320
password string Yes min length: 12; max length: 128

Example request

json
{  "email": "admin@example.com",  "password": "replace-with-a-unique-password"}
Responses
Status Meaning
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
413 Payload Too Large
415 Unsupported Media Type
429 Too Many Requests
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.authenticated true Yes —
data.sessionKey string No —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "authenticated": true  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /api/auth/sign-out

Sign out of the current session

Operation ID: signOut

Permissions: Revokes the current user session cookie.

Responses
Status Meaning
200 OK
401 Unauthorized
403 Forbidden
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {},  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Backends

Operation Summary
GET /backends List configured Backends (experimental)

GET /backends

List configured Backends (experimental)

Operation ID: listBackends

Permissions: Requires administer permission on the requested Installation.

Action Resource Scope
administer installation requested
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<object> Yes —
data[].id string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data[].type "chatgpt" or "github" or "openshell" Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Connections

Operation Summary
GET /connection-templates List all Installation-wide and Namespace-scoped connection templates
POST /connection-templates Create an Installation-wide or Namespace-scoped connection template
POST /connection-templates/discover Read public MCP resource and authorization server metadata
DELETE /connection-templates/{connectionTemplateId} Delete a connection template
GET /connection-templates/{connectionTemplateId} Get one connection template
PATCH /connection-templates/{connectionTemplateId} Rename a connection template, or create a version with new approved values
GET /namespaces/{namespaceId}/connection-templates List connection templates the caller may connect in this Namespace
GET /namespaces/{namespaceId}/connections List completed connections the caller can read in this Namespace
POST /namespaces/{namespaceId}/connections Start consent for a reusable account in this Namespace
DELETE /namespaces/{namespaceId}/connections/{credentialSourceId} Disconnect a saved account and retire its OAuth grant
GET /oauth-clients List registered OAuth clients
POST /oauth-clients Register an OAuth client from a connection template
DELETE /oauth-clients/{oauthClientId} Delete an unused OAuth client
POST /oauth-clients/{oauthClientId}/rotate-secret Rotate an OAuth client secret
GET /oauth/callback Complete a browser connection for the signed-in person who started it

GET /connection-templates

List all Installation-wide and Namespace-scoped connection templates

Operation ID: listConnectionTemplates

Permissions: Requires administer permission on the requested Installation.

Action Resource Scope
administer installation requested
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<OAuth connection template> Yes —
data[].createdAt string Yes —
data[].current OAuth connection template version Yes —
data[].current.authorizationParameters object<string, string> Yes max properties: 32
data[].current.authorizationUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data[].current.createdAt string Yes —
data[].current.destinations array<object> Yes min items: 1
data[].current.destinations[].host string Yes —
data[].current.destinations[].path string Yes —
data[].current.destinations[].port integer Yes —
data[].current.issuer string Yes max length: 2048; pattern: ^https://[^\s/]
data[].current.mcp object No —
data[].current.mcp.resource string Yes max length: 2048; pattern: ^https://[^\s/]
data[].current.mcp.serverUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data[].current.mode "manual" or "mcp_discovery" Yes —
data[].current.oauthClientId string No pattern: ^ccr_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].current.observed object No —
data[].current.observed.authorizationUrl string No max length: 2048; pattern: ^https://[^\s/]
data[].current.observed.issuer string No max length: 2048; pattern: ^https://[^\s/]
data[].current.observed.issuers array<string> Yes —
data[].current.observed.registrationUrl string No max length: 2048; pattern: ^https://[^\s/]
data[].current.observed.requestedScopes array<string> Yes —
data[].current.observed.resource string Yes max length: 2048; pattern: ^https://[^\s/]
data[].current.observed.resourceScopes array<string> No —
data[].current.observed.revocationUrl string No max length: 2048; pattern: ^https://[^\s/]
data[].current.observed.serverUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data[].current.observed.supportedScopes array<string> No —
data[].current.observed.tokenEndpointAuthMethods array<string> No —
data[].current.observed.tokenUrl string No max length: 2048; pattern: ^https://[^\s/]
data[].current.revocationUrl string No max length: 2048; pattern: ^https://[^\s/]
data[].current.scopes array<string> Yes unique items: true; Scopes approved by the administrator. An empty list leaves scope selection to the account owner and provider.
data[].current.templateId string Yes pattern: ^ctp_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].current.tokenUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data[].current.version integer Yes minimum: 1
data[].displayName string Yes min length: 1; max length: 200
data[].id string Yes pattern: ^ctp_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].namespaceId string No pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.redirectUri string No —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

No readable resources

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Example response

json
{  "data": [    {      "createdAt": "2026-10-01T12:00:00.000Z",      "current": {        "authorizationParameters": {},        "authorizationUrl": "https://accounts.example.com/authorize",        "createdAt": "2026-10-01T12:00:00.000Z",        "destinations": [          {            "host": "api.example.com",            "path": "/profile",            "port": 443          }        ],        "issuer": "https://accounts.example.com",        "mode": "manual",        "oauthClientId": "ccr_123e4567-e89b-42d3-a456-426614174000",        "scopes": [          "profile.read"        ],        "templateId": "ctp_123e4567-e89b-42d3-a456-426614174000",        "tokenUrl": "https://accounts.example.com/token",        "version": 1      },      "displayName": "Example account",      "id": "ctp_123e4567-e89b-42d3-a456-426614174000",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    }  ],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /connection-templates

Create an Installation-wide or Namespace-scoped connection template

Operation ID: createConnectionTemplate

Permissions: Requires administer permission on the requested Installation.

Action Resource Scope
administer installation requested
Request body

Required: Yes

Content type: application/json

Schema: object or object.

Example request

json
{  "authorizationUrl": "https://accounts.example.com/authorize",  "destinations": [    {      "host": "api.example.com",      "path": "/profile",      "port": 443    }  ],  "displayName": "Example account",  "issuer": "https://accounts.example.com",  "mode": "manual",  "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",  "oauthClientId": "ccr_123e4567-e89b-42d3-a456-426614174000",  "scopes": [    "profile.read"  ],  "tokenUrl": "https://accounts.example.com/token"}
Responses
Status Meaning
201 Created
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

201 response body: application/json

Field Type Required Constraints
data OAuth connection template Yes —
data.createdAt string Yes —
data.current OAuth connection template version Yes —
data.current.authorizationParameters object<string, string> Yes max properties: 32
data.current.authorizationUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.createdAt string Yes —
data.current.destinations array<object> Yes min items: 1
data.current.destinations[].host string Yes —
data.current.destinations[].path string Yes —
data.current.destinations[].port integer Yes —
data.current.issuer string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.mcp object No —
data.current.mcp.resource string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.mcp.serverUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.mode "manual" or "mcp_discovery" Yes —
data.current.oauthClientId string No pattern: ^ccr_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.current.observed object No —
data.current.observed.authorizationUrl string No max length: 2048; pattern: ^https://[^\s/]
data.current.observed.issuer string No max length: 2048; pattern: ^https://[^\s/]
data.current.observed.issuers array<string> Yes —
data.current.observed.registrationUrl string No max length: 2048; pattern: ^https://[^\s/]
data.current.observed.requestedScopes array<string> Yes —
data.current.observed.resource string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.observed.resourceScopes array<string> No —
data.current.observed.revocationUrl string No max length: 2048; pattern: ^https://[^\s/]
data.current.observed.serverUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.observed.supportedScopes array<string> No —
data.current.observed.tokenEndpointAuthMethods array<string> No —
data.current.observed.tokenUrl string No max length: 2048; pattern: ^https://[^\s/]
data.current.revocationUrl string No max length: 2048; pattern: ^https://[^\s/]
data.current.scopes array<string> Yes unique items: true; Scopes approved by the administrator. An empty list leaves scope selection to the account owner and provider.
data.current.templateId string Yes pattern: ^ctp_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.current.tokenUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.version integer Yes minimum: 1
data.displayName string Yes min length: 1; max length: 200
data.id string Yes pattern: ^ctp_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.namespaceId string No pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.redirectUri string No —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "createdAt": "2026-10-01T12:00:00.000Z",    "current": {      "authorizationParameters": {},      "authorizationUrl": "https://accounts.example.com/authorize",      "createdAt": "2026-10-01T12:00:00.000Z",      "destinations": [        {          "host": "api.example.com",          "path": "/profile",          "port": 443        }      ],      "issuer": "https://accounts.example.com",      "mode": "manual",      "oauthClientId": "ccr_123e4567-e89b-42d3-a456-426614174000",      "scopes": [        "profile.read"      ],      "templateId": "ctp_123e4567-e89b-42d3-a456-426614174000",      "tokenUrl": "https://accounts.example.com/token",      "version": 1    },    "displayName": "Example account",    "id": "ctp_123e4567-e89b-42d3-a456-426614174000",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /connection-templates/discover

Read public MCP resource and authorization server metadata

Operation ID: discoverConnectionTemplate

Permissions: Requires administer permission on the requested Installation.

Action Resource Scope
administer installation requested
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
issuer string No max length: 2048; pattern: ^https://[^\s/]
serverUrl string Yes max length: 2048; pattern: ^https://[^\s/]

Example request

json
{  "serverUrl": "https://tools.example.com/mcp"}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.authorizationUrl string No max length: 2048; pattern: ^https://[^\s/]
data.issuer string No max length: 2048; pattern: ^https://[^\s/]
data.issuers array<string> Yes —
data.registrationUrl string No max length: 2048; pattern: ^https://[^\s/]
data.requestedScopes array<string> Yes —
data.resource string Yes max length: 2048; pattern: ^https://[^\s/]
data.resourceScopes array<string> No —
data.revocationUrl string No max length: 2048; pattern: ^https://[^\s/]
data.serverUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data.supportedScopes array<string> No —
data.tokenEndpointAuthMethods array<string> No —
data.tokenUrl string No max length: 2048; pattern: ^https://[^\s/]
meta object Yes —
meta.redirectUri string No —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "authorizationUrl": "https://accounts.example.com/authorize",    "issuer": "https://accounts.example.com",    "issuers": [      "https://accounts.example.com"    ],    "requestedScopes": [      "profile.read"    ],    "resource": "https://tools.example.com/mcp",    "resourceScopes": [      "profile.read"    ],    "serverUrl": "https://tools.example.com/mcp",    "tokenEndpointAuthMethods": [      "client_secret_basic"    ],    "tokenUrl": "https://accounts.example.com/token"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

DELETE /connection-templates/{connectionTemplateId}

Delete a connection template

Operation ID: deleteConnectionTemplate

Permissions: Requires administer permission on the requested Installation.

Action Resource Scope
administer installation requested
Parameters
Name In Type Required Constraints Example
connectionTemplateId path string Yes pattern: ^ctp_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ctp_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
204 No Content
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

GET /connection-templates/{connectionTemplateId}

Get one connection template

Operation ID: getConnectionTemplate

Permissions: Requires administer permission on the requested Installation.

Action Resource Scope
administer installation requested
Parameters
Name In Type Required Constraints Example
connectionTemplateId path string Yes pattern: ^ctp_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ctp_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data OAuth connection template Yes —
data.createdAt string Yes —
data.current OAuth connection template version Yes —
data.current.authorizationParameters object<string, string> Yes max properties: 32
data.current.authorizationUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.createdAt string Yes —
data.current.destinations array<object> Yes min items: 1
data.current.destinations[].host string Yes —
data.current.destinations[].path string Yes —
data.current.destinations[].port integer Yes —
data.current.issuer string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.mcp object No —
data.current.mcp.resource string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.mcp.serverUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.mode "manual" or "mcp_discovery" Yes —
data.current.oauthClientId string No pattern: ^ccr_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.current.observed object No —
data.current.observed.authorizationUrl string No max length: 2048; pattern: ^https://[^\s/]
data.current.observed.issuer string No max length: 2048; pattern: ^https://[^\s/]
data.current.observed.issuers array<string> Yes —
data.current.observed.registrationUrl string No max length: 2048; pattern: ^https://[^\s/]
data.current.observed.requestedScopes array<string> Yes —
data.current.observed.resource string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.observed.resourceScopes array<string> No —
data.current.observed.revocationUrl string No max length: 2048; pattern: ^https://[^\s/]
data.current.observed.serverUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.observed.supportedScopes array<string> No —
data.current.observed.tokenEndpointAuthMethods array<string> No —
data.current.observed.tokenUrl string No max length: 2048; pattern: ^https://[^\s/]
data.current.revocationUrl string No max length: 2048; pattern: ^https://[^\s/]
data.current.scopes array<string> Yes unique items: true; Scopes approved by the administrator. An empty list leaves scope selection to the account owner and provider.
data.current.templateId string Yes pattern: ^ctp_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.current.tokenUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.version integer Yes minimum: 1
data.displayName string Yes min length: 1; max length: 200
data.id string Yes pattern: ^ctp_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.namespaceId string No pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.redirectUri string No —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "createdAt": "2026-10-01T12:00:00.000Z",    "current": {      "authorizationParameters": {},      "authorizationUrl": "https://accounts.example.com/authorize",      "createdAt": "2026-10-01T12:00:00.000Z",      "destinations": [        {          "host": "api.example.com",          "path": "/profile",          "port": 443        }      ],      "issuer": "https://accounts.example.com",      "mode": "manual",      "oauthClientId": "ccr_123e4567-e89b-42d3-a456-426614174000",      "scopes": [        "profile.read"      ],      "templateId": "ctp_123e4567-e89b-42d3-a456-426614174000",      "tokenUrl": "https://accounts.example.com/token",      "version": 1    },    "displayName": "Example account",    "id": "ctp_123e4567-e89b-42d3-a456-426614174000",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

PATCH /connection-templates/{connectionTemplateId}

Rename a connection template, or create a version with new approved values

Operation ID: updateConnectionTemplate

Permissions: Requires administer permission on the requested Installation.

Action Resource Scope
administer installation requested
Parameters
Name In Type Required Constraints Example
connectionTemplateId path string Yes pattern: ^ctp_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ctp_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Schema: object or object or object.

Example request

json
{  "displayName": "Engineering account"}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data OAuth connection template Yes —
data.createdAt string Yes —
data.current OAuth connection template version Yes —
data.current.authorizationParameters object<string, string> Yes max properties: 32
data.current.authorizationUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.createdAt string Yes —
data.current.destinations array<object> Yes min items: 1
data.current.destinations[].host string Yes —
data.current.destinations[].path string Yes —
data.current.destinations[].port integer Yes —
data.current.issuer string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.mcp object No —
data.current.mcp.resource string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.mcp.serverUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.mode "manual" or "mcp_discovery" Yes —
data.current.oauthClientId string No pattern: ^ccr_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.current.observed object No —
data.current.observed.authorizationUrl string No max length: 2048; pattern: ^https://[^\s/]
data.current.observed.issuer string No max length: 2048; pattern: ^https://[^\s/]
data.current.observed.issuers array<string> Yes —
data.current.observed.registrationUrl string No max length: 2048; pattern: ^https://[^\s/]
data.current.observed.requestedScopes array<string> Yes —
data.current.observed.resource string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.observed.resourceScopes array<string> No —
data.current.observed.revocationUrl string No max length: 2048; pattern: ^https://[^\s/]
data.current.observed.serverUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.observed.supportedScopes array<string> No —
data.current.observed.tokenEndpointAuthMethods array<string> No —
data.current.observed.tokenUrl string No max length: 2048; pattern: ^https://[^\s/]
data.current.revocationUrl string No max length: 2048; pattern: ^https://[^\s/]
data.current.scopes array<string> Yes unique items: true; Scopes approved by the administrator. An empty list leaves scope selection to the account owner and provider.
data.current.templateId string Yes pattern: ^ctp_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.current.tokenUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data.current.version integer Yes minimum: 1
data.displayName string Yes min length: 1; max length: 200
data.id string Yes pattern: ^ctp_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.namespaceId string No pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.redirectUri string No —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "createdAt": "2026-10-01T12:00:00.000Z",    "current": {      "authorizationParameters": {},      "authorizationUrl": "https://accounts.example.com/authorize",      "createdAt": "2026-10-01T12:00:00.000Z",      "destinations": [        {          "host": "api.example.com",          "path": "/profile",          "port": 443        }      ],      "issuer": "https://accounts.example.com",      "mode": "manual",      "oauthClientId": "ccr_123e4567-e89b-42d3-a456-426614174000",      "scopes": [        "profile.read"      ],      "templateId": "ctp_123e4567-e89b-42d3-a456-426614174000",      "tokenUrl": "https://accounts.example.com/token",      "version": 1    },    "displayName": "Engineering account",    "id": "ctp_123e4567-e89b-42d3-a456-426614174000",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/connection-templates

List connection templates the caller may connect in this Namespace

Operation ID: listUsableConnectionTemplates

Permissions: Requires create permission for CredentialSource resources in the requested Namespace.

Action Resource Scope
create credential_source namespace
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<OAuth connection template> Yes —
data[].createdAt string Yes —
data[].current OAuth connection template version Yes —
data[].current.authorizationParameters object<string, string> Yes max properties: 32
data[].current.authorizationUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data[].current.createdAt string Yes —
data[].current.destinations array<object> Yes min items: 1
data[].current.destinations[].host string Yes —
data[].current.destinations[].path string Yes —
data[].current.destinations[].port integer Yes —
data[].current.issuer string Yes max length: 2048; pattern: ^https://[^\s/]
data[].current.mcp object No —
data[].current.mcp.resource string Yes max length: 2048; pattern: ^https://[^\s/]
data[].current.mcp.serverUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data[].current.mode "manual" or "mcp_discovery" Yes —
data[].current.oauthClientId string No pattern: ^ccr_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].current.observed object No —
data[].current.observed.authorizationUrl string No max length: 2048; pattern: ^https://[^\s/]
data[].current.observed.issuer string No max length: 2048; pattern: ^https://[^\s/]
data[].current.observed.issuers array<string> Yes —
data[].current.observed.registrationUrl string No max length: 2048; pattern: ^https://[^\s/]
data[].current.observed.requestedScopes array<string> Yes —
data[].current.observed.resource string Yes max length: 2048; pattern: ^https://[^\s/]
data[].current.observed.resourceScopes array<string> No —
data[].current.observed.revocationUrl string No max length: 2048; pattern: ^https://[^\s/]
data[].current.observed.serverUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data[].current.observed.supportedScopes array<string> No —
data[].current.observed.tokenEndpointAuthMethods array<string> No —
data[].current.observed.tokenUrl string No max length: 2048; pattern: ^https://[^\s/]
data[].current.revocationUrl string No max length: 2048; pattern: ^https://[^\s/]
data[].current.scopes array<string> Yes unique items: true; Scopes approved by the administrator. An empty list leaves scope selection to the account owner and provider.
data[].current.templateId string Yes pattern: ^ctp_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].current.tokenUrl string Yes max length: 2048; pattern: ^https://[^\s/]
data[].current.version integer Yes minimum: 1
data[].displayName string Yes min length: 1; max length: 200
data[].id string Yes pattern: ^ctp_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].namespaceId string No pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

No readable resources

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Example response

json
{  "data": [    {      "createdAt": "2026-10-01T12:00:00.000Z",      "current": {        "authorizationParameters": {},        "authorizationUrl": "https://accounts.example.com/authorize",        "createdAt": "2026-10-01T12:00:00.000Z",        "destinations": [          {            "host": "api.example.com",            "path": "/profile",            "port": 443          }        ],        "issuer": "https://accounts.example.com",        "mode": "manual",        "oauthClientId": "ccr_123e4567-e89b-42d3-a456-426614174000",        "scopes": [          "profile.read"        ],        "templateId": "ctp_123e4567-e89b-42d3-a456-426614174000",        "tokenUrl": "https://accounts.example.com/token",        "version": 1      },      "displayName": "Example account",      "id": "ctp_123e4567-e89b-42d3-a456-426614174000",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    }  ],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/connections

List completed connections the caller can read in this Namespace

Operation ID: listNamespaceConnections

Permissions: Requires read permission on the requested Namespace. Only CredentialSource resources with individual read permission are returned.

Action Resource Scope
read namespace requested
read credential_source each_returned
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<object> Yes —
data[].clientId string Yes —
data[].connectionTemplateId string Yes pattern: ^ctp_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].connectionTemplateVersion integer Yes minimum: 1
data[].createdAt string Yes —
data[].credentialSourceId string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].destinations array<object> Yes Effective credential delivery destinations; empty when the current template is unavailable or incompatible.
data[].destinations[].host string Yes —
data[].destinations[].path string Yes —
data[].destinations[].port integer Yes —
data[].grantedScopes array<string> Yes —
data[].issuer string Yes —
data[].mcpServerUrl string No —
data[].namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].oauthClientId string Yes —
data[].ownerPrincipalId string Yes —
data[].requestedScopes array<string> Yes —
data[].resource string No —
data[].tokenUrl string Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

No readable resources

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Example response

json
{  "data": [    {      "clientId": "example-client",      "connectionTemplateId": "ctp_123e4567-e89b-42d3-a456-426614174000",      "connectionTemplateVersion": 1,      "createdAt": "2026-10-01T12:00:00.000Z",      "credentialSourceId": "cs_123e4567-e89b-42d3-a456-426614174000",      "destinations": [        {          "host": "api.example.com",          "path": "/profile",          "port": 443        }      ],      "grantedScopes": [        "profile.read"      ],      "issuer": "https://accounts.example.com",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",      "oauthClientId": "ccr_123e4567-e89b-42d3-a456-426614174000",      "ownerPrincipalId": "user-docs-admin",      "requestedScopes": [        "profile.read"      ],      "tokenUrl": "https://accounts.example.com/token"    }  ],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/connections

Start consent for a reusable account in this Namespace

Operation ID: startNamespaceConnection

Permissions: Requires create permission for CredentialSource resources in the requested Namespace.

Action Resource Scope
create credential_source namespace
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
connectionTemplateId string Yes pattern: ^ctp_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
selectedScopes array<string> No unique items: true

Example request

json
{  "connectionTemplateId": "ctp_123e4567-e89b-42d3-a456-426614174000"}
Responses
Status Meaning
201 Created
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
501 The selected Driver does not support this operation.
503 A required dependency is unavailable.

201 response body: application/json

Field Type Required Constraints
data object Yes —
data.authorizationUrl string Yes —
data.credentialSourceId string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.expiresAt string Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "authorizationUrl": "https://accounts.example.com/authorize?state=example-state",    "credentialSourceId": "cs_123e4567-e89b-42d3-a456-426614174000",    "expiresAt": "2026-10-01T12:00:00.000Z"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

DELETE /namespaces/{namespaceId}/connections/{credentialSourceId}

Disconnect a saved account and retire its OAuth grant

Operation ID: disconnectNamespaceConnection

Permissions: Requires delete permission on this CredentialSource unless the caller owns the saved connection.

Action Resource Scope
delete credential_source requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
credentialSourceId path string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "cs_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
204 No Content
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

GET /oauth-clients

List registered OAuth clients

Operation ID: listOAuthClients

Permissions: Requires administer permission on the requested Installation.

Action Resource Scope
administer installation requested
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<object> Yes —
data[].clientId string Yes min length: 1; max length: 256
data[].createdAt string Yes —
data[].displayName string Yes min length: 1; max length: 200
data[].id string Yes pattern: ^ccr_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].issuer string Yes max length: 2048; pattern: ^https://[^\s/]
data[].namespaceId string No pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].revocationUrl string No max length: 2048; pattern: ^https://[^\s/]
data[].tokenEndpointAuthMethod "none" or "client_secret_basic" or "client_secret_post" Yes —
data[].tokenUrl string Yes max length: 2048; pattern: ^https://[^\s/]
meta object Yes —
meta.redirectUri string No —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

No readable resources

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Example response

json
{  "data": [    {      "clientId": "example-client",      "createdAt": "2026-10-01T12:00:00.000Z",      "displayName": "Example provider client",      "id": "ccr_123e4567-e89b-42d3-a456-426614174000",      "issuer": "https://accounts.example.com",      "tokenEndpointAuthMethod": "client_secret_basic",      "tokenUrl": "https://accounts.example.com/token"    }  ],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /oauth-clients

Register an OAuth client from a connection template

Operation ID: createOAuthClient

Permissions: Requires administer permission on the requested Installation.

Action Resource Scope
administer installation requested
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
clientId string Yes min length: 1; max length: 256
clientSecret string No min length: 1; max length: 4096
connectionTemplateId string Yes pattern: ^ctp_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
connectionTemplateVersion integer Yes minimum: 1
displayName string Yes min length: 1; max length: 200
tokenEndpointAuthMethod "none" or "client_secret_basic" or "client_secret_post" Yes —

Example request

json
{  "clientId": "example-client",  "clientSecret": "example-client-secret",  "connectionTemplateId": "ctp_123e4567-e89b-42d3-a456-426614174000",  "connectionTemplateVersion": 1,  "displayName": "Example provider client",  "tokenEndpointAuthMethod": "client_secret_basic"}
Responses
Status Meaning
201 Created
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

201 response body: application/json

Field Type Required Constraints
data object Yes —
data.clientId string Yes min length: 1; max length: 256
data.createdAt string Yes —
data.displayName string Yes min length: 1; max length: 200
data.id string Yes pattern: ^ccr_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.issuer string Yes max length: 2048; pattern: ^https://[^\s/]
data.namespaceId string No pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.revocationUrl string No max length: 2048; pattern: ^https://[^\s/]
data.tokenEndpointAuthMethod "none" or "client_secret_basic" or "client_secret_post" Yes —
data.tokenUrl string Yes max length: 2048; pattern: ^https://[^\s/]
meta object Yes —
meta.redirectUri string No —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "clientId": "example-client",    "createdAt": "2026-10-01T12:00:00.000Z",    "displayName": "Example provider client",    "id": "ccr_123e4567-e89b-42d3-a456-426614174000",    "issuer": "https://accounts.example.com",    "tokenEndpointAuthMethod": "client_secret_basic",    "tokenUrl": "https://accounts.example.com/token"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

DELETE /oauth-clients/{oauthClientId}

Delete an unused OAuth client

Operation ID: deleteOAuthClient

Permissions: Requires administer permission on the requested Installation.

Action Resource Scope
administer installation requested
Parameters
Name In Type Required Constraints Example
oauthClientId path string Yes pattern: ^ccr_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ccr_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
204 No Content
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

POST /oauth-clients/{oauthClientId}/rotate-secret

Rotate an OAuth client secret

Operation ID: rotateOAuthClientSecret

Permissions: Requires administer permission on the requested Installation.

Action Resource Scope
administer installation requested
Parameters
Name In Type Required Constraints Example
oauthClientId path string Yes pattern: ^ccr_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ccr_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
clientSecret string Yes min length: 1; max length: 4096

Example request

json
{  "clientSecret": "replacement-example-client-secret"}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.clientId string Yes min length: 1; max length: 256
data.createdAt string Yes —
data.displayName string Yes min length: 1; max length: 200
data.id string Yes pattern: ^ccr_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.issuer string Yes max length: 2048; pattern: ^https://[^\s/]
data.namespaceId string No pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.revocationUrl string No max length: 2048; pattern: ^https://[^\s/]
data.tokenEndpointAuthMethod "none" or "client_secret_basic" or "client_secret_post" Yes —
data.tokenUrl string Yes max length: 2048; pattern: ^https://[^\s/]
meta object Yes —
meta.redirectUri string No —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "clientId": "example-client",    "createdAt": "2026-10-01T12:00:00.000Z",    "displayName": "Example provider client",    "id": "ccr_123e4567-e89b-42d3-a456-426614174000",    "issuer": "https://accounts.example.com",    "tokenEndpointAuthMethod": "client_secret_basic",    "tokenUrl": "https://accounts.example.com/token"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /oauth/callback

Complete a browser connection for the signed-in person who started it

Operation ID: completeNamespaceConnection

Permissions: Requires the signed-in human session that started the connection, permission to create a credential source in the starting Namespace, and a template available there. The provider redirects here with state and code, or with error. The response is a 303 redirect to the console without the query string.

Action Resource Scope
create credential_source namespace
Parameters
Name In Type Required Constraints Example
state query string No max length: 512 "example-browser-bound-state"
code query string No max length: 4096 "example-provider-code"
error query string No max length: 256 "access_denied"
iss query string No max length: 2048 "https://accounts.example.com"
Responses
Status Meaning
303 Redirect to the console with the connection outcome
429 Too many requests; wait for Retry-After

Installation

Operation Summary
GET /installation Get the singleton Installation
POST /installation/bootstrap Bootstrap the singleton Installation
GET /installation/deployment-inventory Get the complete authorized Agent deployment inventory
GET /installation/driver-configurations Inspect selected Driver accepted startup values and configuration schemas
GET /observability Get the configured external observability destination

GET /installation

Get the singleton Installation

Operation ID: getInstallation

Permissions: Requires read permission on the requested Installation.

Action Resource Scope
read installation requested
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.capabilities object No —
data.capabilities.agentProvisioning object No —
data.capabilities.agentProvisioning.executionModes array<"embedded" or "dedicated"> Yes min items: 1; max items: 2
data.capabilities.credentialSources object No —
data.capabilities.credentialSources.types array<object> Yes —
data.capabilities.credentialSources.types[].config array<object> Yes —
data.capabilities.credentialSources.types[].config[].description string No —
data.capabilities.credentialSources.types[].config[].issuerRotated boolean No —
data.capabilities.credentialSources.types[].config[].name string Yes min length: 1
data.capabilities.credentialSources.types[].config[].required boolean Yes —
data.capabilities.credentialSources.types[].deviceAuthorization object No —
data.capabilities.credentialSources.types[].deviceAuthorization.harnessId string Yes min length: 1
data.capabilities.credentialSources.types[].harnessAuth object No —
data.capabilities.credentialSources.types[].harnessAuth.loginMode "api_key" or "codex_pat" or "chatgptAuthTokens" Yes —
data.capabilities.credentialSources.types[].harnessAuth.modelProvider string Yes min length: 1
data.capabilities.credentialSources.types[].rotation "none" or "external" or "refresh" Yes —
data.capabilities.credentialSources.types[].secrets array<object> Yes —
data.capabilities.credentialSources.types[].secrets[].description string No —
data.capabilities.credentialSources.types[].secrets[].issuerRotated boolean No —
data.capabilities.credentialSources.types[].secrets[].name string Yes min length: 1
data.capabilities.credentialSources.types[].secrets[].required boolean Yes —
data.capabilities.credentialSources.types[].type string Yes min length: 1; max length: 64; pattern: ^[a-z][a-z0-9-]{0,63}$; Source type from the selected Credential Gateway catalog, for example openai.
data.capabilities.nativeAdmin true No —
data.capabilities.nativeWorkers object No Present only when dedicated native OpenClaw can be admitted, and says where its native worker support comes from.
data.capabilities.nativeWorkers.support "pinned-runtime" or "custom-image" Yes —
data.capabilities.openclaw object No —
data.capabilities.openclaw.executionModes array<"embedded" or "dedicated"> Yes max items: 2; unique items: true; The OpenClaw execution modes this Installation's Sandbox Driver and runtime let an Agent deploy. Agent save refuses Embedded with a selected Sandbox Driver, and Dedicated when the Sandbox Driver's settings refuse it (settingRefusals); it saves Dedicated without a Sandbox Driver that can provision it, which deploy refuses. Empty when no mode can deploy: a selected Sandbox Driver refuses Embedded execution, Dedicated needs one that can provision dedicated OpenClaw with settings that allow it, and a selected Sandbox Driver that is unavailable admits neither.
data.capabilities.openclaw.sandboxDriverUnavailable true No Present while the selected Sandbox Driver is unavailable. executionModes is then empty until it returns, and Agent save and deploy answer 503 DEPENDENCY_UNAVAILABLE.
data.capabilities.openclaw.settingRefusals object No Present when the selected Sandbox Driver can provision a mode missing from executionModes but its settings refuse it. Each value is the message Agent save and deploy return for that mode, naming the setting an operator changes. Absent for other reasons a mode is missing.
data.capabilities.openclaw.settingRefusals.dedicated string No min length: 1
data.capabilities.pluginCatalogs array<object> No —
data.capabilities.pluginCatalogs[].harnessId "openclaw" or "codex" Yes —
data.capabilities.pluginCatalogs[].pluginDiscovery object No —
data.capabilities.pluginCatalogs[].pluginDiscovery.credential "required" or "none" Yes —
data.capabilities.pluginCatalogs[].pluginPolicies object Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.approvers object No —
data.capabilities.pluginCatalogs[].pluginPolicies.approvers.agent boolean Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.approvers.plugin boolean Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.approvers.tools boolean Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.driver PluginDriverIdentity Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.driver.id string Yes min length: 1
data.capabilities.pluginCatalogs[].pluginPolicies.driver.implementation string Yes min length: 1
data.capabilities.pluginCatalogs[].pluginPolicies.driverPolicySchema object<string, any> Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.policyScopeByPlugin object<string, "enablement_only"> No —
data.capabilities.pluginCatalogs[].pluginPolicies.toolDefaults object Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.toolDefaults.approval array<"provider_default" or "all_actions" or "write_actions" or "none"> Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.toolDefaults.enabled boolean Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.toolDefaults.reviewer array<"human" or "auto"> Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.tools object Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.tools.approval array<"provider_default" or "all_actions" or "write_actions" or "none"> Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.tools.enabled boolean Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.tools.reviewer array<"human" or "auto"> Yes —
data.createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.id string Yes pattern: ^ins_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "createdAt": "2026-10-01T12:00:00.000Z",    "id": "ins_123e4567-e89b-42d3-a456-426614174000",    "name": "Engineering"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /installation/bootstrap

Bootstrap the singleton Installation

Operation ID: bootstrapInstallation

Permissions: Requires administer permission on the requested Installation.

Action Resource Scope
administer installation requested
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$

Example request

json
{  "name": "Engineering"}
Responses
Status Meaning
201 Created
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

201 response body: application/json

Field Type Required Constraints
data object Yes —
data.capabilities object No —
data.capabilities.agentProvisioning object No —
data.capabilities.agentProvisioning.executionModes array<"embedded" or "dedicated"> Yes min items: 1; max items: 2
data.capabilities.credentialSources object No —
data.capabilities.credentialSources.types array<object> Yes —
data.capabilities.credentialSources.types[].config array<object> Yes —
data.capabilities.credentialSources.types[].config[].description string No —
data.capabilities.credentialSources.types[].config[].issuerRotated boolean No —
data.capabilities.credentialSources.types[].config[].name string Yes min length: 1
data.capabilities.credentialSources.types[].config[].required boolean Yes —
data.capabilities.credentialSources.types[].deviceAuthorization object No —
data.capabilities.credentialSources.types[].deviceAuthorization.harnessId string Yes min length: 1
data.capabilities.credentialSources.types[].harnessAuth object No —
data.capabilities.credentialSources.types[].harnessAuth.loginMode "api_key" or "codex_pat" or "chatgptAuthTokens" Yes —
data.capabilities.credentialSources.types[].harnessAuth.modelProvider string Yes min length: 1
data.capabilities.credentialSources.types[].rotation "none" or "external" or "refresh" Yes —
data.capabilities.credentialSources.types[].secrets array<object> Yes —
data.capabilities.credentialSources.types[].secrets[].description string No —
data.capabilities.credentialSources.types[].secrets[].issuerRotated boolean No —
data.capabilities.credentialSources.types[].secrets[].name string Yes min length: 1
data.capabilities.credentialSources.types[].secrets[].required boolean Yes —
data.capabilities.credentialSources.types[].type string Yes min length: 1; max length: 64; pattern: ^[a-z][a-z0-9-]{0,63}$; Source type from the selected Credential Gateway catalog, for example openai.
data.capabilities.nativeAdmin true No —
data.capabilities.nativeWorkers object No Present only when dedicated native OpenClaw can be admitted, and says where its native worker support comes from.
data.capabilities.nativeWorkers.support "pinned-runtime" or "custom-image" Yes —
data.capabilities.openclaw object No —
data.capabilities.openclaw.executionModes array<"embedded" or "dedicated"> Yes max items: 2; unique items: true; The OpenClaw execution modes this Installation's Sandbox Driver and runtime let an Agent deploy. Agent save refuses Embedded with a selected Sandbox Driver, and Dedicated when the Sandbox Driver's settings refuse it (settingRefusals); it saves Dedicated without a Sandbox Driver that can provision it, which deploy refuses. Empty when no mode can deploy: a selected Sandbox Driver refuses Embedded execution, Dedicated needs one that can provision dedicated OpenClaw with settings that allow it, and a selected Sandbox Driver that is unavailable admits neither.
data.capabilities.openclaw.sandboxDriverUnavailable true No Present while the selected Sandbox Driver is unavailable. executionModes is then empty until it returns, and Agent save and deploy answer 503 DEPENDENCY_UNAVAILABLE.
data.capabilities.openclaw.settingRefusals object No Present when the selected Sandbox Driver can provision a mode missing from executionModes but its settings refuse it. Each value is the message Agent save and deploy return for that mode, naming the setting an operator changes. Absent for other reasons a mode is missing.
data.capabilities.openclaw.settingRefusals.dedicated string No min length: 1
data.capabilities.pluginCatalogs array<object> No —
data.capabilities.pluginCatalogs[].harnessId "openclaw" or "codex" Yes —
data.capabilities.pluginCatalogs[].pluginDiscovery object No —
data.capabilities.pluginCatalogs[].pluginDiscovery.credential "required" or "none" Yes —
data.capabilities.pluginCatalogs[].pluginPolicies object Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.approvers object No —
data.capabilities.pluginCatalogs[].pluginPolicies.approvers.agent boolean Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.approvers.plugin boolean Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.approvers.tools boolean Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.driver PluginDriverIdentity Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.driver.id string Yes min length: 1
data.capabilities.pluginCatalogs[].pluginPolicies.driver.implementation string Yes min length: 1
data.capabilities.pluginCatalogs[].pluginPolicies.driverPolicySchema object<string, any> Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.policyScopeByPlugin object<string, "enablement_only"> No —
data.capabilities.pluginCatalogs[].pluginPolicies.toolDefaults object Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.toolDefaults.approval array<"provider_default" or "all_actions" or "write_actions" or "none"> Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.toolDefaults.enabled boolean Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.toolDefaults.reviewer array<"human" or "auto"> Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.tools object Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.tools.approval array<"provider_default" or "all_actions" or "write_actions" or "none"> Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.tools.enabled boolean Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.tools.reviewer array<"human" or "auto"> Yes —
data.createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.id string Yes pattern: ^ins_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "createdAt": "2026-10-01T12:00:00.000Z",    "id": "ins_123e4567-e89b-42d3-a456-426614174000",    "name": "Engineering"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /installation/deployment-inventory

Get the complete authorized Agent deployment inventory

Operation ID: getInstallationDeploymentInventory

Permissions: Requires administer permission on the requested Installation.

Action Resource Scope
administer installation requested
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.installationId string Yes pattern: ^ins_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.namespaces array<object> Yes —
data.namespaces[].agents array<object> Yes —
data.namespaces[].agents[].activeRevisionId string No pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.namespaces[].agents[].deploymentInProgress boolean Yes —
data.namespaces[].agents[].desiredRuntimeState "running" or "stopped" Yes —
data.namespaces[].agents[].executionMode "embedded" or "dedicated" Yes —
data.namespaces[].agents[].id string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.namespaces[].agents[].repositoryWorkerRestart "original-worker-required" or "reverification-supported" or "not-applicable" or "unknown" No —
data.namespaces[].agents[].status "active" or "deleting" Yes —
data.namespaces[].id string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.namespaces[].status "provisioning" or "ready" or "failed" or "deleting" Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "installationId": "ins_123e4567-e89b-42d3-a456-426614174000",    "namespaces": [      {        "agents": [          {            "deploymentInProgress": false,            "desiredRuntimeState": "stopped",            "executionMode": "dedicated",            "id": "agt_123e4567-e89b-42d3-a456-426614174000",            "status": "active"          }        ],        "id": "ns_123e4567-e89b-42d3-a456-426614174000",        "status": "ready"      }    ]  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /installation/driver-configurations

Inspect selected Driver accepted startup values and configuration schemas

Operation ID: discoverInstallationConfigurations

Permissions: Requires administer permission on the requested Installation.

Action Resource Scope
administer installation requested
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.configurations array<object> Yes —
data.configurations[].actions object Yes —
data.configurations[].actions.apply object No —
data.configurations[].actions.apply.available boolean Yes —
data.configurations[].actions.apply.href string Yes max length: 2048; pattern: ^/[^/]
data.configurations[].actions.apply.method "GET" or "POST" or "PUT" Yes —
data.configurations[].actions.read object No —
data.configurations[].actions.read.available boolean Yes —
data.configurations[].actions.read.href string Yes max length: 2048; pattern: ^/[^/]
data.configurations[].actions.read.method "GET" or "POST" or "PUT" Yes —
data.configurations[].actions.save object No —
data.configurations[].actions.save.available boolean Yes —
data.configurations[].actions.save.href string Yes max length: 2048; pattern: ^/[^/]
data.configurations[].actions.save.method "GET" or "POST" or "PUT" Yes —
data.configurations[].actions.validate object No —
data.configurations[].actions.validate.available boolean Yes —
data.configurations[].actions.validate.href string Yes max length: 2048; pattern: ^/[^/]
data.configurations[].actions.validate.method "GET" or "POST" or "PUT" Yes —
data.configurations[].binding "installation-startup" or "sandbox-policy" Yes —
data.configurations[].capability string Yes —
data.configurations[].configurationSchema object<string, any> Yes —
data.configurations[].driverId string Yes —
data.configurations[].implementation string Yes —
data.configurations[].key string Yes —
data.configurations[].scope "installation" or "agent" Yes —
data.configurations[].startupConfiguration object<string, SafeJsonValue> No —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "configurations": []  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /observability

Get the configured external observability destination

Operation ID: getObservability

Permissions: Requires administer permission on the requested Installation.

Action Resource Scope
administer installation requested
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.url string (uri) or null Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "url": null  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Namespaces

Operation Summary
GET /namespaces List authorized Namespaces
POST /namespaces Create an Installation-owned Namespace
DELETE /namespaces/{namespaceId} Begin or retry deletion of an empty Installation-owned Namespace
GET /namespaces/{namespaceId} Get an exact Installation-owned Namespace
GET /namespaces/{namespaceId}/agent-capabilities Report the Installation capabilities that Agent creation in this Namespace needs, for a caller who may create Agents there
GET /namespaces/{namespaceId}/permissions Report advisory primary IAM permissions on a readable Namespace, not authorization for a later operation
GET /namespaces/{namespaceId}/permissions/secrets Report the readable Secrets that the caller may not bind to a new Agent, not authorization for a later operation

GET /namespaces

List authorized Namespaces

Operation ID: listNamespaces

Permissions: Only Namespace resources with individual read permission are returned.

Action Resource Scope
read namespace each_returned
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<object> Yes —
data[].createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data[].existingNamespace string No min length: 1; max length: 63; pattern: ^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?$
data[].id string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data[].status "provisioning" or "ready" or "failed" or "deleting" Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

No readable resources

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Example response

json
{  "data": [    {      "createdAt": "2026-10-01T12:00:00.000Z",      "id": "ns_123e4567-e89b-42d3-a456-426614174000",      "name": "engineering",      "status": "ready"    }  ],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces

Create an Installation-owned Namespace

Operation ID: createNamespace

Permissions: Requires create permission for Namespace resources in the Installation. Requires administer permission on the Installation when selecting an existing Kubernetes namespace.

Action Resource Scope
create namespace installation
administer installation requested (when selecting an existing namespace)
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
existingNamespace string No min length: 1; max length: 63; pattern: ^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?$
name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$

Example request

json
{  "name": "engineering"}
Responses
Status Meaning
201 Created
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

201 response body: application/json

Field Type Required Constraints
data object Yes —
data.createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.existingNamespace string No min length: 1; max length: 63; pattern: ^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?$
data.id string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.status "provisioning" or "ready" or "failed" or "deleting" Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "createdAt": "2026-10-01T12:00:00.000Z",    "id": "ns_123e4567-e89b-42d3-a456-426614174000",    "name": "engineering",    "status": "provisioning"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

DELETE /namespaces/{namespaceId}

Begin or retry deletion of an empty Installation-owned Namespace

Operation ID: deleteNamespace

Permissions: Requires delete permission on the requested Namespace.

Action Resource Scope
delete namespace requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
202 Accepted
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

202 response body: application/json

Field Type Required Constraints
data object Yes —
data.createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.existingNamespace string No min length: 1; max length: 63; pattern: ^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?$
data.id string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.status "provisioning" or "ready" or "failed" or "deleting" Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "createdAt": "2026-10-01T12:00:00.000Z",    "id": "ns_123e4567-e89b-42d3-a456-426614174000",    "name": "engineering",    "status": "deleting"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}

Get an exact Installation-owned Namespace

Operation ID: getNamespace

Permissions: Requires read permission on the requested Namespace.

Action Resource Scope
read namespace requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.existingNamespace string No min length: 1; max length: 63; pattern: ^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?$
data.id string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.status "provisioning" or "ready" or "failed" or "deleting" Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "createdAt": "2026-10-01T12:00:00.000Z",    "id": "ns_123e4567-e89b-42d3-a456-426614174000",    "name": "engineering",    "status": "ready"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agent-capabilities

Report the Installation capabilities that Agent creation in this Namespace needs, for a caller who may create Agents there

Operation ID: getNamespaceAgentCapabilities

Permissions: Requires create permission for Agent resources in the requested Namespace.

Action Resource Scope
create agent namespace
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.capabilities object Yes The Installation capabilities that apply to Agent creation in this Namespace, as GET /installation reports them. It includes browser-access availability and omits agentProvisioning, which needs Installation administration.
data.capabilities.credentialSources object No —
data.capabilities.credentialSources.types array<object> Yes —
data.capabilities.credentialSources.types[].config array<object> Yes —
data.capabilities.credentialSources.types[].config[].description string No —
data.capabilities.credentialSources.types[].config[].issuerRotated boolean No —
data.capabilities.credentialSources.types[].config[].name string Yes min length: 1
data.capabilities.credentialSources.types[].config[].required boolean Yes —
data.capabilities.credentialSources.types[].deviceAuthorization object No —
data.capabilities.credentialSources.types[].deviceAuthorization.harnessId string Yes min length: 1
data.capabilities.credentialSources.types[].harnessAuth object No —
data.capabilities.credentialSources.types[].harnessAuth.loginMode "api_key" or "codex_pat" or "chatgptAuthTokens" Yes —
data.capabilities.credentialSources.types[].harnessAuth.modelProvider string Yes min length: 1
data.capabilities.credentialSources.types[].rotation "none" or "external" or "refresh" Yes —
data.capabilities.credentialSources.types[].secrets array<object> Yes —
data.capabilities.credentialSources.types[].secrets[].description string No —
data.capabilities.credentialSources.types[].secrets[].issuerRotated boolean No —
data.capabilities.credentialSources.types[].secrets[].name string Yes min length: 1
data.capabilities.credentialSources.types[].secrets[].required boolean Yes —
data.capabilities.credentialSources.types[].type string Yes min length: 1; max length: 64; pattern: ^[a-z][a-z0-9-]{0,63}$; Source type from the selected Credential Gateway catalog, for example openai.
data.capabilities.nativeAdmin true No —
data.capabilities.nativeWorkers object No Present only when dedicated native OpenClaw can be admitted, and says where its native worker support comes from.
data.capabilities.nativeWorkers.support "pinned-runtime" or "custom-image" Yes —
data.capabilities.openclaw object No —
data.capabilities.openclaw.executionModes array<"embedded" or "dedicated"> Yes max items: 2; unique items: true; The OpenClaw execution modes this Installation's Sandbox Driver and runtime let an Agent deploy. Agent save refuses Embedded with a selected Sandbox Driver, and Dedicated when the Sandbox Driver's settings refuse it (settingRefusals); it saves Dedicated without a Sandbox Driver that can provision it, which deploy refuses. Empty when no mode can deploy: a selected Sandbox Driver refuses Embedded execution, Dedicated needs one that can provision dedicated OpenClaw with settings that allow it, and a selected Sandbox Driver that is unavailable admits neither.
data.capabilities.openclaw.sandboxDriverUnavailable true No Present while the selected Sandbox Driver is unavailable. executionModes is then empty until it returns, and Agent save and deploy answer 503 DEPENDENCY_UNAVAILABLE.
data.capabilities.openclaw.settingRefusals object No Present when the selected Sandbox Driver can provision a mode missing from executionModes but its settings refuse it. Each value is the message Agent save and deploy return for that mode, naming the setting an operator changes. Absent for other reasons a mode is missing.
data.capabilities.openclaw.settingRefusals.dedicated string No min length: 1
data.capabilities.pluginCatalogs array<object> No —
data.capabilities.pluginCatalogs[].harnessId "openclaw" or "codex" Yes —
data.capabilities.pluginCatalogs[].pluginDiscovery object No —
data.capabilities.pluginCatalogs[].pluginDiscovery.credential "required" or "none" Yes —
data.capabilities.pluginCatalogs[].pluginPolicies object Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.approvers object No —
data.capabilities.pluginCatalogs[].pluginPolicies.approvers.agent boolean Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.approvers.plugin boolean Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.approvers.tools boolean Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.driver PluginDriverIdentity Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.driver.id string Yes min length: 1
data.capabilities.pluginCatalogs[].pluginPolicies.driver.implementation string Yes min length: 1
data.capabilities.pluginCatalogs[].pluginPolicies.driverPolicySchema object<string, any> Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.policyScopeByPlugin object<string, "enablement_only"> No —
data.capabilities.pluginCatalogs[].pluginPolicies.toolDefaults object Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.toolDefaults.approval array<"provider_default" or "all_actions" or "write_actions" or "none"> Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.toolDefaults.enabled boolean Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.toolDefaults.reviewer array<"human" or "auto"> Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.tools object Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.tools.approval array<"provider_default" or "all_actions" or "write_actions" or "none"> Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.tools.enabled boolean Yes —
data.capabilities.pluginCatalogs[].pluginPolicies.tools.reviewer array<"human" or "auto"> Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "capabilities": {      "credentialSources": {        "types": [          {            "config": [              {                "name": "authorized_base_url",                "required": false              }            ],            "harnessAuth": {              "loginMode": "api_key",              "modelProvider": "openai"            },            "rotation": "external",            "secrets": [              {                "name": "api_key",                "required": true              }            ],            "type": "openai"          }        ]      },      "openclaw": {        "executionModes": [          "dedicated"        ]      }    }  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/permissions

Report advisory primary IAM permissions on a readable Namespace, not authorization for a later operation

Operation ID: getNamespaceCallerPermissions

Permissions: Requires read permission on the requested Namespace.

Action Resource Scope
read namespace requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.agents object Yes —
data.agents.create boolean Yes Whether the selected IAM Driver allows Agent creation in this Namespace now. Advisory only: other required permissions, lifecycle state, or a later authorization decision can still prevent the operation.
data.delete boolean Yes Whether the selected IAM Driver allows deletion of this exact Namespace now. Advisory only: remaining resources, required Preset deletion permissions, or a later authorization decision can still prevent deletion.
data.installation object Yes —
data.installation.administer boolean Yes Whether the selected IAM Driver allows Installation administer now, which Installation-wide operations such as listing Backends need. The check targets the Installation, not this Namespace. Advisory only: a later authorization decision can still prevent the operation.
data.secrets object Yes —
data.secrets.create boolean Yes Whether the selected IAM Driver allows Secret creation in this Namespace now. Advisory only: other required permissions, lifecycle state, or a later authorization decision can still prevent the operation.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "agents": {      "create": true    },    "delete": true,    "installation": {      "administer": true    },    "secrets": {      "create": true    }  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/permissions/secrets

Report the readable Secrets that the caller may not bind to a new Agent, not authorization for a later operation

Operation ID: getNamespaceSecretPermissions

Permissions: Requires read permission on the requested Namespace.

Action Resource Scope
read namespace requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.operateDenied array<string> Yes The IDs of the Namespace's Secrets that the caller may read but the selected IAM Driver does not allow Secret operate on now, sorted. Agent creation needs Secret operate on each Secret it binds or uses: its Harness authentication source, its Configuration's Secret bindings, and a directory search Secret. Empty when it is not reported: reported only to a caller who may create an Agent in this Namespace. Advisory only: other required permissions, lifecycle state, or a later authorization decision can still prevent the operation.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "operateDenied": []  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Agents

Operation Summary
GET /namespaces/{namespaceId}/agents List authorized Agents in one exact Namespace
POST /namespaces/{namespaceId}/agents Create a Namespace-owned Agent
POST /namespaces/{namespaceId}/agents/device-authorizations Experimental: Start a private device login for Agent configuration
DELETE /namespaces/{namespaceId}/agents/device-authorizations/{secretId} Experimental: Discard a local device login without upstream revocation
POST /namespaces/{namespaceId}/agents/device-authorizations/{secretId}/poll Experimental: Complete device login without returning credential material
POST /namespaces/{namespaceId}/agents/models List provider models for Agent creation without storing the supplied credential
POST /namespaces/{namespaceId}/agents/plugins List or search available plugins for Agent creation using the selected Driver
POST /namespaces/{namespaceId}/agents/plugins/details Read plugin details using the selected Driver
POST /namespaces/{namespaceId}/agents/provision Create a new Agent and queue first-time provisioning
GET /namespaces/{namespaceId}/agents/provision/{workId} Get first-time provisioning status for one exact work item
POST /namespaces/{namespaceId}/agents/provision/{workId}/retry Retry failed first-time provisioning for one exact work item
GET /namespaces/{namespaceId}/agents/repository-options List approved repository choices for Agent creation in one Namespace
POST /namespaces/{namespaceId}/agents/validate Check an unsaved Agent Configuration, plugin selections, initial workspace files and Harness authentication as Configuration and Agent create would, without saving anything
DELETE /namespaces/{namespaceId}/agents/{agentId} Begin or retry deletion of the requested Agent and its Agent revisions
GET /namespaces/{namespaceId}/agents/{agentId} Get an exact Namespace-owned Agent
PATCH /namespaces/{namespaceId}/agents/{agentId} Replace an exact Namespace-owned Agent's editable draft
GET /namespaces/{namespaceId}/agents/{agentId}/audit-events List audit metadata for one Agent
POST /namespaces/{namespaceId}/agents/{agentId}/credential-sources/{credentialSourceId}/withdraw Revoke one credential source from the selected Agent revision
GET /namespaces/{namespaceId}/agents/{agentId}/credential-sources/{credentialSourceId}/withdrawal Get the withdrawal state of a credential source for an Agent
POST /namespaces/{namespaceId}/agents/{agentId}/deploy Save an Agent revision from the Agent's saved settings
POST /namespaces/{namespaceId}/agents/{agentId}/deploy-first Admit the first deployment of an exact reviewed Configuration; requires Configuration read
GET /namespaces/{namespaceId}/agents/{agentId}/deploy-first/{key}/{expectedConfigurationId}/{expectedGeneration} Read an exact first-deployment receipt; null does not prove failure; requires Configuration read
POST /namespaces/{namespaceId}/agents/{agentId}/device-authorizations Experimental: Start a private device login for Agent configuration
DELETE /namespaces/{namespaceId}/agents/{agentId}/device-authorizations/{secretId} Experimental: Discard a local device login without upstream revocation
POST /namespaces/{namespaceId}/agents/{agentId}/device-authorizations/{secretId}/poll Experimental: Complete device login without returning credential material
GET /namespaces/{namespaceId}/agents/{agentId}/driver-configurations Discover authorized Agent Driver configuration contributions
GET /namespaces/{namespaceId}/agents/{agentId}/harness-status Read the Sandbox Driver's record of a running Agent's dedicated Harness Sandbox
GET /namespaces/{namespaceId}/agents/{agentId}/native-admin Resolve native admin UI launch availability for one Agent
POST /namespaces/{namespaceId}/agents/{agentId}/native-admin/confirm Confirm a native Agent browser challenge
POST /namespaces/{namespaceId}/agents/{agentId}/native-admin/launch Create a browser-bound native Agent launch
GET /namespaces/{namespaceId}/agents/{agentId}/permissions Report advisory primary IAM permissions on a readable Agent, not authorization for a later operation
GET /namespaces/{namespaceId}/agents/{agentId}/permissions/secrets Report the readable Secrets that the caller may not bind to a readable Agent, not authorization for a later operation
POST /namespaces/{namespaceId}/agents/{agentId}/plugins List or search plugins for an active Agent; caller needs Agent read/update. Curated discovery needs no Secret; hosted discovery needs the Agent's bound Service Accounts Secret with caller and Agent Secret operate grants
GET /namespaces/{namespaceId}/agents/{agentId}/plugins/capabilities Read selected Plugin Driver policy capabilities for an active Agent with caller Agent read/update permission
POST /namespaces/{namespaceId}/agents/{agentId}/plugins/details Read plugin details for an active Agent with Agent read/update access. Hosted discovery uses the Agent's bound credential. Managed MCP discovery uses an eligible saved connection. The caller and Agent need operate access to the credential
GET /namespaces/{namespaceId}/agents/{agentId}/repository-approval-scopes Review resolved repository scope before explicitly approving it
GET /namespaces/{namespaceId}/agents/{agentId}/repository-approvals Read attributable repository approvals and removed generations for one Agent
POST /namespaces/{namespaceId}/agents/{agentId}/repository-approvals/{approvalId}/remove Remove repository approval independently of configuration or runtime cleanup
GET /namespaces/{namespaceId}/agents/{agentId}/repository-options List approved repository choices for updating one Agent
GET /namespaces/{namespaceId}/agents/{agentId}/revisions/{revisionId}/sandbox-policy/{facet}/recommendations Read policy suggestions for the requested Agent revision
GET /namespaces/{namespaceId}/agents/{agentId}/runtime-credentials Get metadata for one Agent's provisioned runtime credentials
POST /namespaces/{namespaceId}/agents/{agentId}/runtime-credentials Provision initial runtime credentials for one undeployed Agent
GET /namespaces/{namespaceId}/agents/{agentId}/runtime-images Read observed images and source commits for an Agent's active runtime
GET /namespaces/{namespaceId}/agents/{agentId}/sandbox-policy/{facet} Read one Agent sandbox policy and delegation ceiling
PUT /namespaces/{namespaceId}/agents/{agentId}/sandbox-policy/{facet} Replace one Agent network policy additions
POST /namespaces/{namespaceId}/agents/{agentId}/sandbox-policy/{facet}/apply Queue policy application to the running Agent revision, optionally replacing saved additions
PATCH /namespaces/{namespaceId}/agents/{agentId}/sandbox-policy/{facet}/editing Temporarily enable or disable future policy edits for one Agent
POST /namespaces/{namespaceId}/agents/{agentId}/sandbox-policy/{facet}/validate Preview Agent network policy admission without saving or applying
POST /namespaces/{namespaceId}/agents/{agentId}/stop Stop one Agent and keep its saved Agent revision and persistent state
GET /namespaces/{namespaceId}/agents/{agentId}/workspace/files/{name} Read an allowed workspace file from one active Agent
PUT /namespaces/{namespaceId}/agents/{agentId}/workspace/files/{name} Create or replace an allowed workspace file for one active Agent
POST /namespaces/{namespaceId}/channel-directory/lookup Search a channel directory using an authorized Namespace Secret
GET /native-admin/return/{agentKey} Resolve an authorized Agent from a copied native chat link

GET /namespaces/{namespaceId}/agents

List authorized Agents in one exact Namespace

Operation ID: listAgents

Permissions: Requires read permission on the requested Namespace. Only Agent resources with individual read permission are returned.

Action Resource Scope
read namespace requested
read agent each_returned
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<object or object> Yes An Agent with readable saved settings, or Agent metadata with configurationReadError (code SAVED_CONFIGURATION_UNREADABLE and the unreadable field). The error variant omits pluginDriver, plugins, pluginApprovers, repositoryBindings, repositoryAccess, harnessAuth, and credentialSources.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

No readable resources

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Example response

json
{  "data": [    {      "backendId": null,      "configurationId": "cfg_123e4567-e89b-42d3-a456-426614174000",      "createdAt": "2026-10-01T12:00:00.000Z",      "desiredRuntimeState": "stopped",      "executionMode": "dedicated",      "gatewayManagedMode": true,      "harnessAuth": {        "method": "api_key",        "source": {          "id": "sec_123e4567-e89b-42d3-a456-426614174000",          "kind": "secret",          "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"        }      },      "id": "agt_123e4567-e89b-42d3-a456-426614174000",      "name": "Documentation assistant",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",      "servicePrincipalId": "principal-docs-agent",      "status": "active"    }  ],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents

Create a Namespace-owned Agent

Operation ID: createAgent

Permissions: Requires create permission for Agent resources in the requested Namespace. Requires administer permission on the Installation when gatewayManagedMode is set to false. Requires read permission on the requested Configuration. Requires read permission on each currently associated or newly associated ServiceAccount when present. Requires operate permission on each bound Secret when Secret bindings are present or selected. Requires operate permission on each CredentialSource listed in credentialSources or named by a credential-source harnessAuth.

Action Resource Scope
create agent namespace
administer installation installation (when gatewayManagedMode is false)
read configuration requested
read service_account requested (when associated)
operate secret requested (when bound)
operate credential_source request_body (when bound)
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
backendId string or null No —
configurationId string Yes pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
credentialSources array<object> No max items: 64; unique items: true; Every credential source the Agent uses, at each source's endpoints. A credential-source harnessAuth names one entry. The selected Credential Gateway injects them at deployment; the Agent never receives their values.
credentialSources[].sourceId string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
executionMode "embedded" or "dedicated" No —
expectedConfigurationGeneration integer No minimum: 1; maximum: 9007199254740991
gatewayManagedMode boolean No Whether OCE restricts Gateway-local administration. Defaults on when the selected Compute Driver supports it, otherwise off. Changing the setting requires Installation administer permission and takes effect on deployment.
harnessAuth object or object or object or object or null No —
initialWorkspaceFiles object No —
initialWorkspaceFiles.AGENTS.md string No max length: 16384; pattern: ^[^\u0000]*$
initialWorkspaceFiles.IDENTITY.md string No max length: 16384; pattern: ^[^\u0000]*$
initialWorkspaceFiles.SOUL.md string No max length: 16384; pattern: ^[^\u0000]*$
initialWorkspaceFiles.USER.md string No max length: 16384; pattern: ^[^\u0000]*$
name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
nativeAdmin boolean No Enable Agent browser access with server-derived settings. Requires Configuration update permission, expectedConfigurationGeneration, and an unreferenced Configuration. Chat requires Agent operate; full administration requires Agent administer.
pluginApprovers PluginApprovers No max items: 64; unique items: true
pluginApprovers[].channel string Yes min length: 1; max length: 64; pattern: ^[a-z][a-z0-9_-]*$
pluginApprovers[].id string Yes min length: 1; max length: 200; pattern: ^[^\u0000-\u0020\u007f]+$
plugins PluginDesiredState No Agent plugin selection map. Keys must be 1-253 characters matching ^[A-Za-z0-9._~:@-]{1,253}$.
repositoryAccess object No Desired repository access. Each omitted repository profile inherits defaultProfile; explicit profiles remain overrides. Mutually exclusive with repositoryBindings in create, provision, and update requests.
repositoryAccess.defaultProfile string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
repositoryAccess.repositories array<object> Yes max items: 16
repositoryAccess.repositories[].profile string No min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
repositoryAccess.repositories[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
repositoryBindings array<object> No max items: 16; Requested repository references and optional profiles. Omission means no bindings on create and preserves bindings on update; an empty update clears bindings. Admission requires unique repository references.
repositoryBindings[].profile string No min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
repositoryBindings[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
workspaceDefaultsId string No pattern: ^[a-f0-9]{64}$

Example request

json
{  "configurationId": "cfg_123e4567-e89b-42d3-a456-426614174000",  "executionMode": "dedicated",  "harnessAuth": {    "method": "api_key",    "source": {      "id": "sec_123e4567-e89b-42d3-a456-426614174000",      "kind": "secret",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    }  },  "name": "Documentation assistant"}
Responses
Status Meaning
201 Created
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

201 response body: application/json

Field Type Required Constraints
data object Yes —
data.activeRevisionId string No pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.backendId string or null Yes —
data.configurationId string Yes pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.credentialSources array<object> No max items: 64; unique items: true; Every credential source the Agent uses, at each source's endpoints. A credential-source harnessAuth names one entry. The selected Credential Gateway injects them at deployment; the Agent never receives their values.
data.credentialSources[].sourceId string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.desiredRuntimeState "running" or "stopped" Yes —
data.executionMode "embedded" or "dedicated" Yes —
data.gatewayManagedMode boolean Yes Whether OCE restricts Gateway-local administration. Defaults on when the selected Compute Driver supports it, otherwise off. Changing the setting requires Installation administer permission and takes effect on deployment.
data.harnessAuth object or object or object or object or null Yes —
data.id string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.pluginApprovers PluginApprovers No max items: 64; unique items: true
data.pluginApprovers[].channel string Yes min length: 1; max length: 64; pattern: ^[a-z][a-z0-9_-]*$
data.pluginApprovers[].id string Yes min length: 1; max length: 200; pattern: ^[^\u0000-\u0020\u007f]+$
data.pluginDriver PluginDriverIdentity No —
data.pluginDriver.id string Yes min length: 1
data.pluginDriver.implementation string Yes min length: 1
data.plugins PluginDesiredState No Agent plugin selection map. Keys must be 1-253 characters matching ^[A-Za-z0-9._~:@-]{1,253}$.
data.repositoryAccess object No Desired repository access. Each omitted repository profile inherits defaultProfile; explicit profiles remain overrides. Mutually exclusive with repositoryBindings in create, provision, and update requests.
data.repositoryAccess.defaultProfile string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryAccess.repositories array<object> Yes max items: 16
data.repositoryAccess.repositories[].profile string No min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryAccess.repositories[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryBindings array<object> No min items: 1; max items: 16
data.repositoryBindings[].profile string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryBindings[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.sandboxPolicyEditing boolean No —
data.servicePrincipalId string Yes min length: 1; max length: 200
data.status "active" or "deleting" Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "backendId": null,    "configurationId": "cfg_123e4567-e89b-42d3-a456-426614174000",    "createdAt": "2026-10-01T12:00:00.000Z",    "desiredRuntimeState": "stopped",    "executionMode": "dedicated",    "gatewayManagedMode": true,    "harnessAuth": {      "method": "api_key",      "source": {        "id": "sec_123e4567-e89b-42d3-a456-426614174000",        "kind": "secret",        "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"      }    },    "id": "agt_123e4567-e89b-42d3-a456-426614174000",    "name": "Documentation assistant",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "servicePrincipalId": "principal-docs-agent",    "status": "active"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/device-authorizations

Experimental: Start a private device login for Agent configuration

Operation ID: startAgentDeviceAuthorization

Permissions: Requires create permission for Agent resources in the requested Namespace. Requires create permission for Secret resources in the requested Namespace.

Action Resource Scope
create agent namespace
create secret namespace
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
harnessId string Yes min length: 1; max length: 100

Example request

json
{  "harnessId": "codex"}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
501 The selected Driver does not support this operation.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.expiresAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.intervalSeconds integer Yes minimum: 1
data.session object Yes Exact OCC Secret reference. Shape: { "kind": "secret", "namespaceId": "ns_...", "id": "sec_..." }.
data.session.id string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.session.kind "secret" Yes —
data.session.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.source object No Exact OCC credential source reference. Shape: { "kind": "credential_source", "namespaceId": "ns_...", "id": "cs_..." }.
data.source.id string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.source.kind "credential_source" Yes —
data.source.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.status "pending" or "ready" Yes —
data.userCode string Yes —
data.verificationUrl string (uri) Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "expiresAt": "2026-10-01T12:15:00.000Z",    "intervalSeconds": 5,    "session": {      "id": "sec_123e4567-e89b-42d3-a456-426614174000",      "kind": "secret",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    },    "status": "pending",    "userCode": "ABCD-EFGH",    "verificationUrl": "https://auth.example.com/device"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

DELETE /namespaces/{namespaceId}/agents/device-authorizations/{secretId}

Experimental: Discard a local device login without upstream revocation

Operation ID: cancelAgentDeviceAuthorization

Permissions: Requires create permission for Agent resources in the requested Namespace. Requires operate permission on the requested Secret.

Action Resource Scope
create agent namespace
operate secret requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
secretId path string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "sec_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
204 No Content
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
501 The selected Driver does not support this operation.
503 A required dependency is unavailable.

POST /namespaces/{namespaceId}/agents/device-authorizations/{secretId}/poll

Experimental: Complete device login without returning credential material

Operation ID: pollAgentDeviceAuthorization

Permissions: Requires create permission for Agent resources in the requested Namespace. Requires operate permission on the requested Secret.

Action Resource Scope
create agent namespace
operate secret requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
secretId path string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "sec_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Schema: object.

Example request

json
{}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
501 The selected Driver does not support this operation.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.expiresAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.intervalSeconds integer Yes minimum: 1
data.session object Yes Exact OCC Secret reference. Shape: { "kind": "secret", "namespaceId": "ns_...", "id": "sec_..." }.
data.session.id string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.session.kind "secret" Yes —
data.session.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.source object No Exact OCC credential source reference. Shape: { "kind": "credential_source", "namespaceId": "ns_...", "id": "cs_..." }.
data.source.id string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.source.kind "credential_source" Yes —
data.source.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.status "pending" or "ready" Yes —
data.userCode string Yes —
data.verificationUrl string (uri) Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "expiresAt": "2026-10-01T12:15:00.000Z",    "intervalSeconds": 5,    "session": {      "id": "sec_123e4567-e89b-42d3-a456-426614174000",      "kind": "secret",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    },    "status": "pending",    "userCode": "ABCD-EFGH",    "verificationUrl": "https://auth.example.com/device"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/models

List provider models for Agent creation without storing the supplied credential

Operation ID: discoverAgentModels

Permissions: Requires create permission for Agent resources in the requested Namespace.

Action Resource Scope
create agent namespace
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
apiKey string Yes min length: 1; max length: 8192; pattern: \S
authMethod "api_key" or "codex_pat" Yes —
provider "openai" or "anthropic" Yes —

Example request

json
{  "apiKey": "replace-with-your-authorized-model-key",  "authMethod": "api_key",  "provider": "openai"}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
429 Too many requests. Wait for Retry-After and try again.
500 The platform request could not be completed.
501 The selected Driver does not support this operation.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<object> Yes —
data[].id string Yes —
data[].name string Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

No readable resources

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Example response

json
{  "data": [    {      "id": "gpt-5.1-codex",      "name": "gpt-5.1-codex"    }  ],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/plugins

List or search available plugins for Agent creation using the selected Driver

Operation ID: discoverAgentPlugins

Permissions: Requires create permission for Agent resources in the requested Namespace. Requires operate permission on the exact same-Namespace Secret when a Secret reference is supplied.

Action Resource Scope
create agent namespace
operate secret request_body
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Schema: object or object or object or object.

Example request

json
{  "harnessId": "codex",  "secretRef": {    "id": "sec_123e4567-e89b-42d3-a456-426614174000",    "kind": "secret",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"  }}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
429 Too many requests. Wait for Retry-After and try again.
500 The platform request could not be completed.
501 The selected Driver does not support this operation.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.nextCursor string or null Yes —
data.plugins array<object> Yes —
data.plugins[].available boolean No —
data.plugins[].description string No —
data.plugins[].id string Yes —
data.plugins[].logoUrl string No —
data.plugins[].name string Yes —
data.plugins[].privacyPolicyUrl string No —
data.plugins[].remoteId string No —
data.plugins[].selectableWithoutTools boolean No —
data.plugins[].termsOfServiceUrl string No —
data.plugins[].tools null or array<object> Yes —
data.plugins[].unavailableHelp object No —
data.plugins[].unavailableHelp.label string Yes —
data.plugins[].unavailableHelp.url string Yes —
data.plugins[].unavailableReason string No —
data.plugins[].websiteUrl string No —
data.setup object No —
data.setup.links array<object> Yes —
data.setup.links[].label string Yes —
data.setup.links[].url string Yes —
data.setup.message string Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "nextCursor": null,    "plugins": [      {        "description": "Search the documentation service.",        "id": "documentation",        "name": "Documentation",        "tools": null      }    ]  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/plugins/details

Read plugin details using the selected Driver

Operation ID: discoverAgentPluginDetails

Permissions: Requires create permission for Agent resources in the requested Namespace. Requires operate permission on the exact same-Namespace Secret when a Secret reference is supplied.

Action Resource Scope
create agent namespace
operate secret request_body
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Schema: object or object or object or object.

Example request

json
{  "harnessId": "codex",  "pluginId": "documentation",  "secretRef": {    "id": "sec_123e4567-e89b-42d3-a456-426614174000",    "kind": "secret",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"  }}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
429 Too many requests. Wait for Retry-After and try again.
500 The platform request could not be completed.
501 The selected Driver does not support this operation.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.available boolean No —
data.description string No —
data.id string Yes —
data.logoUrl string No —
data.name string Yes —
data.privacyPolicyUrl string No —
data.remoteId string No —
data.selectableWithoutTools boolean No —
data.termsOfServiceUrl string No —
data.tools null or array<object> Yes —
data.unavailableHelp object No —
data.unavailableHelp.label string Yes —
data.unavailableHelp.url string Yes —
data.unavailableReason string No —
data.websiteUrl string No —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "description": "Search the documentation service.",    "id": "documentation",    "name": "Documentation",    "tools": null  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/provision

Create a new Agent and queue first-time provisioning

Operation ID: provisionAgent

Permissions: Requires create permission for Agent resources in the requested Namespace. Requires create permission for Configuration resources in the requested Namespace. Requires administer permission on the requested Installation. Requires read permission on each currently associated or newly associated ServiceAccount when present. Requires operate permission on each existing Secret reference supplied in provisioning inputs.

Action Resource Scope
create agent namespace
create configuration namespace
administer installation requested
read service_account requested (when associated)
operate secret requested (when bound)
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
backendId string or null No —
configuration object Yes —
configuration.kind "agent" Yes —
configuration.secretBindings object<string, object> No max properties: 64; Optional Secret binding map. Keys are destination environment variable names; at most 64 bindings are accepted. Each value must contain source.kind, source.namespaceId, and source.id, and may contain delivery.type: "env". Admission rejects reserved or process-control destinations such as OPENCLAW_*, CODEX_*, OPENAI_*, ANTHROPIC_*, OCC_*, KUBERNETES_*, PATH, HOME, and proxy variables. Model authentication belongs to Agent.harnessAuth.
configuration.values object<string, SafeJsonValue> Yes A native OpenClaw configuration document.
executionMode "embedded" or "dedicated" No —
gatewayManagedMode boolean No Whether OCE restricts Gateway-local administration. Defaults on when the selected Compute Driver supports it, otherwise off. Changing the setting requires Installation administer permission and takes effect on deployment.
harnessAuth object or object or object or object or null No Dedicated Harness authentication, required. Omitted, null and runtime are refused with 400 INVALID_REQUEST. A ready model credential_source is supported when the selected Credential Gateway owns it and the caller has source operate permission.
initialWorkspaceFiles object No —
initialWorkspaceFiles.AGENTS.md string No max length: 16384; pattern: ^[^\u0000]*$
initialWorkspaceFiles.IDENTITY.md string No max length: 16384; pattern: ^[^\u0000]*$
initialWorkspaceFiles.SOUL.md string No max length: 16384; pattern: ^[^\u0000]*$
initialWorkspaceFiles.USER.md string No max length: 16384; pattern: ^[^\u0000]*$
name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
nativeAdmin boolean No Opt in to native admin UI access on this Agent's exact OCE HTTPS origin before its first deployment. Requires native admin access enabled on the Installation. Defaults to false.
pluginApprovers PluginApprovers No max items: 64; unique items: true
pluginApprovers[].channel string Yes min length: 1; max length: 64; pattern: ^[a-z][a-z0-9_-]*$
pluginApprovers[].id string Yes min length: 1; max length: 200; pattern: ^[^\u0000-\u0020\u007f]+$
plugins PluginDesiredState No Agent plugin selection map. Keys must be 1-253 characters matching ^[A-Za-z0-9._~:@-]{1,253}$.
repositoryAccess object No Desired repository access. Each omitted repository profile inherits defaultProfile; explicit profiles remain overrides. Mutually exclusive with repositoryBindings in create, provision, and update requests.
repositoryAccess.defaultProfile string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
repositoryAccess.repositories array<object> Yes max items: 16
repositoryAccess.repositories[].profile string No min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
repositoryAccess.repositories[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
repositoryBindings array<object> No max items: 16; Requested repository references and optional profiles. Omission means no bindings on create and preserves bindings on update; an empty update clears bindings. Admission requires unique repository references.
repositoryBindings[].profile string No min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
repositoryBindings[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
workspaceDefaultsId string No pattern: ^[a-f0-9]{64}$

Example request

json
{  "configuration": {    "kind": "agent",    "values": {      "agents": {        "defaults": {          "model": "codex/gpt-5.1-codex",          "models": {            "codex/gpt-5.1-codex": {              "agentRuntime": {                "id": "codex"              }            }          }        }      },      "gateway": {        "auth": {          "password": {            "id": "OPENCLAW_GATEWAY_PASSWORD",            "provider": "default",            "source": "env"          }        },        "bind": "lan",        "controlUi": {          "enabled": false        },        "http": {          "endpoints": {            "chatCompletions": {              "enabled": true            }          }        },        "mode": "local"      },      "models": {        "providers": {          "codex": {            "api": "openai-responses",            "baseUrl": "http://127.0.0.1:9",            "models": [              {                "id": "gpt-5.1-codex",                "name": "gpt-5.1-codex"              }            ]          }        }      },      "plugins": {        "allow": [          "codex"        ],        "entries": {          "codex": {            "config": {              "appServer": {                "approvalPolicy": "on-request",                "authToken": "${APP_SERVER_TOKEN}",                "mode": "guardian",                "sandbox": "read-only",                "transport": "websocket",                "url": "${APP_SERVER_URL}"              }            },            "enabled": true          }        }      }    }  },  "executionMode": "dedicated",  "harnessAuth": {    "method": "api_key",    "source": {      "id": "sec_123e4567-e89b-42d3-a456-426614174000",      "kind": "secret",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    }  },  "name": "Documentation assistant",  "requestId": "req_123e4567-e89b-42d3-a456-426614174000"}
Responses
Status Meaning
202 Accepted
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

202 response body: application/json

Field Type Required Constraints
data object Yes —
data.provisioning object Yes —
data.provisioning.agentId string No pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.provisioning.attemptCount integer Yes minimum: 0
data.provisioning.configurationId string No pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.provisioning.error object No —
data.provisioning.error.code string Yes min length: 1; max length: 64
data.provisioning.error.message string Yes min length: 1; max length: 256
data.provisioning.phase "admitted" or "configuration" or "transport" or "handoff" Yes —
data.provisioning.progress object No Present while a job past handoff is queued or running. The job defers without spending attempts while it waits, so attemptCount can stay 0.
data.provisioning.progress.lastAttempt null or object Yes With agent_revision:read, this can report the deployment's named wait. Otherwise it reports the job's own PROVISIONING_DEPLOYMENT_PENDING, or null if the job has not recorded that wait. The controller writes the message; a refusal can include a code restricted to uppercase letters, digits, and underscores.
data.provisioning.progress.phase "deployment" Yes Handoff is done; the job waits for its initial deployment.
data.provisioning.requestId string No pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$; The client request ID stored when this job was admitted. Older controllers omit it. The separate meta.requestId identifies the current HTTP request.
data.provisioning.revisionId string No pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.provisioning.status "queued" or "running" or "succeeded" or "failed" Yes —
data.provisioning.updatedAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.provisioning.url string Yes min length: 1
data.provisioning.workId string Yes min length: 1; max length: 200
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "provisioning": {      "attemptCount": 0,      "phase": "admitted",      "requestId": "req_123e4567-e89b-42d3-a456-426614174000",      "status": "queued",      "updatedAt": "2026-10-01T12:00:00.000Z",      "url": "/namespaces/ns_123e4567-e89b-42d3-a456-426614174000/agents/provision/provision-docs-assistant",      "workId": "provision-docs-assistant"    }  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/provision/{workId}

Get first-time provisioning status for one exact work item

Operation ID: getAgentProvisioning

Permissions: Requires create permission for Agent and Configuration resources in the requested Namespace and administer permission on the Installation. These are checked from the request path before any lookup, so a caller without them gets 403 whether or not the Namespace or work item exists. Only the principal that started the work can read it. The caller also needs read, operate and deploy permission on the work's Agent and read and update permission on its Configuration once the work has created them, operate permission on each Secret the work binds or uses for Harness authentication, and read permission on its Harness ServiceAccount when present. OCC re-checks these grants against the initiator while the work runs.

Action Resource Scope
create agent namespace
create configuration namespace
administer installation requested
read agent requested (once created)
operate agent requested (once created)
deploy agent requested (once created)
read configuration requested (once created)
update configuration requested (once created)
read service_account requested (when associated)
operate secret requested (when bound)
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
workId path string Yes min length: 1; max length: 200; pattern: ^[A-Za-z0-9._~:@/-]{1,200}$ "provision-docs-assistant"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.agentId string No pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.attemptCount integer Yes minimum: 0
data.configurationId string No pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.error object No —
data.error.code string Yes min length: 1; max length: 64
data.error.message string Yes min length: 1; max length: 256
data.phase "admitted" or "configuration" or "transport" or "handoff" Yes —
data.progress object No Present while a job past handoff is queued or running. The job defers without spending attempts while it waits, so attemptCount can stay 0.
data.progress.lastAttempt null or object Yes With agent_revision:read, this can report the deployment's named wait. Otherwise it reports the job's own PROVISIONING_DEPLOYMENT_PENDING, or null if the job has not recorded that wait. The controller writes the message; a refusal can include a code restricted to uppercase letters, digits, and underscores.
data.progress.phase "deployment" Yes Handoff is done; the job waits for its initial deployment.
data.requestId string No pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$; The client request ID stored when this job was admitted. Older controllers omit it. The separate meta.requestId identifies the current HTTP request.
data.revisionId string No pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.status "queued" or "running" or "succeeded" or "failed" Yes —
data.updatedAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.url string Yes min length: 1
data.workId string Yes min length: 1; max length: 200
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "attemptCount": 0,    "phase": "admitted",    "requestId": "req_123e4567-e89b-42d3-a456-426614174000",    "status": "queued",    "updatedAt": "2026-10-01T12:00:00.000Z",    "url": "/namespaces/ns_123e4567-e89b-42d3-a456-426614174000/agents/provision/provision-docs-assistant",    "workId": "provision-docs-assistant"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/provision/{workId}/retry

Retry failed first-time provisioning for one exact work item

Operation ID: retryAgentProvisioning

Permissions: Requires create permission for Agent and Configuration resources in the requested Namespace and administer permission on the Installation. These are checked from the request path before any lookup, so a caller without them gets 403 whether or not the Namespace or work item exists. Only the principal that started the work can retry it. The caller also needs read, operate and deploy permission on the work's Agent and read and update permission on its Configuration once the work has created them, operate permission on each Secret the work binds or uses for Harness authentication, and read permission on its Harness ServiceAccount when present. OCC re-checks these grants against the initiator while the work runs.

Action Resource Scope
create agent namespace
create configuration namespace
administer installation requested
read agent requested (once created)
operate agent requested (once created)
deploy agent requested (once created)
read configuration requested (once created)
update configuration requested (once created)
read service_account requested (when associated)
operate secret requested (when bound)
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
workId path string Yes min length: 1; max length: 200; pattern: ^[A-Za-z0-9._~:@/-]{1,200}$ "provision-docs-assistant"
Responses
Status Meaning
202 Accepted
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

202 response body: application/json

Field Type Required Constraints
data object Yes —
data.agentId string No pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.attemptCount integer Yes minimum: 0
data.configurationId string No pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.error object No —
data.error.code string Yes min length: 1; max length: 64
data.error.message string Yes min length: 1; max length: 256
data.phase "admitted" or "configuration" or "transport" or "handoff" Yes —
data.progress object No Present while a job past handoff is queued or running. The job defers without spending attempts while it waits, so attemptCount can stay 0.
data.progress.lastAttempt null or object Yes With agent_revision:read, this can report the deployment's named wait. Otherwise it reports the job's own PROVISIONING_DEPLOYMENT_PENDING, or null if the job has not recorded that wait. The controller writes the message; a refusal can include a code restricted to uppercase letters, digits, and underscores.
data.progress.phase "deployment" Yes Handoff is done; the job waits for its initial deployment.
data.requestId string No pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$; The client request ID stored when this job was admitted. Older controllers omit it. The separate meta.requestId identifies the current HTTP request.
data.revisionId string No pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.status "queued" or "running" or "succeeded" or "failed" Yes —
data.updatedAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.url string Yes min length: 1
data.workId string Yes min length: 1; max length: 200
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "attemptCount": 0,    "phase": "admitted",    "requestId": "req_123e4567-e89b-42d3-a456-426614174000",    "status": "queued",    "updatedAt": "2026-10-01T12:00:00.000Z",    "url": "/namespaces/ns_123e4567-e89b-42d3-a456-426614174000/agents/provision/provision-docs-assistant",    "workId": "provision-docs-assistant"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/repository-options

List approved repository choices for Agent creation in one Namespace

Operation ID: listRepositoryOptions

Permissions: Requires create permission for Agent resources in the requested Namespace.

Action Resource Scope
create agent namespace
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 Check error.code: REPOSITORY_OPTIONS_UNAVAILABLE means optional repository discovery is unavailable after Namespace lifecycle and Agent create authorization checks, because the selected Compute or Sandbox Driver cannot support repository credentials or the selected repository Driver is unavailable. Without repository settings the answer is 200 with meta.notConfigured instead. Creation without repository bindings remains available subject to fresh authorization. DEPENDENCY_UNAVAILABLE includes IAM and other required dependency failures and does not permit proceeding. Successful discovery returns a data array, including an empty array when no repositories are approved.

200 response body: application/json

Field Type Required Constraints
data array<object> Yes max items: 1001
data[].allowedProfiles array<string> Yes min items: 1; max items: 16; unique items: true
data[].description string No min length: 1; max length: 512
data[].displayName string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
meta object Yes —
meta.notConfigured true No Present when the Installation has no repository settings, so no repository credential Driver is selected. data is then empty, and Agent save refuses repository bindings with 409 RESOURCE_CONFLICT.
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

No readable resources

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Example response

json
{  "data": [    {      "allowedProfiles": [        "read"      ],      "displayName": "Documentation",      "repositoryRef": "documentation"    }  ],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/validate

Check an unsaved Agent Configuration, plugin selections, initial workspace files and Harness authentication as Configuration and Agent create would, without saving anything

Operation ID: validateAgentCreate

Permissions: Requires create permission for Agent resources in the requested Namespace. Requires administer permission on the Installation when gatewayManagedMode is set to false.

Action Resource Scope
create agent namespace
administer installation installation (when gatewayManagedMode is false)
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
configuration object Yes The Agent Configuration the caller will save, not yet saved. With secretBindings, a channel credential reference without a binding is refused where Configuration create refuses it (the bundled Kubernetes Compute); the bound Secrets are not read. Without them, that check is skipped.
configuration.kind "agent" Yes —
configuration.secretBindings object<string, object> No max properties: 64; Optional Secret binding map. Keys are destination environment variable names; at most 64 bindings are accepted. Each value must contain source.kind, source.namespaceId, and source.id, and may contain delivery.type: "env". Admission rejects reserved or process-control destinations such as OPENCLAW_*, CODEX_*, OPENAI_*, ANTHROPIC_*, OCC_*, KUBERNETES_*, PATH, HOME, and proxy variables. Model authentication belongs to Agent.harnessAuth.
configuration.values object<string, SafeJsonValue> Yes A native OpenClaw configuration document.
executionMode "embedded" or "dedicated" No —
gatewayManagedMode boolean No Whether OCE restricts Gateway-local administration. Defaults on when the selected Compute Driver supports it, otherwise off. Changing the setting requires Installation administer permission and takes effect on deployment.
harnessAuth object or object or object or object or object or null No The Harness authentication Agent create will name, so Agent save's check of it against the execution mode and Compute settings runs here too. For a Secret the caller saves next, send only its method. The Secret and credential source are not read; omitted or null skips this check.
initialWorkspaceFiles object No —
initialWorkspaceFiles.AGENTS.md string No max length: 16384; pattern: ^[^\u0000]*$
initialWorkspaceFiles.IDENTITY.md string No max length: 16384; pattern: ^[^\u0000]*$
initialWorkspaceFiles.SOUL.md string No max length: 16384; pattern: ^[^\u0000]*$
initialWorkspaceFiles.USER.md string No max length: 16384; pattern: ^[^\u0000]*$
name string No min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$; The Agent name create will use. A name that another Agent in the Namespace has is refused with create's 409.
pluginApprovers PluginApprovers No max items: 64; unique items: true
pluginApprovers[].channel string Yes min length: 1; max length: 64; pattern: ^[a-z][a-z0-9_-]*$
pluginApprovers[].id string Yes min length: 1; max length: 200; pattern: ^[^\u0000-\u0020\u007f]+$
plugins PluginDesiredState No Agent plugin selection map. Keys must be 1-253 characters matching ^[A-Za-z0-9._~:@-]{1,253}$.

Example request

json
{  "configuration": {    "kind": "agent",    "values": {      "agents": {        "defaults": {          "model": "codex/gpt-5.1-codex",          "models": {            "codex/gpt-5.1-codex": {              "agentRuntime": {                "id": "codex"              }            }          }        }      },      "gateway": {        "auth": {          "password": {            "id": "OPENCLAW_GATEWAY_PASSWORD",            "provider": "default",            "source": "env"          }        },        "bind": "lan",        "controlUi": {          "enabled": false        },        "http": {          "endpoints": {            "chatCompletions": {              "enabled": true            }          }        },        "mode": "local"      },      "models": {        "providers": {          "codex": {            "api": "openai-responses",            "baseUrl": "http://127.0.0.1:9",            "models": [              {                "id": "gpt-5.1-codex",                "name": "gpt-5.1-codex"              }            ]          }        }      },      "plugins": {        "allow": [          "codex"        ],        "entries": {          "codex": {            "config": {              "appServer": {                "approvalPolicy": "on-request",                "authToken": "${APP_SERVER_TOKEN}",                "mode": "guardian",                "sandbox": "read-only",                "transport": "websocket",                "url": "${APP_SERVER_URL}"              }            },            "enabled": true          }        }      }    }  },  "executionMode": "dedicated",  "harnessAuth": {    "method": "api_key",    "source": {      "id": "sec_123e4567-e89b-42d3-a456-426614174000",      "kind": "secret",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    }  },  "name": "Documentation assistant"}
Responses
Status Meaning
204 No Content
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

DELETE /namespaces/{namespaceId}/agents/{agentId}

Begin or retry deletion of the requested Agent and its Agent revisions

Operation ID: deleteAgent

Permissions: Requires delete permission on the requested Agent.

Action Resource Scope
delete agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
202 Accepted
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

202 response body: application/json

Field Type Required Constraints
data object Yes —
data.activeRevisionId string No pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.backendId string or null Yes —
data.configurationId string Yes pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.credentialSources array<object> No max items: 64; unique items: true; Every credential source the Agent uses, at each source's endpoints. A credential-source harnessAuth names one entry. The selected Credential Gateway injects them at deployment; the Agent never receives their values.
data.credentialSources[].sourceId string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.desiredRuntimeState "running" or "stopped" Yes —
data.executionMode "embedded" or "dedicated" Yes —
data.gatewayManagedMode boolean Yes Whether OCE restricts Gateway-local administration. Defaults on when the selected Compute Driver supports it, otherwise off. Changing the setting requires Installation administer permission and takes effect on deployment.
data.harnessAuth object or object or object or object or null Yes —
data.id string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.pluginApprovers PluginApprovers No max items: 64; unique items: true
data.pluginApprovers[].channel string Yes min length: 1; max length: 64; pattern: ^[a-z][a-z0-9_-]*$
data.pluginApprovers[].id string Yes min length: 1; max length: 200; pattern: ^[^\u0000-\u0020\u007f]+$
data.pluginDriver PluginDriverIdentity No —
data.pluginDriver.id string Yes min length: 1
data.pluginDriver.implementation string Yes min length: 1
data.plugins PluginDesiredState No Agent plugin selection map. Keys must be 1-253 characters matching ^[A-Za-z0-9._~:@-]{1,253}$.
data.repositoryAccess object No Desired repository access. Each omitted repository profile inherits defaultProfile; explicit profiles remain overrides. Mutually exclusive with repositoryBindings in create, provision, and update requests.
data.repositoryAccess.defaultProfile string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryAccess.repositories array<object> Yes max items: 16
data.repositoryAccess.repositories[].profile string No min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryAccess.repositories[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryBindings array<object> No min items: 1; max items: 16
data.repositoryBindings[].profile string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryBindings[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.sandboxPolicyEditing boolean No —
data.servicePrincipalId string Yes min length: 1; max length: 200
data.status "active" or "deleting" Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "backendId": null,    "configurationId": "cfg_123e4567-e89b-42d3-a456-426614174000",    "createdAt": "2026-10-01T12:00:00.000Z",    "desiredRuntimeState": "stopped",    "executionMode": "dedicated",    "gatewayManagedMode": true,    "harnessAuth": {      "method": "api_key",      "source": {        "id": "sec_123e4567-e89b-42d3-a456-426614174000",        "kind": "secret",        "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"      }    },    "id": "agt_123e4567-e89b-42d3-a456-426614174000",    "name": "Documentation assistant",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "servicePrincipalId": "principal-docs-agent",    "status": "deleting"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}

Get an exact Namespace-owned Agent

Operation ID: getAgent

Permissions: Requires read permission on the requested Agent.

Action Resource Scope
read agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object or object Yes An Agent with readable saved settings, or Agent metadata with configurationReadError (code SAVED_CONFIGURATION_UNREADABLE and the unreadable field). The error variant omits pluginDriver, plugins, pluginApprovers, repositoryBindings, repositoryAccess, harnessAuth, and credentialSources.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "backendId": null,    "configurationId": "cfg_123e4567-e89b-42d3-a456-426614174000",    "createdAt": "2026-10-01T12:00:00.000Z",    "desiredRuntimeState": "stopped",    "executionMode": "dedicated",    "gatewayManagedMode": true,    "harnessAuth": {      "method": "api_key",      "source": {        "id": "sec_123e4567-e89b-42d3-a456-426614174000",        "kind": "secret",        "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"      }    },    "id": "agt_123e4567-e89b-42d3-a456-426614174000",    "name": "Documentation assistant",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "servicePrincipalId": "principal-docs-agent",    "status": "active"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

PATCH /namespaces/{namespaceId}/agents/{agentId}

Replace an exact Namespace-owned Agent's editable draft

Operation ID: updateAgent

Permissions: Requires update permission on the requested Agent. Requires administer permission on the Installation when the request changes the Agent's saved gatewayManagedMode setting. Requires read permission on the requested Configuration. Requires read permission on each currently associated or newly associated ServiceAccount when present. Requires operate permission on each bound Secret when Secret bindings are present or selected. Requires operate permission on each CredentialSource the Agent lists or names in harnessAuth, before and after the update. Requires read permission on the Agent's SandboxPolicy when it has saved network policy additions and the Agent has repository bindings after the update.

Action Resource Scope
update agent requested
administer installation installation (when the request changes gatewayManagedMode)
read configuration requested
read service_account requested (when associated)
operate secret requested (when bound)
operate credential_source requested (when bound)
read sandbox_policy requested (when saved network policy additions exist)
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
backendId string or null No —
configurationId string No pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
credentialSources array<object> No max items: 64; unique items: true; Every credential source the Agent uses, at each source's endpoints. A credential-source harnessAuth names one entry. The selected Credential Gateway injects them at deployment; the Agent never receives their values.
credentialSources[].sourceId string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
executionMode "embedded" or "dedicated" No —
gatewayManagedMode boolean No Whether OCE restricts Gateway-local administration. Defaults on when the selected Compute Driver supports it, otherwise off. Changing the setting requires Installation administer permission and takes effect on deployment.
harnessAuth object or object or object or object or null No —
pluginApprovers PluginApprovers or null No —
plugins PluginDesiredState No Agent plugin selection map. Keys must be 1-253 characters matching ^[A-Za-z0-9._~:@-]{1,253}$.
repositoryAccess object No Desired repository access. Each omitted repository profile inherits defaultProfile; explicit profiles remain overrides. Mutually exclusive with repositoryBindings in create, provision, and update requests.
repositoryAccess.defaultProfile string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
repositoryAccess.repositories array<object> Yes max items: 16
repositoryAccess.repositories[].profile string No min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
repositoryAccess.repositories[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
repositoryBindings array<object> No max items: 16; Requested repository references and optional profiles. Omission means no bindings on create and preserves bindings on update; an empty update clears bindings. Admission requires unique repository references.
repositoryBindings[].profile string No min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
repositoryBindings[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
repositoryStandingApproval object or object No —

Example request

json
{  "configurationId": "cfg_123e4567-e89b-42d3-a456-426614174000",  "executionMode": "dedicated",  "harnessAuth": {    "method": "api_key",    "source": {      "id": "sec_123e4567-e89b-42d3-a456-426614174000",      "kind": "secret",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    }  }}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.activeRevisionId string No pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.backendId string or null Yes —
data.configurationId string Yes pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.credentialSources array<object> No max items: 64; unique items: true; Every credential source the Agent uses, at each source's endpoints. A credential-source harnessAuth names one entry. The selected Credential Gateway injects them at deployment; the Agent never receives their values.
data.credentialSources[].sourceId string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.desiredRuntimeState "running" or "stopped" Yes —
data.executionMode "embedded" or "dedicated" Yes —
data.gatewayManagedMode boolean Yes Whether OCE restricts Gateway-local administration. Defaults on when the selected Compute Driver supports it, otherwise off. Changing the setting requires Installation administer permission and takes effect on deployment.
data.harnessAuth object or object or object or object or null Yes —
data.id string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.pluginApprovers PluginApprovers No max items: 64; unique items: true
data.pluginApprovers[].channel string Yes min length: 1; max length: 64; pattern: ^[a-z][a-z0-9_-]*$
data.pluginApprovers[].id string Yes min length: 1; max length: 200; pattern: ^[^\u0000-\u0020\u007f]+$
data.pluginDriver PluginDriverIdentity No —
data.pluginDriver.id string Yes min length: 1
data.pluginDriver.implementation string Yes min length: 1
data.plugins PluginDesiredState No Agent plugin selection map. Keys must be 1-253 characters matching ^[A-Za-z0-9._~:@-]{1,253}$.
data.repositoryAccess object No Desired repository access. Each omitted repository profile inherits defaultProfile; explicit profiles remain overrides. Mutually exclusive with repositoryBindings in create, provision, and update requests.
data.repositoryAccess.defaultProfile string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryAccess.repositories array<object> Yes max items: 16
data.repositoryAccess.repositories[].profile string No min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryAccess.repositories[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryBindings array<object> No min items: 1; max items: 16
data.repositoryBindings[].profile string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryBindings[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.sandboxPolicyEditing boolean No —
data.servicePrincipalId string Yes min length: 1; max length: 200
data.status "active" or "deleting" Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "backendId": null,    "configurationId": "cfg_123e4567-e89b-42d3-a456-426614174000",    "createdAt": "2026-10-01T12:00:00.000Z",    "desiredRuntimeState": "stopped",    "executionMode": "dedicated",    "gatewayManagedMode": true,    "harnessAuth": {      "method": "api_key",      "source": {        "id": "sec_123e4567-e89b-42d3-a456-426614174000",        "kind": "secret",        "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"      }    },    "id": "agt_123e4567-e89b-42d3-a456-426614174000",    "name": "Documentation assistant",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "servicePrincipalId": "principal-docs-agent",    "status": "active"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/audit-events

List audit metadata for one Agent

Operation ID: listAgentAuditEvents

Permissions: Requires a human session with a direct read_audit grant on the requested Agent. Returns selected audit metadata from the preceding 24 hours.

Action Resource Scope
read_audit agent requested
Parameters
Name In Type Required Constraints Example
limit query string No pattern: ^(?:[1-9][0-9]?|100)$ "20"
cursor query string No min length: 1; max length: 1024; pattern: ^[A-Za-z0-9_-]+$ "YXVkaXQtbmV4dC1wYWdl"
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
501 The selected Driver does not support this operation.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.events array<object> Yes max items: 100
data.events[].actorId string No pattern: ^(prn|spn)_[a-f0-9-]{36}$
data.events[].attemptId string No pattern: ^aud_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.events[].event "api_request" or "work_queued" or "work_claimed" or "work_deferred" or "work_completed" or "work_result" Yes —
data.events[].id string Yes pattern: ^aud_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.events[].occurredAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{6}Z$
data.events[].operationId "getAgent" No —
data.events[].outcome "success" or "denied" or "failure" Yes —
data.events[].requestId string No pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.events[].workId string No pattern: ^work_[0-9a-f]{64}$
data.events[].workState "queued" or "claimed" or "succeeded" or "failed_permanent" or "superseded" No —
data.nextCursor string or null Yes —
data.projectionVersion 1 Yes —
data.window object Yes —
data.window.end string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.window.start string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "events": [      {        "actorId": "prn_123e4567-e89b-42d3-a456-426614174000",        "event": "api_request",        "id": "aud_123e4567-e89b-42d3-a456-426614174000",        "occurredAt": "2026-10-01T11:30:00.000000Z",        "operationId": "getAgent",        "outcome": "success",        "requestId": "req_123e4567-e89b-42d3-a456-426614174000"      }    ],    "nextCursor": null,    "projectionVersion": 1,    "window": {      "end": "2026-10-01T12:00:00.000Z",      "start": "2026-09-30T12:00:00.000Z"    }  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/{agentId}/credential-sources/{credentialSourceId}/withdraw

Revoke one credential source from the selected Agent revision

Operation ID: withdrawAgentCredentialSource

Permissions: Requires operate permission on the requested Agent.

Action Resource Scope
operate agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
credentialSourceId path string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "cs_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
202 Accepted
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

202 response body: application/json

Field Type Required Constraints
data object Yes —
data.agentId string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.completedAt string (date-time) No —
data.credentialSourceId string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.lastAttemptAt string (date-time) No —
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.reason string No pattern: ^[A-Z0-9_]{1,64}$; Reason code of the worker's most recent attempt, for example CREDENTIAL_WITHDRAWAL_PENDING while the gateway has not confirmed revocation.
data.requestedAt string (date-time) Yes —
data.requestedBy string Yes min length: 1; max length: 256; Principal whose agent:operate permission the worker re-checks before revoking.
data.revisionId string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$; Identifies the Agent revision for the reported withdrawal. This is the selected Agent revision unless another Agent revision that can still run has a pending withdrawal for this source. A status read first reports a pending withdrawal with no queued or running attempt. revoked means every Agent revision that can still run with this source has confirmed withdrawal.
data.state "pending" or "revoked" Yes revoked only after the Credential Gateway confirms that the Agent revision's placeholders no longer resolve.
data.withdrawalInProgress boolean Yes true while a withdrawal attempt is queued or running. A pending withdrawal with false has no queued or running attempt. OCC maintenance can queue a new attempt. To request another attempt, send the withdraw request again.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "agentId": "agt_123e4567-e89b-42d3-a456-426614174000",    "credentialSourceId": "cs_123e4567-e89b-42d3-a456-426614174000",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "requestedAt": "2026-10-01T12:00:00.000Z",    "requestedBy": "principal-administrator",    "revisionId": "rev_123e4567-e89b-42d3-a456-426614174000",    "state": "pending",    "withdrawalInProgress": true  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/credential-sources/{credentialSourceId}/withdrawal

Get the withdrawal state of a credential source for an Agent

Operation ID: getAgentCredentialWithdrawal

Permissions: Requires read permission on the requested Agent.

Action Resource Scope
read agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
credentialSourceId path string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "cs_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.agentId string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.completedAt string (date-time) No —
data.credentialSourceId string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.lastAttemptAt string (date-time) No —
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.reason string No pattern: ^[A-Z0-9_]{1,64}$; Reason code of the worker's most recent attempt, for example CREDENTIAL_WITHDRAWAL_PENDING while the gateway has not confirmed revocation.
data.requestedAt string (date-time) Yes —
data.requestedBy string Yes min length: 1; max length: 256; Principal whose agent:operate permission the worker re-checks before revoking.
data.revisionId string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$; Identifies the Agent revision for the reported withdrawal. This is the selected Agent revision unless another Agent revision that can still run has a pending withdrawal for this source. A status read first reports a pending withdrawal with no queued or running attempt. revoked means every Agent revision that can still run with this source has confirmed withdrawal.
data.state "pending" or "revoked" Yes revoked only after the Credential Gateway confirms that the Agent revision's placeholders no longer resolve.
data.withdrawalInProgress boolean Yes true while a withdrawal attempt is queued or running. A pending withdrawal with false has no queued or running attempt. OCC maintenance can queue a new attempt. To request another attempt, send the withdraw request again.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "agentId": "agt_123e4567-e89b-42d3-a456-426614174000",    "credentialSourceId": "cs_123e4567-e89b-42d3-a456-426614174000",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "requestedAt": "2026-10-01T12:00:00.000Z",    "requestedBy": "principal-administrator",    "revisionId": "rev_123e4567-e89b-42d3-a456-426614174000",    "state": "pending",    "withdrawalInProgress": true  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/{agentId}/deploy

Save an Agent revision from the Agent's saved settings

Operation ID: deployAgent

Permissions: Requires deploy permission on the requested Agent. Requires read permission on the requested Configuration. Requires read permission on the Agent when the selected Compute Driver must generate missing runtime credentials for its first deployment. Requires operate permission on the Agent when the selected Compute Driver must generate missing runtime credentials for its first deployment. Requires read permission on each currently associated or newly associated ServiceAccount when present. Requires operate permission on each bound Secret when Secret bindings are present or selected. Requires operate permission on each CredentialSource the Agent lists or names in harnessAuth. Requires read permission on the Agent's SandboxPolicy when it has saved network policy additions. Deployment also requires the owning Agent service principal to have operate permission on each bound Secret and on each CredentialSource the Agent lists.

Action Resource Scope
deploy agent requested
read configuration requested
read agent requested
operate agent requested
read service_account requested (when associated)
operate secret requested (when bound)
operate credential_source requested (when bound)
read sandbox_policy requested (when saved network policy additions exist)
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: No

Content type: application/json

Field Type Required Constraints
harnessOverrides object<string, any> No Nonsecret settings owned and validated by the selected Compute Driver.

Example request

json
{}
Responses
Status Meaning
202 Accepted
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

202 response body: application/json

Field Type Required Constraints
data object Yes —
data.agentId string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.backendId string or null Yes —
data.compute object Yes —
data.compute.id string Yes min length: 1
data.compute.implementation string Yes min length: 1
data.configuration object<string, SafeJsonValue> Yes A native OpenClaw configuration document.
data.configurationGeneration integer Yes minimum: 1; maximum: 9007199254740991
data.configurationId string Yes pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.configurationKind "agent" Yes —
data.createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.credentialSources array<object> No max items: 64; unique items: true; Every credential source the Agent uses, at each source's endpoints. A credential-source harnessAuth names one entry. The selected Credential Gateway injects them at deployment; the Agent never receives their values.
data.credentialSources[].sourceId string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.gatewayManagedMode boolean Yes Gateway managed mode requested for this Agent version. It does not report Gateway runtime state.
data.harness object Yes —
data.harness.configuration object<string, any> Yes Nonsecret settings owned and validated by the selected Compute Driver.
data.harness.id string Yes min length: 1
data.harness.mode "embedded" or "dedicated" Yes —
data.harness.overrides object<string, any> Yes Nonsecret settings owned and validated by the selected Compute Driver.
data.harness.version string Yes min length: 1
data.harnessAuth object or object or object or object Yes —
data.id string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.pluginApprovers PluginApprovers No max items: 64; unique items: true
data.pluginApprovers[].channel string Yes min length: 1; max length: 64; pattern: ^[a-z][a-z0-9_-]*$
data.pluginApprovers[].id string Yes min length: 1; max length: 200; pattern: ^[^\u0000-\u0020\u007f]+$
data.plugins object No —
data.plugins.driver PluginDriverIdentity Yes —
data.plugins.driver.id string Yes min length: 1
data.plugins.driver.implementation string Yes min length: 1
data.plugins.plugins PluginDesiredState Yes Agent plugin selection map. Keys must be 1-253 characters matching ^[A-Za-z0-9._~:@-]{1,253}$.
data.repositoryCredentials object No —
data.repositoryCredentials.bindings array<object> Yes min items: 1; max items: 16
data.repositoryCredentials.bindings[].profile string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryCredentials.bindings[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryCredentials.deadlineWallMs integer Yes minimum: 1; maximum: 9007199254740991
data.repositoryCredentials.driver object Yes —
data.repositoryCredentials.driver.id string Yes min length: 1
data.repositoryCredentials.driver.implementation string Yes min length: 1
data.revision integer Yes minimum: 1
data.sandboxDriverId string No min length: 1; The Sandbox Driver that provisions this version. Absent when the version runs without a Sandbox, so it has no Sandbox log source and records no policy denials.
data.secretBindings object<string, object> No max properties: 64; Optional Secret binding map. Keys are destination environment variable names; at most 64 bindings are accepted. Each value must contain source.kind, source.namespaceId, and source.id, and may contain delivery.type: "env". Admission rejects reserved or process-control destinations such as OPENCLAW_*, CODEX_*, OPENAI_*, ANTHROPIC_*, OCC_*, KUBERNETES_*, PATH, HOME, and proxy variables. Model authentication belongs to Agent.harnessAuth.
data.secretDriverId string No min length: 1
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "agentId": "agt_123e4567-e89b-42d3-a456-426614174000",    "backendId": null,    "compute": {      "id": "kubernetes",      "implementation": "kubernetes"    },    "configuration": {      "agents": {        "defaults": {          "model": "codex/gpt-5.1-codex",          "models": {            "codex/gpt-5.1-codex": {              "agentRuntime": {                "id": "codex"              }            }          }        }      },      "gateway": {        "auth": {          "password": {            "id": "OPENCLAW_GATEWAY_PASSWORD",            "provider": "default",            "source": "env"          }        },        "bind": "lan",        "controlUi": {          "enabled": false        },        "http": {          "endpoints": {            "chatCompletions": {              "enabled": true            }          }        },        "mode": "local"      },      "models": {        "providers": {          "codex": {            "api": "openai-responses",            "baseUrl": "http://127.0.0.1:9",            "models": [              {                "id": "gpt-5.1-codex",                "name": "gpt-5.1-codex"              }            ]          }        }      },      "plugins": {        "allow": [          "codex"        ],        "entries": {          "codex": {            "config": {              "appServer": {                "approvalPolicy": "on-request",                "authToken": "${APP_SERVER_TOKEN}",                "mode": "guardian",                "sandbox": "read-only",                "transport": "websocket",                "url": "${APP_SERVER_URL}"              }            },            "enabled": true          }        }      }    },    "configurationGeneration": 1,    "configurationId": "cfg_123e4567-e89b-42d3-a456-426614174000",    "configurationKind": "agent",    "createdAt": "2026-10-01T12:00:00.000Z",    "gatewayManagedMode": true,    "harness": {      "configuration": {        "modelProvider": {          "baseUrl": "https://api.openai.com/v1",          "protocol": "openai-responses",          "supportsStandaloneWebSearch": false        }      },      "id": "codex",      "mode": "dedicated",      "overrides": {},      "version": "1"    },    "harnessAuth": {      "method": "api_key",      "source": {        "id": "sec_123e4567-e89b-42d3-a456-426614174000",        "kind": "secret",        "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"      }    },    "id": "rev_123e4567-e89b-42d3-a456-426614174000",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "revision": 1  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/{agentId}/deploy-first

Admit the first deployment of an exact reviewed Configuration; requires Configuration read

Operation ID: deployAgentFirst

Permissions: Fresh admission has the same permissions and conditional access requirements as ordinary deployment. Permissions marked fresh_admission apply only when creating the first revision. Recovery of a matching admission requires only current deploy permission on the exact Agent and read permission on the reviewed Configuration. Requires deploy permission on the requested Agent. Requires read permission on the requested Configuration. Requires read permission on the Agent when the selected Compute Driver must generate missing runtime credentials for its first deployment. Requires operate permission on the Agent when the selected Compute Driver must generate missing runtime credentials for its first deployment. Requires read permission on each currently associated or newly associated ServiceAccount when present. Requires operate permission on each bound Secret when Secret bindings are present or selected. Requires operate permission on each CredentialSource the Agent lists or names in harnessAuth. Requires read permission on the Agent's SandboxPolicy when it has saved network policy additions. Deployment also requires the owning Agent service principal to have operate permission on each bound Secret and on each CredentialSource the Agent lists.

Action Resource Scope
deploy agent requested
read configuration requested
read agent requested
operate agent requested
read service_account requested (when associated)
operate secret requested (when bound)
operate credential_source requested (when bound)
read sandbox_policy requested (when saved network policy additions exist)
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
expectedConfigurationId string Yes pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
expectedGeneration integer Yes minimum: 1; maximum: 9007199254740991
harnessOverrides object<string, any> No Nonsecret settings owned and validated by the selected Compute Driver.
key string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._~-]*$

Example request

json
{  "expectedConfigurationId": "cfg_123e4567-e89b-42d3-a456-426614174000",  "expectedGeneration": 1,  "key": "review-1"}
Responses
Status Meaning
202 Accepted
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

202 response body: application/json

Field Type Required Constraints
data object Yes —
data.agentId string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.configurationGeneration integer Yes minimum: 1; maximum: 9007199254740991
data.configurationId string Yes pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.revisionId string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "agentId": "agt_123e4567-e89b-42d3-a456-426614174000",    "configurationGeneration": 1,    "configurationId": "cfg_123e4567-e89b-42d3-a456-426614174000",    "createdAt": "2026-10-01T12:00:00.000Z",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "revisionId": "rev_123e4567-e89b-42d3-a456-426614174000"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/deploy-first/{key}/{expectedConfigurationId}/{expectedGeneration}

Read an exact first-deployment receipt; null does not prove failure; requires Configuration read

Operation ID: recoverAgentFirstDeployment

Permissions: Requires deploy permission on the exact Agent and read permission on the reviewed Configuration named in the request path. These current permissions are checked for both receipts and misses. Recovery performs no admission or credential preparation.

Action Resource Scope
deploy agent requested
read configuration requested
Parameters
Name In Type Required Constraints Example
harnessOverrides query string No max length: 8192 "{}"
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
key path string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._~-]*$ "review-1"
expectedConfigurationId path string Yes pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "cfg_123e4567-e89b-42d3-a456-426614174000"
expectedGeneration path string Yes max length: 16; pattern: ^(?:[1-9][0-9]{0,14}|[1-8][0-9]{15}|900[0-6][0-9]{12}|9007[0-0][0-9]{11}|90071[0-8][0-9]{10}|900719[0-8][0-9]{9}|9007199[0-1][0-9]{8}|90071992[0-4][0-9]{7}|900719925[0-3][0-9]{6}|9007199254[0-6][0-9]{5}|90071992547[0-3][0-9]{4}|9007199254740[0-8][0-9]{2}|90071992547409[0-8][0-9]{1}|900719925474099[0-0][0-9]{0}|9007199254740991)(?![\s\S]) "1"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object or null Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "agentId": "agt_123e4567-e89b-42d3-a456-426614174000",    "configurationGeneration": 1,    "configurationId": "cfg_123e4567-e89b-42d3-a456-426614174000",    "createdAt": "2026-10-01T12:00:00.000Z",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "revisionId": "rev_123e4567-e89b-42d3-a456-426614174000"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/{agentId}/device-authorizations

Experimental: Start a private device login for Agent configuration

Operation ID: startSavedAgentDeviceAuthorization

Permissions: Requires update permission on the requested Agent. Requires read permission on the requested Agent. Requires create permission for Secret resources in the requested Namespace.

Action Resource Scope
update agent requested
read agent requested
create secret namespace
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
harnessId string Yes min length: 1; max length: 100

Example request

json
{  "harnessId": "codex"}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
501 The selected Driver does not support this operation.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.expiresAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.intervalSeconds integer Yes minimum: 1
data.session object Yes Exact OCC Secret reference. Shape: { "kind": "secret", "namespaceId": "ns_...", "id": "sec_..." }.
data.session.id string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.session.kind "secret" Yes —
data.session.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.source object No Exact OCC credential source reference. Shape: { "kind": "credential_source", "namespaceId": "ns_...", "id": "cs_..." }.
data.source.id string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.source.kind "credential_source" Yes —
data.source.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.status "pending" or "ready" Yes —
data.userCode string Yes —
data.verificationUrl string (uri) Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "expiresAt": "2026-10-01T12:15:00.000Z",    "intervalSeconds": 5,    "session": {      "id": "sec_123e4567-e89b-42d3-a456-426614174000",      "kind": "secret",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    },    "status": "pending",    "userCode": "ABCD-EFGH",    "verificationUrl": "https://auth.example.com/device"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

DELETE /namespaces/{namespaceId}/agents/{agentId}/device-authorizations/{secretId}

Experimental: Discard a local device login without upstream revocation

Operation ID: cancelSavedAgentDeviceAuthorization

Permissions: Requires update permission on the requested Agent. Requires read permission on the requested Agent. Requires operate permission on the requested Secret.

Action Resource Scope
update agent requested
read agent requested
operate secret requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
secretId path string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "sec_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
204 No Content
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
501 The selected Driver does not support this operation.
503 A required dependency is unavailable.

POST /namespaces/{namespaceId}/agents/{agentId}/device-authorizations/{secretId}/poll

Experimental: Complete device login without returning credential material

Operation ID: pollSavedAgentDeviceAuthorization

Permissions: Requires update permission on the requested Agent. Requires read permission on the requested Agent. Requires operate permission on the requested Secret.

Action Resource Scope
update agent requested
read agent requested
operate secret requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
secretId path string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "sec_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Schema: object.

Example request

json
{}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
501 The selected Driver does not support this operation.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.expiresAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.intervalSeconds integer Yes minimum: 1
data.session object Yes Exact OCC Secret reference. Shape: { "kind": "secret", "namespaceId": "ns_...", "id": "sec_..." }.
data.session.id string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.session.kind "secret" Yes —
data.session.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.source object No Exact OCC credential source reference. Shape: { "kind": "credential_source", "namespaceId": "ns_...", "id": "cs_..." }.
data.source.id string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.source.kind "credential_source" Yes —
data.source.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.status "pending" or "ready" Yes —
data.userCode string Yes —
data.verificationUrl string (uri) Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "expiresAt": "2026-10-01T12:15:00.000Z",    "intervalSeconds": 5,    "session": {      "id": "sec_123e4567-e89b-42d3-a456-426614174000",      "kind": "secret",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    },    "status": "pending",    "userCode": "ABCD-EFGH",    "verificationUrl": "https://auth.example.com/device"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/driver-configurations

Discover authorized Agent Driver configuration contributions

Operation ID: discoverAgentConfigurations

Permissions: Requires read permission on the requested Agent.

Action Resource Scope
read agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.configurations array<object> Yes —
data.configurations[].actions object Yes —
data.configurations[].actions.apply object No —
data.configurations[].actions.apply.available boolean Yes —
data.configurations[].actions.apply.href string Yes max length: 2048; pattern: ^/[^/]
data.configurations[].actions.apply.method "GET" or "POST" or "PUT" Yes —
data.configurations[].actions.read object No —
data.configurations[].actions.read.available boolean Yes —
data.configurations[].actions.read.href string Yes max length: 2048; pattern: ^/[^/]
data.configurations[].actions.read.method "GET" or "POST" or "PUT" Yes —
data.configurations[].actions.save object No —
data.configurations[].actions.save.available boolean Yes —
data.configurations[].actions.save.href string Yes max length: 2048; pattern: ^/[^/]
data.configurations[].actions.save.method "GET" or "POST" or "PUT" Yes —
data.configurations[].actions.validate object No —
data.configurations[].actions.validate.available boolean Yes —
data.configurations[].actions.validate.href string Yes max length: 2048; pattern: ^/[^/]
data.configurations[].actions.validate.method "GET" or "POST" or "PUT" Yes —
data.configurations[].binding "installation-startup" or "sandbox-policy" Yes —
data.configurations[].capability string Yes —
data.configurations[].configurationSchema object<string, any> Yes —
data.configurations[].driverId string Yes —
data.configurations[].implementation string Yes —
data.configurations[].key string Yes —
data.configurations[].scope "installation" or "agent" Yes —
data.configurations[].startupConfiguration object<string, SafeJsonValue> No —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "configurations": []  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/harness-status

Read the Sandbox Driver's record of a running Agent's dedicated Harness Sandbox

Operation ID: getAgentHarnessStatus

Permissions: Requires read permission on the requested Agent.

Action Resource Scope
read agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.harness object No The Sandbox Driver reports this provider-owned Harness Sandbox (OpenShell). lost means that the Sandbox does not serve this Agent revision. OCC will not restart it. Deploy the Agent again to replace it. starting with HARNESS_RESTARTING means that the provider is restarting a Harness process that exited.
data.harness.code "SANDBOX_MISSING" or "SANDBOX_DELETING" or "SANDBOX_STOPPED" or "SANDBOX_FAILED" or "HARNESS_EXITED" or "HARNESS_RESTARTING" or "UNAVAILABLE" No —
data.harness.exitCode integer No minimum: -2147483648; maximum: 2147483647; Present only with HARNESS_RESTARTING: the Harness process's last exit code.
data.harness.restarts integer No minimum: 1; maximum: 4294967295; Present only with HARNESS_RESTARTING: the restart number in the current crash loop (1 for a first restart).
data.harness.state "running" or "starting" or "lost" or "unknown" Yes —
data.revisionId string No pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.status "observed" or "unobserved" Yes observed when OCC read the Sandbox record of the running Agent's active revision. unobserved when there is nothing to read: the Agent is stopped, deleting or has no active revision, its Harness is not dedicated, or the selected Sandbox Driver keeps no lifecycle record.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "status": "unobserved"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/native-admin

Resolve native admin UI launch availability for one Agent

Operation ID: getAgentNativeAdmin

Permissions: Requires a human session with operate or administer permission on the exact Agent. Operate grants chat access; administer grants full native administration. Service API keys cannot launch or inspect native admin UI access.

Action Resource Scope
operate agent requested (chat access)
administer agent requested (full native administration, instead of operate)
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes min length: 1; max length: 200 "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes min length: 1; max length: 200 "agt_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
401 Unauthorized
403 Forbidden
404 Not Found
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.activeRevisionId string No —
data.host string No —
data.mode "admin" or "chat" No —
data.origin string (uri) No —
data.reason "not-enabled" or "configuration" or "compute" No —
data.sessionMode "shared-cookie" or "host-only-exchange" No —
data.status "available" or "disabled" or "stopped" or "unavailable" or "unsupported" Yes —
data.url string (uri) No —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "status": "stopped"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/{agentId}/native-admin/confirm

Confirm a native Agent browser challenge

Operation ID: confirmAgentNativeAdmin

Permissions: Requires a human session with operate or administer permission on the exact Agent. Operate grants chat access; administer grants full native administration. Service API keys cannot launch or inspect native admin UI access.

Action Resource Scope
operate agent requested (chat access)
administer agent requested (full native administration, instead of operate)
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes min length: 1; max length: 200 "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes min length: 1; max length: 200 "agt_123e4567-e89b-42d3-a456-426614174000"
x-occ-session-key header string Yes pattern: ^[A-Za-z0-9_-]{43}$ "sssssssssssssssssssssssssssssssssssssssssss"
origin header string Yes — "https://console.example.com"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
challenge string Yes pattern: ^[A-Za-z0-9_-]{43}$
intentId string (uuid) Yes —

Example request

json
{  "challenge": "ccccccccccccccccccccccccccccccccccccccccccc",  "intentId": "123e4567-e89b-42d3-a456-426614174000"}
Responses
Status Meaning
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
409 Conflict
413 Payload Too Large
415 Unsupported Media Type
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.exchange string Yes —
data.intentId string Yes —
data.landingUrl string No —
data.origin string No —
data.redeemUrl string Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "exchange": "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",    "intentId": "123e4567-e89b-42d3-a456-426614174000",    "redeemUrl": "https://agent-0123456789abcdef0123456789abcdef.agents.example.com/__occ/native-admin/redeem"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/{agentId}/native-admin/launch

Create a browser-bound native Agent launch

Operation ID: launchAgentNativeAdmin

Permissions: Requires a human session with operate or administer permission on the exact Agent. Operate grants chat access; administer grants full native administration. Service API keys cannot launch or inspect native admin UI access.

Action Resource Scope
operate agent requested (chat access)
administer agent requested (full native administration, instead of operate)
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes min length: 1; max length: 200 "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes min length: 1; max length: 200 "agt_123e4567-e89b-42d3-a456-426614174000"
x-occ-session-key header string Yes pattern: ^[A-Za-z0-9_-]{43}$ "sssssssssssssssssssssssssssssssssssssssssss"
origin header string Yes — "https://console.example.com"
Request body

Required: Yes

Content type: application/json

Schema: object.

Example request

json
{}
Responses
Status Meaning
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
409 Conflict
413 Payload Too Large
415 Unsupported Media Type
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.exchange string No —
data.intentId string Yes —
data.landingUrl string Yes —
data.origin string Yes —
data.redeemUrl string No —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "intentId": "123e4567-e89b-42d3-a456-426614174000",    "landingUrl": "https://agent-0123456789abcdef0123456789abcdef.agents.example.com/__occ/native-admin/launch?intent=123e4567-e89b-42d3-a456-426614174000",    "origin": "https://agent-0123456789abcdef0123456789abcdef.agents.example.com"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/permissions

Report advisory primary IAM permissions on a readable Agent, not authorization for a later operation

Operation ID: getAgentCallerPermissions

Permissions: Requires read permission on the requested Agent.

Action Resource Scope
read agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.administer boolean Yes Whether the selected IAM Driver allows Agent administer now, which native admin UI access needs. Advisory only: other required permissions (native admin UI also needs a signed-in console session), lifecycle state, or a later authorization decision can still prevent the operation.
data.agentSourcesOperate boolean Yes Whether the selected IAM Driver allows, now, the source grants that each Agent update checks: Secret operate on every Secret that the Agent's Configuration binds and on a Secret Harness authentication source, credential source operate on every credential source the Agent lists or uses for Harness authentication, and ServiceAccount read on a ServiceAccount Harness authentication source. true when the Agent and its Configuration bind no source. Reported only to a caller with Agent update and Configuration read whose Agent settings are readable; otherwise false. Advisory only: other required permissions, lifecycle state, sources that an update adds, or a later authorization decision can still prevent the operation.
data.configurationRead boolean Yes Whether the selected IAM Driver allows read of the Agent's Configuration now, which each Agent update needs. Advisory only: other required permissions, lifecycle state, or a later authorization decision can still prevent the operation.
data.configurationSecretsOperate boolean Yes Whether the selected IAM Driver allows Secret operate now on every Secret that the Agent's Configuration binds. Each Configuration save needs it for the Secrets it binds: the Secrets in its secretBindings, or every bound Secret when it omits them. true when the Configuration binds no Secret. Reported only to a caller with Configuration read and update; otherwise false. Advisory only: other required permissions, lifecycle state, or a later authorization decision can still prevent the operation.
data.configurationSecretsOperateDeniedBindings array<string> Yes max items: 64; The names of the Agent's Configuration Secret bindings whose bound Secret the selected IAM Driver does not allow Secret operate on now, sorted. A Configuration save that submits secretBindings needs Secret operate only on the Secrets it submits, so a save that binds each listed name to another Secret does not need it on the Secrets they bind now. A save that omits secretBindings keeps every binding. Empty when configurationSecretsOperate is true, and when it is not reported: reported only to a caller with Configuration read and update. Advisory only: other required permissions, lifecycle state, the Secrets a save binds, or a later authorization decision can still prevent the operation.
data.configurationUpdate boolean Yes Whether the selected IAM Driver allows update of the Agent's Configuration now, which saving its draft Configuration needs. Advisory only: other required permissions, lifecycle state, or a later authorization decision can still prevent the operation.
data.delete boolean Yes Whether the selected IAM Driver allows Agent delete now. Advisory only: other required permissions, lifecycle state, or a later authorization decision can still prevent the operation.
data.deploy boolean Yes Whether the selected IAM Driver allows Agent deploy now. Advisory only: other required permissions, lifecycle state, or a later authorization decision can still prevent the operation.
data.operate boolean Yes Whether the selected IAM Driver allows Agent operate (used for Stop) now. Advisory only: other required permissions, lifecycle state, or a later authorization decision can still prevent the operation.
data.readLogs boolean Yes Whether the selected IAM Driver allows reading the Agent's runtime log text now: Agent read_logs, or Agent administer when no Restriction denies read_logs. Advisory only: other required permissions, Compute Driver support, or a later authorization decision can still prevent the read.
data.sandboxPolicyRead boolean Yes Whether the selected IAM Driver allows read now on the Agent's sandbox policy, which reading its network policy and policy suggestions needs. Advisory only: other required permissions, Sandbox Driver support, or a later authorization decision can still prevent the read.
data.update boolean Yes Whether the selected IAM Driver allows Agent update now. Advisory only: other required permissions, lifecycle state, or a later authorization decision can still prevent the operation.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "administer": true,    "agentSourcesOperate": true,    "configurationRead": true,    "configurationSecretsOperate": true,    "configurationSecretsOperateDeniedBindings": [],    "configurationUpdate": true,    "delete": true,    "deploy": true,    "operate": true,    "readLogs": true,    "sandboxPolicyRead": true,    "update": true  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/permissions/secrets

Report the readable Secrets that the caller may not bind to a readable Agent, not authorization for a later operation

Operation ID: getAgentSecretPermissions

Permissions: Requires read permission on the requested Agent.

Action Resource Scope
read agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.operateDenied array<string> Yes The IDs of the Namespace's Secrets that the caller may read but the selected IAM Driver does not allow Secret operate on now, sorted. Binding a Secret to this Agent's Configuration or as its Harness authentication source needs Secret operate on it, and so does deploying a draft that binds it. Empty when it is not reported: reported only to a caller with read on the Namespace and on the Agent's Configuration, and update on the Agent or its Configuration or deploy on the Agent. A caller with deploy but neither update gets only the Secrets the draft binds: its Configuration's Secret bindings and a Secret Harness authentication source. Advisory only: other required permissions, lifecycle state, or a later authorization decision can still prevent the operation.
data.unreadableOperateDenied integer Yes minimum: 0; How many of the Secrets the draft binds the caller may neither read nor Secret operate now: its Configuration's Secret bindings and a Secret Harness authentication source. Deploying the draft needs Secret operate on each. A count only: the caller may not read them, so their IDs are never reported. 0 when it is not reported, under the same conditions as operateDenied. Advisory only: other required permissions, lifecycle state, or a later authorization decision can still prevent the operation.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "operateDenied": [],    "unreadableOperateDenied": 0  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/{agentId}/plugins

List or search plugins for an active Agent; caller needs Agent read/update. Curated discovery needs no Secret; hosted discovery needs the Agent's bound Service Accounts Secret with caller and Agent Secret operate grants

Operation ID: discoverSavedAgentPlugins

Permissions: Requires update permission on the requested Agent. Requires read permission on the requested Agent. Requires operate permission on the Agent's bound Secret when the selected Plugin Driver requires a discovery credential.

Action Resource Scope
update agent requested
read agent requested
operate secret requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
credentialSource object No Exact OCC credential source reference. Shape: { "kind": "credential_source", "namespaceId": "ns_...", "id": "cs_..." }.
credentialSource.id string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
credentialSource.kind "credential_source" Yes —
credentialSource.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
cursor string No min length: 1; max length: 8192
q string No max length: 1024

Example request

json
{}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
429 Too many requests. Wait for Retry-After and try again.
500 The platform request could not be completed.
501 The selected Driver does not support this operation.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.nextCursor string or null Yes —
data.plugins array<object> Yes —
data.plugins[].available boolean No —
data.plugins[].description string No —
data.plugins[].id string Yes —
data.plugins[].logoUrl string No —
data.plugins[].name string Yes —
data.plugins[].privacyPolicyUrl string No —
data.plugins[].remoteId string No —
data.plugins[].selectableWithoutTools boolean No —
data.plugins[].termsOfServiceUrl string No —
data.plugins[].tools null or array<object> Yes —
data.plugins[].unavailableHelp object No —
data.plugins[].unavailableHelp.label string Yes —
data.plugins[].unavailableHelp.url string Yes —
data.plugins[].unavailableReason string No —
data.plugins[].websiteUrl string No —
data.setup object No —
data.setup.links array<object> Yes —
data.setup.links[].label string Yes —
data.setup.links[].url string Yes —
data.setup.message string Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "nextCursor": null,    "plugins": [      {        "description": "Search the documentation service.",        "id": "documentation",        "name": "Documentation",        "tools": null      }    ]  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/plugins/capabilities

Read selected Plugin Driver policy capabilities for an active Agent with caller Agent read/update permission

Operation ID: getSavedAgentPluginPolicyCapabilities

Permissions: Requires update permission on the requested Agent. Requires read permission on the requested Agent.

Action Resource Scope
update agent requested
read agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
501 The selected Driver does not support this operation.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.approvers object No —
data.approvers.agent boolean Yes —
data.approvers.plugin boolean Yes —
data.approvers.tools boolean Yes —
data.credentialSlots array<object> No —
data.credentialSlots[].id string Yes —
data.credentialSlots[].label string Yes —
data.credentialSlots[].pluginId string Yes —
data.credentialSlots[].releaseSha256 string Yes pattern: ^[a-f0-9]{64}$
data.credentialSlots[].sources array<object> Yes —
data.credentialSlots[].sources[].id string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.credentialSlots[].sources[].name string Yes —
data.credentialSlots[].toolDiscovery true No —
data.discoveryCredential "required" or "none" Yes —
data.driver PluginDriverIdentity Yes —
data.driver.id string Yes min length: 1
data.driver.implementation string Yes min length: 1
data.driverPolicySchema object<string, any> Yes —
data.policyScopeByPlugin object<string, "enablement_only"> No —
data.toolDefaults object Yes —
data.toolDefaults.approval array<"provider_default" or "all_actions" or "write_actions" or "none"> Yes —
data.toolDefaults.enabled boolean Yes —
data.toolDefaults.reviewer array<"human" or "auto"> Yes —
data.tools object Yes —
data.tools.approval array<"provider_default" or "all_actions" or "write_actions" or "none"> Yes —
data.tools.enabled boolean Yes —
data.tools.reviewer array<"human" or "auto"> Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "discoveryCredential": "required",    "driver": {      "id": "codex",      "implementation": "codex"    },    "driverPolicySchema": {},    "toolDefaults": {      "approval": [        "all_actions"      ],      "enabled": true,      "reviewer": [        "human"      ]    },    "tools": {      "approval": [        "all_actions"      ],      "enabled": true,      "reviewer": [        "human"      ]    }  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/{agentId}/plugins/details

Read plugin details for an active Agent with Agent read/update access. Hosted discovery uses the Agent's bound credential. Managed MCP discovery uses an eligible saved connection. The caller and Agent need operate access to the credential

Operation ID: discoverSavedAgentPluginDetails

Permissions: Requires update permission on the requested Agent. Requires read permission on the requested Agent. Requires operate permission on the Agent's bound Secret when the selected Plugin Driver requires a discovery credential.

Action Resource Scope
update agent requested
read agent requested
operate secret requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Schema: object or object.

Example request

json
{  "pluginId": "documentation"}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
429 Too many requests. Wait for Retry-After and try again.
500 The platform request could not be completed.
501 The selected Driver does not support this operation.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.available boolean No —
data.description string No —
data.id string Yes —
data.logoUrl string No —
data.name string Yes —
data.privacyPolicyUrl string No —
data.remoteId string No —
data.selectableWithoutTools boolean No —
data.termsOfServiceUrl string No —
data.tools null or array<object> Yes —
data.unavailableHelp object No —
data.unavailableHelp.label string Yes —
data.unavailableHelp.url string Yes —
data.unavailableReason string No —
data.websiteUrl string No —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "description": "Search the documentation service.",    "id": "documentation",    "name": "Documentation",    "tools": null  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/repository-approval-scopes

Review resolved repository scope before explicitly approving it

Operation ID: listAgentStandingApprovalScopes

Permissions: Requires administer permission on the requested Agent.

Action Resource Scope
administer agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<object> Yes —
data[].binding object<string, any> Yes —
data[].repositoryRef string Yes —
data[].scope object<string, any> Yes —
data[].scopeFingerprint string Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/repository-approvals

Read attributable repository approvals and removed generations for one Agent

Operation ID: listAgentStandingApprovals

Permissions: Requires administer permission on the requested Agent.

Action Resource Scope
administer agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<object> Yes —
data[].approvedBy string Yes —
data[].createdAt string Yes —
data[].generation integer Yes minimum: 1
data[].id string Yes —
data[].profile string Yes —
data[].repositoryRef string Yes —
data[].revokedAt string No —
data[].scopeFingerprint string Yes —
data[].status "active" or "removed" Yes —
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/{agentId}/repository-approvals/{approvalId}/remove

Remove repository approval independently of configuration or runtime cleanup

Operation ID: removeAgentStandingApproval

Permissions: Requires administer permission on the requested Agent.

Action Resource Scope
administer agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
approvalId path string Yes pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$ "approval-documentation"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
expectedGeneration integer Yes minimum: 1; maximum: 9007199254740991

Example request

json
{  "expectedGeneration": 1}
Responses
Status Meaning
204 No Content
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

GET /namespaces/{namespaceId}/agents/{agentId}/repository-options

List approved repository choices for updating one Agent

Operation ID: listAgentRepositoryOptions

Permissions: Requires update permission on the requested Agent.

Action Resource Scope
update agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<object> Yes max items: 1001
data[].allowedProfiles array<string> Yes min items: 1; max items: 16; unique items: true
data[].description string No min length: 1; max length: 512
data[].displayName string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
meta object Yes —
meta.notConfigured true No Present when the Installation has no repository settings, so no repository credential Driver is selected. data is then empty, and Agent save refuses repository bindings with 409 RESOURCE_CONFLICT.
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

No readable resources

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Example response

json
{  "data": [    {      "allowedProfiles": [        "read"      ],      "displayName": "Documentation",      "repositoryRef": "documentation"    }  ],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/revisions/{revisionId}/sandbox-policy/{facet}/recommendations

Read policy suggestions for the requested Agent revision

Operation ID: getAgentSandboxRecommendations

Permissions: Requires read permission on the requested Agent. Requires read permission on the requested SandboxPolicy.

Action Resource Scope
read agent requested
read sandbox_policy requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
facet path "networking" or "filesystem" or "process" Yes — "networking"
revisionId path string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "rev_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
429 Too many requests. Wait for Retry-After and try again.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.providerVersion string No max length: 128
data.recommendations array<object> Yes max items: 32
data.recommendations[].grant object Yes —
data.recommendations[].grant.binary string Yes min length: 2; max length: 512; pattern: ^/[^\s\x00-\x1f]+$; Absolute path of the executable receiving access.
data.recommendations[].grant.host string Yes min length: 1; max length: 253; pattern: ^(\*\.)?[a-z0-9]([a-z0-9.-]*[a-z0-9])?$; DNS hostname or permitted single-label wildcard. Grants allow access; omitted destinations stay denied.
data.recommendations[].grant.id string Yes pattern: ^[a-z][a-z0-9-]{0,47}$
data.recommendations[].grant.ports array<object> Yes min items: 1; max items: 16
data.recommendations[].grant.ports[].from integer Yes minimum: 1; maximum: 65535
data.recommendations[].grant.ports[].to integer Yes minimum: 1; maximum: 65535
data.recommendations[].id string Yes —
data.recommendations[].observations integer No minimum: 0
data.recommendations[].status "pending" or "approved" or "rejected" Yes —
data.truncated boolean Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "recommendations": [],    "truncated": false  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/runtime-credentials

Get metadata for one Agent's provisioned runtime credentials

Operation ID: getAgentRuntimeCredentials

Permissions: Requires read permission on the requested Agent.

Action Resource Scope
read agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.transportConfigured boolean Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "transportConfigured": true  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/{agentId}/runtime-credentials

Provision initial runtime credentials for one undeployed Agent

Operation ID: provisionAgentRuntimeCredentials

Permissions: Requires operate permission on the requested Agent. Requires read permission on the requested Agent.

Action Resource Scope
operate agent requested
read agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Schema: object.

Example request

json
{}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.transportConfigured boolean Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "transportConfigured": true  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/runtime-images

Read observed images and source commits for an Agent's active runtime

Operation ID: getAgentRuntimeImages

Permissions: Requires read permission on the requested Agent.

Action Resource Scope
read agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.images array<object> Yes —
data.images[].commit string or null Yes —
data.images[].container string Yes —
data.images[].image string Yes —
data.images[].imageId string or null Yes —
data.images[].openclawCommit string or null Yes —
data.images[].workload string Yes —
data.status "observed" or "undeployed" or "unsupported" Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "images": [],    "status": "undeployed"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/sandbox-policy/{facet}

Read one Agent sandbox policy and delegation ceiling

Operation ID: getAgentSandboxPolicy

Permissions: Requires read permission on the requested Agent. Requires read permission on the requested SandboxPolicy.

Action Resource Scope
read agent requested
read sandbox_policy requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
facet path "networking" or "filesystem" or "process" Yes — "networking"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.capability null or object Yes —
data.ceiling array<object> Yes max items: 32
data.ceiling[].binary string Yes min length: 2; max length: 512; pattern: ^/[^\s\x00-\x1f]+$; Absolute path of the executable receiving access.
data.ceiling[].host string Yes min length: 1; max length: 253; pattern: ^(\*\.)?[a-z0-9]([a-z0-9.-]*[a-z0-9])?$; DNS hostname or permitted single-label wildcard. Grants allow access; omitted destinations stay denied.
data.ceiling[].id string Yes pattern: ^[a-z][a-z0-9-]{0,47}$
data.ceiling[].ports array<object> Yes min items: 1; max items: 16
data.ceiling[].ports[].from integer Yes minimum: 1; maximum: 65535
data.ceiling[].ports[].to integer Yes minimum: 1; maximum: 65535
data.configuration object No —
data.configuration.actions object Yes —
data.configuration.actions.apply object No —
data.configuration.actions.apply.available boolean Yes —
data.configuration.actions.apply.href string Yes max length: 2048; pattern: ^/[^/]
data.configuration.actions.apply.method "GET" or "POST" or "PUT" Yes —
data.configuration.actions.read object No —
data.configuration.actions.read.available boolean Yes —
data.configuration.actions.read.href string Yes max length: 2048; pattern: ^/[^/]
data.configuration.actions.read.method "GET" or "POST" or "PUT" Yes —
data.configuration.actions.save object No —
data.configuration.actions.save.available boolean Yes —
data.configuration.actions.save.href string Yes max length: 2048; pattern: ^/[^/]
data.configuration.actions.save.method "GET" or "POST" or "PUT" Yes —
data.configuration.actions.validate object No —
data.configuration.actions.validate.available boolean Yes —
data.configuration.actions.validate.href string Yes max length: 2048; pattern: ^/[^/]
data.configuration.actions.validate.method "GET" or "POST" or "PUT" Yes —
data.configuration.binding "installation-startup" or "sandbox-policy" Yes —
data.configuration.capability string Yes —
data.configuration.configurationSchema object<string, any> Yes —
data.configuration.driverId string Yes —
data.configuration.implementation string Yes —
data.configuration.key string Yes —
data.configuration.scope "installation" or "agent" Yes —
data.configuration.startupConfiguration object<string, SafeJsonValue> No —
data.defaults null or object<string, any> Yes —
data.defaultsRevisionId string No pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.deployedPolicyVersion integer No minimum: 1; maximum: 2147483647; The saved policy version the active revision (defaultsRevisionId) was deployed with. Its Sandbox enforces that version without a live application.
data.editingEnabled boolean Yes —
data.policy object Yes —
data.policy.additions array<object> Yes max items: 32
data.policy.additions[].binary string Yes min length: 2; max length: 512; pattern: ^/[^\s\x00-\x1f]+$; Absolute path of the executable receiving access.
data.policy.additions[].host string Yes min length: 1; max length: 253; pattern: ^(\*\.)?[a-z0-9]([a-z0-9.-]*[a-z0-9])?$; DNS hostname or permitted single-label wildcard. Grants allow access; omitted destinations stay denied.
data.policy.additions[].id string Yes pattern: ^[a-z][a-z0-9-]{0,47}$
data.policy.additions[].ports array<object> Yes min items: 1; max items: 16
data.policy.additions[].ports[].from integer Yes minimum: 1; maximum: 65535
data.policy.additions[].ports[].to integer Yes minimum: 1; maximum: 65535
data.policy.agentId string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.policy.application object No —
data.policy.application.id string (uuid) Yes —
data.policy.application.policyVersion integer Yes minimum: 1; maximum: 2147483647
data.policy.application.providerVersion string No —
data.policy.application.reason string No —
data.policy.application.requestedAt string Yes —
data.policy.application.requestedBy string Yes —
data.policy.application.revisionId string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.policy.application.state "pending" or "applied" or "failed" Yes —
data.policy.applied object No —
data.policy.applied.appliedAt string Yes —
data.policy.applied.policyVersion integer Yes minimum: 1; maximum: 2147483647
data.policy.applied.providerVersion string Yes —
data.policy.applied.revisionId string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.policy.id string Yes pattern: ^sbp_[0-9a-f-]{36}$
data.policy.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.policy.version integer Yes minimum: 1; maximum: 2147483647
data.protectedExecution boolean Yes True while the active revision or the next deploy runs under protected execution. Saving network policy additions is then refused with SANDBOX_POLICY_PROTECTED_EXECUTION; saving an empty policy stays allowed.
data.unavailableReason string No Why per-Agent network policy is unavailable, when capability is null: the sentence the save, validate, apply and editing refusals give.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "capability": null,    "ceiling": [],    "defaults": null,    "editingEnabled": true,    "policy": {      "additions": [],      "agentId": "agt_123e4567-e89b-42d3-a456-426614174000",      "id": "sbp_123e4567-e89b-42d3-a456-426614174000",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",      "version": 1    },    "protectedExecution": false  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

PUT /namespaces/{namespaceId}/agents/{agentId}/sandbox-policy/{facet}

Replace one Agent network policy additions

Operation ID: updateAgentSandboxPolicy

Permissions: Requires manage_policy permission on the requested Agent. Requires update permission on the requested SandboxPolicy.

Action Resource Scope
manage_policy agent requested
update sandbox_policy requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
facet path "networking" or "filesystem" or "process" Yes — "networking"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
additions array<object> Yes max items: 32
additions[].binary string Yes min length: 2; max length: 512; pattern: ^/[^\s\x00-\x1f]+$; Absolute path of the executable receiving access.
additions[].host string Yes min length: 1; max length: 253; pattern: ^(\*\.)?[a-z0-9]([a-z0-9.-]*[a-z0-9])?$; DNS hostname or permitted single-label wildcard. Grants allow access; omitted destinations stay denied.
additions[].id string Yes pattern: ^[a-z][a-z0-9-]{0,47}$
additions[].ports array<object> Yes min items: 1; max items: 16
additions[].ports[].from integer Yes minimum: 1; maximum: 65535
additions[].ports[].to integer Yes minimum: 1; maximum: 65535
expectedVersion integer Yes minimum: 1; maximum: 2147483647

Example request

json
{  "additions": [],  "expectedVersion": 1}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.additions array<object> Yes max items: 32
data.additions[].binary string Yes min length: 2; max length: 512; pattern: ^/[^\s\x00-\x1f]+$; Absolute path of the executable receiving access.
data.additions[].host string Yes min length: 1; max length: 253; pattern: ^(\*\.)?[a-z0-9]([a-z0-9.-]*[a-z0-9])?$; DNS hostname or permitted single-label wildcard. Grants allow access; omitted destinations stay denied.
data.additions[].id string Yes pattern: ^[a-z][a-z0-9-]{0,47}$
data.additions[].ports array<object> Yes min items: 1; max items: 16
data.additions[].ports[].from integer Yes minimum: 1; maximum: 65535
data.additions[].ports[].to integer Yes minimum: 1; maximum: 65535
data.agentId string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.application object No —
data.application.id string (uuid) Yes —
data.application.policyVersion integer Yes minimum: 1; maximum: 2147483647
data.application.providerVersion string No —
data.application.reason string No —
data.application.requestedAt string Yes —
data.application.requestedBy string Yes —
data.application.revisionId string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.application.state "pending" or "applied" or "failed" Yes —
data.applied object No —
data.applied.appliedAt string Yes —
data.applied.policyVersion integer Yes minimum: 1; maximum: 2147483647
data.applied.providerVersion string Yes —
data.applied.revisionId string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.id string Yes pattern: ^sbp_[0-9a-f-]{36}$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.version integer Yes minimum: 1; maximum: 2147483647
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "additions": [],    "agentId": "agt_123e4567-e89b-42d3-a456-426614174000",    "id": "sbp_123e4567-e89b-42d3-a456-426614174000",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "version": 2  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/{agentId}/sandbox-policy/{facet}/apply

Queue policy application to the running Agent revision, optionally replacing saved additions

Operation ID: applyAgentSandboxPolicy

Permissions: Requires manage_policy permission on the requested Agent. Requires update permission on the requested SandboxPolicy. Requires read permission on the requested SandboxPolicy.

Action Resource Scope
manage_policy agent requested
update sandbox_policy requested
read sandbox_policy requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
facet path "networking" or "filesystem" or "process" Yes — "networking"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
additions array<object> No max items: 32
additions[].binary string Yes min length: 2; max length: 512; pattern: ^/[^\s\x00-\x1f]+$; Absolute path of the executable receiving access.
additions[].host string Yes min length: 1; max length: 253; pattern: ^(\*\.)?[a-z0-9]([a-z0-9.-]*[a-z0-9])?$; DNS hostname or permitted single-label wildcard. Grants allow access; omitted destinations stay denied.
additions[].id string Yes pattern: ^[a-z][a-z0-9-]{0,47}$
additions[].ports array<object> Yes min items: 1; max items: 16
additions[].ports[].from integer Yes minimum: 1; maximum: 65535
additions[].ports[].to integer Yes minimum: 1; maximum: 65535
expectedVersion integer Yes minimum: 1; maximum: 2147483647
revisionId string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example request

json
{  "expectedVersion": 1,  "revisionId": "rev_123e4567-e89b-42d3-a456-426614174000"}
Responses
Status Meaning
202 Accepted
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

202 response body: application/json

Field Type Required Constraints
data object Yes —
data.additions array<object> Yes max items: 32
data.additions[].binary string Yes min length: 2; max length: 512; pattern: ^/[^\s\x00-\x1f]+$; Absolute path of the executable receiving access.
data.additions[].host string Yes min length: 1; max length: 253; pattern: ^(\*\.)?[a-z0-9]([a-z0-9.-]*[a-z0-9])?$; DNS hostname or permitted single-label wildcard. Grants allow access; omitted destinations stay denied.
data.additions[].id string Yes pattern: ^[a-z][a-z0-9-]{0,47}$
data.additions[].ports array<object> Yes min items: 1; max items: 16
data.additions[].ports[].from integer Yes minimum: 1; maximum: 65535
data.additions[].ports[].to integer Yes minimum: 1; maximum: 65535
data.agentId string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.application object No —
data.application.id string (uuid) Yes —
data.application.policyVersion integer Yes minimum: 1; maximum: 2147483647
data.application.providerVersion string No —
data.application.reason string No —
data.application.requestedAt string Yes —
data.application.requestedBy string Yes —
data.application.revisionId string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.application.state "pending" or "applied" or "failed" Yes —
data.applied object No —
data.applied.appliedAt string Yes —
data.applied.policyVersion integer Yes minimum: 1; maximum: 2147483647
data.applied.providerVersion string Yes —
data.applied.revisionId string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.id string Yes pattern: ^sbp_[0-9a-f-]{36}$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.version integer Yes minimum: 1; maximum: 2147483647
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "additions": [],    "agentId": "agt_123e4567-e89b-42d3-a456-426614174000",    "application": {      "id": "123e4567-e89b-42d3-a456-426614174000",      "policyVersion": 1,      "requestedAt": "2026-10-01T12:00:00.000Z",      "requestedBy": "principal-administrator",      "revisionId": "rev_123e4567-e89b-42d3-a456-426614174000",      "state": "pending"    },    "id": "sbp_123e4567-e89b-42d3-a456-426614174000",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "version": 1  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

PATCH /namespaces/{namespaceId}/agents/{agentId}/sandbox-policy/{facet}/editing

Temporarily enable or disable future policy edits for one Agent

Operation ID: TEMPORARY_API_WILL_BREAK_IN_FUTURE_setAgentSandboxPolicyEditing

Permissions: Requires administer permission on the requested Agent. Requires administer permission for Installation resources in the Installation.

Action Resource Scope
administer agent requested
administer installation installation
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
facet path "networking" or "filesystem" or "process" Yes — "networking"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
enabled boolean Yes —

Example request

json
{  "enabled": true}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.activeRevisionId string No pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.backendId string or null Yes —
data.configurationId string Yes pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.credentialSources array<object> No max items: 64; unique items: true; Every credential source the Agent uses, at each source's endpoints. A credential-source harnessAuth names one entry. The selected Credential Gateway injects them at deployment; the Agent never receives their values.
data.credentialSources[].sourceId string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.desiredRuntimeState "running" or "stopped" Yes —
data.executionMode "embedded" or "dedicated" Yes —
data.gatewayManagedMode boolean Yes Whether OCE restricts Gateway-local administration. Defaults on when the selected Compute Driver supports it, otherwise off. Changing the setting requires Installation administer permission and takes effect on deployment.
data.harnessAuth object or object or object or object or null Yes —
data.id string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.pluginApprovers PluginApprovers No max items: 64; unique items: true
data.pluginApprovers[].channel string Yes min length: 1; max length: 64; pattern: ^[a-z][a-z0-9_-]*$
data.pluginApprovers[].id string Yes min length: 1; max length: 200; pattern: ^[^\u0000-\u0020\u007f]+$
data.pluginDriver PluginDriverIdentity No —
data.pluginDriver.id string Yes min length: 1
data.pluginDriver.implementation string Yes min length: 1
data.plugins PluginDesiredState No Agent plugin selection map. Keys must be 1-253 characters matching ^[A-Za-z0-9._~:@-]{1,253}$.
data.repositoryAccess object No Desired repository access. Each omitted repository profile inherits defaultProfile; explicit profiles remain overrides. Mutually exclusive with repositoryBindings in create, provision, and update requests.
data.repositoryAccess.defaultProfile string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryAccess.repositories array<object> Yes max items: 16
data.repositoryAccess.repositories[].profile string No min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryAccess.repositories[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryBindings array<object> No min items: 1; max items: 16
data.repositoryBindings[].profile string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryBindings[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.sandboxPolicyEditing boolean No —
data.servicePrincipalId string Yes min length: 1; max length: 200
data.status "active" or "deleting" Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "backendId": null,    "configurationId": "cfg_123e4567-e89b-42d3-a456-426614174000",    "createdAt": "2026-10-01T12:00:00.000Z",    "desiredRuntimeState": "stopped",    "executionMode": "dedicated",    "gatewayManagedMode": true,    "harnessAuth": {      "method": "api_key",      "source": {        "id": "sec_123e4567-e89b-42d3-a456-426614174000",        "kind": "secret",        "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"      }    },    "id": "agt_123e4567-e89b-42d3-a456-426614174000",    "name": "Documentation assistant",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "servicePrincipalId": "principal-docs-agent",    "status": "active"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/{agentId}/sandbox-policy/{facet}/validate

Preview Agent network policy admission without saving or applying

Operation ID: validateAgentSandboxPolicy

Permissions: Requires manage_policy permission on the requested Agent. Requires update permission on the requested SandboxPolicy.

Action Resource Scope
manage_policy agent requested
update sandbox_policy requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
facet path "networking" or "filesystem" or "process" Yes — "networking"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
additions any Yes —
expectedVersion integer Yes minimum: 1; maximum: 2147483647

Example request

json
{  "additions": [],  "expectedVersion": 1}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object or object Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "data": [],    "success": true  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/{agentId}/stop

Stop one Agent and keep its saved Agent revision and persistent state

Operation ID: stopAgent

Permissions: Requires operate permission on the requested Agent.

Action Resource Scope
operate agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
202 Accepted
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

202 response body: application/json

Field Type Required Constraints
data object Yes —
data.activeRevisionId string No pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.backendId string or null Yes —
data.configurationId string Yes pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.credentialSources array<object> No max items: 64; unique items: true; Every credential source the Agent uses, at each source's endpoints. A credential-source harnessAuth names one entry. The selected Credential Gateway injects them at deployment; the Agent never receives their values.
data.credentialSources[].sourceId string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.desiredRuntimeState "running" or "stopped" Yes —
data.executionMode "embedded" or "dedicated" Yes —
data.gatewayManagedMode boolean Yes Whether OCE restricts Gateway-local administration. Defaults on when the selected Compute Driver supports it, otherwise off. Changing the setting requires Installation administer permission and takes effect on deployment.
data.harnessAuth object or object or object or object or null Yes —
data.id string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.pluginApprovers PluginApprovers No max items: 64; unique items: true
data.pluginApprovers[].channel string Yes min length: 1; max length: 64; pattern: ^[a-z][a-z0-9_-]*$
data.pluginApprovers[].id string Yes min length: 1; max length: 200; pattern: ^[^\u0000-\u0020\u007f]+$
data.pluginDriver PluginDriverIdentity No —
data.pluginDriver.id string Yes min length: 1
data.pluginDriver.implementation string Yes min length: 1
data.plugins PluginDesiredState No Agent plugin selection map. Keys must be 1-253 characters matching ^[A-Za-z0-9._~:@-]{1,253}$.
data.repositoryAccess object No Desired repository access. Each omitted repository profile inherits defaultProfile; explicit profiles remain overrides. Mutually exclusive with repositoryBindings in create, provision, and update requests.
data.repositoryAccess.defaultProfile string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryAccess.repositories array<object> Yes max items: 16
data.repositoryAccess.repositories[].profile string No min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryAccess.repositories[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryBindings array<object> No min items: 1; max items: 16
data.repositoryBindings[].profile string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.repositoryBindings[].repositoryRef string Yes min length: 1; max length: 128; pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$
data.sandboxPolicyEditing boolean No —
data.servicePrincipalId string Yes min length: 1; max length: 200
data.status "active" or "deleting" Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "backendId": null,    "configurationId": "cfg_123e4567-e89b-42d3-a456-426614174000",    "createdAt": "2026-10-01T12:00:00.000Z",    "desiredRuntimeState": "stopped",    "executionMode": "dedicated",    "gatewayManagedMode": true,    "harnessAuth": {      "method": "api_key",      "source": {        "id": "sec_123e4567-e89b-42d3-a456-426614174000",        "kind": "secret",        "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"      }    },    "id": "agt_123e4567-e89b-42d3-a456-426614174000",    "name": "Documentation assistant",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "servicePrincipalId": "principal-docs-agent",    "status": "active"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/workspace/files/{name}

Read an allowed workspace file from one active Agent

Operation ID: getAgentWorkspaceFile

Permissions: Requires read permission on the requested Agent.

Action Resource Scope
read agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
name path "AGENTS.md" or "SOUL.md" or "IDENTITY.md" or "USER.md" Yes — "AGENTS.md"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 Conflict. The Agent has no running version: deploy it, or wait until its deployment finishes.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.content string Yes max length: 16384; pattern: ^[^\u0000]*$
data.name "AGENTS.md" or "SOUL.md" or "IDENTITY.md" or "USER.md" Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "content": "Explain your changes and verify the affected behavior.\n",    "name": "AGENTS.md"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

PUT /namespaces/{namespaceId}/agents/{agentId}/workspace/files/{name}

Create or replace an allowed workspace file for one active Agent

Operation ID: putAgentWorkspaceFile

Permissions: Requires operate permission on the requested Agent.

Action Resource Scope
operate agent requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
name path "AGENTS.md" or "SOUL.md" or "IDENTITY.md" or "USER.md" Yes — "AGENTS.md"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
content string Yes max length: 16384; pattern: ^[^\u0000]*$; Workspace file content. The controller also enforces a 16 KiB UTF-8 byte limit and rejects unpaired UTF-16 surrogates.

Example request

json
{  "content": "Explain your changes and verify the affected behavior.\n"}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 Service Unavailable. Check error.code: DEPENDENCY_UNAVAILABLE means workspace access is unavailable. UNKNOWN_OUTCOME means OCC could not confirm the write or its audit record; the file may already contain the requested content. Read the same file with GET and compare its content before deciding whether to retry. If the content matches, do not retry. If you cannot read it, wait or ask someone with read permission on the Agent to check.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.name "AGENTS.md" or "SOUL.md" or "IDENTITY.md" or "USER.md" Yes —
data.size integer No minimum: 0; maximum: 16384
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "name": "AGENTS.md",    "size": 54  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/channel-directory/lookup

Search a channel directory using an authorized Namespace Secret

Operation ID: lookupChannelDirectory

Permissions: Requires operate permission on the exact Secret named by secretId. Without an edit target, requires Agent create permission in the Namespace. With agentId, requires update permission on that exact Agent. With configurationId, requires update permission on that exact Configuration.

Action Resource Scope
operate secret request_body
create agent namespace
update agent request_body
update configuration request_body
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Schema: object or object or object or object or object or object.

Example request

json
{  "kind": "channels",  "query": "engineering",  "secretId": "sec_123e4567-e89b-42d3-a456-426614174000"}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
429 Too many requests. Wait for Retry-After and try again.
500 The platform request could not be completed.
501 The selected Driver does not support this operation.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.candidates array<object> Yes max items: 100
data.candidates[].displayName string No min length: 1; max length: 200
data.candidates[].id string Yes min length: 1; max length: 200
data.candidates[].name string Yes min length: 1; max length: 200
data.complete boolean Yes —
data.nextCursor string No min length: 1; max length: 2048
data.workspaceId string Yes min length: 1; max length: 200
data.workspaceName string No min length: 1; max length: 200
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "candidates": [      {        "id": "C0123456789",        "name": "engineering"      }    ],    "complete": true,    "workspaceId": "T0123456789",    "workspaceName": "Engineering"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /native-admin/return/{agentKey}

Resolve an authorized Agent from a copied native chat link

Operation ID: resolveAgentNativeAdminReturn

Permissions: Requires a human session with operate or administer permission on the exact Agent. Operate grants chat access; administer grants full native administration. Unknown and inaccessible Agents both return 404. This lookup does not launch or start the Agent.

Action Resource Scope
operate agent requested (chat access)
administer agent requested (full native administration, instead of operate)
Parameters
Name In Type Required Constraints Example
agentKey path string Yes pattern: ^[0-9a-f]{32}$ "123e4567e89b42d3a456426614174000"
Responses
Status Meaning
200 OK
400 Invalid Agent key
401 Unauthorized
403 Forbidden
404 Not Found
429 Too many requests; wait for Retry-After
503 Service Unavailable

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.agentId string Yes min length: 1; max length: 200
data.namespaceId string Yes min length: 1; max length: 200
meta object Yes —
meta.requestId string Yes —

Example response

json
{  "data": {    "agentId": "agt_123e4567-e89b-42d3-a456-426614174000",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Agent deployments

Operation Summary
GET /namespaces/{namespaceId}/agents/{agentId}/deployments/{deploymentId} Get the saved deployment status for an Agent revision
POST /namespaces/{namespaceId}/agents/{agentId}/deployments/{deploymentId}/diagnostics Check the current runtime for an Agent revision
GET /namespaces/{namespaceId}/agents/{agentId}/deployments/{deploymentId}/runtime Read Pod status, restart counts, Events, and log sources for an Agent revision
GET /namespaces/{namespaceId}/agents/{agentId}/deployments/{deploymentId}/runtime/logs Read one page of redacted container output for an Agent revision

GET /namespaces/{namespaceId}/agents/{agentId}/deployments/{deploymentId}

Get the saved deployment status for an Agent revision

Operation ID: getAgentDeployment

Permissions: Requires read permission on the requested Agent revision.

Action Resource Scope
read agent_revision requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
deploymentId path string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "rev_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.agentId string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.cleanup null or object Yes Saved cleanup status for this Agent revision, separate from its deployment result. null means no cleanup requirement was recorded. succeeded confirms that cleanup is complete.
data.deploymentId string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.error null or object Yes null unless deployment failed. A failure contains code, a fixed safe message, and optional data with known fields. CONVERGENCE_DEADLINE_EXCEEDED can include data.timeoutMs and data.runtimeFailure with startup failure details. A component, check, or code unknown to the runtime is shown as UNRECOGNIZED. RUNTIME_MODEL_PROBE_FAILED can include data.runtimeFailure with the cause of the failed startup model check. The response never includes native error text.
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.progress null or object Yes Pending deployment progress. Null for terminal outcomes. A last attempt describes a recorded result, not current runtime health.
data.repositoryAccess object No Present when completed maintenance for this exact revision recorded that repository access requires a new revision. This condition does not change the original deployment result. Absence does not establish current repository access health.
data.repositoryAccess.code "REPOSITORY_EXECUTION_REDEPLOY_REQUIRED" Yes —
data.repositoryAccess.message string Yes —
data.repositoryAccess.state "redeploy-required" Yes —
data.status "queued" or "running" or "succeeded" or "failed" Yes —
data.warnings array<object> Yes Warnings recorded from this deployment startup. Plugin install and connector-auth warnings mean the deployment succeeded after the runtime disabled the affected admitted plugin for that startup.
data.warnings[].code "PLUGIN_INSTALL_FAILED" or "PLUGIN_AUTH_REQUIRED" Yes —
data.warnings[].pluginId string Yes min length: 1; max length: 253; pattern: ^[A-Za-z0-9._~:@-]{1,253}$; The admitted Agent plugin selection key.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "agentId": "agt_123e4567-e89b-42d3-a456-426614174000",    "cleanup": null,    "deploymentId": "rev_123e4567-e89b-42d3-a456-426614174000",    "error": null,    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "progress": null,    "status": "succeeded",    "warnings": []  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/agents/{agentId}/deployments/{deploymentId}/diagnostics

Check the current runtime for an Agent revision

Operation ID: diagnoseAgentDeployment

Permissions: Requires operate permission on the requested Agent. Requires read permission on the requested Agent. Requires read permission on the requested Agent revision.

Action Resource Scope
operate agent requested
read agent requested
read agent_revision requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
deploymentId path string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "rev_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.checks array<object> Yes max items: 32
data.checks[].check string Yes min length: 1; max length: 64; pattern: ^[A-Za-z0-9._~:@-]{1,64}$
data.checks[].checkedAt string (date-time) or null Yes —
data.checks[].code string No min length: 1; max length: 64; pattern: ^[A-Za-z0-9._~:@-]{1,64}$
data.checks[].component string Yes min length: 1; max length: 64; pattern: ^[A-Za-z0-9._~:@-]{1,64}$
data.checks[].state "succeeded" or "failed" or "unknown" Yes —
data.observedAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.revisionId string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "checks": [      {        "check": "running",        "checkedAt": "2026-10-01T12:00:00.000Z",        "component": "harness",        "state": "succeeded"      }    ],    "observedAt": "2026-10-01T12:00:00.000Z",    "revisionId": "rev_123e4567-e89b-42d3-a456-426614174000"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/deployments/{deploymentId}/runtime

Read Pod status, restart counts, Events, and log sources for an Agent revision

Operation ID: getAgentDeploymentRuntime

Permissions: Requires operate permission on the requested Agent. Requires read permission on the requested Agent. Requires read permission on the requested Agent revision.

Action Resource Scope
operate agent requested
read agent requested
read agent_revision requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
deploymentId path string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "rev_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
429 Too many requests. Wait for Retry-After and try again.
500 The platform request could not be completed.
501 The selected Driver does not support this operation.
503 A required dependency is unavailable.
504 The runtime status or log read timed out.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.harness object No The Sandbox Driver reports this provider-owned Harness Sandbox (OpenShell). lost means that the Sandbox does not serve this Agent revision. OCC will not restart it. Deploy the Agent again to replace it. starting with HARNESS_RESTARTING means that the provider is restarting a Harness process that exited.
data.harness.code "SANDBOX_MISSING" or "SANDBOX_DELETING" or "SANDBOX_STOPPED" or "SANDBOX_FAILED" or "HARNESS_EXITED" or "HARNESS_RESTARTING" or "UNAVAILABLE" No —
data.harness.exitCode integer No minimum: -2147483648; maximum: 2147483647; Present only with HARNESS_RESTARTING: the Harness process's last exit code.
data.harness.restarts integer No minimum: 1; maximum: 4294967295; Present only with HARNESS_RESTARTING: the restart number in the current crash loop (1 for a first restart).
data.harness.state "running" or "starting" or "lost" or "unknown" Yes —
data.observedAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.pods array<object> Yes max items: 16
data.pods[].cluster "control" or "execution" Yes —
data.pods[].containers array<object> Yes max items: 16
data.pods[].containers[].lastTermination object or null Yes —
data.pods[].containers[].name string Yes min length: 1; max length: 253; pattern: ^[a-z0-9]([-a-z0-9.]*[a-z0-9])?$
data.pods[].containers[].ready boolean Yes —
data.pods[].containers[].reason string or null Yes —
data.pods[].containers[].restartCount integer Yes minimum: 0
data.pods[].containers[].startedAt string (date-time) or null Yes —
data.pods[].containers[].state "waiting" or "running" or "terminated" or "unknown" Yes —
data.pods[].createdAt string (date-time) or null Yes —
data.pods[].events array<object> Yes max items: 100
data.pods[].events[].container string or null Yes —
data.pods[].events[].count integer Yes minimum: 1
data.pods[].events[].lastObservedAt string (date-time) or null Yes —
data.pods[].events[].message string Yes max length: 2048
data.pods[].events[].reason string Yes max length: 128
data.pods[].events[].type "Normal" or "Warning" Yes —
data.pods[].name string Yes min length: 1; max length: 253; pattern: ^[a-z0-9]([-a-z0-9.]*[a-z0-9])?$
data.pods[].phase string Yes max length: 64
data.pods[].ready boolean Yes —
data.pods[].role "gateway" or "agent" Yes —
data.pods[].uid string Yes min length: 1; max length: 64; pattern: ^[A-Za-z0-9-]+$
data.revisionId string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.sources array<object> Yes max items: 4
data.sources[].available boolean Yes —
data.sources[].id "gateway" or "agent" or "sandbox" Yes —
data.sources[].kind "container" or "sandbox" Yes —
data.sources[].pods array<object> Yes max items: 256
data.sources[].pods[].container string Yes min length: 1; max length: 253; pattern: ^[a-z0-9]([-a-z0-9.]*[a-z0-9])?$
data.sources[].pods[].name string Yes min length: 1; max length: 253; pattern: ^[a-z0-9]([-a-z0-9.]*[a-z0-9])?$
data.sources[].pods[].restartCount integer Yes minimum: 0
data.sources[].pods[].uid string Yes min length: 1; max length: 64; pattern: ^[A-Za-z0-9-]+$
data.sources[].retention string Yes max length: 512
data.sources[].unavailableCode "NO_POD" No —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "observedAt": "2026-10-01T12:00:00.000Z",    "pods": [],    "revisionId": "rev_123e4567-e89b-42d3-a456-426614174000",    "sources": [      {        "available": false,        "id": "agent",        "kind": "container",        "pods": [],        "retention": "Pod lifetime",        "unavailableCode": "NO_POD"      }    ]  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/deployments/{deploymentId}/runtime/logs

Read one page of redacted container output for an Agent revision

Operation ID: getAgentDeploymentRuntimeLogs

Permissions: Requires read_logs permission on the requested Agent. Without read_logs, administer permission on the requested Agent also admits the read. Requires read permission on the requested Agent.

Action Resource Scope
read_logs agent requested
administer agent requested (instead of read_logs)
read agent requested
Parameters
Name In Type Required Constraints Example
source query "gateway" or "agent" or "sandbox" Yes — "agent"
pod query string No min length: 1; max length: 253; pattern: ^[a-z0-9]([-a-z0-9.]*[a-z0-9])?$ "agent-docs-0"
container query string No min length: 1; max length: 253; pattern: ^[a-z0-9]([-a-z0-9.]*[a-z0-9])?$ "agent"
previous query "true" or "false" No — "false"
tailLines query string No pattern: ^(?:[1-9][0-9]{0,2}|1000)$ "100"
sinceSeconds query string No pattern: ^(?:[1-9][0-9]{0,3}|[1-7][0-9]{4}|8[0-5][0-9]{3}|86[0-3][0-9]{2}|86400)$ "300"
minLevel query "error" or "warn" or "info" or "debug" No — "info"
cursor query string No max length: 2048; pattern: ^v[12]\.[A-Za-z0-9_-]{1,1900}\.[A-Za-z0-9_-]{43}$ "v1.ZXhhbXBsZQ.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
download query "true" or "false" No — "false"
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
deploymentId path string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "rev_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 One page of records, or a text/plain attachment when download=true
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
429 Too many requests. Wait for Retry-After and try again.
500 The platform request could not be completed.
501 The selected Driver does not support this operation.
503 A required dependency is unavailable.
504 The runtime status or log read timed out.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.cursor string or null Yes —
data.observedAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.records array<object or object or object> Yes max items: 1100
data.revisionId string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.source "gateway" or "agent" or "sandbox" Yes —
data.stream object or null Yes —
data.truncated boolean Yes —
data.withheld integer Yes minimum: 0
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "cursor": null,    "observedAt": "2026-10-01T12:00:00.000Z",    "records": [],    "revisionId": "rev_123e4567-e89b-42d3-a456-426614174000",    "source": "agent",    "stream": null,    "truncated": false,    "withheld": 0  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

200 response body: text/plain

Schema: string.

Log download (download=true)

text
2026-10-01T12:00:00.000Z Agent ready 

Agent revisions

Operation Summary
GET /namespaces/{namespaceId}/agents/{agentId}/revisions List Agent revision summaries that you can read for the requested Agent, newest first
GET /namespaces/{namespaceId}/agents/{agentId}/revisions/{revisionId} Get an Agent revision that you can read

GET /namespaces/{namespaceId}/agents/{agentId}/revisions

List Agent revision summaries that you can read for the requested Agent, newest first

Operation ID: listAgentRevisions

Permissions: Requires read permission on the requested Agent. Only Agent revision resources with individual read permission are returned.

Action Resource Scope
read agent requested
read agent_revision each_returned
Parameters
Name In Type Required Constraints Example
limit query string No pattern: ^(?:[1-9][0-9]?|100)$ "20"
cursor query string No max length: 32; pattern: ^v1\.[1-9][0-9]{0,14}$ "v1.1"
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<object> Yes max items: 100; Agent revisions that you can read, newest first.
data[].agentId string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].backendId string or null Yes —
data[].configurationGeneration integer Yes minimum: 1; maximum: 9007199254740991
data[].configurationId string Yes pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data[].deploymentErrorCode string or null Yes The error.code that reading this revision's deployment would report, or null when it reports no error. It tells a failure from a deployment that a newer version or a Stop ended.
data[].deploymentStatus "queued" or "running" or "succeeded" or "failed" or null Yes The status that reading this revision's deployment would report, or null when OCC has no deployment record for it.
data[].harness object Yes Older revisions omit overrides and configuration when Harness settings were not recorded.
data[].harness.configuration object<string, any> No Nonsecret settings owned and validated by the selected Compute Driver.
data[].harness.id string Yes min length: 1
data[].harness.mode "embedded" or "dedicated" Yes —
data[].harness.overrides object<string, any> No Nonsecret settings owned and validated by the selected Compute Driver.
data[].harness.version string Yes min length: 1
data[].id string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].revision integer Yes minimum: 1
meta object Yes —
meta.nextCursor string or null Yes Pass this value as cursor to read older Agent revisions. OCC returns a cursor only when it finds an older Agent revision that you can read during this request. A later page can be empty if access changes. null means OCC found no older Agent revision that you can read.
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

No readable resources

json
{  "data": [],  "meta": {    "nextCursor": null,    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Example response

json
{  "data": [    {      "agentId": "agt_123e4567-e89b-42d3-a456-426614174000",      "backendId": null,      "configurationGeneration": 1,      "configurationId": "cfg_123e4567-e89b-42d3-a456-426614174000",      "createdAt": "2026-10-01T12:00:00.000Z",      "deploymentErrorCode": null,      "deploymentStatus": "succeeded",      "harness": {        "configuration": {          "modelProvider": {            "baseUrl": "https://api.openai.com/v1",            "protocol": "openai-responses",            "supportsStandaloneWebSearch": false          }        },        "id": "codex",        "mode": "dedicated",        "overrides": {},        "version": "1"      },      "id": "rev_123e4567-e89b-42d3-a456-426614174000",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",      "revision": 1    }  ],  "meta": {    "nextCursor": null,    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/agents/{agentId}/revisions/{revisionId}

Get an Agent revision that you can read

Operation ID: getAgentRevision

Permissions: Requires read permission on the requested Agent revision.

Action Resource Scope
read agent_revision requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
agentId path string Yes pattern: ^agt_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "agt_123e4567-e89b-42d3-a456-426614174000"
revisionId path string Yes pattern: ^rev_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "rev_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object or object Yes Returns an Agent revision with saved settings that cannot change. If OCC cannot read them, the response omits saved configuration fields and includes configurationReadError with code SAVED_CONFIGURATION_UNREADABLE and the unreadable field.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "agentId": "agt_123e4567-e89b-42d3-a456-426614174000",    "backendId": null,    "compute": {      "id": "kubernetes",      "implementation": "kubernetes"    },    "configuration": {      "agents": {        "defaults": {          "model": "codex/gpt-5.1-codex",          "models": {            "codex/gpt-5.1-codex": {              "agentRuntime": {                "id": "codex"              }            }          }        }      },      "gateway": {        "auth": {          "password": {            "id": "OPENCLAW_GATEWAY_PASSWORD",            "provider": "default",            "source": "env"          }        },        "bind": "lan",        "controlUi": {          "enabled": false        },        "http": {          "endpoints": {            "chatCompletions": {              "enabled": true            }          }        },        "mode": "local"      },      "models": {        "providers": {          "codex": {            "api": "openai-responses",            "baseUrl": "http://127.0.0.1:9",            "models": [              {                "id": "gpt-5.1-codex",                "name": "gpt-5.1-codex"              }            ]          }        }      },      "plugins": {        "allow": [          "codex"        ],        "entries": {          "codex": {            "config": {              "appServer": {                "approvalPolicy": "on-request",                "authToken": "${APP_SERVER_TOKEN}",                "mode": "guardian",                "sandbox": "read-only",                "transport": "websocket",                "url": "${APP_SERVER_URL}"              }            },            "enabled": true          }        }      }    },    "configurationGeneration": 1,    "configurationId": "cfg_123e4567-e89b-42d3-a456-426614174000",    "configurationKind": "agent",    "createdAt": "2026-10-01T12:00:00.000Z",    "gatewayManagedMode": true,    "harness": {      "configuration": {        "modelProvider": {          "baseUrl": "https://api.openai.com/v1",          "protocol": "openai-responses",          "supportsStandaloneWebSearch": false        }      },      "id": "codex",      "mode": "dedicated",      "overrides": {},      "version": "1"    },    "harnessAuth": {      "method": "api_key",      "source": {        "id": "sec_123e4567-e89b-42d3-a456-426614174000",        "kind": "secret",        "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"      }    },    "id": "rev_123e4567-e89b-42d3-a456-426614174000",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "revision": 1  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Configurations

Operation Summary
POST /namespaces/{namespaceId}/configurations Create a native Namespace-owned Agent Configuration
DELETE /namespaces/{namespaceId}/configurations/{configurationId} Delete an exact unreferenced Namespace-owned Configuration
GET /namespaces/{namespaceId}/configurations/{configurationId} Get an exact Namespace-owned Configuration
PATCH /namespaces/{namespaceId}/configurations/{configurationId} Replace values and increment an exact Namespace-owned Configuration generation

POST /namespaces/{namespaceId}/configurations

Create a native Namespace-owned Agent Configuration

Operation ID: createConfiguration

Permissions: Requires create permission for Configuration resources in the requested Namespace. Requires operate permission on each Secret supplied in request body Secret bindings.

Action Resource Scope
create configuration namespace
operate secret request_body (when bound)
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
kind "agent" Yes —
secretBindings object<string, object> No max properties: 64; Optional Secret binding map. Keys are destination environment variable names; at most 64 bindings are accepted. Each value must contain source.kind, source.namespaceId, and source.id, and may contain delivery.type: "env". Admission rejects reserved or process-control destinations such as OPENCLAW_*, CODEX_*, OPENAI_*, ANTHROPIC_*, OCC_*, KUBERNETES_*, PATH, HOME, and proxy variables. Model authentication belongs to Agent.harnessAuth.
values object<string, SafeJsonValue> Yes A native OpenClaw configuration document.

Example request

json
{  "kind": "agent",  "values": {    "agents": {      "defaults": {        "model": "codex/gpt-5.1-codex",        "models": {          "codex/gpt-5.1-codex": {            "agentRuntime": {              "id": "codex"            }          }        }      }    },    "gateway": {      "auth": {        "password": {          "id": "OPENCLAW_GATEWAY_PASSWORD",          "provider": "default",          "source": "env"        }      },      "bind": "lan",      "controlUi": {        "enabled": false      },      "http": {        "endpoints": {          "chatCompletions": {            "enabled": true          }        }      },      "mode": "local"    },    "models": {      "providers": {        "codex": {          "api": "openai-responses",          "baseUrl": "http://127.0.0.1:9",          "models": [            {              "id": "gpt-5.1-codex",              "name": "gpt-5.1-codex"            }          ]        }      }    },    "plugins": {      "allow": [        "codex"      ],      "entries": {        "codex": {          "config": {            "appServer": {              "approvalPolicy": "on-request",              "authToken": "${APP_SERVER_TOKEN}",              "mode": "guardian",              "sandbox": "read-only",              "transport": "websocket",              "url": "${APP_SERVER_URL}"            }          },          "enabled": true        }      }    }  }}
Responses
Status Meaning
201 Created
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

201 response body: application/json

Field Type Required Constraints
data object Yes —
data.createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.generation integer Yes minimum: 1; maximum: 9007199254740991
data.id string Yes pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.kind "agent" Yes —
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.secretBindings object<string, object> No max properties: 64; Optional Secret binding map. Keys are destination environment variable names; at most 64 bindings are accepted. Each value must contain source.kind, source.namespaceId, and source.id, and may contain delivery.type: "env". Admission rejects reserved or process-control destinations such as OPENCLAW_*, CODEX_*, OPENAI_*, ANTHROPIC_*, OCC_*, KUBERNETES_*, PATH, HOME, and proxy variables. Model authentication belongs to Agent.harnessAuth.
data.values object<string, SafeJsonValue> Yes A native OpenClaw configuration document.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "createdAt": "2026-10-01T12:00:00.000Z",    "generation": 1,    "id": "cfg_123e4567-e89b-42d3-a456-426614174000",    "kind": "agent",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "values": {      "agents": {        "defaults": {          "model": "codex/gpt-5.1-codex",          "models": {            "codex/gpt-5.1-codex": {              "agentRuntime": {                "id": "codex"              }            }          }        }      },      "gateway": {        "auth": {          "password": {            "id": "OPENCLAW_GATEWAY_PASSWORD",            "provider": "default",            "source": "env"          }        },        "bind": "lan",        "controlUi": {          "enabled": false        },        "http": {          "endpoints": {            "chatCompletions": {              "enabled": true            }          }        },        "mode": "local"      },      "models": {        "providers": {          "codex": {            "api": "openai-responses",            "baseUrl": "http://127.0.0.1:9",            "models": [              {                "id": "gpt-5.1-codex",                "name": "gpt-5.1-codex"              }            ]          }        }      },      "plugins": {        "allow": [          "codex"        ],        "entries": {          "codex": {            "config": {              "appServer": {                "approvalPolicy": "on-request",                "authToken": "${APP_SERVER_TOKEN}",                "mode": "guardian",                "sandbox": "read-only",                "transport": "websocket",                "url": "${APP_SERVER_URL}"              }            },            "enabled": true          }        }      }    }  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

DELETE /namespaces/{namespaceId}/configurations/{configurationId}

Delete an exact unreferenced Namespace-owned Configuration

Operation ID: deleteConfiguration

Permissions: Requires delete permission on the requested Configuration.

Action Resource Scope
delete configuration requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
configurationId path string Yes pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "cfg_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
204 No Content
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

GET /namespaces/{namespaceId}/configurations/{configurationId}

Get an exact Namespace-owned Configuration

Operation ID: getConfiguration

Permissions: Requires read permission on the requested Configuration.

Action Resource Scope
read configuration requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
configurationId path string Yes pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "cfg_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.generation integer Yes minimum: 1; maximum: 9007199254740991
data.id string Yes pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.kind "agent" Yes —
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.secretBindings object<string, object> No max properties: 64; Optional Secret binding map. Keys are destination environment variable names; at most 64 bindings are accepted. Each value must contain source.kind, source.namespaceId, and source.id, and may contain delivery.type: "env". Admission rejects reserved or process-control destinations such as OPENCLAW_*, CODEX_*, OPENAI_*, ANTHROPIC_*, OCC_*, KUBERNETES_*, PATH, HOME, and proxy variables. Model authentication belongs to Agent.harnessAuth.
data.values object<string, SafeJsonValue> Yes A native OpenClaw configuration document.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "createdAt": "2026-10-01T12:00:00.000Z",    "generation": 1,    "id": "cfg_123e4567-e89b-42d3-a456-426614174000",    "kind": "agent",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "values": {      "agents": {        "defaults": {          "model": "codex/gpt-5.1-codex",          "models": {            "codex/gpt-5.1-codex": {              "agentRuntime": {                "id": "codex"              }            }          }        }      },      "gateway": {        "auth": {          "password": {            "id": "OPENCLAW_GATEWAY_PASSWORD",            "provider": "default",            "source": "env"          }        },        "bind": "lan",        "controlUi": {          "enabled": false        },        "http": {          "endpoints": {            "chatCompletions": {              "enabled": true            }          }        },        "mode": "local"      },      "models": {        "providers": {          "codex": {            "api": "openai-responses",            "baseUrl": "http://127.0.0.1:9",            "models": [              {                "id": "gpt-5.1-codex",                "name": "gpt-5.1-codex"              }            ]          }        }      },      "plugins": {        "allow": [          "codex"        ],        "entries": {          "codex": {            "config": {              "appServer": {                "approvalPolicy": "on-request",                "authToken": "${APP_SERVER_TOKEN}",                "mode": "guardian",                "sandbox": "read-only",                "transport": "websocket",                "url": "${APP_SERVER_URL}"              }            },            "enabled": true          }        }      }    }  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

PATCH /namespaces/{namespaceId}/configurations/{configurationId}

Replace values and increment an exact Namespace-owned Configuration generation

Operation ID: updateConfiguration

Permissions: Requires update permission on the requested Configuration. Requires operate permission on each Secret bound by the resulting Configuration.

Action Resource Scope
update configuration requested
operate secret requested (when bound)
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
configurationId path string Yes pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "cfg_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
expectedGeneration integer No minimum: 1; maximum: 9007199254740991; The generation this update replaces, from the caller's last read. A Configuration at another generation refuses the update with 409 and an /expectedGeneration detail, and keeps its content. Omitted, the update replaces whatever generation is current.
secretBindings object<string, object> No max properties: 64; Optional Secret binding map. Keys are destination environment variable names; at most 64 bindings are accepted. Each value must contain source.kind, source.namespaceId, and source.id, and may contain delivery.type: "env". Admission rejects reserved or process-control destinations such as OPENCLAW_*, CODEX_*, OPENAI_*, ANTHROPIC_*, OCC_*, KUBERNETES_*, PATH, HOME, and proxy variables. Model authentication belongs to Agent.harnessAuth.
values object<string, SafeJsonValue> Yes A native OpenClaw configuration document.

Example request

json
{  "expectedGeneration": 1,  "values": {    "agents": {      "defaults": {        "model": "codex/gpt-5.1-codex",        "models": {          "codex/gpt-5.1-codex": {            "agentRuntime": {              "id": "codex"            }          }        }      }    },    "gateway": {      "auth": {        "password": {          "id": "OPENCLAW_GATEWAY_PASSWORD",          "provider": "default",          "source": "env"        }      },      "bind": "lan",      "controlUi": {        "enabled": false      },      "http": {        "endpoints": {          "chatCompletions": {            "enabled": true          }        }      },      "mode": "local"    },    "models": {      "providers": {        "codex": {          "api": "openai-responses",          "baseUrl": "http://127.0.0.1:9",          "models": [            {              "id": "gpt-5.1-codex",              "name": "gpt-5.1-codex"            }          ]        }      }    },    "plugins": {      "allow": [        "codex"      ],      "entries": {        "codex": {          "config": {            "appServer": {              "approvalPolicy": "on-request",              "authToken": "${APP_SERVER_TOKEN}",              "mode": "guardian",              "sandbox": "read-only",              "transport": "websocket",              "url": "${APP_SERVER_URL}"            }          },          "enabled": true        }      }    }  }}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.generation integer Yes minimum: 1; maximum: 9007199254740991
data.id string Yes pattern: ^cfg_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.kind "agent" Yes —
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.secretBindings object<string, object> No max properties: 64; Optional Secret binding map. Keys are destination environment variable names; at most 64 bindings are accepted. Each value must contain source.kind, source.namespaceId, and source.id, and may contain delivery.type: "env". Admission rejects reserved or process-control destinations such as OPENCLAW_*, CODEX_*, OPENAI_*, ANTHROPIC_*, OCC_*, KUBERNETES_*, PATH, HOME, and proxy variables. Model authentication belongs to Agent.harnessAuth.
data.values object<string, SafeJsonValue> Yes A native OpenClaw configuration document.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "createdAt": "2026-10-01T12:00:00.000Z",    "generation": 2,    "id": "cfg_123e4567-e89b-42d3-a456-426614174000",    "kind": "agent",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "values": {      "agents": {        "defaults": {          "model": "codex/gpt-5.1-codex",          "models": {            "codex/gpt-5.1-codex": {              "agentRuntime": {                "id": "codex"              }            }          }        }      },      "gateway": {        "auth": {          "password": {            "id": "OPENCLAW_GATEWAY_PASSWORD",            "provider": "default",            "source": "env"          }        },        "bind": "lan",        "controlUi": {          "enabled": false        },        "http": {          "endpoints": {            "chatCompletions": {              "enabled": true            }          }        },        "mode": "local"      },      "models": {        "providers": {          "codex": {            "api": "openai-responses",            "baseUrl": "http://127.0.0.1:9",            "models": [              {                "id": "gpt-5.1-codex",                "name": "gpt-5.1-codex"              }            ]          }        }      },      "plugins": {        "allow": [          "codex"        ],        "entries": {          "codex": {            "config": {              "appServer": {                "approvalPolicy": "on-request",                "authToken": "${APP_SERVER_TOKEN}",                "mode": "guardian",                "sandbox": "read-only",                "transport": "websocket",                "url": "${APP_SERVER_URL}"              }            },            "enabled": true          }        }      }    }  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Credential sources

Operation Summary
GET /namespaces/{namespaceId}/credential-sources List readable credential sources without revealing credential values
POST /namespaces/{namespaceId}/credential-sources Register a credential source with the selected Credential Gateway
DELETE /namespaces/{namespaceId}/credential-sources/{credentialSourceId} Remove an unreferenced credential source from the Credential Gateway
GET /namespaces/{namespaceId}/credential-sources/{credentialSourceId} Get one credential source and its live Credential Gateway status
PATCH /namespaces/{namespaceId}/credential-sources/{credentialSourceId} Push current or replacement Secret values to the Credential Gateway copy
POST /namespaces/{namespaceId}/credential-sources/{credentialSourceId}/rotate Force the Credential Refresh Driver to mint a new token for a refresh-type source

GET /namespaces/{namespaceId}/credential-sources

List readable credential sources without revealing credential values

Operation ID: listCredentialSources

Permissions: Requires read permission on the requested Namespace. Only CredentialSource resources with individual read permission are returned.

Action Resource Scope
read namespace requested
read credential_source each_returned
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<object> Yes —
data[].config object<string, string> Yes max properties: 32; Non-secret source configuration keyed by catalog field name.
data[].egress object No Protected live static, eligible prepared, or explicitly credential-free metadata access. Each profile requires its own grant; missing material never selects credential-free access. Runtime readiness requires current authenticated supervisor evidence.
data[].egress.adoption "live" or "prepared" or "credential_free" Yes —
data[].egress.retention "none" Yes —
data[].id string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data[].namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].ownerCapability "credential_gateway" or "credential_proxy" or "token_service" Yes The Token Service owns saved accounts. Other sources belong to the Driver that admitted them.
data[].ref object Yes Exact OCC credential source reference. Shape: { "kind": "credential_source", "namespaceId": "ns_...", "id": "cs_..." }.
data[].ref.id string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].ref.kind "credential_source" Yes —
data[].ref.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].secrets object<string, object> Yes max properties: 16; Secret inputs keyed by catalog field name. Each value references an OCC Secret in the same Namespace; OCC never returns its value.
data[].state "registering" or "ready" or "deleting" Yes —
data[].status object No Source admission or selected Credential Gateway status. For protected sources, ready does not attest an installed enforcing Sandbox; current supervisor evidence is checked separately. Never contains credential values.
data[].status.reason string No max length: 512
data[].status.refresh object No Token refresh status reported by the selected Credential Refresh Driver for a refresh-type source. It never contains tokens or refresh material.
data[].status.refresh.expiresAt string (date-time) No —
data[].status.refresh.failureCode string No max length: 128
data[].status.refresh.lastRefreshAt string (date-time) No —
data[].status.refresh.nextRefreshAt string (date-time) No —
data[].status.refresh.recoveryAction "retry" or "reauthorize" or "fix_configuration" or "investigate" No —
data[].status.refresh.state "pending" or "ready" or "failed" Yes —
data[].status.state "ready" or "pending" or "failed" or "absent" Yes —
data[].type string Yes min length: 1; max length: 64; pattern: ^[a-z][a-z0-9-]{0,63}$; Source type from the selected Credential Gateway catalog, for example openai.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

No readable resources

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Example response

json
{  "data": [    {      "config": {},      "id": "cs_123e4567-e89b-42d3-a456-426614174000",      "name": "Model credentials",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",      "ownerCapability": "credential_gateway",      "ref": {        "id": "cs_123e4567-e89b-42d3-a456-426614174000",        "kind": "credential_source",        "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"      },      "secrets": {        "api_key": {          "id": "sec_123e4567-e89b-42d3-a456-426614174000",          "kind": "secret",          "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"        }      },      "state": "ready",      "type": "openai"    }  ],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/credential-sources

Register a credential source with the selected Credential Gateway

Operation ID: createCredentialSource

Permissions: Requires create permission for CredentialSource resources in the requested Namespace. Requires operate permission on each Secret named in the request body secrets.

Action Resource Scope
create credential_source namespace
operate secret request_body (when bound)
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
config object<string, string> No max properties: 32; Non-secret source configuration keyed by catalog field name.
name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
secrets object<string, object> No max properties: 16; Secret inputs keyed by catalog field name. Each value references an OCC Secret in the same Namespace; OCC never returns its value.
type string Yes min length: 1; max length: 64; pattern: ^[a-z][a-z0-9-]{0,63}$; Source type from the selected Credential Gateway catalog, for example openai.

Example request

json
{  "config": {},  "name": "Model credentials",  "secrets": {    "api_key": {      "id": "sec_123e4567-e89b-42d3-a456-426614174000",      "kind": "secret",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    }  },  "type": "openai"}
Responses
Status Meaning
201 Created
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

201 response body: application/json

Field Type Required Constraints
data object Yes —
data.config object<string, string> Yes max properties: 32; Non-secret source configuration keyed by catalog field name.
data.egress object No Protected live static, eligible prepared, or explicitly credential-free metadata access. Each profile requires its own grant; missing material never selects credential-free access. Runtime readiness requires current authenticated supervisor evidence.
data.egress.adoption "live" or "prepared" or "credential_free" Yes —
data.egress.retention "none" Yes —
data.id string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.ownerCapability "credential_gateway" or "credential_proxy" or "token_service" Yes The Token Service owns saved accounts. Other sources belong to the Driver that admitted them.
data.ref object Yes Exact OCC credential source reference. Shape: { "kind": "credential_source", "namespaceId": "ns_...", "id": "cs_..." }.
data.ref.id string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.ref.kind "credential_source" Yes —
data.ref.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.secrets object<string, object> Yes max properties: 16; Secret inputs keyed by catalog field name. Each value references an OCC Secret in the same Namespace; OCC never returns its value.
data.state "registering" or "ready" or "deleting" Yes —
data.status object No Source admission or selected Credential Gateway status. For protected sources, ready does not attest an installed enforcing Sandbox; current supervisor evidence is checked separately. Never contains credential values.
data.status.reason string No max length: 512
data.status.refresh object No Token refresh status reported by the selected Credential Refresh Driver for a refresh-type source. It never contains tokens or refresh material.
data.status.refresh.expiresAt string (date-time) No —
data.status.refresh.failureCode string No max length: 128
data.status.refresh.lastRefreshAt string (date-time) No —
data.status.refresh.nextRefreshAt string (date-time) No —
data.status.refresh.recoveryAction "retry" or "reauthorize" or "fix_configuration" or "investigate" No —
data.status.refresh.state "pending" or "ready" or "failed" Yes —
data.status.state "ready" or "pending" or "failed" or "absent" Yes —
data.type string Yes min length: 1; max length: 64; pattern: ^[a-z][a-z0-9-]{0,63}$; Source type from the selected Credential Gateway catalog, for example openai.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "config": {},    "id": "cs_123e4567-e89b-42d3-a456-426614174000",    "name": "Model credentials",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "ownerCapability": "credential_gateway",    "ref": {      "id": "cs_123e4567-e89b-42d3-a456-426614174000",      "kind": "credential_source",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    },    "secrets": {      "api_key": {        "id": "sec_123e4567-e89b-42d3-a456-426614174000",        "kind": "secret",        "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"      }    },    "state": "ready",    "type": "openai"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

DELETE /namespaces/{namespaceId}/credential-sources/{credentialSourceId}

Remove an unreferenced credential source from the Credential Gateway

Operation ID: deleteCredentialSource

Permissions: Requires delete permission on the requested CredentialSource.

Action Resource Scope
delete credential_source requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
credentialSourceId path string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "cs_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
204 No Content
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

GET /namespaces/{namespaceId}/credential-sources/{credentialSourceId}

Get one credential source and its live Credential Gateway status

Operation ID: getCredentialSource

Permissions: Requires read permission on the requested CredentialSource.

Action Resource Scope
read credential_source requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
credentialSourceId path string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "cs_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.config object<string, string> Yes max properties: 32; Non-secret source configuration keyed by catalog field name.
data.egress object No Protected live static, eligible prepared, or explicitly credential-free metadata access. Each profile requires its own grant; missing material never selects credential-free access. Runtime readiness requires current authenticated supervisor evidence.
data.egress.adoption "live" or "prepared" or "credential_free" Yes —
data.egress.retention "none" Yes —
data.id string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.ownerCapability "credential_gateway" or "credential_proxy" or "token_service" Yes The Token Service owns saved accounts. Other sources belong to the Driver that admitted them.
data.ref object Yes Exact OCC credential source reference. Shape: { "kind": "credential_source", "namespaceId": "ns_...", "id": "cs_..." }.
data.ref.id string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.ref.kind "credential_source" Yes —
data.ref.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.secrets object<string, object> Yes max properties: 16; Secret inputs keyed by catalog field name. Each value references an OCC Secret in the same Namespace; OCC never returns its value.
data.state "registering" or "ready" or "deleting" Yes —
data.status object No Source admission or selected Credential Gateway status. For protected sources, ready does not attest an installed enforcing Sandbox; current supervisor evidence is checked separately. Never contains credential values.
data.status.reason string No max length: 512
data.status.refresh object No Token refresh status reported by the selected Credential Refresh Driver for a refresh-type source. It never contains tokens or refresh material.
data.status.refresh.expiresAt string (date-time) No —
data.status.refresh.failureCode string No max length: 128
data.status.refresh.lastRefreshAt string (date-time) No —
data.status.refresh.nextRefreshAt string (date-time) No —
data.status.refresh.recoveryAction "retry" or "reauthorize" or "fix_configuration" or "investigate" No —
data.status.refresh.state "pending" or "ready" or "failed" Yes —
data.status.state "ready" or "pending" or "failed" or "absent" Yes —
data.type string Yes min length: 1; max length: 64; pattern: ^[a-z][a-z0-9-]{0,63}$; Source type from the selected Credential Gateway catalog, for example openai.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "config": {},    "id": "cs_123e4567-e89b-42d3-a456-426614174000",    "name": "Model credentials",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "ownerCapability": "credential_gateway",    "ref": {      "id": "cs_123e4567-e89b-42d3-a456-426614174000",      "kind": "credential_source",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    },    "secrets": {      "api_key": {        "id": "sec_123e4567-e89b-42d3-a456-426614174000",        "kind": "secret",        "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"      }    },    "state": "ready",    "type": "openai"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

PATCH /namespaces/{namespaceId}/credential-sources/{credentialSourceId}

Push current or replacement Secret values to the Credential Gateway copy

Operation ID: updateCredentialSource

Permissions: Requires update permission on the requested CredentialSource. Requires operate permission on each Secret the source references after the update, including its current references when the request omits secrets.

Action Resource Scope
update credential_source requested
operate secret requested (when bound)
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
credentialSourceId path string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "cs_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
adoption "live" No Opt an unbound static source into protected live Secret reads. A legacy or narrower source also requires explicit authorityScope: execution. Requires source update and Secret operate permission.
authorityScope "execution" No Consent to every process in this dedicated execution using the constrained inference grant. An older executable-specific grant is never broadened by an upgrade or Secret change.
secrets object<string, object> No max properties: 16; Secret inputs keyed by catalog field name. Each value references an OCC Secret in the same Namespace; OCC never returns its value.

Example request

json
{  "adoption": "live",  "secrets": {    "api_key": {      "id": "sec_123e4567-e89b-42d3-a456-426614174000",      "kind": "secret",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    }  }}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.config object<string, string> Yes max properties: 32; Non-secret source configuration keyed by catalog field name.
data.egress object No Protected live static, eligible prepared, or explicitly credential-free metadata access. Each profile requires its own grant; missing material never selects credential-free access. Runtime readiness requires current authenticated supervisor evidence.
data.egress.adoption "live" or "prepared" or "credential_free" Yes —
data.egress.retention "none" Yes —
data.id string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.ownerCapability "credential_gateway" or "credential_proxy" or "token_service" Yes The Token Service owns saved accounts. Other sources belong to the Driver that admitted them.
data.ref object Yes Exact OCC credential source reference. Shape: { "kind": "credential_source", "namespaceId": "ns_...", "id": "cs_..." }.
data.ref.id string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.ref.kind "credential_source" Yes —
data.ref.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.secrets object<string, object> Yes max properties: 16; Secret inputs keyed by catalog field name. Each value references an OCC Secret in the same Namespace; OCC never returns its value.
data.state "registering" or "ready" or "deleting" Yes —
data.status object No Source admission or selected Credential Gateway status. For protected sources, ready does not attest an installed enforcing Sandbox; current supervisor evidence is checked separately. Never contains credential values.
data.status.reason string No max length: 512
data.status.refresh object No Token refresh status reported by the selected Credential Refresh Driver for a refresh-type source. It never contains tokens or refresh material.
data.status.refresh.expiresAt string (date-time) No —
data.status.refresh.failureCode string No max length: 128
data.status.refresh.lastRefreshAt string (date-time) No —
data.status.refresh.nextRefreshAt string (date-time) No —
data.status.refresh.recoveryAction "retry" or "reauthorize" or "fix_configuration" or "investigate" No —
data.status.refresh.state "pending" or "ready" or "failed" Yes —
data.status.state "ready" or "pending" or "failed" or "absent" Yes —
data.type string Yes min length: 1; max length: 64; pattern: ^[a-z][a-z0-9-]{0,63}$; Source type from the selected Credential Gateway catalog, for example openai.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "config": {},    "id": "cs_123e4567-e89b-42d3-a456-426614174000",    "name": "Model credentials",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "ownerCapability": "credential_gateway",    "ref": {      "id": "cs_123e4567-e89b-42d3-a456-426614174000",      "kind": "credential_source",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    },    "secrets": {      "api_key": {        "id": "sec_123e4567-e89b-42d3-a456-426614174000",        "kind": "secret",        "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"      }    },    "state": "ready",    "type": "openai"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/credential-sources/{credentialSourceId}/rotate

Force the Credential Refresh Driver to mint a new token for a refresh-type source

Operation ID: rotateCredentialSource

Permissions: Requires update permission on the requested CredentialSource.

Action Resource Scope
update credential_source requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
credentialSourceId path string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "cs_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.config object<string, string> Yes max properties: 32; Non-secret source configuration keyed by catalog field name.
data.egress object No Protected live static, eligible prepared, or explicitly credential-free metadata access. Each profile requires its own grant; missing material never selects credential-free access. Runtime readiness requires current authenticated supervisor evidence.
data.egress.adoption "live" or "prepared" or "credential_free" Yes —
data.egress.retention "none" Yes —
data.id string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.ownerCapability "credential_gateway" or "credential_proxy" or "token_service" Yes The Token Service owns saved accounts. Other sources belong to the Driver that admitted them.
data.ref object Yes Exact OCC credential source reference. Shape: { "kind": "credential_source", "namespaceId": "ns_...", "id": "cs_..." }.
data.ref.id string Yes pattern: ^cs_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.ref.kind "credential_source" Yes —
data.ref.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.secrets object<string, object> Yes max properties: 16; Secret inputs keyed by catalog field name. Each value references an OCC Secret in the same Namespace; OCC never returns its value.
data.state "registering" or "ready" or "deleting" Yes —
data.status object No Source admission or selected Credential Gateway status. For protected sources, ready does not attest an installed enforcing Sandbox; current supervisor evidence is checked separately. Never contains credential values.
data.status.reason string No max length: 512
data.status.refresh object No Token refresh status reported by the selected Credential Refresh Driver for a refresh-type source. It never contains tokens or refresh material.
data.status.refresh.expiresAt string (date-time) No —
data.status.refresh.failureCode string No max length: 128
data.status.refresh.lastRefreshAt string (date-time) No —
data.status.refresh.nextRefreshAt string (date-time) No —
data.status.refresh.recoveryAction "retry" or "reauthorize" or "fix_configuration" or "investigate" No —
data.status.refresh.state "pending" or "ready" or "failed" Yes —
data.status.state "ready" or "pending" or "failed" or "absent" Yes —
data.type string Yes min length: 1; max length: 64; pattern: ^[a-z][a-z0-9-]{0,63}$; Source type from the selected Credential Gateway catalog, for example openai.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "config": {},    "id": "cs_123e4567-e89b-42d3-a456-426614174000",    "name": "Model credentials",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "ownerCapability": "credential_gateway",    "ref": {      "id": "cs_123e4567-e89b-42d3-a456-426614174000",      "kind": "credential_source",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    },    "secrets": {      "api_key": {        "id": "sec_123e4567-e89b-42d3-a456-426614174000",        "kind": "secret",        "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"      }    },    "state": "ready",    "type": "openai"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

IAM

Operation Summary
GET /namespaces/{namespaceId}/iam/access-bindings List exact Namespace IAM AccessBindings
POST /namespaces/{namespaceId}/iam/access-bindings Create an immutable exact-resource Namespace IAM AccessBinding
DELETE /namespaces/{namespaceId}/iam/access-bindings/{bindingId} Delete one exact Namespace IAM AccessBinding
GET /namespaces/{namespaceId}/iam/access-bindings/{bindingId} Get an exact Namespace IAM AccessBinding
GET /namespaces/{namespaceId}/iam/roles List exact Namespace IAM Roles
POST /namespaces/{namespaceId}/iam/roles Create an immutable Namespace IAM Role
DELETE /namespaces/{namespaceId}/iam/roles/{roleId} Delete an unreferenced exact Namespace IAM Role
GET /namespaces/{namespaceId}/iam/roles/{roleId} Get an exact Namespace IAM Role
GET /namespaces/{namespaceId}/iam/service-principals List the Namespace's non-Agent ServicePrincipals
POST /namespaces/{namespaceId}/iam/service-principals Create a Namespace ServicePrincipal with no grants for automation or CLI keys
GET /namespaces/{namespaceId}/iam/service-principals/{servicePrincipalId} Get an exact Namespace ServicePrincipal

GET /namespaces/{namespaceId}/iam/access-bindings

List exact Namespace IAM AccessBindings

Operation ID: listIAMAccessBindings

Permissions: Requires administer permission on the requested Installation. Requires read permission on the requested Namespace.

Action Resource Scope
administer installation requested
read namespace requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<object or object> Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

No readable resources

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Example response

json
{  "data": [    {      "id": "binding-agent-secret",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",      "resourceId": "sec_123e4567-e89b-42d3-a456-426614174000",      "resourceKind": "secret",      "roleId": "role-secret-operator",      "subjectId": "principal-docs-agent",      "subjectKind": "identity"    }  ],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/iam/access-bindings

Create an immutable exact-resource Namespace IAM AccessBinding

Operation ID: createIAMAccessBinding

Permissions: Requires administer permission on the requested Installation. Requires read permission on the requested Namespace. Requires read permission on the request body Agent when the AccessBinding targets that resource kind. Requires read permission on the request body Agent revision when the AccessBinding targets that resource kind. Requires read permission on the request body Configuration when the AccessBinding targets that resource kind. Requires read permission on the request body CredentialSource when the AccessBinding targets that resource kind. Requires read permission on the request body Namespace when the AccessBinding targets that resource kind. Requires read permission on the request body Preset when the AccessBinding targets that resource kind. Requires read permission on the request body Secret when the AccessBinding targets that resource kind. Requires read permission on the request body ServiceAccount when the AccessBinding targets that resource kind.

Action Resource Scope
administer installation requested
read namespace requested
read agent request_body
read agent_revision request_body
read configuration request_body
read credential_source request_body
read namespace request_body
read preset request_body
read secret request_body
read service_account request_body
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
resourceId string Yes min length: 1; max length: 200
resourceKind "namespace" or "agent" or "agent_revision" or "configuration" or "credential_source" or "sandbox_policy" or "preset" or "secret" or "service_account" Yes —
roleId string Yes min length: 1; max length: 200
subjectId string Yes min length: 1; max length: 200
subjectKind "identity" Yes —

Example request

json
{  "resourceId": "sec_123e4567-e89b-42d3-a456-426614174000",  "resourceKind": "secret",  "roleId": "role-secret-operator",  "subjectId": "principal-docs-agent",  "subjectKind": "identity"}
Responses
Status Meaning
201 Created
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

201 response body: application/json

Field Type Required Constraints
data object or object Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "id": "binding-agent-secret",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "resourceId": "sec_123e4567-e89b-42d3-a456-426614174000",    "resourceKind": "secret",    "roleId": "role-secret-operator",    "subjectId": "principal-docs-agent",    "subjectKind": "identity"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

DELETE /namespaces/{namespaceId}/iam/access-bindings/{bindingId}

Delete one exact Namespace IAM AccessBinding

Operation ID: deleteIAMAccessBinding

Permissions: Requires administer permission on the requested Installation. Requires read permission on the requested Namespace.

Action Resource Scope
administer installation requested
read namespace requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
bindingId path string Yes min length: 1; max length: 200 "binding-agent-secret"
Responses
Status Meaning
204 No Content
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

GET /namespaces/{namespaceId}/iam/access-bindings/{bindingId}

Get an exact Namespace IAM AccessBinding

Operation ID: getIAMAccessBinding

Permissions: Requires administer permission on the requested Installation. Requires read permission on the requested Namespace.

Action Resource Scope
administer installation requested
read namespace requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
bindingId path string Yes min length: 1; max length: 200 "binding-agent-secret"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object or object Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "id": "binding-agent-secret",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "resourceId": "sec_123e4567-e89b-42d3-a456-426614174000",    "resourceKind": "secret",    "roleId": "role-secret-operator",    "subjectId": "principal-docs-agent",    "subjectKind": "identity"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/iam/roles

List exact Namespace IAM Roles

Operation ID: listIAMRoles

Permissions: Requires administer permission on the requested Installation. Requires read permission on the requested Namespace.

Action Resource Scope
administer installation requested
read namespace requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<object> Yes —
data[].id string Yes min length: 1; max length: 200
data[].name string No min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data[].namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].permissions array<object> Yes min items: 1; max items: 64
data[].permissions[].action "create" or "read" or "update" or "delete" or "deploy" or "operate" or "administer" or "read_logs" or "manage_policy" or "read_audit" Yes —
data[].permissions[].resourceKind "installation" or "namespace" or "configuration" or "preset" or "service_account" or "secret" or "agent" or "agent_revision" or "credential_source" or "sandbox_policy" Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

No readable resources

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Example response

json
{  "data": [    {      "id": "role-secret-operator",      "name": "Secret operator",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",      "permissions": [        {          "action": "operate",          "resourceKind": "secret"        }      ]    }  ],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/iam/roles

Create an immutable Namespace IAM Role

Operation ID: createIAMRole

Permissions: Requires administer permission on the requested Installation. Requires read permission on the requested Namespace.

Action Resource Scope
administer installation requested
read namespace requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
name string No min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
permissions array<object> Yes min items: 1; max items: 64
permissions[].action "create" or "read" or "update" or "delete" or "deploy" or "operate" or "administer" or "read_logs" or "manage_policy" or "read_audit" Yes —
permissions[].resourceKind "namespace" or "agent" or "agent_revision" or "configuration" or "credential_source" or "sandbox_policy" or "preset" or "secret" or "service_account" Yes —

Example request

json
{  "name": "Secret operator",  "permissions": [    {      "action": "operate",      "resourceKind": "secret"    }  ]}
Responses
Status Meaning
201 Created
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

201 response body: application/json

Field Type Required Constraints
data object Yes —
data.id string Yes min length: 1; max length: 200
data.name string No min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.permissions array<object> Yes min items: 1; max items: 64
data.permissions[].action "create" or "read" or "update" or "delete" or "deploy" or "operate" or "administer" or "read_logs" or "manage_policy" or "read_audit" Yes —
data.permissions[].resourceKind "installation" or "namespace" or "configuration" or "preset" or "service_account" or "secret" or "agent" or "agent_revision" or "credential_source" or "sandbox_policy" Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "id": "role-secret-operator",    "name": "Secret operator",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "permissions": [      {        "action": "operate",        "resourceKind": "secret"      }    ]  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

DELETE /namespaces/{namespaceId}/iam/roles/{roleId}

Delete an unreferenced exact Namespace IAM Role

Operation ID: deleteIAMRole

Permissions: Requires administer permission on the requested Installation. Requires read permission on the requested Namespace.

Action Resource Scope
administer installation requested
read namespace requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
roleId path string Yes min length: 1; max length: 200 "role-secret-operator"
Responses
Status Meaning
204 No Content
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

GET /namespaces/{namespaceId}/iam/roles/{roleId}

Get an exact Namespace IAM Role

Operation ID: getIAMRole

Permissions: Requires administer permission on the requested Installation. Requires read permission on the requested Namespace.

Action Resource Scope
administer installation requested
read namespace requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
roleId path string Yes min length: 1; max length: 200 "role-secret-operator"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.id string Yes min length: 1; max length: 200
data.name string No min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.permissions array<object> Yes min items: 1; max items: 64
data.permissions[].action "create" or "read" or "update" or "delete" or "deploy" or "operate" or "administer" or "read_logs" or "manage_policy" or "read_audit" Yes —
data.permissions[].resourceKind "installation" or "namespace" or "configuration" or "preset" or "service_account" or "secret" or "agent" or "agent_revision" or "credential_source" or "sandbox_policy" Yes —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "id": "role-secret-operator",    "name": "Secret operator",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "permissions": [      {        "action": "operate",        "resourceKind": "secret"      }    ]  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/iam/service-principals

List the Namespace's non-Agent ServicePrincipals

Operation ID: listIAMServicePrincipals

Permissions: Requires administer permission on the requested Installation. Requires read permission on the requested Namespace.

Action Resource Scope
administer installation requested
read namespace requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<object> Yes —
data[].id string Yes min length: 1; max length: 200
data[].namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

No readable resources

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Example response

json
{  "data": [    {      "id": "principal-docs-agent",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    }  ],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/iam/service-principals

Create a Namespace ServicePrincipal with no grants for automation or CLI keys

Operation ID: createIAMServicePrincipal

Permissions: Requires administer permission on the requested Installation. Requires read permission on the requested Namespace.

Action Resource Scope
administer installation requested
read namespace requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Schema: object.

Example request

json
{}
Responses
Status Meaning
201 Created
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

201 response body: application/json

Field Type Required Constraints
data object Yes A non-Agent automation identity fixed to one Namespace. It holds only the grants of AccessBindings that name it.
data.id string Yes min length: 1; max length: 200
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "id": "principal-docs-agent",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/iam/service-principals/{servicePrincipalId}

Get an exact Namespace ServicePrincipal

Operation ID: getIAMServicePrincipal

Permissions: Requires administer permission on the requested Installation. Requires read permission on the requested Namespace.

Action Resource Scope
administer installation requested
read namespace requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
servicePrincipalId path string Yes min length: 1; max length: 200 "principal-docs-agent"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes A non-Agent automation identity fixed to one Namespace. It holds only the grants of AccessBindings that name it.
data.id string Yes min length: 1; max length: 200
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "id": "principal-docs-agent",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Presets

Operation Summary
GET /namespaces/{namespaceId}/presets List readable Preset summaries in one Namespace
POST /namespaces/{namespaceId}/presets Create a reusable Namespace-owned Agent Preset
DELETE /namespaces/{namespaceId}/presets/{presetId} Delete a Preset without changing existing Agents
GET /namespaces/{namespaceId}/presets/{presetId} Read one exact Namespace-owned Preset
PATCH /namespaces/{namespaceId}/presets/{presetId} Update a Preset without changing existing Agents

GET /namespaces/{namespaceId}/presets

List readable Preset summaries in one Namespace

Operation ID: listPresets

Permissions: Requires read permission on the requested Namespace. Only Preset resources with individual read permission are returned.

Action Resource Scope
read namespace requested
read preset each_returned
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<object> Yes —
data[].createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data[].id string Yes pattern: ^pre_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data[].namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

No readable resources

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Example response

json
{  "data": [    {      "createdAt": "2026-10-01T12:00:00.000Z",      "id": "pre_123e4567-e89b-42d3-a456-426614174000",      "name": "Documentation assistant",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    }  ],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/presets

Create a reusable Namespace-owned Agent Preset

Operation ID: createPreset

Permissions: Requires create permission for Preset resources in the requested Namespace.

Action Resource Scope
create preset namespace
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
template object Yes Reusable partial Agent launch settings. Scalar values may use {{ vars.name }}. Admission validates template syntax and credential boundaries. Ordinary creation APIs validate concrete launch settings.
template.agent object No —
template.agent.backendId SafeJsonValue No —
template.agent.executionMode SafeJsonValue No —
template.agent.harnessAuth SafeJsonValue No —
template.agent.initialWorkspaceFiles object No —
template.agent.initialWorkspaceFiles.AGENTS.md string No max length: 16384; pattern: ^[^\u0000]*$
template.agent.initialWorkspaceFiles.IDENTITY.md string No max length: 16384; pattern: ^[^\u0000]*$
template.agent.initialWorkspaceFiles.SOUL.md string No max length: 16384; pattern: ^[^\u0000]*$
template.agent.initialWorkspaceFiles.USER.md string No max length: 16384; pattern: ^[^\u0000]*$
template.agent.name SafeJsonValue No —
template.agent.pluginApprovers SafeJsonValue No —
template.agent.plugins SafeJsonValue No —
template.agent.repositoryAccess SafeJsonValue No —
template.agent.repositoryBindings SafeJsonValue No —
template.configuration object No —
template.configuration.secretBindings object<string, SafeJsonValue> No Namespace-owned Secret bindings. Reference fields may use {{ vars.name }}.
template.configuration.values object<string, SafeJsonValue> No A native OpenClaw configuration document.
template.variables object<string, object> No —

Example request

json
{  "name": "Documentation assistant",  "template": {    "agent": {      "executionMode": "dedicated"    },    "configuration": {      "values": {        "agents": {          "defaults": {            "model": "codex/gpt-5.1-codex",            "models": {              "codex/gpt-5.1-codex": {                "agentRuntime": {                  "id": "codex"                }              }            }          }        },        "gateway": {          "auth": {            "password": {              "id": "OPENCLAW_GATEWAY_PASSWORD",              "provider": "default",              "source": "env"            }          },          "bind": "lan",          "controlUi": {            "enabled": false          },          "http": {            "endpoints": {              "chatCompletions": {                "enabled": true              }            }          },          "mode": "local"        },        "models": {          "providers": {            "codex": {              "api": "openai-responses",              "baseUrl": "http://127.0.0.1:9",              "models": [                {                  "id": "gpt-5.1-codex",                  "name": "gpt-5.1-codex"                }              ]            }          }        },        "plugins": {          "allow": [            "codex"          ],          "entries": {            "codex": {              "config": {                "appServer": {                  "approvalPolicy": "on-request",                  "authToken": "${APP_SERVER_TOKEN}",                  "mode": "guardian",                  "sandbox": "read-only",                  "transport": "websocket",                  "url": "${APP_SERVER_URL}"                }              },              "enabled": true            }          }        }      }    }  }}
Responses
Status Meaning
201 Created
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

201 response body: application/json

Field Type Required Constraints
data object Yes —
data.createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.id string Yes pattern: ^pre_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.template object Yes Reusable partial Agent launch settings. Scalar values may use {{ vars.name }}. Admission validates template syntax and credential boundaries. Ordinary creation APIs validate concrete launch settings.
data.template.agent object No —
data.template.agent.backendId SafeJsonValue No —
data.template.agent.executionMode SafeJsonValue No —
data.template.agent.harnessAuth SafeJsonValue No —
data.template.agent.initialWorkspaceFiles object No —
data.template.agent.initialWorkspaceFiles.AGENTS.md string No max length: 16384; pattern: ^[^\u0000]*$
data.template.agent.initialWorkspaceFiles.IDENTITY.md string No max length: 16384; pattern: ^[^\u0000]*$
data.template.agent.initialWorkspaceFiles.SOUL.md string No max length: 16384; pattern: ^[^\u0000]*$
data.template.agent.initialWorkspaceFiles.USER.md string No max length: 16384; pattern: ^[^\u0000]*$
data.template.agent.name SafeJsonValue No —
data.template.agent.pluginApprovers SafeJsonValue No —
data.template.agent.plugins SafeJsonValue No —
data.template.agent.repositoryAccess SafeJsonValue No —
data.template.agent.repositoryBindings SafeJsonValue No —
data.template.configuration object No —
data.template.configuration.secretBindings object<string, SafeJsonValue> No Namespace-owned Secret bindings. Reference fields may use {{ vars.name }}.
data.template.configuration.values object<string, SafeJsonValue> No A native OpenClaw configuration document.
data.template.variables object<string, object> No —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "createdAt": "2026-10-01T12:00:00.000Z",    "id": "pre_123e4567-e89b-42d3-a456-426614174000",    "name": "Documentation assistant",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "template": {      "agent": {        "executionMode": "dedicated"      },      "configuration": {        "values": {          "agents": {            "defaults": {              "model": "codex/gpt-5.1-codex",              "models": {                "codex/gpt-5.1-codex": {                  "agentRuntime": {                    "id": "codex"                  }                }              }            }          },          "gateway": {            "auth": {              "password": {                "id": "OPENCLAW_GATEWAY_PASSWORD",                "provider": "default",                "source": "env"              }            },            "bind": "lan",            "controlUi": {              "enabled": false            },            "http": {              "endpoints": {                "chatCompletions": {                  "enabled": true                }              }            },            "mode": "local"          },          "models": {            "providers": {              "codex": {                "api": "openai-responses",                "baseUrl": "http://127.0.0.1:9",                "models": [                  {                    "id": "gpt-5.1-codex",                    "name": "gpt-5.1-codex"                  }                ]              }            }          },          "plugins": {            "allow": [              "codex"            ],            "entries": {              "codex": {                "config": {                  "appServer": {                    "approvalPolicy": "on-request",                    "authToken": "${APP_SERVER_TOKEN}",                    "mode": "guardian",                    "sandbox": "read-only",                    "transport": "websocket",                    "url": "${APP_SERVER_URL}"                  }                },                "enabled": true              }            }          }        }      }    }  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

DELETE /namespaces/{namespaceId}/presets/{presetId}

Delete a Preset without changing existing Agents

Operation ID: deletePreset

Permissions: Requires delete permission on the requested Preset.

Action Resource Scope
delete preset requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
presetId path string Yes pattern: ^pre_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "pre_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
204 No Content
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

GET /namespaces/{namespaceId}/presets/{presetId}

Read one exact Namespace-owned Preset

Operation ID: getPreset

Permissions: Requires read permission on the requested Preset.

Action Resource Scope
read preset requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
presetId path string Yes pattern: ^pre_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "pre_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.id string Yes pattern: ^pre_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.template object Yes Reusable partial Agent launch settings. Scalar values may use {{ vars.name }}. Admission validates template syntax and credential boundaries. Ordinary creation APIs validate concrete launch settings.
data.template.agent object No —
data.template.agent.backendId SafeJsonValue No —
data.template.agent.executionMode SafeJsonValue No —
data.template.agent.harnessAuth SafeJsonValue No —
data.template.agent.initialWorkspaceFiles object No —
data.template.agent.initialWorkspaceFiles.AGENTS.md string No max length: 16384; pattern: ^[^\u0000]*$
data.template.agent.initialWorkspaceFiles.IDENTITY.md string No max length: 16384; pattern: ^[^\u0000]*$
data.template.agent.initialWorkspaceFiles.SOUL.md string No max length: 16384; pattern: ^[^\u0000]*$
data.template.agent.initialWorkspaceFiles.USER.md string No max length: 16384; pattern: ^[^\u0000]*$
data.template.agent.name SafeJsonValue No —
data.template.agent.pluginApprovers SafeJsonValue No —
data.template.agent.plugins SafeJsonValue No —
data.template.agent.repositoryAccess SafeJsonValue No —
data.template.agent.repositoryBindings SafeJsonValue No —
data.template.configuration object No —
data.template.configuration.secretBindings object<string, SafeJsonValue> No Namespace-owned Secret bindings. Reference fields may use {{ vars.name }}.
data.template.configuration.values object<string, SafeJsonValue> No A native OpenClaw configuration document.
data.template.variables object<string, object> No —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "createdAt": "2026-10-01T12:00:00.000Z",    "id": "pre_123e4567-e89b-42d3-a456-426614174000",    "name": "Documentation assistant",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "template": {      "agent": {        "executionMode": "dedicated"      },      "configuration": {        "values": {          "agents": {            "defaults": {              "model": "codex/gpt-5.1-codex",              "models": {                "codex/gpt-5.1-codex": {                  "agentRuntime": {                    "id": "codex"                  }                }              }            }          },          "gateway": {            "auth": {              "password": {                "id": "OPENCLAW_GATEWAY_PASSWORD",                "provider": "default",                "source": "env"              }            },            "bind": "lan",            "controlUi": {              "enabled": false            },            "http": {              "endpoints": {                "chatCompletions": {                  "enabled": true                }              }            },            "mode": "local"          },          "models": {            "providers": {              "codex": {                "api": "openai-responses",                "baseUrl": "http://127.0.0.1:9",                "models": [                  {                    "id": "gpt-5.1-codex",                    "name": "gpt-5.1-codex"                  }                ]              }            }          },          "plugins": {            "allow": [              "codex"            ],            "entries": {              "codex": {                "config": {                  "appServer": {                    "approvalPolicy": "on-request",                    "authToken": "${APP_SERVER_TOKEN}",                    "mode": "guardian",                    "sandbox": "read-only",                    "transport": "websocket",                    "url": "${APP_SERVER_URL}"                  }                },                "enabled": true              }            }          }        }      }    }  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

PATCH /namespaces/{namespaceId}/presets/{presetId}

Update a Preset without changing existing Agents

Operation ID: updatePreset

Permissions: Requires update permission on the requested Preset.

Action Resource Scope
update preset requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
presetId path string Yes pattern: ^pre_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "pre_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
name string No min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
template object No Reusable partial Agent launch settings. Scalar values may use {{ vars.name }}. Admission validates template syntax and credential boundaries. Ordinary creation APIs validate concrete launch settings.
template.agent object No —
template.agent.backendId SafeJsonValue No —
template.agent.executionMode SafeJsonValue No —
template.agent.harnessAuth SafeJsonValue No —
template.agent.initialWorkspaceFiles object No —
template.agent.initialWorkspaceFiles.AGENTS.md string No max length: 16384; pattern: ^[^\u0000]*$
template.agent.initialWorkspaceFiles.IDENTITY.md string No max length: 16384; pattern: ^[^\u0000]*$
template.agent.initialWorkspaceFiles.SOUL.md string No max length: 16384; pattern: ^[^\u0000]*$
template.agent.initialWorkspaceFiles.USER.md string No max length: 16384; pattern: ^[^\u0000]*$
template.agent.name SafeJsonValue No —
template.agent.pluginApprovers SafeJsonValue No —
template.agent.plugins SafeJsonValue No —
template.agent.repositoryAccess SafeJsonValue No —
template.agent.repositoryBindings SafeJsonValue No —
template.configuration object No —
template.configuration.secretBindings object<string, SafeJsonValue> No Namespace-owned Secret bindings. Reference fields may use {{ vars.name }}.
template.configuration.values object<string, SafeJsonValue> No A native OpenClaw configuration document.
template.variables object<string, object> No —

Example request

json
{  "name": "Updated documentation assistant",  "template": {    "agent": {      "executionMode": "dedicated"    },    "configuration": {      "values": {        "agents": {          "defaults": {            "model": "codex/gpt-5.1-codex",            "models": {              "codex/gpt-5.1-codex": {                "agentRuntime": {                  "id": "codex"                }              }            }          }        },        "gateway": {          "auth": {            "password": {              "id": "OPENCLAW_GATEWAY_PASSWORD",              "provider": "default",              "source": "env"            }          },          "bind": "lan",          "controlUi": {            "enabled": false          },          "http": {            "endpoints": {              "chatCompletions": {                "enabled": true              }            }          },          "mode": "local"        },        "models": {          "providers": {            "codex": {              "api": "openai-responses",              "baseUrl": "http://127.0.0.1:9",              "models": [                {                  "id": "gpt-5.1-codex",                  "name": "gpt-5.1-codex"                }              ]            }          }        },        "plugins": {          "allow": [            "codex"          ],          "entries": {            "codex": {              "config": {                "appServer": {                  "approvalPolicy": "on-request",                  "authToken": "${APP_SERVER_TOKEN}",                  "mode": "guardian",                  "sandbox": "read-only",                  "transport": "websocket",                  "url": "${APP_SERVER_URL}"                }              },              "enabled": true            }          }        }      }    }  }}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.createdAt string (date-time) Yes pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.][0-9]{3}Z$
data.id string Yes pattern: ^pre_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.template object Yes Reusable partial Agent launch settings. Scalar values may use {{ vars.name }}. Admission validates template syntax and credential boundaries. Ordinary creation APIs validate concrete launch settings.
data.template.agent object No —
data.template.agent.backendId SafeJsonValue No —
data.template.agent.executionMode SafeJsonValue No —
data.template.agent.harnessAuth SafeJsonValue No —
data.template.agent.initialWorkspaceFiles object No —
data.template.agent.initialWorkspaceFiles.AGENTS.md string No max length: 16384; pattern: ^[^\u0000]*$
data.template.agent.initialWorkspaceFiles.IDENTITY.md string No max length: 16384; pattern: ^[^\u0000]*$
data.template.agent.initialWorkspaceFiles.SOUL.md string No max length: 16384; pattern: ^[^\u0000]*$
data.template.agent.initialWorkspaceFiles.USER.md string No max length: 16384; pattern: ^[^\u0000]*$
data.template.agent.name SafeJsonValue No —
data.template.agent.pluginApprovers SafeJsonValue No —
data.template.agent.plugins SafeJsonValue No —
data.template.agent.repositoryAccess SafeJsonValue No —
data.template.agent.repositoryBindings SafeJsonValue No —
data.template.configuration object No —
data.template.configuration.secretBindings object<string, SafeJsonValue> No Namespace-owned Secret bindings. Reference fields may use {{ vars.name }}.
data.template.configuration.values object<string, SafeJsonValue> No A native OpenClaw configuration document.
data.template.variables object<string, object> No —
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "createdAt": "2026-10-01T12:00:00.000Z",    "id": "pre_123e4567-e89b-42d3-a456-426614174000",    "name": "Documentation assistant",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "template": {      "agent": {        "executionMode": "dedicated"      },      "configuration": {        "values": {          "agents": {            "defaults": {              "model": "codex/gpt-5.1-codex",              "models": {                "codex/gpt-5.1-codex": {                  "agentRuntime": {                    "id": "codex"                  }                }              }            }          },          "gateway": {            "auth": {              "password": {                "id": "OPENCLAW_GATEWAY_PASSWORD",                "provider": "default",                "source": "env"              }            },            "bind": "lan",            "controlUi": {              "enabled": false            },            "http": {              "endpoints": {                "chatCompletions": {                  "enabled": true                }              }            },            "mode": "local"          },          "models": {            "providers": {              "codex": {                "api": "openai-responses",                "baseUrl": "http://127.0.0.1:9",                "models": [                  {                    "id": "gpt-5.1-codex",                    "name": "gpt-5.1-codex"                  }                ]              }            }          },          "plugins": {            "allow": [              "codex"            ],            "entries": {              "codex": {                "config": {                  "appServer": {                    "approvalPolicy": "on-request",                    "authToken": "${APP_SERVER_TOKEN}",                    "mode": "guardian",                    "sandbox": "read-only",                    "transport": "websocket",                    "url": "${APP_SERVER_URL}"                  }                },                "enabled": true              }            }          }        }      }    }  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Secrets

Operation Summary
GET /namespaces/{namespaceId}/secrets List readable Namespace-owned Secret metadata without revealing material
POST /namespaces/{namespaceId}/secrets Create exact Namespace-owned Secret material and return metadata only
DELETE /namespaces/{namespaceId}/secrets/{secretId} Delete exact unbound Namespace-owned Secret material
GET /namespaces/{namespaceId}/secrets/{secretId} Get exact Namespace-owned Secret metadata and its readable consumers
PATCH /namespaces/{namespaceId}/secrets/{secretId} Replace exact Namespace-owned Secret material and return stable metadata

GET /namespaces/{namespaceId}/secrets

List readable Namespace-owned Secret metadata without revealing material

Operation ID: listSecrets

Permissions: Requires read permission on the requested Namespace. Only Secret resources with individual read permission are returned.

Action Resource Scope
read namespace requested
read secret each_returned
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<object> Yes —
data[].id string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data[].namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].ref object Yes Exact OCC Secret reference. Shape: { "kind": "secret", "namespaceId": "ns_...", "id": "sec_..." }.
data[].ref.id string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].ref.kind "secret" Yes —
data[].ref.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

No readable resources

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Example response

json
{  "data": [    {      "id": "sec_123e4567-e89b-42d3-a456-426614174000",      "name": "model-api-key",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",      "ref": {        "id": "sec_123e4567-e89b-42d3-a456-426614174000",        "kind": "secret",        "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"      }    }  ],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/secrets

Create exact Namespace-owned Secret material and return metadata only

Operation ID: createSecret

Permissions: Requires create permission for Secret resources in the requested Namespace.

Action Resource Scope
create secret namespace
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
value string Yes min length: 1; max length: 65536; pattern: ^[^\u0000]*$; Protected Secret value. It must be nonempty UTF-8 without NUL; OCC accepts at most 65,536 UTF-8 bytes and still enforces the route request body limit.

Example request

json
{  "name": "model-api-key",  "value": "replace-with-your-authorized-model-key"}
Responses
Status Meaning
201 Created
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

201 response body: application/json

Field Type Required Constraints
data object Yes —
data.id string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.ref object Yes Exact OCC Secret reference. Shape: { "kind": "secret", "namespaceId": "ns_...", "id": "sec_..." }.
data.ref.id string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.ref.kind "secret" Yes —
data.ref.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "id": "sec_123e4567-e89b-42d3-a456-426614174000",    "name": "model-api-key",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "ref": {      "id": "sec_123e4567-e89b-42d3-a456-426614174000",      "kind": "secret",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    }  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

DELETE /namespaces/{namespaceId}/secrets/{secretId}

Delete exact unbound Namespace-owned Secret material

Operation ID: deleteSecret

Permissions: Requires delete permission on the requested Secret.

Action Resource Scope
delete secret requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
secretId path string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "sec_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
204 No Content
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

GET /namespaces/{namespaceId}/secrets/{secretId}

Get exact Namespace-owned Secret metadata and its readable consumers

Operation ID: getSecret

Permissions: Requires read permission on the requested Secret.

Action Resource Scope
read secret requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
secretId path string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "sec_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.callerPermissions object Yes What the selected IAM Driver allows you to do to this Secret now. Checking it records no authorization denial. Returned by the exact Secret read only.
data.callerPermissions.delete boolean Yes Whether the selected IAM Driver allows you to delete this Secret now (Secret delete). Advisory only: current references, lifecycle state or a later authorization decision can still prevent the operation.
data.callerPermissions.update boolean Yes Whether the selected IAM Driver allows you to replace this Secret's value now (Secret update). Advisory only: lifecycle state or a later authorization decision can still prevent the operation.
data.consumers object Yes Current references that block deletion of the Secret. Returned by the exact Secret read only.
data.consumers.agents array<string> Yes max items: 50; Agents that you can read. Each Agent has a Secret reference in its saved settings, selected Agent revision, or pending deployment. Deploy each Agent again to use a rotated value.
data.consumers.configurations array<string> Yes max items: 50; Readable Configurations whose secretBindings reference the Secret.
data.consumers.credentialSources array<string> Yes max items: 50; Readable credential sources that hold the Secret.
data.consumers.provisioningRequests array<string> Yes max items: 50; Work IDs of queued or running Agent provisioning requests that reference the Secret, listed only for the actor that started them.
data.consumers.truncated boolean Yes true when the Secret has more than 50 references; only the first 50, ordered by kind and ID, are examined.
data.consumers.unreadable integer Yes minimum: 0; maximum: 50; Examined references to resources the caller may not read. They are counted, never named.
data.id string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.ref object Yes Exact OCC Secret reference. Shape: { "kind": "secret", "namespaceId": "ns_...", "id": "sec_..." }.
data.ref.id string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.ref.kind "secret" Yes —
data.ref.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "callerPermissions": {      "delete": true,      "update": true    },    "consumers": {      "agents": [        "agt_123e4567-e89b-42d3-a456-426614174000"      ],      "configurations": [],      "credentialSources": [],      "provisioningRequests": [],      "truncated": false,      "unreadable": 0    },    "id": "sec_123e4567-e89b-42d3-a456-426614174000",    "name": "model-api-key",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "ref": {      "id": "sec_123e4567-e89b-42d3-a456-426614174000",      "kind": "secret",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    }  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

PATCH /namespaces/{namespaceId}/secrets/{secretId}

Replace exact Namespace-owned Secret material and return stable metadata

Operation ID: updateSecret

Permissions: Requires update permission on the requested Secret.

Action Resource Scope
update secret requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
secretId path string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "sec_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
value string Yes min length: 1; max length: 65536; pattern: ^[^\u0000]*$; Protected Secret value. It must be nonempty UTF-8 without NUL; OCC accepts at most 65,536 UTF-8 bytes and still enforces the route request body limit.

Example request

json
{  "value": "replace-with-your-rotated-model-key"}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.id string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.ref object Yes Exact OCC Secret reference. Shape: { "kind": "secret", "namespaceId": "ns_...", "id": "sec_..." }.
data.ref.id string Yes pattern: ^sec_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.ref.kind "secret" Yes —
data.ref.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "id": "sec_123e4567-e89b-42d3-a456-426614174000",    "name": "model-api-key",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "ref": {      "id": "sec_123e4567-e89b-42d3-a456-426614174000",      "kind": "secret",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    }  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Service accounts

Operation Summary
GET /namespaces/{namespaceId}/service-accounts List authorized Namespace-owned ServiceAccounts in one exact Namespace
POST /namespaces/{namespaceId}/service-accounts Create a native Namespace-owned ServiceAccount
DELETE /namespaces/{namespaceId}/service-accounts/{serviceAccountId} Delete an exact unreferenced Namespace-owned ServiceAccount
GET /namespaces/{namespaceId}/service-accounts/{serviceAccountId} Get an exact Namespace-owned ServiceAccount
PATCH /namespaces/{namespaceId}/service-accounts/{serviceAccountId}/credential Associate an exact Namespace-local credential reference with a ServiceAccount
POST /namespaces/{namespaceId}/service-accounts/{serviceAccountId}/credentials Issue a managed credential for an exact Namespace-owned ServiceAccount

GET /namespaces/{namespaceId}/service-accounts

List authorized Namespace-owned ServiceAccounts in one exact Namespace

Operation ID: listServiceAccounts

Permissions: Requires read permission on the requested Namespace. Only ServiceAccount resources with individual read permission are returned.

Action Resource Scope
read namespace requested
read service_account each_returned
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data array<object> Yes —
data[].credential object No —
data[].credential.kind "api_key" or "access_token" or "oauth_access_token" Yes —
data[].id string Yes pattern: ^sa_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data[].name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data[].namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

No readable resources

json
{  "data": [],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Example response

json
{  "data": [    {      "id": "sa_123e4567-e89b-42d3-a456-426614174000",      "name": "Model service account",      "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"    }  ],  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/service-accounts

Create a native Namespace-owned ServiceAccount

Operation ID: createServiceAccount

Permissions: Requires create permission for ServiceAccount resources in the requested Namespace.

Action Resource Scope
create service_account namespace
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$

Example request

json
{  "name": "Model service account"}
Responses
Status Meaning
201 Created
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

201 response body: application/json

Field Type Required Constraints
data object Yes —
data.credential object No —
data.credential.kind "api_key" or "access_token" or "oauth_access_token" Yes —
data.id string Yes pattern: ^sa_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "id": "sa_123e4567-e89b-42d3-a456-426614174000",    "name": "Model service account",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

DELETE /namespaces/{namespaceId}/service-accounts/{serviceAccountId}

Delete an exact unreferenced Namespace-owned ServiceAccount

Operation ID: deleteServiceAccount

Permissions: Requires delete permission on the requested ServiceAccount.

Action Resource Scope
delete service_account requested
Parameters
Name In Type Required Constraints Example
force query "true" or "false" No — "false"
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
serviceAccountId path string Yes pattern: ^sa_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "sa_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 A forced deletion removed the account and its credential Secret but could not revoke its issued access token.
204 No Content
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.backendId string No min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.id string Yes pattern: ^sa_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.revocation "skipped" Yes The account's issued access token was not revoked: no ChatGPT Backend can revoke it. Revoke it at the provider; the audit event names its Backend and credential ID.
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "id": "sa_123e4567-e89b-42d3-a456-426614174000",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000",    "revocation": "skipped"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

GET /namespaces/{namespaceId}/service-accounts/{serviceAccountId}

Get an exact Namespace-owned ServiceAccount

Operation ID: getServiceAccount

Permissions: Requires read permission on the requested ServiceAccount.

Action Resource Scope
read service_account requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
serviceAccountId path string Yes pattern: ^sa_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "sa_123e4567-e89b-42d3-a456-426614174000"
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.credential object No —
data.credential.kind "api_key" or "access_token" or "oauth_access_token" Yes —
data.id string Yes pattern: ^sa_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "id": "sa_123e4567-e89b-42d3-a456-426614174000",    "name": "Model service account",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

PATCH /namespaces/{namespaceId}/service-accounts/{serviceAccountId}/credential

Associate an exact Namespace-local credential reference with a ServiceAccount

Operation ID: updateServiceAccountCredential

Permissions: Requires update permission on the requested ServiceAccount.

Action Resource Scope
update service_account requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
serviceAccountId path string Yes pattern: ^sa_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "sa_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Field Type Required Constraints
kind "api_key" or "oauth_access_token" Yes —
secretRef object Yes —
secretRef.key string Yes max length: 253; pattern: ^(?![.]{1,2}$)[-._a-zA-Z0-9]+$
secretRef.name string Yes max length: 253; pattern: ^[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:[.][a-z0-9](?:[-a-z0-9]*[a-z0-9])?)*$

Example request

json
{  "kind": "api_key",  "secretRef": {    "key": "value",    "name": "model-api-key"  }}
Responses
Status Meaning
200 OK
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

200 response body: application/json

Field Type Required Constraints
data object Yes —
data.credential object No —
data.credential.kind "api_key" or "access_token" or "oauth_access_token" Yes —
data.id string Yes pattern: ^sa_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "credential": {      "kind": "api_key"    },    "id": "sa_123e4567-e89b-42d3-a456-426614174000",    "name": "Model service account",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

POST /namespaces/{namespaceId}/service-accounts/{serviceAccountId}/credentials

Issue a managed credential for an exact Namespace-owned ServiceAccount

Operation ID: createServiceAccountCredential

Permissions: Requires update permission on the requested ServiceAccount.

Action Resource Scope
update service_account requested
Parameters
Name In Type Required Constraints Example
namespaceId path string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "ns_123e4567-e89b-42d3-a456-426614174000"
serviceAccountId path string Yes pattern: ^sa_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ "sa_123e4567-e89b-42d3-a456-426614174000"
Request body

Required: Yes

Content type: application/json

Schema: object.

Example request

json
{}
Responses
Status Meaning
201 Created
400 The request does not match the operation contract.
401 The caller did not provide valid credentials.
403 The caller is not allowed to perform this operation.
404 The requested platform resource was not found.
409 The requested operation conflicts with the current resource state.
413 The request body exceeds the permitted size.
415 The request content type is not supported.
500 The platform request could not be completed.
503 A required dependency is unavailable.

201 response body: application/json

Field Type Required Constraints
data object Yes —
data.credential object No —
data.credential.kind "api_key" or "access_token" or "oauth_access_token" Yes —
data.id string Yes pattern: ^sa_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
data.name string Yes min length: 1; max length: 200; pattern: ^(?!\s)(?!.*\s$)[^\u0000-\u001f\u007f-\u009f\u2028\u2029]+$
data.namespaceId string Yes pattern: ^ns_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
meta object Yes —
meta.requestId string Yes pattern: ^req_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Example response

json
{  "data": {    "credential": {      "kind": "access_token"    },    "id": "sa_123e4567-e89b-42d3-a456-426614174000",    "name": "Model service account",    "namespaceId": "ns_123e4567-e89b-42d3-a456-426614174000"  },  "meta": {    "requestId": "req_123e4567-e89b-42d3-a456-426614174000"  }}

Shared schemas

Reusable schema names are referenced by operation request and response tables.

Schema Type
SafeJsonValue string or boolean or number or null or array<SafeJsonValue> or object<string, SafeJsonValue>
PluginDriverIdentity object
AgentRuntimeLogsResponse object
AgentRuntimeCredentialResponse object
SecretResponse object
CredentialSourceResponse object
OAuth connection template version object
OAuth connection template object
PluginApprovers array<object>
PluginToolPolicy object
PluginToolDefaults object
PluginDesiredSelection object
PluginDesiredState object<string, PluginDesiredSelection>
ErrorResponse object
AgentDeploymentDiagnosticsResponse object
AgentRuntimeResponse object
Search documentation