Skip to content

For the complete documentation index, see llms.txt.

Send a task message

POST
/v1/triggers/{trigger_event_id}/messages
curl --request POST \
--url https://api.gopromptless.ai/v1/triggers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "message": "Also document the 429 rate-limit response for this endpoint." }'

Append a message to the conversation of a task submitted through POST /v1/triggers, continuing the reply on that same task. Available for tasks submitted over the API or MCP and for tasks created through MCP request_changes.

trigger_event_id
required
string format: uuid

Identifier of the task, as returned by POST /v1/triggers.

Idempotency-Key
string
<= 255 characters

Optional key of up to 255 characters that makes the message send safe to retry. Reusing the key with the same text returns the original stored message with deduplicated set to true. Reusing it with different text returns 409 idempotency_conflict.

Media typeapplication/json
SendTaskMessageRequest

JSON request body for appending a message to a task’s conversation.

object
message
required
Message

The instruction to add. Non-empty after trimming, up to 20,000 characters.

string
>= 1 characters <= 20000 characters

An idempotent replay of a message stored earlier under the same Idempotency-Key.

Media typeapplication/json
SendTaskMessageResponse

Response body returned when a task message is stored or replayed.

object
message
required
TaskMessage

A single message in a task’s conversation.

object
id
required
Id

Stable, immutable identifier for the message. Deduplicate on it.

string format: uuid
trigger_event_id
required
Trigger Event Id

Identifier of the task this message belongs to.

string format: uuid
sequence
required
Sequence

The message’s order within the task.

integer
author
required
Author

Who wrote the message.

object
type
required
Type
string
Allowed values: promptless customer
name
required
Name

The customer’s email when available, otherwise null.

string | null
created_at
required
Created At

ISO 8601 time the message was created.

string format: date-time
message
required
Message

The message text.

string
deduplicated
required
Deduplicated

True when this response replays a message stored earlier under the same Idempotency-Key instead of storing a new one.

boolean
Example
{
"message": {
"id": "b1e2c3d4-5678-90ab-cdef-1234567890ab",
"trigger_event_id": "550e8400-e29b-41d4-a716-446655440000",
"sequence": 1,
"author": {
"type": "promptless"
}
},
"deduplicated": false
}

Promptless appends the message to the task’s conversation.

Media typeapplication/json
SendTaskMessageResponse

Response body returned when a task message is stored or replayed.

object
message
required
TaskMessage

A single message in a task’s conversation.

object
id
required
Id

Stable, immutable identifier for the message. Deduplicate on it.

string format: uuid
trigger_event_id
required
Trigger Event Id

Identifier of the task this message belongs to.

string format: uuid
sequence
required
Sequence

The message’s order within the task.

integer
author
required
Author

Who wrote the message.

object
type
required
Type
string
Allowed values: promptless customer
name
required
Name

The customer’s email when available, otherwise null.

string | null
created_at
required
Created At

ISO 8601 time the message was created.

string format: date-time
message
required
Message

The message text.

string
deduplicated
required
Deduplicated

True when this response replays a message stored earlier under the same Idempotency-Key instead of storing a new one.

boolean
Example
{
"message": {
"id": "b1e2c3d4-5678-90ab-cdef-1234567890ab",
"trigger_event_id": "550e8400-e29b-41d4-a716-446655440000",
"sequence": 1,
"author": {
"type": "promptless"
}
},
"deduplicated": false
}

The task source does not support messages (unsupported_task_source), or the message is empty or longer than 20,000 characters, or an Idempotency-Key is blank or longer than 255 characters (invalid_message).

Media typeapplication/json
ApiTriggerErrorResponse

Error body returned when an API trigger request is rejected.

object
error
required
Error

Stable machine-readable error code.

string
message
required
Message

Human-readable explanation of the error.

string
Example
{
"error": "authentication_failed",
"message": "Authentication failed."
}

The API key is missing, invalid, or revoked.

Media typeapplication/json
ApiTriggerErrorResponse

Error body returned when an API trigger request is rejected.

object
error
required
Error

Stable machine-readable error code.

string
message
required
Message

Human-readable explanation of the error.

string
Example
{
"error": "authentication_failed",
"message": "Authentication failed."
}

No task with this id exists for the organization (task_not_found).

Media typeapplication/json
ApiTriggerErrorResponse

Error body returned when an API trigger request is rejected.

object
error
required
Error

Stable machine-readable error code.

string
message
required
Message

Human-readable explanation of the error.

string
Example
{
"error": "authentication_failed",
"message": "Authentication failed."
}

The task has finished and stops accepting messages (task_finished), or the caller reused the same Idempotency-Key with different text (idempotency_conflict).

Media typeapplication/json
ApiTriggerErrorResponse

Error body returned when an API trigger request is rejected.

object
error
required
Error

Stable machine-readable error code.

string
message
required
Message

Human-readable explanation of the error.

string
Example
{
"error": "authentication_failed",
"message": "Authentication failed."
}

The trigger_event_id path parameter is not a valid UUID, or the request body is invalid.

Media typeapplication/json
HTTPValidationError

Validation error body returned when the request fails schema validation.

object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}

Task intake or lookup is temporarily unavailable (runtime_store_unavailable).

Media typeapplication/json
ApiTriggerErrorResponse

Error body returned when an API trigger request is rejected.

object
error
required
Error

Stable machine-readable error code.

string
message
required
Message

Human-readable explanation of the error.

string
Example
{
"error": "authentication_failed",
"message": "Authentication failed."
}