curl --request POST \
--url https://web-api.clerk.chat/public/contacts/batch \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--data '
{
"contacts": [
{
"name": "John Doe",
"email": "[email protected]",
"phone": "+1234567890",
"public": false,
"data": {}
}
]
}
'{
"data": [
{
"id": "1",
"teamId": "1",
"createdByUserId": "1",
"name": "John Doe",
"phone": "+1234567890",
"email": "[email protected]",
"externalId": "1234",
"optOut": false,
"avatarURL": "https://example.com/avatar.jpg",
"public": false,
"data": {},
"attributes": [],
"created": "2021-01-01T00:00:00.000Z",
"updated": "2021-01-01T00:00:00.000Z"
}
]
}Create multiple contacts for the active team
curl --request POST \
--url https://web-api.clerk.chat/public/contacts/batch \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--data '
{
"contacts": [
{
"name": "John Doe",
"email": "[email protected]",
"phone": "+1234567890",
"public": false,
"data": {}
}
]
}
'{
"data": [
{
"id": "1",
"teamId": "1",
"createdByUserId": "1",
"name": "John Doe",
"phone": "+1234567890",
"email": "[email protected]",
"externalId": "1234",
"optOut": false,
"avatarURL": "https://example.com/avatar.jpg",
"public": false,
"data": {},
"attributes": [],
"created": "2021-01-01T00:00:00.000Z",
"updated": "2021-01-01T00:00:00.000Z"
}
]
}Show child attributes
The name of the contact
"John Doe"
The email address of the contact
The phone number of the contact
"+1234567890"
Whether the contact is public
false
Additional metadata for the contact
{}The created contacts
Show child attributes
The ID of the contact
"1"
The ID of the team the contact belongs to
"1"
The ID of the user who created the contact
"1"
The name of the contact
"John Doe"
The phone number of the contact
"+1234567890"
The email address of the contact
The external ID of the contact
"1234"
Whether the contact has opted out of messages
false
The URL of the contact avatar
"https://example.com/avatar.jpg"
Whether the contact is public
false
Additional metadata for the contact
{}"2021-01-01T00:00:00.000Z"
"2021-01-01T00:00:00.000Z"