---
title: "Create a task attempt"
method: POST
path: "/tasks/{taskId}/attempt"
---

# Create a task attempt

`POST /tasks/{taskId}/attempt`

## Request

- Base URL: `https://api.vogent.ai/api`
- URL: `https://api.vogent.ai/api/tasks/{taskId}/attempt`
- Auth: HTTP bearer

Creates a new attempt to complete a task by initiating a dial.

## Path parameters

- `taskId` string, required

## Request body

- CreateTaskAttemptInput
  - `toNumber` string, required: The phone number to dial in E.164 format.
  - `fromNumberId` string, required: The ID of the phone number to use for dialing.
  - `webhookUrl` string, nullable: Optional webhook URL for notifications about the dial.

## Response `200`

Successful operation

- CreateDialOutput
  - `dialToken` string, required: You can pass this dial token to Elto's web UI, or use this token to authorize any requests for this dial. It's safe to pass this token to a client -- it only allows users to run requests against the dial associated with this session.
  - `sessionId` string, required
  - `dialId` string, required

## Other responses

- `400`: Invalid input
- `422`: Validation exception

---

[API](https://skmtc.dev/vogent/apis/vogent-openapi-3-0.md) - [All operations](https://skmtc.dev/vogent/apis/vogent-openapi-3-0/llms.txt) - [OpenAPI document](https://skmtc.dev/vogent/apis/vogent-openapi-3-0/revisions/a5966cc364ef?raw)
