ورود | ثبت نام
  • FA
  • EN

API Docs

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

Approves or denies a pending AI tool action on a message that paused with status: "pending_confirmation" during an interactive run.


Permissions

PermissionDescription
ai_thread_messages.createResolve confirmations in your own thread

URL Parameters

NameTypeRequiredDescriptionExample
thread-idintYesID of the thread123
message-idintYesID of the paused assistant message456

Request Body Parameters

NameTypeRequiredDescriptionExample
approvedbooleanYestrue executes the pending tool call; false skips it (the AI is told the user declined)true

Request Example

{
  "approved": true
}

Response

201 Created

Returns the run's next state. responseMessage is either the final assistant message (status: "completed") or the same message paused again on another confirmation-required tool call (status: "pending_confirmation").

Example

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

For a full schema, see AI Thread Message Resource.


Error Responses

StatusDescriptionReference
422Validation error, or the message has no pending action to confirmValidation error
401UnauthorizedAuthentication error
403Forbidden (no permission)Permission error
404Thread or message not found, or message not in threadNot found error
Dambel

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

LinkedinInstagramXYoutubeTelegramGitHub