Discard a message

Delete an outbound message that has not been sent. A sent message cannot be withdrawn and answers 409.

DELETEhttps://app.trygtm.com/api/v1/messages/{message_id}
Scope
write

Path parameters

message_idstringrequired
The unsent message's id.

Headers

Idempotency-Keystringoptional
A key unique to this write, up to 255 characters. A retry carrying the same key returns the first response instead of running again. Kept for 24 hours.

Request

curl -X DELETE https://app.trygtm.com/api/v1/messages/8f2a91c4-6d1e-4c0a-9a57-2f3b1c7e9d10 \
  -H "Authorization: Bearer $TRYGTM_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Response

{
  "data": {
    "discarded": "aa11bb22-cc33-4d44-8e55-ff6677889900"
  }
}

Was this page helpful?