TypeScript
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.contacts.updateContactLabels({
contact_ids: [
'911111111111',
'911111111111',
],
labels: 'lead, priority',
});
console.log(response);
}
main();curl -X PATCH 'https://api.periskope.app/v1/contacts/labels' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"contact_ids": [
"911111111111",
"911111111111"
],
"labels": "lead, priority"
}'Contact APIs
Update Contact Labels
Sets the labels of one or more contacts; label names that do not exist yet are created automatically. Pass null or an empty string as labels to remove every label.
TypeScript
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.contacts.updateContactLabels({
contact_ids: [
'911111111111',
'911111111111',
],
labels: 'lead, priority',
});
console.log(response);
}
main();curl -X PATCH 'https://api.periskope.app/v1/contacts/labels' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"contact_ids": [
"911111111111",
"911111111111"
],
"labels": "lead, priority"
}'Authorizations
Body
application/json
Comma-separated list of labels to put on the contact (e.g. 'lead, priority'). Labels are matched case-insensitively and labels that do not exist yet are created automatically. This replaces all current labels of the contact — pass the full desired list. Pass null or an empty string to remove every label from the contacts.
Example:
"lead, priority"
Response
Labels updated — no content
Was this page helpful?