This endpoint creates a new annotation or updates an existing one for a message. It supports:
Creating annotations for agent messages
Updating existing annotations (upsert by messageId)
Associating tags with annotations
Public agent access (no authentication required for public agents)
Automatic organization and agent resolution from message
Authentication is optional for public agents. If the message belongs to a public agent, you can create annotations without authentication. Otherwise, authentication is required.
Only agent messages can be annotated. Attempting to annotate a user or contact message will result in a 400 error.
Comment is empty or whitespace-only, or attempting to annotate a non-agent message.
401
UNAUTHORIZED
Missing or invalid authentication session, and the message does not belong to a public agent, or the message’s organization does not match your session.
404
NOT_FOUND
Message with the specified ID does not exist.
400
INVALID_REQUEST
Message does not have an associated agent ID.
Copy
curl --location --request POST 'https://dashboard.laburen.com/api/annotations' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer <API_KEY>' \--data-raw '{ "messageId": "clxxxxxxxxxxxxxxxxx", "sentiment": "bad", "comment": "The agent provided incorrect information about pricing", "tagIds": ["clxxxxxxxxxxxxxxxxx"]}'