post https://api.dmchamp.com/v1/tags
This endpoint allows you to create a new tag and associate it with a specific contact.
Required Parameters:
- tag: The name of the tag you want to create (sent in the query string).
- apiKey: Your unique API key for authentication.
Optional Parameters (one of the following is required):
- phoneNumber: The phone number of the contact to associate the tag with (sent in the query string). Phone number format should exclude the leading "+" symbol.
- email: The email address of the contact to associate the tag with (sent in the query string).
The endpoint will return an appropriate error response in the following cases:
- Missing Required Parameters: If both phoneNumber and email are missing, or tag is missing, a 400 Bad Request error is returned.
- Invalid API Key: If the provided API key is invalid, a 401 Unauthorized error is returned.
- Contact Not Found: If the specified phone number or email address does not match an existing contact, a 404 Not Found error is returned.
- Other Errors: In case of other errors during tag creation, a generic error message is returned.