Claim
Claim a public resource
Assigns a publicly-created resource to the caller's organization using its one-time `claim_token`. Requires an API key.
POST
/api/claim/{id}Parameters
Path
idstringrequiredThe ID of the public resource to claim (tsk_…, wh_…, art_…, msg_…, or inbox_…).Request body
claim_tokenstringrequiredResponses
200The claimed resource, now owned by the caller's organization.
One of the following objects:
Task
idstringUnique identifier for the task, prefixed with `tsk_`.Example: "tsk_xxxxxxxxxxxxxxxxxxxxxxxx"object"task"organization_idstring | nullOwning organization ID, or null if the resource is public (created without an API key).namestringdescriptionstring | nullpriority"low" | "medium" | "high" | "critical"Task priority. Defaults to `low`.due_atinteger | nullWhen the task is due. Unix timestamp in seconds.labelsstring[]Labels attached to the task. Use ?label= on the list endpoint to filter. Defaults to [].created_atinteger | nullWhen the task was created. Unix timestamp in seconds.updated_atinteger | nullWhen the task was last updated. Unix timestamp in seconds.WebhookEndpoint
idstringUnique identifier for the webhook endpoint, prefixed with `wh_`.Example: "wh_xxxxxxxxxxxxxxxxxxxxxxxx"object"webhook_endpoint"organization_idstring | nullOwning organization ID, or null if the resource is public (created without an API key).namestringdescriptionstring | nullurlstringPublic capture URL (…/api/catch/{id}) that records requests.max_eventsintegerMaximum number of events retained. Defaults to 100.event_countintegerNumber of captured events. Present on single-resource reads.created_atinteger | nullWhen the endpoint was created. Unix timestamp in seconds.updated_atinteger | nullWhen the endpoint was last updated. Unix timestamp in seconds.Inbox
idstringUnique identifier for the inbox, prefixed with `inbox_`.Example: "inbox_xxxxxxxxxxxxxxxxxxxxxxxx"object"inbox"organization_idstring | nullOwning organization ID, or null if the resource is public (created without an API key).namestringdescriptionstring | nullingest_urlstringPublic ingest URL (…/api/inboxes/{id}/events). Anyone with the ID can POST events here — no authentication required.default_ttl_secondsintegerDefault event TTL in seconds, used when an ingested event doesn't specify its own. Defaults to 86400 (1 day); range 60–2592000 (30 days).max_eventsintegerMaximum number of pending (non-expired) events retained. Defaults to 1000.event_countintegerNumber of pending (non-expired) events. Present on single-resource reads.created_atinteger | nullWhen the inbox was created. Unix timestamp in seconds.updated_atinteger | nullWhen the inbox was last updated. Unix timestamp in seconds.Artifact
idstringUnique identifier for the artifact, prefixed with `art_`.Example: "art_xxxxxxxxxxxxxxxxxxxxxxxx"object"artifact"organization_idstring | nullOwning organization ID, or null if the resource is public (created without an API key).namestringsizeintegerSize of the stored content in bytes (UTF-8).contentstringThe stored content. Returned when fetching a single artifact; omitted from list responses — use `raw_url` to fetch the body.format"markdown" | "html"Content format. Determines the content type the raw endpoint serves.raw_urlstringPath serving the raw content with the format's content type (`text/html` for html, `text/markdown` for markdown).created_atinteger | nullWhen the artifact was created. Unix timestamp in seconds.updated_atinteger | nullWhen the artifact was last updated. Unix timestamp in seconds.ScheduledMessage
idstringUnique identifier for the scheduled message, prefixed with `msg_`.Example: "msg_xxxxxxxxxxxxxxxxxxxxxxxx"object"scheduled_message"organization_idstring | nullOwning organization ID, or null if the resource is public (created without an API key).channel"http"Delivery channel. Only `http` is supported today.urlstringTarget URL the request is sent to.method"GET" | "POST" | "PUT" | "PATCH" | "DELETE"HTTP method used for delivery.headersobjectRequest headers. Defaults to {}.bodystring | nullRequest body, if any.scheduled_atinteger | nullWhen the message will fire. Unix timestamp in seconds.status"scheduled" | "delivering" | "delivered" | "failed" | "canceled"Delivery state.attemptsintegerNumber of delivery attempts made.response_statusinteger | nullHTTP status returned by the target on the last attempt.last_errorstring | nullError from the last attempt, if it failed.delivered_atinteger | nullWhen the last delivery attempt ran. Unix timestamp in seconds.created_atinteger | nullWhen the message was created. Unix timestamp in seconds.updated_atinteger | nullWhen the message was last updated. Unix timestamp in seconds.400The request was malformed or failed validation.
errorobjecttype"invalid_request_error" | "authentication_error" | "authorization_error" | "not_found_error" | "rate_limit_error" | "api_error"codestringMachine-readable error code.messagestringHuman-readable error message.paramstring | nullThe offending parameter, when applicable.401No valid API key was provided.
errorobjecttype"invalid_request_error" | "authentication_error" | "authorization_error" | "not_found_error" | "rate_limit_error" | "api_error"codestringMachine-readable error code.messagestringHuman-readable error message.paramstring | nullThe offending parameter, when applicable.403The caller is authenticated but lacks access to the resource.
errorobjecttype"invalid_request_error" | "authentication_error" | "authorization_error" | "not_found_error" | "rate_limit_error" | "api_error"codestringMachine-readable error code.messagestringHuman-readable error message.paramstring | nullThe offending parameter, when applicable.404The resource does not exist or is not visible to the caller.
errorobjecttype"invalid_request_error" | "authentication_error" | "authorization_error" | "not_found_error" | "rate_limit_error" | "api_error"codestringMachine-readable error code.messagestringHuman-readable error message.paramstring | nullThe offending parameter, when applicable.Example request
curl
curl -X POST https://agtls.dev/api/claim/{id} \
-H "Authorization: Bearer agt_…" \
-H "Content-Type: application/json" \
-d '{ … }'