Skip to main content

Accounts

Handle ImBox accounts. An account can have multiple contacts connected to it.

Create account​

Parameters​

NameTypeDescription
apiKey*StringYour API Key
userId*StringUnique id for the user

Body​

NameTypeDescription
name*StringMin 2 characters. Max 50 characters.
descriptionString | null
externalIdString | nullMax 50 characters.
externalUrlString | nullMax 250 characters.
labelsArray<String> | nullReplaces 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.

ScopeAccess
ContactsWrite

Update account​

Parameters​

NameTypeDescription
apiKey*StringYour API Key
userId*StringUnique id for the user
id*IntegerAccount id

Body​

NameTypeDescription
nameString | nullMin 2 characters. Max 50 characters.
descriptionString | null
externalIdString | nullMax 50 characters.
externalUrlString | nullMax 250 characters.
labelsArray<String> | nullReplaces 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.

ScopeAccess
ContactsWrite

Delete account​

Parameters​

NameTypeDescription
apiKey*StringYour API Key
userId*IntegerUnique id for the user
id*IntegerAccount 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.

ScopeAccess
ContactsWrite

Get accounts​

Parameters​

NameTypeDescription
apiKey*StringYour API Key
userId*IntegerUnique id for the user

Query parameters​

NameTypeDescription
limitIntegerNumber of accounts to return
afterIdIntegerCursor 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.

ScopeAccess
ContactsRead

Get account​

Parameters​

NameTypeDescription
apiKey*StringYour API Key
userId*IntegerUnique id for the user
id*IntegerAccount 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.

ScopeAccess
ContactsRead

Create account note​

Parameters​

NameTypeDescription
apiKey*StringYour API Key
userId*StringUnique id for the user

Body​

NameTypeDescription
accountId*IntegerId of account that the account note will belong to.
agentIdIntegerUnique id for the agent that creates the account note.
content*StringContent 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.

ScopeAccess
ContactsWrite

Delete account note​

Parameters​

NameTypeDescription
apiKey*StringYour API Key
userId*StringUnique id for the user
id*IntegerThe 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.

ScopeAccess
ContactsWrite

Get account notes​

Get notes

Parameters​

NameTypeDescription
apiKey*StringYour API Key
userId*StringUnique id for the user

Query parameters​

NameTypeDescription
accountIdIntegerAccount id to filter by
limitIntegerNumber of account notes to return
afterIntegerCursor 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.

ScopeAccess
ContactsRead

Get account note​

Parameters​

NameTypeDescription
apiKey*StringYour API Key
userId*StringUnique id for the user
id*IntegerNote 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.

ScopeAccess
ContactsRead