Delete

DELETE /messages/:message

A Message can be deleted when its status is “scheduled”, “delivered”, or “received”.

Examples

Deleting a Message

Request

DELETE /messages/1zO27OO
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
    -H Authorization:"Bearer {token}" \
    -X DELETE /messages/1zO27OO
    

Response

Status

202

Response Type

Message

Example Body

{
  "@type": "Message",
  "@context": "/contexts/Message.jsonld",
  "id": "/messages/KYMdkl",
  "direction": "out",
  "body": "scheduled message",
  "formattedBody": "scheduled message",
  "displayTimestamp": "2020-11-20T18:45:00.000000Z",
  "timelinePosition": "2020-11-20T18:45:00.000000Z",
  "deliveryState": "scheduled",
  "friendlyStateDescription": "Message Scheduled",
  "retryAllowed": false,
  "flags": [
    "scheduled"
  ],
  "retry": null,
  "attachments": {
    "@type": "hydra:Collection",
    "@context": "/contexts/hydra:Collection.jsonld",
    "id": "/messages/KYMdkl/attachments",
    "members": [],
    "totalItems": 0
  },
  "latestEventAt": "2020-11-20T18:45:00.000000Z",
  "conversation": "/conversations/ZLqRNE",
  "sender": "/users/RLjdlW",
  "source": "textus"
}

© 2024 TextUs