dambel

دمبل

shevron
ورود | ثبت نام

API Docs / ai / threads / messages / create



POST /api/v1/ai/threads/{thread-id}/messages

Creates a new message in a specific AI thread.


Permissions

PermissionDescription
ai_thread_messages.createCreate messages in your own thread

URL Parameters

NameTypeRequiredDescriptionExample
thread-idintYesID of the thread123

Request Body Parameters

NameTypeRequiredDescriptionExample
contentstringYesContent of the message (max 5000 chars)"Hello!"
stateobjectNoOptional state data as JSON{ ... }

Request Example

{
  "content": "Hello!",
  "state": { "form": { "field": "value" } }
}

Response

201 Created

Returns the created message and the AI's response message.

Example

{
  "createdMessage": { /* ai thread message resource */ },
  "responseMessage": { /* ai thread message resource */ }
}

For a full schema, see AI Thread Message Resource.

In responseMessage.updated_state you may find the updated state data you initially sent.


Error Responses

StatusDescriptionReference
422Validation errorValidation error
401UnauthorizedAuthentication error
403Forbidden (no permission)Permission error
429Too many requests (rate limit exceeded)

AI System

The AI system uses OpenAI APIs behind the scenes, it handles reading Dambel documentation files, searching web or reading a specific web page, saving memories for each user and access them in other chats, reading data from Dambel's database, and even reporting the conversation whenever necessary. Once it uses every tool that it has, it returns the final response to the message.

footer wave
logo

دمبل، دنیای هوشمند ورزش و تغذیه

LinkedinInstagramXYoutube