Automated Communications
Get all automated communications
GET /automated-communications
Query string parameters
- Supports Pagination
Response
Status code 200
{
"data":[
{
"id":"93400c3a-1805-35e3-8f01-0ca5fbd4fff8",
"team_id":null,
"name":"Alice.",
"description":"Alice; 'I might as well say that \"I see what was.",
"icon":"Mouse,.",
"communications":[
{
"name":"Voluptas dolor quisquam sunt perspiciatis est laudantium. Eos quia eos repudiandae ad eveniet illum est.",
"delay":{
"days":73,
"offset_from_midnight":32429
},
"template_id":2,
"subject":"Maxime reiciendis minima quos.",
"content":"Et officiis rerum distinctio quia harum. Aut et sequi dolorum sapiente. Veritatis et voluptatum dolores ipsam minus soluta. Inventore qui non nemo quae quia nam velit.\nFacilis ut aliquid eaque quod. Dolorem rerum iure laborum doloremque corrupti. Saepe ut veniam officia debitis officiis et iusto."
}
],
"created_at":"2015-02-13 20:57:37",
"updated_at":"1971-02-27 04:29:50"
}
],
"pagination":{
"total":50,
"page":1,
"per_page":15,
"urls":{
"previous":null,
"next":"https://api.easir.com/automated-communications/?page=2"
}
}
}
Get a specific automated communication
GET /automated-communications/:automated_communication_id
Response
Status code 200
{
"id":"93400c3a-1805-35e3-8f01-0ca5fbd4fff8",
"team_id":null,
"name":"Alice.",
"description":"Alice; 'I might as well say that \"I see what was.",
"icon":"Mouse,.",
"communications":[
{
"name":"Voluptas dolor quisquam sunt perspiciatis est laudantium. Eos quia eos repudiandae ad eveniet illum est.",
"delay":{
"days":73,
"offset_from_midnight":32429
},
"template_id":2,
"subject":"Maxime reiciendis minima quos.",
"content":"Et officiis rerum distinctio quia harum. Aut et sequi dolorum sapiente. Veritatis et voluptatum dolores ipsam minus soluta. Inventore qui non nemo quae quia nam velit.\nFacilis ut aliquid eaque quod. Dolorem rerum iure laborum doloremque corrupti. Saepe ut veniam officia debitis officiis et iusto.",
"attachments": [
"a498aca0-7f94-4863-82c8-d9b0c71975b1",
"72dbb0a1-da29-418c-9ddd-acbe761cbd40"
]
}
],
"created_at":"2015-02-13 20:57:37",
"updated_at":"1971-02-27 04:29:50"
}
Create automated communication
POST /automated-communications
Parameters
name
string- Between 1 and 255 chars.
- Required
description
string- Between 1 and 1024 chars.
icon
string- Between 1 and 50 chars.
communications
array- Required
communications.*.name
string- Between 1 and 255 chars.
- Required
communications.*.delay.days
integer- Min 1.
- Required
communications.*.delay.offset_from_midnight
integer- Between 0 and 86400.
- Required
communications.*.template_id
integer- Must exist and be of type email.
communications.*.subject
string- Between 1 and 255 chars.
- Required
communications.*.content
string- Min 1 char.
- Required
communications.*.attachments
array - List of file-ids.
Payload
{
"name":"Test name",
"description":"Some text to describe this",
"icon":"testing",
"communications":[
{
"name":"Test 1",
"delay":{
"days":16,
"offset_from_midnight":1234
},
"template_id":2,
"subject":"Test subject 1",
"content":"Test content 1",
"attachments": [
"a498aca0-7f94-4863-82c8-d9b0c71975b1",
"72dbb0a1-da29-418c-9ddd-acbe761cbd40"
]
},
{
"name":"Test 2",
"delay":{
"days":32,
"offset_from_midnight":4321
},
"subject":"Test subject 2",
"content":"Test content 2"
}
]
}
Response
Status code 201
{
"id":"caea0888-66be-4320-a3c5-60cb5a20e3f4",
"team_id":1,
"name":"Test name",
"description":"Some text to describe this",
"icon":"testing",
"communications":[
{
"name":"Test 1",
"delay":{
"days":16,
"offset_from_midnight":1234
},
"template_id":2,
"subject":"Test subject 1",
"content":"Test content 1",
"attachments": [
"a498aca0-7f94-4863-82c8-d9b0c71975b1",
"72dbb0a1-da29-418c-9ddd-acbe761cbd40"
]
},
{
"name":"Test 2",
"delay":{
"days":32,
"offset_from_midnight":4321
},
"template_id":0,
"subject":"Test subject 2",
"content":"Test content 2"
}
],
"created_at":"2015-07-07 08:55:26",
"updated_at":"2015-07-07 08:55:26"
}
Update a automated communication
PUT /automated-communications/:automated_communication_id
Parameters
name
string- Between 1 and 255 chars.
- Required
description
string- Between 1 and 1024 chars.
icon
string- Between 1 and 50 chars.
communications
array- Required
communications.*.name
string- Between 1 and 255 chars.
- Required
communications.*.delay.days
integer- Min 1.
- Required
communications.*.delay.offset_from_midnight
integer- Between 0 and 86400.
- Required
communications.*.template_id
integer- Must exist and be of type email.
communications.*.subject
string- Between 1 and 255 chars.
- Required
communications.*.content
string- Min 1 char.
- Required
communications.*.attachments
array - List of file-ids.
Payload
{
"name":"Test name - updated",
"description":"Some text to describe this. Updated",
"icon":"testing_updated",
"communications":[
{
"name":"Test 1 - updated",
"delay":{
"days":16,
"offset_from_midnight":1234
},
"template_id":2,
"subject":"Test subject 1 - updated",
"content":"Test content 1 - updated",
"attachments": [
"a498aca0-7f94-4863-82c8-d9b0c71975b1",
"72dbb0a1-da29-418c-9ddd-acbe761cbd40"
]
},
{
"name":"Test 2 - updated",
"delay":{
"days":32,
"offset_from_midnight":4321
},
"subject":"Test subject 2 - updated",
"content":"Test content 2 - updated"
}
]
}
Response
Status code 200
{
"id":"caea0888-66be-4320-a3c5-60cb5a20e3f4",
"team_id":1,
"name":"Test name - updated",
"description":"Some text to describe this. Updated",
"icon":"testing_updated",
"communications":[
{
"name":"Test 1 - updated",
"delay":{
"days":16,
"offset_from_midnight":1234
},
"template_id":2,
"subject":"Test subject 1 - updated",
"content":"Test content 1 - updated",
"attachments": [
"a498aca0-7f94-4863-82c8-d9b0c71975b1",
"72dbb0a1-da29-418c-9ddd-acbe761cbd40"
]
},
{
"name":"Test 2 - updated",
"delay":{
"days":32,
"offset_from_midnight":4321
},
"template_id":0,
"subject":"Test subject 2 - updated",
"content":"Test content 2 - updated"
}
],
"created_at":"2015-07-07 08:55:26",
"updated_at":"2015-07-07 08:57:41"
}
Delete a automated communication
DELETE /automated-communications/:automated_communication_id
Response
Status code 204