Link Search Menu Expand Document

Updated Thu Sep 23rd 2021, 14:49 UTC

Update

PUT /messages/:message

A Message can be updated if its state is “scheduled”.

Examples

Updating a Message

Request

PUT /messages/1zO27OO

Body

{
   "body": "updated body"
}
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
    -H Authorization:"Bearer {token}" \
    -X PUT /messages/1zO27OO
     -d '{json: "body"}' 

Response

Status

200

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