Managing labels

These endpoints update all contacts in perspective from a label and return a summary of the label in question.


Quickstart

curl -X POST "https://api.ip1sms.com/v2/labels/{labelName}/contacts" \
-H "Authorization: Bearer API_NYCKEL" \
-H "Content-Type: application/json" \
-d '[
  "5d8b19f972c0b7514c5b0f"
  "5d8b19f972c0b7515c5b0f"
  "5d8b19f972c0b7516c5b0f"
]'

call

Add a label for multiple contacts

This endpoint allows you to add a label to many contacts at once. It takes a collection of contact IDs

Endpoint: /v2/labels/{labelName}/contacts

Methodology: POST

Call data

Type Description Mandatory Example
Array A list of contact IDs where the label should be added. Yes

[
  "5d8b19f972c0b7514c5b0f"
  "5d8b19f972c0b7515c5b0f"
  "5d8b19f972c0b7516c5b0f"
]
      

Fields for calls

Field name Type Description Mandatory Example
labelName String The name of the label to be added to your contacts. Yes

customers
      

Delete a label

This endpoint allows you to delete a label and can remove it from any contacts that have it. The contacts are otherwise intact.

Endpoint: /v2/labels/{labelName}

Methodology: DELETE

Examples of calls

https://api.ip1sms.com/v2/labels/kunder

Fields for calls

Field name Type Description Example
labelName string The name of the label you want to delete.

customers
      

Response

Examples of responses

{ "labelName": "Coworker", "usageCount": 3 }

Fields for feedback

Field name Type Description Example
labelName String The name of a label associated with your contacts.

customers
      
usageCount Integer How many contacts have the label on them.

3