Skip to main content
POST
/
v1
/
assistants
/
{identifier}
/
messages
Process a message with an assistant specialization
curl --request POST \
  --url https://api.devic.ai/v1/assistants/{identifier}/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "messages": [
    {
      "role": "user",
      "content": "<string>",
      "timestamp": "2023-11-07T05:31:56Z"
    }
  ],
  "chatUid": "<string>",
  "metadata": {}
}
'
{
  "chatUid": "<string>",
  "assistantIdentifier": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "messages": [
    {
      "role": "user",
      "content": "<string>",
      "timestamp": "2023-11-07T05:31:56Z"
    }
  ],
  "metadata": {}
}

Authorizations

Authorization
string
header
required

Use JWT token for authentication

Path Parameters

identifier
string
required

Identifier of the assistant specialization to use

Body

application/json

Messages and optional chat context for the assistant

messages
object[]
required

Messages to process, usually including the latest user message

chatUid
string

Optional chat UID to continue an existing conversation

metadata
object

Custom metadata for this interaction

Response

Assistant response and updated chat context

chatUid
string
required

Unique identifier for the chat session

assistantIdentifier
string
required

Identifier for the assistant specialization used

createdAt
string<date-time>
required

Timestamp when the chat was created

messages
object[]
required

Messages exchanged in the chat

metadata
object

Custom metadata associated with the chat