Create
POST /users/:user/saved_replies
A Saved Reply is a user-defined canned message body that can be quickly chosen from a list and sent as a message.
Examples
Create a new Saved Reply
Request
POST /users/zygnZv/saved_replies
Body
{
"saved_reply": {
"title": "My Saved Reply",
"content": "This is my saved reply.",
"attachments": [
{
"key": "def123",
"originalFilename": "image01.png",
"size": 1024,
"height": 320,
"width": 240,
"contentType": "image/png"
}
]
}
}
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
-H Authorization:"Bearer {token}" \
-X POST /users/zygnZv/saved_replies
-d '{
"saved_reply": {
"title": "My Saved Reply",
"content": "This is my saved reply.",
"attachments": [
{
"key": "def123",
"originalFilename": "image01.png",
"size": 1024,
"height": 320,
"width": 240,
"contentType": "image/png"
}
]
}
}'
Response
Status
201
Response Type
Example Body
{
"@type": "SavedReply",
"@context": "/contexts/SavedReply.jsonld",
"id": "/saved_replies/vxoonZb",
"title": "Updated Title",
"content": "updated content",
"shared": false,
"user": "/users/wqyODPA",
"attachments": {
"@type": "hydra:Collection",
"@context": "/contexts/hydra:Collection.jsonld",
"id": "/saved_replies/ZLA8Y5/attachments",
"members": [
{
"@type": "SavedReplyAttachment",
"@context": "/contexts/SavedReplyAttachment.jsonld",
"id": "/attachments/9",
"url": "https://d1jouk7ho9xl4w.cloudfront.net/abc123==",
"downloadUrl": "https://s3.amazonaws.com/attachments.textus-staging.net/abc123",
"key": "abc123",
"contentType": "image/png",
"size": 1024,
"width": 240,
"height": 320,
"originalFilename": "image01.png"
}
],
"totalItems": 1
}
}