---
title: "Execute task"
description: "Execute a Turnstile, WAF, or WAF Auto solve."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.uncaptcha.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Execute task

<div class="endpoint-line">
  <span class="method method-post">POST</span>
  <code>https://api.uncaptcha.io/v1/task/execute</code>
</div>

Executes one task synchronously. The request remains open until the solver
returns a solution or the 30-second execution limit is reached.

## Headers

| Header | Required | Value |
| --- | --- | --- |
| `X-Api-Key` | Yes | Your uncaptcha.io API key |
| `Content-Type` | Yes | `application/json` |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `task_type` | string | Yes | `turnstile`, `waf`, or `wafauto` |
| `task_data` | object | Yes | Task-specific input described in the task pages |

```json
{
  "task_type": "turnstile",
  "task_data": {
"url": "https://example.com/",
"sitekey": "0x4AAAAAABs37s-ih7Jepz0J",
"proxy": "http://user:pass@203.0.113.10:8080"
  }
}
```

## Success

```json
{
  "success": true,
  "data": {
"solution": {
  "token": "0.AuR5g8kP..."
}
  }
}
```

The contents of `data.solution` depend on `task_type`:

| Task | Primary result |
| --- | --- |
| [`turnstile`](/tasks/turnstile) | `token` |
| [`waf`](/tasks/cloudflare-waf) | `clearance`, `headers`, and first-request data |
| [`wafauto`](/tasks/waf-auto) | Clearance data and the fetched `response` |

## Failure

```json
{
  "success": false,
  "message": "task timed out"
}
```

See [Errors and billing](/getting-started/errors-and-billing) for all expected
statuses and retry guidance.

Source: https://docs.uncaptcha.io/api-reference/execute-task/index.mdx
