POST
/
{resourceSlug}
/
forms
/
task
/
{taskId}
/
edit
curl --request POST \
  --url https://app.agentcloud.dev/{resourceSlug}/forms/task/{taskId}/edit \
  --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

taskId
string
required

objectId of the task to be edited

Body

task.json

JSON body containing the edited task, all edited fields contain their new value and any unedited fields must still be included but with their original value.

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