Released docs. You are viewing the documentation published with v0.48.0. Development docs are available at Latest.
Cancel a queued message, including one waiting for a retry, the caller submitted, or any queued message for an operator. A message whose dispatch started or that reached a final state is refused.
const url = 'https://example.com/v1/messages/example/cancel';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/messages/example/cancel \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”The operation succeeded.
A message’s status and metadata. The recipient is masked, and no part or template data is returned.
object
object
Whether the provider returned a reference. The reference itself is not returned.
What the dispatch worker did. submitted means the provider accepted the message, never that it was delivered.
object
What the provider’s delivery receipts reported. It only moves forward, none then sent then delivered or undelivered, and a final report is never replaced. unavailable: the message’s provider reports no delivery receipts, so submitted is the last status.
When the report last moved. Absent while it is none or unavailable.
Derived from dispatch and report: the dispatch state, except that a submitted message whose report is delivered is delivered, and one whose report is undelivered is failed.
object
Example
{ "attempts": [ { "outcome": "in-progress" } ], "channel": "email", "dispatch": "queued", "report": "none", "status": "queued", "to": { "email": "redacted" }}A problem: authentication.refused.
object
Example
{ "code": "authentication.refused", "type": "https://id.registrystack.org/problems/registry-messaging/authentication/refused"}Headers
Section titled “Headers”The bearer challenge.
A problem: profile.not-authorized.
object
Example
{ "code": "profile.not-authorized", "type": "https://id.registrystack.org/problems/registry-messaging/authentication/refused"}A problem: message.not-visible.
object
Example
{ "code": "message.not-visible", "type": "https://id.registrystack.org/problems/registry-messaging/authentication/refused"}A problem: request.method-not-allowed.
object
Example
{ "code": "request.method-not-allowed", "type": "https://id.registrystack.org/problems/registry-messaging/authentication/refused"}A problem: message.dispatch-started, message.terminal.
object
Example
{ "code": "message.dispatch-started", "type": "https://id.registrystack.org/problems/registry-messaging/authentication/refused"}A problem: service.unavailable.
object
Example
{ "code": "service.unavailable", "type": "https://id.registrystack.org/problems/registry-messaging/authentication/refused"}Headers
Section titled “Headers”Whole seconds to wait before trying again.
Cookies on Registry Stack
We use optional cookies to understand how you use the main Registry Stack website and this documentation. If you contact us, we may link this activity to your enquiry. You can change your choice at any time. Read the privacy policy.
Your browser asks sites not to track you, so optional tracking stays off.
We could not use or save that choice. Optional tracking remains off.