---
title: "Create a Flow draft"
method: POST
path: "/experimental/flow/drafts"
tags: ["Drafts"]
---

# Create a Flow draft

`POST /experimental/flow/drafts`

## Request

- Base URL: `https://scrive.com`
- URL: `https://scrive.com/experimental/flow/drafts`
- Auth: one of:
  - HTTP oauth1
  - OAuth 2
    - Authorization code: `/oauth2/auth`
    - Token URL: `/oauth2/token` scopes: `full`
  - API key in cookie `sessionId` and API key in header `X-Scrive-XToken`
- TypeScript: <https://skmtc.dev/scrive/apis/scrive-flow-api/docs/experimental/flow/drafts/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new Flow draft. Drafts are instances that can be freely modified until started.

You can provide partial information for the draft when creating it and add the rest later before finally starting it.

The `process` DSL or `process_parameters` are not validated when creating the draft.

## Request body

- CreateDraft
  - `title` string
  - `process` FlowDSL: Description of the signing process in Flow DSL. Most of the strings encountered in this object are interpreted as abstract variables, to be set when a Flow instance is created. Thus one can reuse this template for multiple concrete processes with their own sets of concrete users, documents, and messages. A Flow Process is composed of stages. Every _regular_ stage consists of actions taken immediately and conditions that need to be satisfied to move to the next stage. The last stage in the `stages` list may be defined as a _confirmation_ stage. A confirmation stage is a special case that consists of a notification action with its `kind` field set to "confirmation" and an empty set of `expect` conditions. If missing, the old per-document notifications will be sent out. This behaviour will change, from sending per-document confirmation notifications by default, to sending unified flow confirmation notifications, in the future.
    - `stages` FlowDSLStage[], required
      - union
        - FlowDSLStageRegular: Stage of a Flow process. It consists of actions taken immediately and conditions that need to be satisfied to move to the next stage.
        - FlowDSLStageConfirmation: A Confirmation stage is a special case that consists of a notification action with its `kind` field set to "confirmation" and empty set of `expect` conditions. This stage must be at the end of `stages` list. If missing, the old per-document notifications will be sent out. This behaviour will change, from sending per-document confirmation notifications by default, to sending unified flow confirmation notifications, in the future.
    - `dsl-version` string, required: Process version
    - `allow-rejections` boolean: Allow participants to reject the instance
    - `automatic-reminders` AutomaticReminder[]
      - `user-name` string, required: The placeholder name for a participant in a process.
      - `date` union, required: Specifies when the reminder should be sent.
        - object
          - `type` 'absolute', required: The reminder time is a specific UTC date and time.
          - `date_time` string, yyyy-mm-ddThh:MM:ssZ, required: The UTC date and time for the reminder.
        - object
          - `type` 'relative', required: The reminder is sent after a specific number of days of inactivity.
          - `days_delay` integer, required: Number of days before a reminder is sent.
          - `time` ReminderRelativeTime: Time of day in a specific time zone.
            - `time_of_day` string, hh:MM:ss, required: Time of day when the reminder will be sent.
            - `time_zone` string, required: The [IANA time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) TZ identifier. For example: `Europe/Stockholm`, or `Etc/UTC`
          - `repeat` 'never' | 'periodically': Whether the reminder repeats. With `periodically`, a new reminder is scheduled every time one is sent, using the same `days_delay` and `time`, for as long as the participant still has pending actions and the instance is running. Omitting the field is equivalent to `never`, in which case a single reminder is sent.
      - `method` 'email' | 'sms' | 'email-and-sms', required: Notification method
  - `process_parameters` ProcessParameters: This object specifies concrete values for the abstract process parameters.
    - `documents` object, required
    - `users` object, required
    - `messages` object, required
  - `callback` Callback: Callback object containing callback URL and optional authentication data.
    - `url` string, required: An absolute https or http URL for callback purposes.
    - `auth` union: Authentication method for the callback.
      - object: Basic callback authentication
        - `type` 'basic', required
        - `user` string, required
        - `password` string, required
      - object
        - `type` 'none', required
    - `version` 'v1', required: The Flow callback version that you would like to use.
  - `folder_id` string: Unique Scrive Folder ID.
  - `duration` object: How long before an in-progress instance times out. It cannot exceed 365 days in total.
    - `days` integer
    - `hours` integer
    - `minutes` integer

## Response `201`

- GetDraft
  - `id` string, uuid, required: Unique identifier of the draft.
  - `title` string
  - `process` FlowDSL: Description of the signing process in Flow DSL. Most of the strings encountered in this object are interpreted as abstract variables, to be set when a Flow instance is created. Thus one can reuse this template for multiple concrete processes with their own sets of concrete users, documents, and messages. A Flow Process is composed of stages. Every _regular_ stage consists of actions taken immediately and conditions that need to be satisfied to move to the next stage. The last stage in the `stages` list may be defined as a _confirmation_ stage. A confirmation stage is a special case that consists of a notification action with its `kind` field set to "confirmation" and an empty set of `expect` conditions. If missing, the old per-document notifications will be sent out. This behaviour will change, from sending per-document confirmation notifications by default, to sending unified flow confirmation notifications, in the future.
    - `stages` FlowDSLStage[], required
      - union
        - FlowDSLStageRegular: Stage of a Flow process. It consists of actions taken immediately and conditions that need to be satisfied to move to the next stage.
        - FlowDSLStageConfirmation: A Confirmation stage is a special case that consists of a notification action with its `kind` field set to "confirmation" and empty set of `expect` conditions. This stage must be at the end of `stages` list. If missing, the old per-document notifications will be sent out. This behaviour will change, from sending per-document confirmation notifications by default, to sending unified flow confirmation notifications, in the future.
    - `dsl-version` string, required: Process version
    - `allow-rejections` boolean: Allow participants to reject the instance
    - `automatic-reminders` AutomaticReminder[]
      - `user-name` string, required: The placeholder name for a participant in a process.
      - `date` union, required: Specifies when the reminder should be sent.
        - object
          - `type` 'absolute', required: The reminder time is a specific UTC date and time.
          - `date_time` string, yyyy-mm-ddThh:MM:ssZ, required: The UTC date and time for the reminder.
        - object
          - `type` 'relative', required: The reminder is sent after a specific number of days of inactivity.
          - `days_delay` integer, required: Number of days before a reminder is sent.
          - `time` ReminderRelativeTime: Time of day in a specific time zone.
            - `time_of_day` string, hh:MM:ss, required: Time of day when the reminder will be sent.
            - `time_zone` string, required: The [IANA time zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) TZ identifier. For example: `Europe/Stockholm`, or `Etc/UTC`
          - `repeat` 'never' | 'periodically': Whether the reminder repeats. With `periodically`, a new reminder is scheduled every time one is sent, using the same `days_delay` and `time`, for as long as the participant still has pending actions and the instance is running. Omitting the field is equivalent to `never`, in which case a single reminder is sent.
      - `method` 'email' | 'sms' | 'email-and-sms', required: Notification method
  - `process_parameters` ProcessParameters: This object specifies concrete values for the abstract process parameters.
    - `documents` object, required
    - `users` object, required
    - `messages` object, required
  - `callback` GetCallback: Callback object containing callback URL and the authentication type.
    - `url` string, required: An absolute https or http URL for callback purposes.
    - `auth_type` 'none' | 'basic', required
    - `version` 'v1', required: The Flow callback version that you would like to use.
  - `created` string, yyyy-mm-ddThh:MM:ssZ, required
  - `author_id` string, required: Unique Scrive User ID.
  - `folder_id` string, required: Unique Scrive Folder ID.
  - `duration` object: How long before an in-progress instance times out. It cannot exceed 365 days in total.
    - `days` integer
    - `hours` integer
    - `minutes` integer

## Other responses

- `400`: Invalid `body`

---

[API](https://skmtc.dev/scrive/apis/scrive-flow-api.md) - [All operations](https://skmtc.dev/scrive/apis/scrive-flow-api/llms.txt) - [OpenAPI document](https://skmtc.dev/scrive/apis/scrive-flow-api/revisions/f9b2836863f2?raw)
