Macros
Resource Fields
Name | Type | Read-only | Description |
---|---|---|---|
title | string | ||
reply_type | string |
REPLY , NOTE
|
|
reply_contents | string | ||
agent | User | The agent who created/last-modified the macro | |
assignee | Assignee | ||
type | Type | ||
status | Status | ||
priority_action | string |
INCREASE_ONE_LEVEL , DECREASE_ONE_LEVEL
|
|
priority | Priority | ||
visibility | Visibility | ||
add_tags | array | ||
remove_tags | array | ||
usage_count | integer | ||
last_used_at | timestamp | ISO-8601 Format | |
created_at | timestamp | ISO-8601 Format | |
updated_at | timestamp | ISO-8601 Format |
Metadata
Version | 1.0 |
Last Updated | July 04, 2016 |
Actions
Retrieve all macros
GET /api/v1/cases/macros.jsonInformation
Allowed for | Collaborators, Agents, Admins & Owners |
Scope | conversations |
Ordered by | title (ascending) |
Arguments
Name | Type | Mandatory | Description |
---|---|---|---|
show_all | boolean | Only applicable for ADMINS or OWNERS |
Response
{
"status": 200,
"data": [
{
"id": 1,
"title": "What is Chemex?",
"reply_type": "REPLY",
"reply_contents": "The Chemex brews coffee using the infusion method, which makes it most similar to drip coffee in terms of body and taste.",
"agent":
{
"id": 1,
"resource_type": "user"
}
,
"assignee": {
"type": null,
"team": null,
"agent": null,
"resource_type": "macro_assignee"
},
"type": null,
"status": null,
"priority_action": null,
"priority": null,
"visibility": {
"type": "ALL",
"team": null,
"resource_type": "macro_visibility"
},
"add_tags": [
"chemex"
],
"remove_tags": [
"general"
],
"usage_count": 0,
"last_used_at": null,
"created_at": "2015-08-03T10:17:14+05:00",
"updated_at": "2015-08-03T10:17:14+05:00",
"resource_type": "macro"
,"resource_url": "https://brewfictus.kayako.com/api/v1/cases/macros/1"
}
],
"resource": "macro",
"total_count": 1
}
Retrieve a macro
GET /api/v1/cases/macros/:id.jsonInformation
Allowed for | Collaborators, Agents, Admins & Owners |
Scope | conversations |
Response
{
"status": 200,
"data": {
"id": 1,
"title": "What is Chemex?",
"reply_type": "REPLY",
"reply_contents": "The Chemex brews coffee using the infusion method, which makes it most similar to drip coffee in terms of body and taste.",
"agent":
{
"id": 1,
"resource_type": "user"
}
,
"assignee": {
"type": null,
"team": null,
"agent": null,
"resource_type": "macro_assignee"
},
"type": null,
"status": null,
"priority_action": null,
"priority": null,
"visibility": {
"type": "ALL",
"team": null,
"resource_type": "macro_visibility"
},
"add_tags": [
"chemex"
],
"remove_tags": [
"general"
],
"usage_count": 0,
"last_used_at": null,
"created_at": "2015-08-03T10:17:14+05:00",
"updated_at": "2015-08-03T10:17:14+05:00",
"resource_type": "macro"
,"resource_url": "https://brewfictus.kayako.com/api/v1/cases/macros/1"
}
,
"resource": "macro"
}
Add a macro
POST /api/v1/cases/macros.jsonInformation
Allowed for | Agents, Admins & Owners |
Scope | configuration |
Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
title | string | ||
visibility_type | string | ALL , TEAM , PRIVATE |
|
visible_to_team_id | integer | ||
reply_type | string | REPLY , NOTE |
|
reply_contents | string | ||
assignee_type | string | UNASSIGNED , CURRENT_AGENT , TEAM , AGENT |
|
assigned_team_id | integer | Only applicable when "assignee_type" is set to TEAM or AGENT | |
assigned_agent_id | integer | Only applicable when "assignee_type" is set to AGENT | |
type_id | integer | ||
status_id | integer | ||
priority_action | string | INCREASE_ONE_LEVEL , DECREASE_ONE_LEVEL |
|
priority_id | integer | Either priority_action or priority_id can be specified, not both |
|
add_tags | string | Comma separated tags | |
remove_tags | string | Comma separated tags |
Macro requires at-least one action in order to be created
Response
{
"status": 201,
"data": {
"id": 1,
"title": "What is Chemex?",
"reply_type": "REPLY",
"reply_contents": "The Chemex brews coffee using the infusion method, which makes it most similar to drip coffee in terms of body and taste.",
"agent":
{
"id": 1,
"resource_type": "user"
}
,
"assignee": {
"type": null,
"team": null,
"agent": null,
"resource_type": "macro_assignee"
},
"type": null,
"status": null,
"priority_action": null,
"priority": null,
"visibility": {
"type": "ALL",
"team": null,
"resource_type": "macro_visibility"
},
"add_tags": [
"chemex"
],
"remove_tags": [
"general"
],
"usage_count": 0,
"last_used_at": null,
"created_at": "2015-08-03T10:17:14+05:00",
"updated_at": "2015-08-03T10:17:14+05:00",
"resource_type": "macro"
,"resource_url": "https://brewfictus.kayako.com/api/v1/cases/macros/1"
}
,
"resource": "macro"
}
Update a macro
PUT /api/v1/cases/macros/:id.jsonInformation
Allowed for | Agents, Admins & Owners |
Scope | configuration |
Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
title | string | ||
visibility_type | string | ALL , TEAM , PRIVATE |
|
visible_to_team_id | integer | Only applicable when visibility_type is set to TEAM |
|
reply_type | string | REPLY , NOTE |
|
reply_contents | string | ||
assignee_type | string | UNASSIGNED , CURRENT_AGENT , TEAM , AGENT |
|
assigned_team_id | integer | Only applicable when "assignee_type" is set to TEAM or AGENT | |
assigned_agent_id | integer | Only applicable when "assignee_type" is set to AGENT | |
type_id | integer | ||
status_id | integer | ||
priority_action | string | INCREASE_ONE_LEVEL , DECREASE_ONE_LEVEL |
|
priority_id | integer | Either priority_action or priority_id can be specified, not both |
|
add_tags | string | Comma separated tags (This will replace all existing tags with given ones) | |
remove_tags | string | Comma separated tags (This will replace all existing tags with given ones) |
Response
{
"status": 200,
"data": {
"id": 1,
"title": "What is Chemex?",
"reply_type": "REPLY",
"reply_contents": "The Chemex brews coffee using the infusion method, which makes it most similar to drip coffee in terms of body and taste.",
"agent":
{
"id": 1,
"resource_type": "user"
}
,
"assignee": {
"type": null,
"team": null,
"agent": null,
"resource_type": "macro_assignee"
},
"type": null,
"status": null,
"priority_action": null,
"priority": null,
"visibility": {
"type": "ALL",
"team": null,
"resource_type": "macro_visibility"
},
"add_tags": [
"chemex"
],
"remove_tags": [
"general"
],
"usage_count": 0,
"last_used_at": null,
"created_at": "2015-08-03T10:17:14+05:00",
"updated_at": "2015-08-03T10:17:14+05:00",
"resource_type": "macro"
,"resource_url": "https://brewfictus.kayako.com/api/v1/cases/macros/1"
}
,
"resource": "macro"
}
Mark as used
PUT /api/v1/cases/macros/:id/used.jsonDelete a macro
DELETE /api/v1/cases/macro/:id.jsonInformation
Allowed for | Agents, Admins & Owners |
Scope | configuration |
Macro deletion is subject to visibility restrictions
Response
{
"status": 200
}
Delete macros
DELETE /api/v1/cases/macros.jsonInformation
Allowed for | Agents, Admins & Owners |
Scope | configuration |
Arguments
Name | Type | Mandatory | Description |
---|---|---|---|
ids | string | The comma separated ids |
Macro deletion is subject to visibility restrictions
Response
{
"status": 200,
"total_count": 2
}