コンテンツにスキップ
Subako Docs
日本語
Esc
移動開く⌘Jプレビュー

Replace an agent's security document

Replaces the document whole. An omitted field takes its default rather than its current value, so send every field you mean to keep.

PUT/v1/agents/{agent_id}/security
Authorization
AuthorizationBearer token · headerrequired
Path parameters
agent_idstring<uuid>required
Agent id
Request body
requiredapplication/json
Replaces the whole document. An omitted field takes its default.
allowed_originsstring[]
`*` allows every origin; other entries must be exact HTTP(S) origins without a path or trailing slash. Partial wildcards are not supported. Defaults to empty, which answers no browser.
max items 32
Responses
200The document the agent now holds.
allowed_originsstring[]required
The browser origins the agent's sessions answer a cross-origin request from. `*` allows every origin. Other entries match `Origin` exactly: a scheme, host, and optional port, with no trailing slash or path. Partial wildcards are not supported. Empty answers no browser.
max items 32
400Malformed body, path parameter, or an entry no `Origin` header could equal.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
401Missing, malformed, or invalid bearer token.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
403Caller lacks agent.publish.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
404No such agent, or the caller cannot see it.
errorErrorDetailrequired
What went wrong: a `code` to branch on and a `message` to show. The message is written for a person and may change; the code will not.
Show properties
codeErrorCoderequired
The machine-readable half of an error response, and the field a client branches on. Closed: every error carries exactly one of these.
Allowed:unauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternal
messagestringrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PUT "https://api.us.cloud.subako.ai/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/security" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "allowed_origins": [
    "string"
  ]
}'
Response
{
  "allowed_origins": [
    "string"
  ]
}