Contact tags
Add a tag to a contact
Attach an existing reusable contact tag to one Instagram contact by ID and return the complete current tag set on that contact as confirmation.
PUT
/
api
/
v1
/
contacts
/
{contactId}
/
tags
/
{tagId}
Add a tag to a contact
curl --request PUT \
--url https://levios.app/api/v1/contacts/{contactId}/tags/{tagId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://levios.app/api/v1/contacts/{contactId}/tags/{tagId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://levios.app/api/v1/contacts/{contactId}/tags/{tagId}"
payload = { "account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"error": {
"code": "api_invalid_content_length",
"message": "Invalid Content-Length.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_unauthorized",
"message": "Authentication required.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_account_not_granted",
"message": "This credential is not authorized for the request.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_contact_tag_not_found",
"message": "The requested contact tag was not found.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_contact_tag_limit_reached",
"message": "The contact tag limit has been reached.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_body_too_large",
"message": "The JSON request body exceeds 1 MiB.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_unsupported_media_type",
"message": "Content-Type must be application/json.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_validation_error",
"message": "The request does not match the declared schema.",
"correlation_id": "<string>",
"details": {
"issues": [
{
"code": "<string>",
"path": [
1
]
}
]
}
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_contact_tag_response_unavailable",
"message": "The contact tag changed, but its response could not be verified. Do not retry automatically.",
"correlation_id": "<string>",
"details": {
"committed": true,
"retryable": false
}
}
}{
"error": {
"code": "api_account_resolution_unavailable",
"message": "The reachable account set could not be read.",
"correlation_id": "<string>"
}
}Add
The response contains
tagId to the contact identified by contactId. Both UUIDs must belong to
the selected Instagram account.
Your API key needs the contacts:write scope. Send account_id as the only
request-body field.
curl --request PUT \
--url "https://levios.app/api/v1/contacts/${LEVIOS_CONTACT_ID}/tags/${LEVIOS_TAG_ID}" \
--header "Authorization: Bearer ${LEVIOS_API_KEY}" \
--header 'Content-Type: application/json' \
--data @- <<JSON
{
"account_id": "${LEVIOS_ACCOUNT_ID}"
}
JSON
contact_id and the contact’s complete current tags
array. Each tag contains id and name.
Adding a tag that is already assigned does not create a duplicate. The
operation is idempotent. A contact can have up to 100 assigned tags.
If the API returns
api_contact_tag_response_unavailable with
committed: true and retryable: false, the assignment changed but the
response could not be verified. Do not retry automatically. Read the contact
to check its current tags.Add a tag to a contact
curl --request PUT \
--url https://levios.app/api/v1/contacts/{contactId}/tags/{tagId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://levios.app/api/v1/contacts/{contactId}/tags/{tagId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://levios.app/api/v1/contacts/{contactId}/tags/{tagId}"
payload = { "account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"error": {
"code": "api_invalid_content_length",
"message": "Invalid Content-Length.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_unauthorized",
"message": "Authentication required.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_account_not_granted",
"message": "This credential is not authorized for the request.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_contact_tag_not_found",
"message": "The requested contact tag was not found.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_contact_tag_limit_reached",
"message": "The contact tag limit has been reached.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_body_too_large",
"message": "The JSON request body exceeds 1 MiB.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_unsupported_media_type",
"message": "Content-Type must be application/json.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_validation_error",
"message": "The request does not match the declared schema.",
"correlation_id": "<string>",
"details": {
"issues": [
{
"code": "<string>",
"path": [
1
]
}
]
}
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded.",
"correlation_id": "<string>"
}
}{
"error": {
"code": "api_contact_tag_response_unavailable",
"message": "The contact tag changed, but its response could not be verified. Do not retry automatically.",
"correlation_id": "<string>",
"details": {
"committed": true,
"retryable": false
}
}
}{
"error": {
"code": "api_account_resolution_unavailable",
"message": "The reachable account set could not be read.",
"correlation_id": "<string>"
}
}
