Fetchply Docs
POST
/api/v1/agents/{id}/train

Queues a training job for the chatbot agent. Returns 409 if training is already in progress.

Authorization

bearerAuth
AuthorizationBearer <token>

API key with fp_ prefix. Generate keys in your Fetchply dashboard under Settings > API Keys.

In: header

Path Parameters

id*string

The chatbot agent ID.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://fetchply.com/api/v1/agents/string/train" \  -H "Content-Type: application/json" \  -d '{}'
{
  "success": true,
  "data": {
    "status": "queued"
  }
}
{
  "success": false,
  "error": "Invalid or missing API key"
}
{
  "success": false,
  "error": "Resource not found"
}
{
  "success": false,
  "error": "string"
}
{
  "success": false,
  "error": "Rate limit exceeded"
}