Run Agent
POST
/api/public/ai-chat/agents/{agentId}/runs
const url = 'https://backend.podscribe.ai/api/public/ai-chat/agents/1/runs';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"params":{"additionalProperty":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://backend.podscribe.ai/api/public/ai-chat/agents/1/runs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "params": { "additionalProperty": "example" } }'Starts an asynchronous agent run. Returns immediately with status: processing and a runId that
identifies the run. Poll GET /api/public/ai-chat/agent-runs/{runId}/status until the run is
done or failed.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”agentId
required
integer
ID of an existing AI Chat agent. Copy it from the agent details page in the app.
Request Body
Section titled “Request Body”Media typeapplication/json
object
params
Key-value map of template parameters substituted into the agent prompt
(for example { "advertiser": "Example Advertiser" } for {{advertiser}}).
object
key
additional properties
string
Examplegenerated
{ "params": { "additionalProperty": "example" }}Responses
Section titled “Responses”Agent run accepted
Media typeapplication/json
object
runId
required
Run identifier; use with the agent run status endpoint.
integer
status
required
string
Example
{ "status": "processing"}Invalid request data
Invalid token, insufficient permissions, or agent is not active
Agent not found
Internal server error