Skip to main content
PUT
/
agents
/
browser-use
/
{agentId}
/
tasks
/
{id}
cURL
curl --request PUT \
  --url https://gobii.ai/api/v1/agents/browser-use/{agentId}/tasks/{id}/ \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "agent": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "prompt": "<string>",
  "output_schema": "<unknown>",
  "wait": 675,
  "secrets": {},
  "credits_cost": "<string>",
  "webhook": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "agent": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "prompt": "<string>",
  "output_schema": "<unknown>",
  "status": "pending",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "error_message": "<string>",
  "credits_cost": "<string>",
  "webhook": "<string>",
  "webhook_last_called_at": "2023-11-07T05:31:56Z",
  "webhook_last_status_code": 123,
  "webhook_last_error": "<string>"
}

Authorizations

X-Api-Key
string
header
required

Path Parameters

agentId
string<uuid>
required
id
string<uuid>
required

Body

agent
string<uuid> | null
prompt
string | null
output_schema
any | null

Optional JSON schema to define structured output from the agent

wait
integer

Number of seconds to wait for the task to complete before returning. Defaults to 0 (no wait). Providing a value will run the task synchronously.

Required range: 0 <= x <= 1350
secrets
object

Domain-specific secrets for the task. REQUIRED FORMAT: {'https://example.com': {'x_api_key': 'value', 'x_username': 'user'}}. Each domain can have multiple secrets. Secret keys will be available as placeholders in the prompt for the specified domains.

credits_cost
string<decimal> | null

Number of task credits used during execution.

webhook
string<uri> | null

HTTP or HTTPS URL invoked when the task finishes.

Response

200 - application/json
id
string<uuid>
agent
string<uuid> | null
agent_id
string<uuid>

ID of the browser-use agent to use for this task. If not specified, the task will be created for the authenticated user's agent.

organization_id
string<uuid>

ID of the organization that owns the agent, if any.

prompt
string | null
output_schema
any | null

Optional JSON schema to define structured output from the agent

status
enum<string>
  • pending - Pending
  • in_progress - In Progress
  • completed - Completed
  • failed - Failed
  • cancelled - Cancelled
Available options:
pending,
in_progress,
completed,
failed,
cancelled
created_at
string<date-time>
updated_at
string<date-time>
error_message
string | null
credits_cost
string<decimal> | null

Number of task credits used during execution.

webhook
string<uri> | null

HTTP or HTTPS URL invoked when the task finishes.

webhook_last_called_at
string<date-time>

Timestamp of the last webhook invocation, if any.

webhook_last_status_code
integer | null

HTTP status code of the last webhook invocation, if any.

webhook_last_error
string | null

Error message of the last webhook invocation, if any.