Pending Automated Communications
Get all
GET /cases/:case_id/automated-communications
Response
Status code 200
{
"data": [
{
"id": 43,
"user": {
"id": 1,
"first_name": "Doe",
"last_name": "John",
"phone_number": "+4588888888",
"job_title": "Animal",
"email": "info@easir.com",
"profile_picture": "http://api.randomuser.me/portraits/thumb/women/5.jpg",
"created_at": "2014-01-01 12:45:56",
"updated_at": "2014-01-02 00:11:22"
},
"template": {
"id": 2,
"type": "email",
"company_id": 1,
"title": "Email template",
"user_id": 1
},
"subject": "Subject",
"send_at": "2015-07-02 23:23:23",
"created_at": "2015-07-06 13:57:33",
"updated_at": "2015-07-06 13:57:33"
}
]
}
Get a specific pending automated communication
GET /case/:case_id/automated-communications/:automated_communication_id
Response
Status code 200
{
"id": 43,
"user": {
"id": 1,
"first_name": "Doe",
"last_name": "John",
"phone_number": "+4588888888",
"job_title": "Animal",
"email": "info@easir.com",
"profile_picture": "http://api.randomuser.me/portraits/thumb/women/5.jpg",
"created_at": "2014-01-01 12:45:56",
"updated_at": "2014-01-02 00:11:22"
},
"template": {
"id": 2,
"type": "email",
"company_id": 1,
"title": "Email template",
"user_id": 1
},
"subject": "Fun stuff",
"content": "We are going to have fun",
"attachments": [
{
"id": "29aed944-3ea9-465d-a8ca-919e6775e2a5",
"name": "qui eos laudantium.fvt",
"type": "fvt",
"size": 461332,
"created_at": "2015-07-07 06:27:26",
"updated_at": "2015-07-07 06:27:26",
"company_id": 1,
"belongs_to": "company",
"folder_id": "eb13626c-170e-4a5a-8328-534f3098103b",
"user_id": 1
},
{
"id": "fc54f470-2eb3-44e5-947d-b3909013c583",
"name": "et asperiores.gramps",
"type": "gramps",
"size": 903230,
"created_at": "2015-07-07 06:27:26",
"updated_at": "2015-07-07 06:27:26",
"company_id": 1,
"belongs_to": "company",
"folder_id": "eb13626c-170e-4a5a-8328-534f3098103b",
"user_id": 1
}
],
"send_at": "2015-07-12 23:23:23",
"created_at": "2015-07-06 13:57:33",
"updated_at": "2015-07-06 13:57:33"
}
Update a pending automated communication
PUT /case/:case_id/automated-communications/:pending_automated_communication_id
Parameters
template_id
integer- Must be an existing template, of the type
email
- default: null
- Must be an existing template, of the type
subject
string- Min 1 char.
- Required
content
string- Min 1 char.
- Required
send_at
date- Must be after "now"
- Y-m-d H:i:s format
- Required
attachments
array- Required
attachments.*
UUID
Payload
{
"subject": "My subject",
"content": "My content",
"template_id": 2,
"send_at": "2017-05-05 12:00:00",
"attachments": [
"29083ea2-782a-4e27-85a6-a8f0241194a1",
"f7870487-07a5-492b-9df7-d988bea221c4"
]
}
Response
Status code 200
{
"id": 34,
"user": {
"id": 8,
"first_name": "Flavie",
"last_name": "Auer",
"phone_number": "+1.861.849.3119",
"job_title": "Business Analytics Director",
"email": "6@example.com",
"email_notifications": false,
"profile_picture": null,
"system_user": false,
"created_at": "2016-11-28 10:21:07",
"updated_at": "2016-12-25 09:45:57"
},
"template": {
"id": 2,
"type": "email",
"company_id": 1,
"title": "Email template",
"user_id": 1,
"team_id": null,
"group_id": null,
"campaign": false
},
"subject": "Why should this be changed?",
"content": "test changed body",
"attachments": [
{
"id": "f7870487-07a5-492b-9df7-d988bea221c4",
"name": "goku_best14.jpg",
"type": "jpg",
"size": 65855,
"created_at": "2017-05-01 08:55:48",
"updated_at": "2017-05-01 08:55:48",
"company_id": 1,
"user_id": 8,
"team_id": 1,
"group_id": null,
"belongs_to": "team",
"folder_id": null
},
{
"id": "29083ea2-782a-4e27-85a6-a8f0241194a1",
"name": "goku.jpg",
"type": "jpg",
"size": 8860,
"created_at": "2017-05-01 09:05:17",
"updated_at": "2017-05-01 09:05:17",
"company_id": 1,
"user_id": 8,
"team_id": 1,
"group_id": null,
"belongs_to": "team",
"folder_id": null
}
],
"send_at": "2017-05-03 00:30:00",
"created_at": "2017-05-01 09:12:21",
"updated_at": "2017-05-02 07:52:59"
}
Delete a pending automated communication
DELETE /cases/:case_id/automated-communications/:pending_automated_communication_id
Response
Status code 204