Contact
Handle ImBox contacts and accounts. A contact can be connected to an account by accountId
property.
Create contact
Create a contact
Parameters
Name | Type | Description |
apiKey* | String | Your API Key |
userId* | String | Your userId |
Usage
curl -X POST -H "Content-Type: application/json" -d @contact.json "https://apiv2.imbox.io/api/apiKey/userId/contacts"
contact.json
{
"firstName": "Arne", // Max length 50 characters
"lastName": "Andersson", // Max length 50 characters
"title": "CEO", // Max length 50 characters
"description": "This is a contact description", // Max length 500 characters
"emails": [{ "email": "arne@gmail.se", "isPrimary": true }],
"phones": [{ "phone": "+46762004545", "isPrimary": true }],
"externalUrl": "http://mycrm.com/abc/123", // Max length 250 characters
"externalId": "123", // Max length 50 characters,
"accountId": 45 // An existing account id
}
Response
{
"id": 100,
"userId": 200,
"accountId": 45,
"crmId": 1,
"description": "This is a contact description",
"externalId": "123",
"externalUrl": "http://mycrm.com/abc/123",
"firstName": "Arne",
"lastName": "Andersson",
"fullName": "Arne Andersson",
"picture": null,
"title": "CEO",
"activityAt": "2020-01-01T13:00:00.000Z",
"modifiedAt": null,
"createdAt": "2020-01-01T13:00:00.000Z",
"updatedAt": null
}
Update contact
Update a contact
Parameters
Name | Type | Description |
apiKey* | String | Your API Key |
userId* | String | Your userId |
id* | Integer | Id of the contact |
Usage
curl -X PUT -H "Content-Type: application/json" -d @contact.json "https://apiv2.imbox.io/api/apiKey/userId/contacts/id"
contact.json
{
"firstName": "Bosse",
"emails": [{ "email": "bosse@gmail.se", "isPrimary": true }],
"description": "Moved from old account",
"externalId": "456",
"externalUrl": "http://mycrm.com/efg/456",
"accountId": 46,
}
Response
{}
Delete contact
Delete a contact
Parameters
Name | Type | Description |
apiKey* | String | Your API Key |
userId* | String | Your userId |
id* | Integer | Id of the contact |
Usage
curl -X DELETE "https://apiv2.imbox.io/api/apiKey/userId/contacts/id"
Response
{}
Get contacts
Get contacts
Parameters
Name | Type | Description |
apiKey* | String | Your API Key |
userId* | String | Your userId |
id | Integer | Id of the contact |
Integer | Email address | |
phone | String | Phone number in +E.164 |
limit | Integer | Number of contacts to return |
after | Integer | Cursor for next result set |
Usage
curl -X GET "https://apiv2.imbox.io/api/apiKey/userId/contacts?limit=2"
Response
{
"contacts": [
{
"id": 100,
"userId": 200,
"accountId": null,
"crmId": 1,
"description": null,
"externalId": null,
"externalUrl": null,
"firstName": "Arne",
"lastName": "Andersson",
"fullName": "Arne Andersson",
"picture": null,
"title": "CEO",
"activityAt": "2020-01-01T13:00:00.000Z",
"modifiedAt": null,
"createdAt": "2020-01-01T13:00:00.000Z",
"updatedAt": null
},
{
"id": 120,
"userId": 200,
"accountId": null,
"crmId": 1,
"description": null,
"externalId": null,
"externalUrl": null,
"firstName": "Bosse",
"lastName": "Bengtsson",
"fullName": "Bosse Bengtsson",
"picture": null,
"title": "HR manager",
"activityAt": "2020-01-01T13:00:00.000Z",
"modifiedAt": null,
"createdAt": "2020-01-01T13:00:00.000Z",
"updatedAt": null
}
]
"paging": {
"cursor": {
"after": 120
}
},
"next": "https://apiv2.imbox.io/api/apiKey/userId/contacts?limit=2&after=120"
}
Create contact note
Create note for contact
Parameters
Name | Type | Description |
apiKey* | String | Your API Key |
userId* | String | Your userId |
Usage
curl -X POST -H "Content-Type: application/json" -d @note.json "https://apiv2.imbox.io/api/apiKey/userId/contactNotes"
note.json
{
"contactId": 1234,
"content": "A note..."
}
Response
{
"id": 100
}
Delete contact note
Delete note for contact
Parameters
Name | Type | Description |
apiKey* | String | Your API Key |
userId* | String | Your userId |
id* | Integer | The contact note id |
Usage
curl -X DELETE "https://apiv2.imbox.io/api/apiKey/userId/contactNotes/id"
Response
{}
Get contact notes
Get notes
Parameters
Name | Type | Description |
apiKey* | String | Your API Key |
userId* | String | Your userId |
contactId | Integer | Contact to filter by |
limit | Integer | Number of contacts to return |
after | Integer | Cursor for next result set |
Usage
curl "https://apiv2.imbox.io/api/apiKey/userId/contactNotes?contactId=1&limit=2"
Response
{
"notes": [
{
"id": 1,
"contactId": 1,
"content": "A note...",
"createdAt": "2020-01-01T13:00:00.000Z"
},
{
"id": 2,
"contactId": 1,
"content": "Anoter note...",
"createdAt": "2020-01-01T13:00:00.000Z"
}
],
"paging": {
"cursors": {
"after": 2
},
"next": "https://apiv2.imbox.io/api/apiKey/userId/contactNotes?contactId=1&limit=2&after=2"
}
}
Get contact note
Get contact note by id
Parameters
Name | Type | Description |
apiKey* | String | Your API Key |
userId* | String | Your userId |
id* | Integer | Note id |
Usage
curl "https://apiv2.imbox.io/api/apiKey/userId/contactNotes/id"
Response
{
"id": 1,
"contactId": 1,
"content": "A note...",
"createdAt": "2020-01-01T13:00:00.000Z"
}
Create account
Create account
Parameters
Name | Type | Description |
apiKey* | String | Your API Key |
userId* | String | Your userId |
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://crm/1234" // optional
}
Response
{
"id": 100,
"userId": 1,
"crmId": 1,
"externalId": "1234",
"externalUrl": "https://crm/1234",
"name": "ImBox Sweden AB"
}
Update account
Update account
Parameters
Name | Type | Description |
apiKey* | String | Your API Key |
userId* | Integer | Your userId |
id* | Integer | Account id |
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
{}
Delete account
Delete account
Parameters
Name | Type | Description |
apiKey* | String | Your API Key |
userId* | Integer | Your userId |
id* | Integer | Account id |
Usage
curl -X DELETE "https://apiv2.imbox.io/api/apiKey/userId/accounts/id"
Response
{}
Get accounts
Get accounts
Parameters
Name | Type | Description |
apiKey* | String | Your API Key |
userId* | Integer | Your userId |
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
{
"accounts": [
{
"id": 1,
"userId": 1,
"crmId": 1,
"externalId": null,
"externalUrl": null,
"name": "ImBox Sweden AB",
"createdAt": "2020-01-01T13:00:00.000Z",
"updatedAt": null
},
{
"id": 10,
"userId": 1,
"crmId": 1,
"externalId": "1234",
"externalUrl": null,
"name": "ImBox Finland",
"createdAt": "2020-01-01T14:00:00.000Z",
"updatedAt": "2020-01-01T15:00:00.000Z"
}
],
"paging": {
"cursors": {
"afterId": 10
},
"next": "https://apiv2.imbox.io/api/apiKey/userId/accounts?limit=2&afterId=10"
}
}
Get account
Get account
Parameters
Name | Type | Description |
apiKey* | String | Your API Key |
userId* | Integer | Your userId |
id* | Integer | Account id |
Usage
curl "https://apiv2.imbox.io/api/apiKey/userId/accounts/id"
Response
{
"id": 1,
"userId": 1,
"crmId": 1,
"externalId": null,
"externalUrl": null,
"name": "ImBox Sweden AB",
"createdAt": "2020-01-01T13:00:00.000Z",
"updatedAt": null
}