Dashboard
Tasks

Create Task

Create Task

POST/v2/tasks

Request Body

agent_idstring · uuidrequired
titlestringoptional
parent_task_idobjectoptional
metadataobjectoptional

Freeform string→string labels stored on the task. Filter the list endpoint with repeated ?metadata=key:value params. Omit or null for none.

initial_messagesarray<object>optional
auto_runbooleanoptional
Request
curl --request POST \
  --url https://api.brainbaselabs.com/v2/tasks \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",
  "title": "",
  "parent_task_id": "0595d3a2-39ad-4ab5-906d-3e39522e8eed",
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "initial_messages": [
    {
      "role": "user",
      "content": null,
      "name": "string",
      "tool_calls": {},
      "tool_call_id": "string",
      "metadata": {}
    }
  ],
  "auto_run": false
}'
Response
json
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",
  "owner_user_id": "65139110-7c3c-4777-b692-80c218be3b9d",
  "parent_task_id": "0595d3a2-39ad-4ab5-906d-3e39522e8eed",
  "title": "string",
  "status": "string",
  "status_info": {},
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "sandbox_id": "string",
  "machine_id": "76ca96f6-a9a8-43bf-917c-a176478a33ba",
  "created_at": "2019-08-24T14:15:22Z"
}