# Create Pathway

Creates a pathway and its initial submission types for the requesting practice group.

Endpoint: POST /v1/care-nav/pathways
Version: 1.0.0
Security: apiKeyAuth, practiceGroupId

## Security:

  - `apiKeyAuth` (unknown)
    apiKey in header x-api-key

  - `practiceGroupId` (unknown)
    apiKey in header x-practice-group-id

## Request fields (application/json):

  - `title` (string, required)

  - `summary` (string)

  - `in_hours` (boolean)

  - `out_of_hours` (boolean)

  - `suspended` (boolean)

  - `order` (integer)

  - `submission_types` (array, required)

  - `submission_types.title` (string, required)

  - `submission_types.description` (string)

  - `submission_types.in_hours` (boolean)

  - `submission_types.out_of_hours` (boolean)

  - `submission_types.suspended` (boolean)

  - `submission_types.form_id` (string)

  - `submission_types.external_url` (string)

  - `submission_types.external_url_name` (string)

  - `submission_types.type` (string)
    Enum: "admin_request", "clinical_request", "other_request"

  - `submission_types.default_priority` (string)
    Enum: "lowest", "low", "medium", "high", "highest"

  - `submission_types.daily_limit` (integer)

  - `submission_types.patient_eligibility_check` (boolean)

  - `submission_types.assignee_id` (string)

  - `submission_types.assignee_type` (string)
    Enum: "Admin", "AdminTeam"

  - `submission_types.order` (integer)

## Response 201:

  - `201` (unknown)
    Created

## Response 201 fields (application/json):

  - `id` (string, required)

  - `title` (string, required)

  - `summary` (string, required)

  - `in_hours` (boolean, required)

  - `out_of_hours` (boolean, required)

  - `suspended` (boolean, required)

  - `order` (number, required)

  - `created_at` (string, required)

  - `updated_at` (string, required)

## Response 400:

  - `400` (unknown)
    Validation error

## Response 400 fields (application/json):

  - `error` (boolean, required)
    Example: true

  - `statusCode` (number, required)
    Example: 400

  - `message` (array, required)

  - `message.code` (string, required)
    Example: invalid_type

  - `message.expected` (string, required)
    Example: string

  - `message.path` (array, required)
    Example: ["patient_id"]

  - `message.message` (string, required)
    Example: Required

## Response 401:

  - `401` (unknown)
    Unauthorised

## Response 422:

  - `422` (unknown)
    Business rule violation

## Response 429:

  - `429` (unknown)
    Too Many Requests

## Response 500:

  - `500` (unknown)
    Unknown error

