Link Search Menu Expand Document

Updated Fri Jun 18th 2021, 16:17 UTC

Delete

DELETE /messages/:message

A Message can be deleted when its status is “scheduled”.

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
{
  "@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"
}

© 2021 TextUs