Accounts
Handle ImBox accounts. An account can have multiple contacts connected to it.
Create account
Parameters
| Name | Type | Description |
|---|---|---|
| apiKey* | String | Your API Key |
| userId* | String | Unique id for the user |
Body
| Name | Type | Description |
|---|---|---|
| name* | String | Min 2 characters. Max 50 characters. |
| description | String | null | |
| externalId | String | null | Max 50 characters. |
| externalUrl | String | null | Max 250 characters. |
| labels | Array<String> | null | Replaces all labels on the account. Case sensitive. If the label does not exist it will not be added to the account. |
Usage
curl -X POST -H "Content-Type: application/json" -d @account.json "https://apiv2.imbox.io/api/:apiKey/:userId/accounts"
account.json
{
"name": "ImBox Sweden AB",
"externalId": "1234", // optional
"externalUrl": "https://example.com/1234" // optional
}
Response
200 OK
{
"id": 100,
"userId": 1,
"crmId": 1,
"externalId": "1234",
"externalUrl": "https://example.com/1234",
"name": "ImBox Sweden AB",
"description": null,
"labels": []
}
400 Bad Request
{
"code": "BadRequest",
"message": "Bad Request"
}
409 Conflict
{
"message": "Conflict",
"error": {
"field": "externalId"
}
}
API key scope access
Configure API key access in ImBox Admin dashboard.
| Scope | Access |
|---|---|
| Contacts | Write |
Update account
Parameters
| Name | Type | Description |
|---|---|---|
| apiKey* | String | Your API Key |
| userId* | String | Unique id for the user |
| id* | Integer | Account id |
Body
| Name | Type | Description |
|---|---|---|
| name | String | null | Min 2 characters. Max 50 characters. |
| description | String | null | |
| externalId | String | null | Max 50 characters. |
| externalUrl | String | null | Max 250 characters. |
| labels | Array<String> | null | Replaces all labels on the account. Case sensitive. If the label does not exist it will not be added to the account. |
Usage
curl -X PUT -H "Content-Type: application/json" -d @account.json "https://apiv2.imbox.io/api/:apiKey/:userId/accounts/:id"
account.json
{
"name": "ImBox England Ltd"
}
Response
200 OK
{}
API key scope access
Configure API key access in ImBox Admin dashboard.
| Scope | Access |
|---|---|
| Contacts | Write |
Delete account
Parameters
| Name | Type | Description |
|---|---|---|
| apiKey* | String | Your API Key |
| userId* | Integer | Unique id for the user |
| id* | Integer | Account id |
Usage
curl -X DELETE "https://apiv2.imbox.io/api/:apiKey/:userId/accounts/:id"
Response
200 OK
{}
API key scope access
Configure API key access in ImBox Admin dashboard.
| Scope | Access |
|---|---|
| Contacts | Write |
Get accounts
Parameters
| Name | Type | Description |
|---|---|---|
| apiKey* | String | Your API Key |
| userId* | Integer | Unique id for the user |
Query parameters
| Name | Type | Description |
|---|---|---|
| limit | Integer | Number of accounts to return |
| afterId | Integer | Cursor for next result set by id |
Usage
curl "https://apiv2.imbox.io/api/:apiKey/:userId/accounts?limit=2"
Response
200 OK
{
"accounts": [
{
"id": 1,
"userId": 1,
"crmId": 1,
"externalId": null,
"externalUrl": null,
"name": "ImBox Sweden AB",
"description": "",
"createdAt": "2020-01-01T13:00:00.000Z",
"updatedAt": null,
"labels": []
},
{
"id": 10,
"userId": 1,
"crmId": 1,
"externalId": "1234",
"externalUrl": null,
"name": "ImBox Finland",
"description": null,
"createdAt": "2020-01-01T14:00:00.000Z",
"updatedAt": "2020-01-01T15:00:00.000Z",
"labels": []
}
],
"paging": {
"cursors": {
"afterId": 10
},
"next": "https://apiv2.imbox.io/api/apiKey/userId/accounts?limit=2&afterId=10"
}
}
paging.cursor.after and next are only provided if there are more results than those that were returned.
API key scope access
Configure API key access in ImBox Admin dashboard.
| Scope | Access |
|---|---|
| Contacts | Read |
Get account
Parameters
| Name | Type | Description |
|---|---|---|
| apiKey* | String | Your API Key |
| userId* | Integer | Unique id for the user |
| id* | Integer | Account id |
Usage
curl "https://apiv2.imbox.io/api/:apiKey/:userId/accounts/:id"
Response
200 OK
{
"id": 1,
"userId": 1,
"crmId": 1,
"externalId": null,
"externalUrl": null,
"name": "ImBox Sweden AB",
"description": null,
"createdAt": "2020-01-01T13:00:00.000Z",
"updatedAt": null,
"labels": []
}
204 No Content
API key scope access
Configure API key access in ImBox Admin dashboard.
| Scope | Access |
|---|---|
| Contacts | Read |
Create account note
Parameters
| Name | Type | Description |
|---|---|---|
| apiKey* | String | Your API Key |
| userId* | String | Unique id for the user |
Body
| Name | Type | Description |
|---|---|---|
| accountId* | Integer | Id of account that the account note will belong to. |
| agentId | Integer | Unique id for the agent that creates the account note. |
| content* | String | Content of the account note. |
Usage
curl -X POST -H "Content-Type: application/json" -d @note.json "https://apiv2.imbox.io/api/:apiKey/:userId/accountNotes"
note.json
{
"accountId": 1234,
"agentId": 5678,
"content": "A note..."
}
Response
{
"id": 100
}
API key scope access
Configure API key access in ImBox Admin dashboard.
| Scope | Access |
|---|---|
| Contacts | Write |
Delete account note
Parameters
| Name | Type | Description |
|---|---|---|
| apiKey* | String | Your API Key |
| userId* | String | Unique id for the user |
| id* | Integer | The account note id |
Usage
curl -X DELETE "https://apiv2.imbox.io/api/:apiKey/:userId/accountNotes/:id"
Response
200 OK
{}
API key scope access
Configure API key access in ImBox Admin dashboard.
| Scope | Access |
|---|---|
| Contacts | Write |
Get account notes
Get notes
Parameters
| Name | Type | Description |
|---|---|---|
| apiKey* | String | Your API Key |
| userId* | String | Unique id for the user |
Query parameters
| Name | Type | Description |
|---|---|---|
| accountId | Integer | Account id to filter by |
| limit | Integer | Number of account notes to return |
| after | Integer | Cursor for next result set by id |
Usage
curl "https://apiv2.imbox.io/api/:apiKey/:userId/accountNotes?accountId=1&limit=2"
Response
200 OK
{
"notes": [
{
"id": 1,
"accountId": 1,
"content": "A note...",
"createdAt": "2020-01-01T13:00:00.000Z"
},
{
"id": 2,
"accountId": 1,
"content": "Another note...",
"createdAt": "2020-01-01T13:00:00.000Z"
}
],
"paging": {
"cursors": {
"after": 2
},
"next": "https://apiv2.imbox.io/api/apiKey/userId/accountNotes?accountId=1&limit=2&after=2"
}
}
API key scope access
Configure API key access in ImBox Admin dashboard.
| Scope | Access |
|---|---|
| Contacts | Read |
Get account note
Parameters
| Name | Type | Description |
|---|---|---|
| apiKey* | String | Your API Key |
| userId* | String | Unique id for the user |
| id* | Integer | Note id |
Usage
curl "https://apiv2.imbox.io/api/:apiKey/:userId/accountNotes/:id"
Response
200 OK
{
"id": 1,
"accountId": 1,
"content": "A note...",
"createdAt": "2020-01-01T13:00:00.000Z"
}
204 No Content
API key scope access
Configure API key access in ImBox Admin dashboard.
| Scope | Access |
|---|---|
| Contacts | Read |