View as Markdown

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.

Parameters of GET /v1/agent-audit
ParameterInTypeDescription
agent_key_idquerystring | null
account_idquerystring | null
beforequeryinteger | null
limitqueryintegerPage size, 1..500 (default 100).
cursorquerystring | nullThe next_cursor of the previous page, unchanged.

Responses

Errors (common for this kind of call; every error uses one envelope)

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}.

Parameters of GET /v1/agent-keys
ParameterInTypeDescription
limitqueryintegerPage size, 1..500 (default 100).
cursorquerystring | nullThe next_cursor of the previous page, unchanged.

Responses

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of POST /v1/agent-keys
ParameterInTypeDescription
Idempotency-Keyheaderstring | null
X-Actorheaderstring | null
X-Reasonheaderstring | null

Request body object required

Responses

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of GET /v1/agent-keys/{key_id}
ParameterInTypeDescription
key_id requiredpathstring

Responses

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of PATCH /v1/agent-keys/{key_id}
ParameterInTypeDescription
key_id requiredpathstring
X-Actorheaderstring | null
X-Reasonheaderstring | null

Request body object required

Responses

Errors (common for this kind of call; every error uses one envelope)

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).

Parameters of DELETE /v1/agent-keys/{key_id}
ParameterInTypeDescription
key_id requiredpathstring
X-Actorheaderstring | null
X-Reasonheaderstring | null

Responses

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of PUT /v1/agent-keys/{key_id}/kill-switch
ParameterInTypeDescription
key_id requiredpathstring
X-Actorheaderstring | null
X-Reasonheaderstring | null

Request body object required

Responses

Errors (common for this kind of call; every error uses one envelope)

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}.

Parameters of GET /v1/agent-kill-switches
ParameterInTypeDescription
limitqueryintegerPage size, 1..500 (default 100).
cursorquerystring | nullThe next_cursor of the previous page, unchanged.

Responses

Errors (common for this kind of call; every error uses one envelope)

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.

Parameters of PUT /v1/agent-kill-switches/accounts/{account_id}
ParameterInTypeDescription
account_id requiredpathstring
X-Actorheaderstring | null
X-Reasonheaderstring | null

Request body object required

Responses

Errors (common for this kind of call; every error uses one envelope)

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.