Skip to main content
POST
/
projects
/
{projectId}
/
messages
Send a message to the assistant
curl --request POST \
  --url https://local.withsutro.com/projects/{projectId}/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-sutro-api-client: <api-key>' \
  --data '
{
  "content": [
    {
      "type": "text",
      "text": "<string>"
    }
  ]
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "content": [
    {
      "type": "text",
      "text": "<string>"
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Builder authentication and authorization

x-sutro-api-client
string
header
required

A unique identifier for the API Client making a request

Path Parameters

projectId
string
required

Body

application/json

The user message to send

content
object[]
required

Array of message parts containing the user's message

Response

Assistant message with the response

id
string<uuid>
required

Unique identifier for the message

content
object[]
required

Array of message parts

createdAt
string<date-time>
required

Timestamp when the message was created