Tokens
Resource Fields
Name | Type | Read-only | Description |
---|---|---|---|
label | string | ||
description | string | ||
channel | string | ||
token | string | ||
webhook_url | string | ||
icon | Attachment | ||
is_enabled | boolean |
Default: true
|
|
lastused_at | timestamp | ISO-8601 Format | |
created_at | timestamp | ISO-8601 Format | |
updated_at | timestamp | ISO-8601 Format |
Attachments
RESOURCE FIELDS
Name | Type | Read-only | Description |
---|---|---|---|
name | string | ||
size | integer | ||
width | integer | Only if the attachment is image | |
height | integer | Only if the attachment is image | |
type | string | Mime-type of the file | |
content_id | string | Content ID used for inline attachment | |
alt | string | ||
url | string | The URL to view the attachment | |
url_download | string | The URL to download the attachment | |
thumbnails | Thumbnails | ||
created_at | timestamp | ISO-8601 Format |
Thumbnails
RESOURCE FIELDS
Name | Type | Read-only | Description |
---|---|---|---|
name | string | ||
size | integer | ||
width | integer | ||
height | integer | ||
type | string | Mime-type of the file | |
url | string | The URL to view the thumbnail | |
created_at | timestamp | ISO-8601 Format |
Metadata
Version | 1.0 |
Last Updated | July 04, 2016 |
Actions
Retrieve all tokens
GET /api/v1/events/tokens.jsonInformation
Allowed for | Admins & Owners |
Ordered by | id (ascending) |
Response
{
"status": 200,
"data": [
{
"id": 1,
"label": "sales force",
"description": "This is posted to case and comes from sales force",
"channel": "EVENT",
"token": "hK1nLnvFNXJW5euvcZPfZD8WnP2kT5jdhz0T7oVgzNiPXfLjertMvYfkAm2F0COR",
"webhook_url": "https://brewfictus.kayako.com/api/v1/webhook/8xNirozibd9aFmQzaRZ3EpKDl6hz4iMjRYk1K7QRr2sGUdun5nCTLKF57HRnH4m2/incoming",
"icon": null,
"is_enabled": true,
"lastused_at": null,
"created_at": "2015-07-28T23:46:17+05:00",
"updated_at": "2015-07-28T23:46:17+05:00",
"resource_type": "token"
,"resource_url": "https://brewfictus.kayako.com/api/v1/events/tokens/1"
}
],
"resource": "token",
"offset": 0,
"limit": 10,
"total_count": 1
}
Retrieve a token
GET /api/v1/events/tokens/:id.jsonInformation
Allowed for | Admins & Owners |
Response
{
"status": 200,
"data": {
"id": 1,
"label": "sales force",
"description": "This is posted to case and comes from sales force",
"channel": "EVENT",
"token": "hK1nLnvFNXJW5euvcZPfZD8WnP2kT5jdhz0T7oVgzNiPXfLjertMvYfkAm2F0COR",
"webhook_url": "https://brewfictus.kayako.com/api/v1/webhook/8xNirozibd9aFmQzaRZ3EpKDl6hz4iMjRYk1K7QRr2sGUdun5nCTLKF57HRnH4m2/incoming",
"icon": null,
"is_enabled": true,
"lastused_at": null,
"created_at": "2015-07-28T23:46:17+05:00",
"updated_at": "2015-07-28T23:46:17+05:00",
"resource_type": "token"
,"resource_url": "https://brewfictus.kayako.com/api/v1/events/tokens/1"
},
"resource": "token"
}
Add a token
POST /api/v1/events/tokens.jsonInformation
Allowed for | Admins & Owners |
Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
label | string | ||
description | string | ||
channel | string | Default: EVENT |
|
icon | multipart/form-data | File upload | |
is_enabled | boolean | Default: true |
Response
{
"status": 201,
"data": {
"id": 1,
"label": "sales force",
"description": "This is posted to case and comes from sales force",
"channel": "EVENT",
"token": "hK1nLnvFNXJW5euvcZPfZD8WnP2kT5jdhz0T7oVgzNiPXfLjertMvYfkAm2F0COR",
"webhook_url": "https://brewfictus.kayako.com/api/v1/webhook/8xNirozibd9aFmQzaRZ3EpKDl6hz4iMjRYk1K7QRr2sGUdun5nCTLKF57HRnH4m2/incoming",
"icon": null,
"is_enabled": true,
"lastused_at": null,
"created_at": "2015-07-28T23:46:17+05:00",
"updated_at": "2015-07-28T23:46:17+05:00",
"resource_type": "token"
,"resource_url": "https://brewfictus.kayako.com/api/v1/events/tokens/1"
},
"resource": "token"
}
Update a token
PUT /api/v1/events/tokens/:id.jsonInformation
Allowed for | Admins & Owners |
Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
label | string | ||
description | string | ||
icon | multipart/form-data | File upload | |
is_enabled | boolean |
Response
{
"status": 200,
"data": {
"id": 1,
"label": "sales force",
"description": "This is posted to case and comes from sales force",
"channel": "EVENT",
"token": "hK1nLnvFNXJW5euvcZPfZD8WnP2kT5jdhz0T7oVgzNiPXfLjertMvYfkAm2F0COR",
"webhook_url": "https://brewfictus.kayako.com/api/v1/webhook/8xNirozibd9aFmQzaRZ3EpKDl6hz4iMjRYk1K7QRr2sGUdun5nCTLKF57HRnH4m2/incoming",
"icon": null,
"is_enabled": true,
"lastused_at": null,
"created_at": "2015-07-28T23:46:17+05:00",
"updated_at": "2015-07-28T23:46:17+05:00",
"resource_type": "token"
,"resource_url": "https://brewfictus.kayako.com/api/v1/events/tokens/1"
},
"resource": "token"
}
Update tokens
PUT /api/v1/events/tokens.jsonInformation
Allowed for | Admins & Owners |
Arguments
Name | Type | Mandatory | Description |
---|---|---|---|
ids | string | The comma separated ids |
Parameters
Name | Type | Mandatory | Description |
---|---|---|---|
is_enabled | boolean |
Response
{
"status": 200,
"total_count": 2
}
Delete a token
DELETE /api/v1/events/tokens/:id.jsonInformation
Allowed for | Admins & Owners |
Response
{
"status": 200
}
Delete tokens
DELETE /api/v1/events/tokens.jsonInformation
Allowed for | Admins & Owners |
Arguments
Name | Type | Mandatory | Description |
---|---|---|---|
ids | string | The comma separated ids |
Response
{
"status": 200,
"total_count": 2
}