Create a contact
curl --request POST \
--url https://app.rookoo.ai/public/api/v1/inboxes/{inbox_identifier}/contacts \
--header 'Content-Type: application/json' \
--data '
{
"identifier": "1234567890",
"identifier_hash": "e93275d4eba0e5679ad55f5360af00444e2a888df9b0afa3e8b691c3173725f9",
"email": "[email protected]",
"name": "Alice",
"phone_number": "+123456789",
"avatar": "<string>",
"custom_attributes": {}
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
identifier: '1234567890',
identifier_hash: 'e93275d4eba0e5679ad55f5360af00444e2a888df9b0afa3e8b691c3173725f9',
email: '[email protected]',
name: 'Alice',
phone_number: '+123456789',
avatar: '<string>',
custom_attributes: {}
})
};
fetch('https://app.rookoo.ai/public/api/v1/inboxes/{inbox_identifier}/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.rookoo.ai/public/api/v1/inboxes/{inbox_identifier}/contacts"
payload = {
"identifier": "1234567890",
"identifier_hash": "e93275d4eba0e5679ad55f5360af00444e2a888df9b0afa3e8b691c3173725f9",
"email": "[email protected]",
"name": "Alice",
"phone_number": "+123456789",
"avatar": "<string>",
"custom_attributes": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"source_id": "<string>",
"name": "<string>",
"email": "<string>",
"pubsub_token": "<string>"
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Contacts API
Create a contact
Create a contact
POST
/
public
/
api
/
v1
/
inboxes
/
{inbox_identifier}
/
contacts
Create a contact
curl --request POST \
--url https://app.rookoo.ai/public/api/v1/inboxes/{inbox_identifier}/contacts \
--header 'Content-Type: application/json' \
--data '
{
"identifier": "1234567890",
"identifier_hash": "e93275d4eba0e5679ad55f5360af00444e2a888df9b0afa3e8b691c3173725f9",
"email": "[email protected]",
"name": "Alice",
"phone_number": "+123456789",
"avatar": "<string>",
"custom_attributes": {}
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
identifier: '1234567890',
identifier_hash: 'e93275d4eba0e5679ad55f5360af00444e2a888df9b0afa3e8b691c3173725f9',
email: '[email protected]',
name: 'Alice',
phone_number: '+123456789',
avatar: '<string>',
custom_attributes: {}
})
};
fetch('https://app.rookoo.ai/public/api/v1/inboxes/{inbox_identifier}/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.rookoo.ai/public/api/v1/inboxes/{inbox_identifier}/contacts"
payload = {
"identifier": "1234567890",
"identifier_hash": "e93275d4eba0e5679ad55f5360af00444e2a888df9b0afa3e8b691c3173725f9",
"email": "[email protected]",
"name": "Alice",
"phone_number": "+123456789",
"avatar": "<string>",
"custom_attributes": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"source_id": "<string>",
"name": "<string>",
"email": "<string>",
"pubsub_token": "<string>"
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Path Parameters
The identifier obtained from API inbox channel
Body
application/json
External identifier of the contact
Example:
"1234567890"
Identifier hash prepared for HMAC authentication
Example:
"e93275d4eba0e5679ad55f5360af00444e2a888df9b0afa3e8b691c3173725f9"
Email of the contact
Example:
Name of the contact
Example:
"Alice"
Phone number of the contact
Example:
"+123456789"
Send the form data with the avatar image binary or use the avatar_url
Custom attributes of the customer
Example:
{}