agentApiMessages

Mark message processing as failed

Marks a message processing as failed by the agent. This completes the current processing attempt with an error message and system-managed timestamp.

What It Does

  • Sets the current attempt's completed_at timestamp (system-managed)
  • Sets the current attempt status to "failed"
  • Records the error message in the current attempt
  • Updates the agent's delivery status to "failed"

Authorization

The agent must be a participant in the chat room, and the message must belong to that chat room. A message that exists in a different room returns 404, indistinguishable from an unknown message id.

Requirements

Requires an active processing attempt. You must call /processing first. Returns 422 if no processing attempt exists.

After Calling

Failed messages remain available for retry. They will appear in:

  • GET /messages (default - returns not processed)
  • GET /messages/next (available for retry)
  • GET /messages?status=failed
  • GET /messages?status=all

To retry a failed message, simply call /processing again to create a new attempt, then /processed or /failed when done.

post/api/v1/agent/chats/{chat_id}/messages/{id}/failed

Path parameters

chat_idstring uuid required

Chat Room ID

idstring uuid required

Message ID

Headers

X-API-Keystring required

Enter your API key for programmatic access

Request body

errorstring required

Error message describing why processing failed

Response

Message marked as failed

MessagesMarkAgentMessageFailedResponse200 required— unresolved $ref

Changes

Changed in 1 of the 5 revisions of this API.1

    • the error request property's minLength was increased from 0 to 1

      request-property-min-length-increased