Tag or untag contacts
const url = 'https://api.sendwing.app/api/organizations/example/tags/example/contacts';const options = { method: 'POST', headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'}, body: '{"add":["example"],"remove":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.sendwing.app/api/organizations/example/tags/example/contacts \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "add": [ "example" ], "remove": [ "example" ] }'Adds the tag to contacts and removes it from others, by ID, up to 1000 at a time. Adding a tag a contact has, or removing one it doesn’t, changes nothing.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The workspace, like org_…. An OAuth access token works in the one the member picked when connecting, which GET /me returns.
Like tag_…
Request Body
Section titled “Request Body”object
Contacts to tag, by ID
Contacts to untag, by ID
Example generated
{ "add": [ "example" ], "remove": [ "example" ]}Responses
Section titled “Responses”What changed
object
Contacts tagged by this request
Contacts untagged by this request
IDs that aren’t contacts in this workspace
Example generated
{ "added": 1, "removed": 1, "notFound": [ "example" ]}The request isn’t valid; issues lists each problem
object
What went wrong, in words you can show people
For a 400: each invalid field, by its path in the request, like events.0.name
object
For a 5xx: quote it when contacting support
Example generated
{ "error": "example", "issues": [ { "path": "example", "message": "example" } ], "requestId": "example"}The API key or access token is missing, invalid or expired
object
What went wrong, in words you can show people
For a 400: each invalid field, by its path in the request, like events.0.name
object
For a 5xx: quote it when contacting support
Example generated
{ "error": "example", "issues": [ { "path": "example", "message": "example" } ], "requestId": "example"}The API key’s permissions, or the app’s scopes and the member’s role, don’t allow this
object
What went wrong, in words you can show people
For a 400: each invalid field, by its path in the request, like events.0.name
object
For a 5xx: quote it when contacting support
Example generated
{ "error": "example", "issues": [ { "path": "example", "message": "example" } ], "requestId": "example"}Not found in this workspace
object
What went wrong, in words you can show people
For a 400: each invalid field, by its path in the request, like events.0.name
object
For a 5xx: quote it when contacting support
Example generated
{ "error": "example", "issues": [ { "path": "example", "message": "example" } ], "requestId": "example"}Too many requests; wait for the seconds in Retry-After
object
What went wrong, in words you can show people
For a 400: each invalid field, by its path in the request, like events.0.name
object
For a 5xx: quote it when contacting support
Example generated
{ "error": "example", "issues": [ { "path": "example", "message": "example" } ], "requestId": "example"}