Identities
Metadata
| Version | 1.0 |
| Last Updated | July 04, 2016 |
Actions
Emails
Retrieve all emails
GET /api/v1/identities/emails.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
| Ordered by | is_primary, updated_at (descending) |
Arguments
| Name | Type | Mandatory | Description |
|---|---|---|---|
| user_id | integer | The id of the User |
Response
{
"status": 200,
"data": [
{
"id": 1,
"email": "simon.blackhouse@brewfictus.com",
"is_primary": true,
"is_validated": true,
"is_notification_enabled": false,
"created_at": "2016-04-22T11:52:04+00:00",
"updated_at": "2016-04-22T11:52:30+00:00",
"resource_type": "identity_email"
,"resource_url": "https://brewfictus.kayako.com/api/v1/identities/emails/1"
}
],
"resource": "identity_email",
"offset": 0,
"limit": 10,
"total_count": 1
}
Retrieve an email
GET /api/v1/identities/emails/:id.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
Response
{
"status": 200,
"data": {
"id": 1,
"email": "simon.blackhouse@brewfictus.com",
"is_primary": true,
"is_validated": true,
"is_notification_enabled": false,
"created_at": "2016-04-22T11:52:04+00:00",
"updated_at": "2016-04-22T11:52:30+00:00",
"resource_type": "identity_email"
,"resource_url": "https://brewfictus.kayako.com/api/v1/identities/emails/1"
},
"resource": "identity_email"
}
Add an email
POST /api/v1/identities/emails.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| user_id | integer | The id of the User | |
| string | |||
| is_primary | boolean | Default: false |
|
| is_validated | boolean | Applicable for the role type AGENT, ADMIN, OWNER Default: false |
|
| is_notification_enabled | boolean | Default: false |
Response
{
"status": 201,
"data": {
"id": 1,
"email": "simon.blackhouse@brewfictus.com",
"is_primary": true,
"is_validated": true,
"is_notification_enabled": false,
"created_at": "2016-04-22T11:52:04+00:00",
"updated_at": "2016-04-22T11:52:30+00:00",
"resource_type": "identity_email"
,"resource_url": "https://brewfictus.kayako.com/api/v1/identities/emails/1"
},
"resource": "identity_email"
}
Update an email
PUT /api/v1/identities/emails/:id.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| is_primary | boolean | ||
| is_validated | boolean | Applicable for the role type AGENT, ADMIN, OWNER |
|
| is_notification_enabled | boolean |
Response
{
"status": 200,
"data": {
"id": 1,
"email": "simon.blackhouse@brewfictus.com",
"is_primary": true,
"is_validated": true,
"is_notification_enabled": false,
"created_at": "2016-04-22T11:52:04+00:00",
"updated_at": "2016-04-22T11:52:30+00:00",
"resource_type": "identity_email"
,"resource_url": "https://brewfictus.kayako.com/api/v1/identities/emails/1"
},
"resource": "identity_email"
}
Send verification email
PUT /api/v1/identities/emails/:id/send_verification_email.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
Response
{
"status": 200,
"notifications": [
{
"type": "INFO",
"message": "An email has been sent to your email id",
"sticky": false
}
]
}
Delete an email
DELETE /api/v1/identities/emails/:id.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
Response
{
"status": 200
}
Delete emails
DELETE /api/v1/identities/emails.jsonInformation
| Allowed for | Admins & Owners |
| Scope | users |
Arguments
| Name | Type | Mandatory | Description |
|---|---|---|---|
| ids | string | The comma separated ids |
Response
{
"status": 200,
"total_count": 2
}
Phones
Retrieve all phones
GET /api/v1/identities/phones.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
| Ordered by | is_primary, updated_at (descending) |
Arguments
| Name | Type | Mandatory | Description |
|---|---|---|---|
| user_id | integer | The id of the User |
Response
{
"status": 200,
"data": [
{
"id": 1,
"number":"+14155550104",
"is_primary": true,
"is_validated": false,
"created_at": "2016-03-15T10:38:01+05:00",
"updated_at": "2016-03-15T10:38:01+05:00",
"resource_type": "identity_phone"
,"resource_url": "https://brewfictus.kayako.com/api/v1/identities/phones/1"
}
],
"resource": "identity_phone",
"offset": 0,
"limit": 10,
"total_count": 1
}
Retrieve a phone
GET /api/v1/identities/phones/:id.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
Response
{
"status": 200,
"data":
{
"id": 1,
"number":"+14155550104",
"is_primary": true,
"is_validated": false,
"created_at": "2016-03-15T10:38:01+05:00",
"updated_at": "2016-03-15T10:38:01+05:00",
"resource_type": "identity_phone"
,"resource_url": "https://brewfictus.kayako.com/api/v1/identities/phones/1"
}
,
"resource": "identity_phone"
}
Add a phone
POST /api/v1/identities/phones.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| user_id | integer | The id of the User | |
| number | string | ||
| is_primary | boolean | Default: false |
|
| is_validated | boolean | Applicable for the role type AGENT, ADMIN, OWNER Default: false |
Response
{
"status": 201,
"data":
{
"id": 1,
"number":"+14155550104",
"is_primary": true,
"is_validated": false,
"created_at": "2016-03-15T10:38:01+05:00",
"updated_at": "2016-03-15T10:38:01+05:00",
"resource_type": "identity_phone"
,"resource_url": "https://brewfictus.kayako.com/api/v1/identities/phones/1"
}
,
"resource": "identity_phone"
}
Update a phone
PUT /api/v1/identities/phones/:id.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| is_primary | boolean | ||
| is_validated | boolean | Applicable for the role type AGENT, ADMIN, OWNER |
Response
{
"status": 200,
"data":
{
"id": 1,
"number":"+14155550104",
"is_primary": true,
"is_validated": false,
"created_at": "2016-03-15T10:38:01+05:00",
"updated_at": "2016-03-15T10:38:01+05:00",
"resource_type": "identity_phone"
,"resource_url": "https://brewfictus.kayako.com/api/v1/identities/phones/1"
}
,
"resource": "identity_phone"
}
Delete a phone
DELETE /api/v1/identities/phones/:id.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
Response
{
"status": 200
}
Delete phones
DELETE /api/v1/identities/phones.jsonInformation
| Allowed for | Admins & Owners |
| Scope | users |
Arguments
| Name | Type | Mandatory | Description |
|---|---|---|---|
| ids | string | The comma separated ids |
Response
{
"status": 200,
"total_count": 2
}
RESOURCE FIELDS
| Name | Type | Read-only | Description |
|---|---|---|---|
| twitter_id | string | ||
| full_name | string | ||
| screen_name | string | ||
| follower_count | integer | ||
| description | string | ||
| url | string | ||
| location | string | ||
| profile_image_url | string | ||
| locale | string | ||
| is_verified | boolean | Default: false |
|
| is_primary | boolean | Default: false |
|
| is_validated | boolean | Default: false |
|
| created_at | timestamp | ISO-8601 Format | |
| updated_at | timestamp | ISO-8601 Format |
Retrieve all accounts
GET /api/v1/identities/twitter.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
| Ordered by | is_primary, updated_at (descending) |
Arguments
| Name | Type | Mandatory | Description |
|---|---|---|---|
| user_id | integer | The id of the User |
Response
{
"status": 200,
"data": [
{
"id": 1,
"twitter_id": "3156012171",
"full_name": "Phoebe Todd",
"screen_name": "phoebetodd",
"follower_count": 0,
"description": null,
"url": null,
"location": null,
"profile_image_url": null,
"locale": "en",
"is_verified": false,
"is_primary": false,
"is_validated": false,
"created_at": "2015-07-25T15:02:02+05:00",
"updated_at": "2015-07-25T15:02:02+05:00",
"resource_type": "identity_twitter"
,"resource_url": "https://brewfictus.kayako.com/api/v1/identities/twitter/1"
}
],
"resource": "identity_twitter",
"offset": 0,
"limit": 10,
"total_count": 1
}
Retrieve an account
GET /api/v1/identities/twitter/:id.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
Response
{
"status": 200,
"data":
{
"id": 1,
"twitter_id": "3156012171",
"full_name": "Phoebe Todd",
"screen_name": "phoebetodd",
"follower_count": 0,
"description": null,
"url": null,
"location": null,
"profile_image_url": null,
"locale": "en",
"is_verified": false,
"is_primary": false,
"is_validated": false,
"created_at": "2015-07-25T15:02:02+05:00",
"updated_at": "2015-07-25T15:02:02+05:00",
"resource_type": "identity_twitter"
,"resource_url": "https://brewfictus.kayako.com/api/v1/identities/twitter/1"
},
"resource": "identity_twitter"
}
Add a twitter account
POST /api/v1/identities/twitter.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| user_id | integer | The id of the User | |
| screen_name | string | ||
| is_validated | boolean | Applicable for the role type AGENT, ADMIN, OWNER Default: false |
Response
{
"status": 200,
"data":
{
"id": 1,
"twitter_id": "3156012171",
"full_name": "Phoebe Todd",
"screen_name": "phoebetodd",
"follower_count": 0,
"description": null,
"url": null,
"location": null,
"profile_image_url": null,
"locale": "en",
"is_verified": false,
"is_primary": false,
"is_validated": false,
"created_at": "2015-07-25T15:02:02+05:00",
"updated_at": "2015-07-25T15:02:02+05:00",
"resource_type": "identity_twitter"
,"resource_url": "https://brewfictus.kayako.com/api/v1/identities/twitter/1"
},
"resource": "identity_twitter"
}
Update a twitter account
PUT /api/v1/identities/twitter/:id.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| is_primary | boolean | ||
| is_validated | boolean |
Response
{
"status": 200,
"data":
{
"id": 1,
"twitter_id": "3156012171",
"full_name": "Phoebe Todd",
"screen_name": "phoebetodd",
"follower_count": 0,
"description": null,
"url": null,
"location": null,
"profile_image_url": null,
"locale": "en",
"is_verified": false,
"is_primary": false,
"is_validated": false,
"created_at": "2015-07-25T15:02:02+05:00",
"updated_at": "2015-07-25T15:02:02+05:00",
"resource_type": "identity_twitter"
,"resource_url": "https://brewfictus.kayako.com/api/v1/identities/twitter/1"
},
"resource": "identity_twitter"
}
Delete an account
DELETE /api/v1/identities/twitter/:id.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
Response
{
"status": 200
}
Delete accounts
DELETE /api/v1/identities/twitter.jsonInformation
| Allowed for | Admins & Owners |
| Scope | users |
Arguments
| Name | Type | Mandatory | Description |
|---|---|---|---|
| ids | string | The comma separated ids |
Response
{
"status": 200,
"total_count": 2
}
RESOURCE FIELDS
| Name | Type | Read-only | Description |
|---|---|---|---|
| facebook_id | string | ||
| user_name | string | ||
| full_name | string | ||
| string | |||
| bio | string | ||
| birth_date | timestamp | ISO-8601 Format | |
| website | string | ||
| profile_url | string | ||
| locale | string | ||
| is_verified | boolean | Default: false |
|
| is_primary | boolean | Default: false |
|
| is_validated | boolean | Default: false |
|
| created_at | timestamp | ISO-8601 Format | |
| updated_at | timestamp | ISO-8601 Format |
Retrieve all accounts
GET /api/v1/identities/facebook.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
| Ordered by | is_primary, updated_at (descending) |
Arguments
| Name | Type | Mandatory | Description |
|---|---|---|---|
| user_id | integer | The id of the User |
Response
{
"status": 200,
"data": [
{
"id": 1,
"facebook_id": "1407638772888867",
"user_name": null,
"full_name": "Jordan Mitchell",
"email": null,
"bio": null,
"birth_date": null,
"website": null,
"profile_url": null,
"locale": null,
"is_verified": false,
"is_primary": false,
"is_validated": false,
"created_at": "2015-07-25T17:47:14+05:00",
"updated_at": "2015-07-25T17:47:14+05:00",
"resource_type": "identity_facebook"
,"resource_url": "https://brewfictus.kayako.com/api/v1/identities/facebook/1"
}
],
"resource": "identity_facebook",
"offset": 0,
"limit": 10,
"total_count": 1
}
Retrieve an account
GET /api/v1/identities/facebook/:id.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
Response
{
"status": 200,
"data": {
"id": 1,
"facebook_id": "1407638772888867",
"user_name": null,
"full_name": "Jordan Mitchell",
"email": null,
"bio": null,
"birth_date": null,
"website": null,
"profile_url": null,
"locale": null,
"is_verified": false,
"is_primary": false,
"is_validated": false,
"created_at": "2015-07-25T17:47:14+05:00",
"updated_at": "2015-07-25T17:47:14+05:00",
"resource_type": "identity_facebook"
,"resource_url": "https://brewfictus.kayako.com/api/v1/identities/facebook/1"
}
,
"resource": "identity_facebook"
}
Update a facebook account
PUT /api/v1/identities/facebook/:id.jsonInformation
| Allowed for | Admins & Owners |
| Scope | users |
Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| is_primary | boolean | ||
| is_validated | boolean |
Response
{
"status": 200,
"data": {
"id": 1,
"facebook_id": "1407638772888867",
"user_name": null,
"full_name": "Jordan Mitchell",
"email": null,
"bio": null,
"birth_date": null,
"website": null,
"profile_url": null,
"locale": null,
"is_verified": false,
"is_primary": false,
"is_validated": false,
"created_at": "2015-07-25T17:47:14+05:00",
"updated_at": "2015-07-25T17:47:14+05:00",
"resource_type": "identity_facebook"
,"resource_url": "https://brewfictus.kayako.com/api/v1/identities/facebook/1"
}
,
"resource": "identity_facebook"
}
Delete an account
DELETE /api/v1/identities/facebook/:id.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
Response
{
"status": 200
}
Delete accounts
DELETE /api/v1/identities/facebook.jsonInformation
| Allowed for | Collaborators, Agents, Admins & Owners |
| Scope | users |
Arguments
| Name | Type | Mandatory | Description |
|---|---|---|---|
| ids | string | The comma separated ids |
Response
{
"status": 200,
"total_count": 2
}