Messages
Reschedule or edit a message
No auth requiredUpdates a message that hasn't fired yet (status `scheduled`). Editing a delivered, in-flight, or canceled message returns 400. Omit both `scheduled_at` and `delay_seconds` to leave the schedule unchanged.
PATCH
/api/messages/{id}Parameters
Path
idstringrequiredThe scheduled message ID (`msg_…`).Request body
urlstringmethod"GET" | "POST" | "PUT" | "PATCH" | "DELETE"headersobject | nullbodystring | nullscheduled_atintegerdelay_secondsintegerResponses
200The updated 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.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 PATCH https://agtls.dev/api/messages/{id} \
-H "Content-Type: application/json" \
-d '{ … }'