agenttools
Messages

Schedule a message

No auth required

Schedules an HTTP request to fire at a later time. Provide `scheduled_at` (absolute Unix seconds) or `delay_seconds` (relative to now); if both are sent, `scheduled_at` wins. Without an API key the response includes a one-time `claim_token`.

POST/api/messages

Request body

channel"http"
urlstringrequired
method"GET" | "POST" | "PUT" | "PATCH" | "DELETE"
headersobject
bodystring | null
scheduled_atinteger
delay_secondsinteger

Responses

201The scheduled message.
idstring
Unique identifier for the scheduled message, prefixed with `msg_`.Example: "msg_xxxxxxxxxxxxxxxxxxxxxxxx"
object"scheduled_message"
organization_idstring | null
Owning organization ID, or null if the resource is public (created without an API key).
channel"http"
Delivery channel. Only `http` is supported today.
urlstring
Target URL the request is sent to.
method"GET" | "POST" | "PUT" | "PATCH" | "DELETE"
HTTP method used for delivery.
headersobject
Request headers. Defaults to {}.
bodystring | null
Request body, if any.
scheduled_atinteger | null
When the message will fire. Unix timestamp in seconds.
status"scheduled" | "delivering" | "delivered" | "failed" | "canceled"
Delivery state.
attemptsinteger
Number of delivery attempts made.
response_statusinteger | null
HTTP status returned by the target on the last attempt.
last_errorstring | null
Error from the last attempt, if it failed.
delivered_atinteger | null
When the last delivery attempt ran. Unix timestamp in seconds.
created_atinteger | null
When the message was created. Unix timestamp in seconds.
updated_atinteger | null
When the message was last updated. Unix timestamp in seconds.
claim_tokenstring
One-time token to claim ownership of this resource via POST /api/claim/{id}. Only present when created without an API key.
claim_urlstring
Relative URL for claiming the resource.
400The request was malformed or failed validation.
errorobject
type"invalid_request_error" | "authentication_error" | "authorization_error" | "not_found_error" | "rate_limit_error" | "api_error"
codestring
Machine-readable error code.
messagestring
Human-readable error message.
paramstring | null
The offending parameter, when applicable.
401No valid API key was provided.
errorobject
type"invalid_request_error" | "authentication_error" | "authorization_error" | "not_found_error" | "rate_limit_error" | "api_error"
codestring
Machine-readable error code.
messagestring
Human-readable error message.
paramstring | null
The offending parameter, when applicable.

Example request

curl
curl -X POST https://agtls.dev/api/messages \
  -H "Content-Type: application/json" \
  -d '{ … }'