---
title: "Create a new phase"
method: POST
path: "/admin/phases"
tags: ["Task Phases"]
---

# Create a new phase

`POST /admin/phases`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/admin/phases`
- Auth: HTTP bearer

Create a new task phase for organizing templates

## Request body

- CreateTaskPhaseRequest
  - `name` string, required: Phase name
  - `slug` string: URL-friendly identifier (auto-generated if not provided)
  - `description` string: Description of the phase
  - `sort_order` integer: Display order (defaults to end)

## Response `201`

Phase created successfully

- object
  - `success` boolean
  - `data` TaskPhase
    - `id` string, uuid: Unique identifier
    - `name` string: Phase name
    - `slug` string: URL-friendly identifier
    - `description` string, nullable: Description of the phase
    - `sort_order` integer: Display order
    - `is_active` boolean: Whether the phase is active
    - `is_archived` boolean: Whether the phase is archived
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `400`: Invalid request body
- `401`: Unauthorized
- `409`: Phase with this slug already exists

---

[API](https://skmtc.dev/withmedley/apis/medley-api.md) - [All operations](https://skmtc.dev/withmedley/apis/medley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/withmedley/apis/medley-api/revisions/40aaac5ca6bd?raw)
