Tasks
Create task.
Changed onCreates a Plan & Act task and submits its first prompt in one call. Returns 202 Accepted. Sessions can run for minutes or longer, so callers must poll GET /projects/{projectId}/tasks/{taskId} for progress events rather than holding a connection open.
Requires the agent to have use_planner_mode enabled and the team to be on a plan that supports Plan & Act tasks (otherwise 402).
post/api/v1/projects/{projectId}/tasks
Request
- Base URLhttps://app.customgpt.ai
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
projectIdinteger required
Example:1
The unique identifier of the agent.
Request body multipart/form-data
Example request
{
"name": "Document analysis",
"prompt": "Analyse the attached document and summarise the key risks.",
"tools": [
{
"function": {
"name": "track_order",
"description": "Look up the current status of an order by its ID."
}
}
],
"custom_persona": "You are a custom AI Agent called *agent name*, a friendly *agent role* who works for *organization* and answers questions based on the given context. Be as helpful as possible. Always prioritize the customer. Escalate complex issues. Stay on topic. Use appropriate language, Acknowledge limitations.",
"sub_personas": {
"persona-summary": "Use a concise analyst tone.",
"task-planner": "Extract risks first, then summarize."
},
"chatbot_model": "gpt-4-1",
"response_source": "default",
"custom_context": "User details: Name: John Doe, Role: Software Developer, Organization: CustomGPT.ai",
"child_project_id": 123,
"file": "file.pdf",
"files[]": [
"file.pdf"
],
"agent_capability": "optimal-choice",
"labels[]": [
"27",
"billing"
],
"action_overrides": {
"enabled": [
"file_upload"
],
"disabled": [
"lead_capture"
]
}
}Response
Task created and submitted successfully. Poll GET /tasks/{taskId} for progress.
Example response
{
"status": "success",
"data": {
"id": "f1b9aaf0-5e4e-11eb-ae93-0242ac130002",
"project_id": 1,
"name": "Analyse this document",
"created_at": "Monday, 01-Jan-24 12:00:00 UTC",
"updated_at": "Monday, 01-Jan-24 12:00:00 UTC"
}
}Changes
- info
endpoint added
- info