Queue an AI agent retrain
POST/v1/brains/:brain_id/train
Marks the AI agent for a full retrain across intents, dialogs, entities, webhooks, insights, and MCP servers. Idempotent: re-queueing an already-pending request is a no-op. Rejected with 422 when the brain has no intents or dialogs to train. Permissions - brains.write. API keys - manage.
Request
Responses
- 200
- 400
- 401
- 404
- 422
- 500
Retrain queued
BadRequest
Response Headers
X-Request-Id
Unique identifier for the API request, useful for debugging and tracking.
Example:
abc123xyz789Unauthorized
Response Headers
X-Request-Id
Unique identifier for the API request, useful for debugging and tracking.
Example:
abc123xyz789The specified resource was not found
Response Headers
X-Request-Id
Unique identifier for the API request, useful for debugging and tracking.
Example:
abc123xyz789Brain has no trainable content
Internal Server Error
Response Headers
X-Request-Id
Unique identifier for the API request, useful for debugging and tracking.
Example:
abc123xyz789