POST
/
{resourceSlug}
/
forms
/
task
/
add
curl --request POST \
  --url https://app.agentcloud.dev/{resourceSlug}/forms/task/add \
  --header 'Content-Type: task.json' \
  --data '{
  "_id": "<string>",
  "orgId": "<string>",
  "teamId": "<string>",
  "name": "<string>",
  "description": "<string>",
  "agentId": "<string>",
  "expectedOutput": "<string>",
  "toolIds": [
    "<string>"
  ],
  "asyncExecution": true,
  "context": [
    "<string>"
  ],
  "outputJson": {},
  "outputPydantic": {},
  "outputFile": "<string>",
  "icon": {
    "id": {},
    "filename": "<string>"
  },
  "requiresHumanInput": true,
  "displayOnlyFinalOutput": true,
  "hidden": true,
  "formFields": [
    {
      "position": "<string>",
      "type": "string",
      "name": "<string>",
      "label": "<string>",
      "description": "<string>",
      "required": true,
      "options": [
        "<string>"
      ],
      "tooltip": "<string>"
    }
  ],
  "isStructuredOutput": true
}'
{
  "_id": "<string>",
  "redirect": "<string>"
}

Path Parameters

resourceSlug
string
required

The resourceSlug is a url parameter of the teamId associated with the user. Anywhere the resourceSlug is used can be interpreted as a teamId

Body

task.json

Task object to be added with at minimum all required fields, _id must be ommited, this will be generated by the api and returned upon successful completion.

Represents a task within the system, including its configuration, expected output, and optional form fields.

Response

302
dynamicResponse

Successful operation, redirect to '/{resourceSlug}/tasks'.

Server response after successsfully adding a new object