Messages

Reschedule a scheduled message

Requires scope: manage. Moves a scheduled send to a new future scheduled_at, and raises message.scheduled again with the new scheduled_at and the previous_scheduled_at it replaced. It needs the send scope as well as manage, and a live key for a live message (403 live_mode_required); the key that scheduled the send keeps answering for it. A send that failed only because its agent was paused or archived when it came due (status: rejected, metadata.rejected_reason starting agent_paused: or agent_archived:) is scheduled again by the same call once a paused agent is resumed: that needs a scheduled_at, and answers 422 agent_paused while the agent is still paused. Archiving cannot be undone, so one whose agent was archived answers 404 agent_archived. A message that changed while it was being rescheduled (it started sending, or was canceled or scheduled again) answers 409 duplicate_resource.

patch/v1/messages/{id}

Request

  • Base URL: https://api.mails.ai
  • URL: https://api.mails.ai/v1/messages/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

Sent message id with status scheduled, or rejected because its agent was paused or archived.

Request body

scheduled_atstring date-time

The new send time: an ISO 8601 UTC time ending in Z, which must be in the future (400 invalid_field otherwise). Left out, the schedule stays as it is.

Response

The updated schedule.

idstring required

Id of the rescheduled message (msg_…): the id in the path.

scheduled_atstring date-time

When the message will go out, as GET /v1/messages/{id} returns it: the new time in UTC with milliseconds, however the request wrote it, or the current one when the request left scheduled_at out.

status'scheduled' required

Always scheduled: only a scheduled message can be rescheduled.

Changes

No recorded changes to this operation across all 1 revision of this API.