API reference / AI agents
Agent keys and kill switches
AI agents. Generated from the OpenAPI document the services export (/openapi.json).
Samples use the placeholders YOUR_API_KEY and YOUR_ACCOUNT_ID.
Paste a sandbox key (twsk_…) to fill them in and to use Try it.
It stays in this browser tab and is only sent to the sandbox, never to the live API.
Try it is off in this build: No sandbox URL is configured for this build of the docs.
GET /v1/agent-audit
Agent Audit Auth: X-API-Key
The agent audit log, newest first (by seq). Cursor-paginated:
{entries, has_more, next_cursor}; before (a seq) still works.
| Parameter | In | Type | Description |
|---|---|---|---|
agent_key_id | query | string | null | |
account_id | query | string | null | |
before | query | integer | null | |
limit | query | integer | Page size, 1..500 (default 100). |
cursor | query | string | null | The next_cursor of the previous page, unchanged. |
Responses
200Successful Response422Validation Error ·HTTPValidationError
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error
curl
curl -sS -X GET 'https://api.tickwire.io/v1/agent-audit' \
-H 'X-API-Key: YOUR_API_KEY' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"GET",
"/v1/agent-audit",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("GET", "/v1/agent-audit");
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
GET /v1/agent-keys
List Agent Keys Auth: X-API-Key
Agent keys of this tenant (never the key values), oldest first.
Cursor-paginated: {data, has_more, next_cursor}.
| Parameter | In | Type | Description |
|---|---|---|---|
limit | query | integer | Page size, 1..500 (default 100). |
cursor | query | string | null | The next_cursor of the previous page, unchanged. |
Responses
200Successful Response422Validation Error ·HTTPValidationError
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error
curl
curl -sS -X GET 'https://api.tickwire.io/v1/agent-keys' \
-H 'X-API-Key: YOUR_API_KEY' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"GET",
"/v1/agent-keys",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("GET", "/v1/agent-keys");
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
POST /v1/agent-keys
Create Agent Key Idempotency-Key Auth: X-API-Key
Create an agent key scoped to accounts. The key is shown once.
Idempotency-Key is honoured: a replay returns the same key record
without minting another key, with key: null and a key_notice
saying it was already shown.
| Parameter | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | null | |
X-Actor | header | string | null | |
X-Reason | header | string | null |
Request body object required
Responses
201Successful Response422Validation Error ·HTTPValidationError
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error409idempotency_conflict
curl
curl -sS -X POST 'https://api.tickwire.io/v1/agent-keys' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Idempotency-Key: my-request-1' \
-H 'X-Reason: why you are doing this' \
-H 'Content-Type: application/json' \
-d '{"name":"my-agent","account_ids":["YOUR_ACCOUNT_ID"],"read_only":false}' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"POST",
"/v1/agent-keys",
json={
"name": "my-agent",
"account_ids": ["YOUR_ACCOUNT_ID"],
"read_only": False,
},
idempotency_key="my-request-1",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/v1/agent-keys", {
body: {"name":"my-agent","account_ids":["YOUR_ACCOUNT_ID"],"read_only":false},
idempotencyKey: "my-request-1",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
GET /v1/agent-keys/{key_id}
Get Agent Key Auth: X-API-Key
One agent key record.
| Parameter | In | Type | Description |
|---|---|---|---|
key_id required | path | string |
Responses
200Successful Response422Validation Error ·HTTPValidationError
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error
curl
curl -sS -X GET 'https://api.tickwire.io/v1/agent-keys/KEY_ID' \
-H 'X-API-Key: YOUR_API_KEY' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"GET",
"/v1/agent-keys/KEY_ID",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("GET", "/v1/agent-keys/KEY_ID");
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
PATCH /v1/agent-keys/{key_id}
Patch Agent Key Auth: X-API-Key
Rename, re-scope or flip read-only.
| Parameter | In | Type | Description |
|---|---|---|---|
key_id required | path | string | |
X-Actor | header | string | null | |
X-Reason | header | string | null |
Request body object required
Responses
200Successful Response422Validation Error ·HTTPValidationError
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error
curl
curl -sS -X PATCH 'https://api.tickwire.io/v1/agent-keys/KEY_ID' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'X-Reason: why you are doing this' \
-H 'Content-Type: application/json' \
-d '{"name":"my-agent"}' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"PATCH",
"/v1/agent-keys/KEY_ID",
json={"name": "my-agent"},
idempotency_key="my-request-1",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("PATCH", "/v1/agent-keys/KEY_ID", {
body: {"name":"my-agent"},
idempotencyKey: "my-request-1",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
DELETE /v1/agent-keys/{key_id}
Revoke Agent Key Auth: X-API-Key
Revoke an agent key (irreversible).
| Parameter | In | Type | Description |
|---|---|---|---|
key_id required | path | string | |
X-Actor | header | string | null | |
X-Reason | header | string | null |
Responses
204Successful Response422Validation Error ·HTTPValidationError
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error
curl
curl -sS -X DELETE 'https://api.tickwire.io/v1/agent-keys/KEY_ID' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'X-Reason: why you are doing this' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"DELETE",
"/v1/agent-keys/KEY_ID",
idempotency_key="my-request-1",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("DELETE", "/v1/agent-keys/KEY_ID", {
idempotencyKey: "my-request-1",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
PUT /v1/agent-keys/{key_id}/kill-switch
Set Key Kill Switch Auth: X-API-Key
Engage or release the kill switch of one agent key.
| Parameter | In | Type | Description |
|---|---|---|---|
key_id required | path | string | |
X-Actor | header | string | null | |
X-Reason | header | string | null |
Request body object required
Responses
200Successful Response422Validation Error ·HTTPValidationError
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error
curl
curl -sS -X PUT 'https://api.tickwire.io/v1/agent-keys/KEY_ID/kill-switch' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'X-Reason: why you are doing this' \
-H 'Content-Type: application/json' \
-d '{"engaged":true,"reason":"stop this agent"}' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"PUT",
"/v1/agent-keys/KEY_ID/kill-switch",
json={"engaged": True, "reason": "stop this agent"},
idempotency_key="my-request-1",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("PUT", "/v1/agent-keys/KEY_ID/kill-switch", {
body: {"engaged":true,"reason":"stop this agent"},
idempotencyKey: "my-request-1",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
GET /v1/agent-kill-switches
List Kill Switches Auth: X-API-Key
Engaged account kill switches (agent-key switches are on each key), by
account id. Cursor-paginated: {accounts, has_more, next_cursor}.
| Parameter | In | Type | Description |
|---|---|---|---|
limit | query | integer | Page size, 1..500 (default 100). |
cursor | query | string | null | The next_cursor of the previous page, unchanged. |
Responses
200Successful Response422Validation Error ·HTTPValidationError
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error
curl
curl -sS -X GET 'https://api.tickwire.io/v1/agent-kill-switches' \
-H 'X-API-Key: YOUR_API_KEY' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"GET",
"/v1/agent-kill-switches",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("GET", "/v1/agent-kill-switches");
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.
PUT /v1/agent-kill-switches/accounts/{account_id}
Set Account Kill Switch Auth: X-API-Key
Engage or release the agent kill switch of one account.
| Parameter | In | Type | Description |
|---|---|---|---|
account_id required | path | string | |
X-Actor | header | string | null | |
X-Reason | header | string | null |
Request body object required
Responses
200Successful Response422Validation Error ·HTTPValidationError
Errors (common for this kind of call; every error uses one envelope)
401unauthorized429rate_limited400, 422validation_error404account_not_found
curl
curl -sS -X PUT 'https://api.tickwire.io/v1/agent-kill-switches/accounts/YOUR_ACCOUNT_ID' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'X-Reason: why you are doing this' \
-H 'Content-Type: application/json' \
-d '{"engaged":true,"reason":"stop all agents"}' Python
from tickwire import Tickwire
with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
result = tw.request(
"PUT",
"/v1/agent-kill-switches/accounts/YOUR_ACCOUNT_ID",
json={"engaged": True, "reason": "stop all agents"},
idempotency_key="my-request-1",
reason="why you are doing this",
)
print(result) TypeScript
import { TickwireClient } from "@tickwire/sdk";
const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("PUT", "/v1/agent-kill-switches/accounts/YOUR_ACCOUNT_ID", {
body: {"engaged":true,"reason":"stop all agents"},
idempotencyKey: "my-request-1",
reason: "why you are doing this",
});
console.log(result);
tw.close(); Try it in the sandbox
Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.