Messages
Schedule a message
No auth requiredSchedules 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/messagesRequest body
channel"http"urlstringrequiredmethod"GET" | "POST" | "PUT" | "PATCH" | "DELETE"headersobjectbodystring | nullscheduled_atintegerdelay_secondsintegerResponses
201The scheduled message.
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.claim_tokenstringOne-time token to claim ownership of this resource via POST /api/claim/{id}. Only present when created without an API key.claim_urlstringRelative URL for claiming the resource.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.Example request
curl
curl -X POST https://agtls.dev/api/messages \
-H "Content-Type: application/json" \
-d '{ … }'