---
title: "Create a workflow"
method: POST
path: "/appointments/workflows"
tags: ["Appointments"]
---

# Create a workflow

`POST /appointments/workflows`

## Request

- Base URL: `https://be.graph8.com/api/v1`
- URL: `https://be.graph8.com/api/v1/appointments/workflows`
- Auth: HTTP bearer

Create a new workflow. Steps define the actions to take; event_type_ids
attaches the workflow to specific event types (omit or set ``is_active_on_all``
to apply org-wide). ``trigger`` must be one of: new_booking, before_event,
after_event, booking_cancelled, booking_rescheduled. Time-based triggers
(before_event / after_event) require ``time`` and ``time_unit``.

## Headers

- `Authorization` string, nullable
- `X-Target-Org-Id` string, nullable

## Request body

- CreateWorkflowRequest
  - `name` string, required
  - `trigger` 'new_booking' | 'before_event' | 'after_event' | 'booking_cancelled' | 'booking_rescheduled', required
  - `time` integer, nullable
  - `time_unit` 'minutes' | 'hours' | 'days', nullable
  - `is_active_on_all` boolean
  - `event_type_ids` integer[], nullable
  - `steps` WorkflowStepInput[], required
    - `action` 'email_host' | 'email_attendee' | 'email_address', required
    - `template` 'reminder' | 'custom' | 'cancelled' | 'rescheduled' | 'completed' | 'rating'
    - `email_subject` string, nullable
    - `reminder_body` string, nullable
    - `send_to` string, email, nullable
    - `sender` string, nullable
    - `include_calendar_event` boolean

## Response `201`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/graph8/apis/graph8-developer-api.md) · [All operations](https://skmtc.dev/graph8/apis/graph8-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/graph8/apis/graph8-developer-api/revisions/2e7cfa0ca921?raw)
