---
title: "Create Hosted Session to Automate Task"
method: POST
path: "/tasks/{task_id}/automate/sessions"
---

# Create Hosted Session to Automate Task

`POST /tasks/{task_id}/automate/sessions`

Starts the Mosey automation for the task. If the automation  requires input from the user, the response will include a URL that will redirect them to a form to collect it.

## Path parameters

- `task_id` string, required

## Request body

- AutomationSessionRequest
  - `callback_url` string, required

## Response `200`

Successful Response

- AutomationSessionResponse
  - `automation_url` string, required
  - `created_at` string, required
  - `expires_at` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/mosey/apis/mosey-api.md) · [All operations](https://skmtc.net/mosey/apis/mosey-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mosey/mosey-api/versions/2121b0e65643/schema)
