---
title: "Create phase"
---

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

Path: Sureshake API › execution

`POST /v2/execution/cycles/{cycleId}/phases`

## Path parameters

- `cycleId` (`execution-create-phase.path.cycleId`; string, required)
  - format `uuid`

## Request body

_Required._

- `name` (`execution-create-phase.name`; string, required)
  - minLength 1; maxLength 120
- `sequence` (`execution-create-phase.sequence`; integer, required)
  - min 1; max 1000
- `startDate` (`execution-create-phase.startDate`; string, required)
  - format `date-time`
- `endDate` (`execution-create-phase.endDate`; string, required)
  - format `date-time`
- `purpose` (`execution-create-phase.purpose`; string, optional)
  - minLength 1; maxLength 2000

## Example request

```json
{
  "name": "string",
  "purpose": "string",
  "sequence": 1,
  "startDate": "2019-08-24T14:15:22Z",
  "endDate": "2019-08-24T14:15:22Z"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sureshake.com/v2/execution/cycles/<cycleId>/phases' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "string",
  "purpose": "string",
  "sequence": 1,
  "startDate": "2019-08-24T14:15:22Z",
  "endDate": "2019-08-24T14:15:22Z"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/execution/cycles/<cycleId>/phases';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    name: 'string',
    purpose: 'string',
    sequence: 1,
    startDate: '2019-08-24T14:15:22Z',
    endDate: '2019-08-24T14:15:22Z'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sureshake.com/v2/execution/cycles/<cycleId>/phases"

payload = {
    "name": "string",
    "purpose": "string",
    "sequence": 1,
    "startDate": "2019-08-24T14:15:22Z",
    "endDate": "2019-08-24T14:15:22Z"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 201

Default Response

#### Example

```json
{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "entityId": "156e622c-6cdf-4c27-9bc9-2f2db69919f5",
    "cycleId": "811bdbf8-a42f-4f8c-b62e-39c77332ffe1",
    "name": "string",
    "purpose": "string",
    "sequence": 1,
    "startDate": "2019-08-24T14:15:22Z",
    "endDate": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  },
  "meta": {
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
```

- `data` (`execution-create-phase.response.201.data`; object, required)
  - `id` (`execution-create-phase.response.201.data.id`; string, required)
    - format `uuid`
  - `entityId` (`execution-create-phase.response.201.data.entityId`; string, required)
    - format `uuid`
  - `cycleId` (`execution-create-phase.response.201.data.cycleId`; string, required)
    - format `uuid`
  - `name` (`execution-create-phase.response.201.data.name`; string, required)
    - minLength 1; maxLength 120
  - `purpose` (`execution-create-phase.response.201.data.purpose`; string, required, nullable)
    - minLength 1; maxLength 2000
  - `sequence` (`execution-create-phase.response.201.data.sequence`; integer, required)
    - min 1; max 1000
  - `startDate` (`execution-create-phase.response.201.data.startDate`; string, required)
    - format `date-time`
  - `endDate` (`execution-create-phase.response.201.data.endDate`; string, required)
    - format `date-time`
  - `createdBy` (`execution-create-phase.response.201.data.createdBy`; string, required)
    - minLength 1
  - `createdAt` (`execution-create-phase.response.201.data.createdAt`; string, required)
    - format `date-time`
  - `updatedAt` (`execution-create-phase.response.201.data.updatedAt`; string, required)
    - format `date-time`
- `meta` (`execution-create-phase.response.201.meta`; object, optional)
  - `timestamp` (`execution-create-phase.response.201.meta.timestamp`; string, required)
    - format `date-time`

### 400

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`execution-create-phase.response.400.error`; object, required)
  - `code` (`execution-create-phase.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`execution-create-phase.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`execution-create-phase.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`execution-create-phase.response.400.error.traceId`; string, optional) — Unique ID for log correlation

### 401

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`execution-create-phase.response.401.error`; object, required)
  - `code` (`execution-create-phase.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`execution-create-phase.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`execution-create-phase.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`execution-create-phase.response.401.error.traceId`; string, optional) — Unique ID for log correlation

### 403

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`execution-create-phase.response.403.error`; object, required)
  - `code` (`execution-create-phase.response.403.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`execution-create-phase.response.403.error.message`; string, required) — Human-readable error message
  - `details` (`execution-create-phase.response.403.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`execution-create-phase.response.403.error.traceId`; string, optional) — Unique ID for log correlation

### 404

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`execution-create-phase.response.404.error`; object, required)
  - `code` (`execution-create-phase.response.404.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`execution-create-phase.response.404.error.message`; string, required) — Human-readable error message
  - `details` (`execution-create-phase.response.404.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`execution-create-phase.response.404.error.traceId`; string, optional) — Unique ID for log correlation

### 409

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`execution-create-phase.response.409.error`; object, required)
  - `code` (`execution-create-phase.response.409.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`execution-create-phase.response.409.error.message`; string, required) — Human-readable error message
  - `details` (`execution-create-phase.response.409.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`execution-create-phase.response.409.error.traceId`; string, optional) — Unique ID for log correlation

### 422

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`execution-create-phase.response.422.error`; object, required)
  - `code` (`execution-create-phase.response.422.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`execution-create-phase.response.422.error.message`; string, required) — Human-readable error message
  - `details` (`execution-create-phase.response.422.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`execution-create-phase.response.422.error.traceId`; string, optional) — Unique ID for log correlation

### 429

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`execution-create-phase.response.429.error`; object, required)
  - `code` (`execution-create-phase.response.429.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`execution-create-phase.response.429.error.message`; string, required) — Human-readable error message
  - `details` (`execution-create-phase.response.429.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`execution-create-phase.response.429.error.traceId`; string, optional) — Unique ID for log correlation

### 500

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`execution-create-phase.response.500.error`; object, required)
  - `code` (`execution-create-phase.response.500.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`execution-create-phase.response.500.error.message`; string, required) — Human-readable error message
  - `details` (`execution-create-phase.response.500.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`execution-create-phase.response.500.error.traceId`; string, optional) — Unique ID for log correlation

### 502

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`execution-create-phase.response.502.error`; object, required)
  - `code` (`execution-create-phase.response.502.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`execution-create-phase.response.502.error.message`; string, required) — Human-readable error message
  - `details` (`execution-create-phase.response.502.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`execution-create-phase.response.502.error.traceId`; string, optional) — Unique ID for log correlation

### 503

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`execution-create-phase.response.503.error`; object, required)
  - `code` (`execution-create-phase.response.503.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`execution-create-phase.response.503.error.message`; string, required) — Human-readable error message
  - `details` (`execution-create-phase.response.503.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`execution-create-phase.response.503.error.traceId`; string, optional) — Unique ID for log correlation


Source: https://docs.sureshake.com/reference/execution-create-phase/index.md
