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

# Create a workflow

> Create the template your jobs run under: how candidates are reached, when, and which checks run by default. Only `name` and `schedule` are required. Returns `workflow_id`.

**Scope:** `workflows:write` · **Idempotency-Key:** optional



## OpenAPI

````yaml /blue-collar-api/api-reference/openapi.json post /workflows
openapi: 3.1.0
info:
  title: Record Blue Collar API
  version: 1.0.0
  description: >-
    Run Record candidate verification from your own system. You need two things:
    your **key id** and your **secret**. Everything else is generated. See
    Authentication for how.
servers:
  - url: https://api-bc.userecord.io/api/v1/partner
    description: Blue Collar API
security: []
tags:
  - name: Skills
    description: The skill taxonomy, read live a page at a time
  - name: Skill requests
    description: Ask Record to add a missing skill
  - name: Lookups
    description: >-
      Lookups for filling in a job mandate: places in India, the countries an
      abroad job can be in, and the employment types and shifts the playground
      offers
  - name: Workflows
    description: >-
      Your organisation's blue-collar workflows (read all; change and
      soft-delete only the ones you created)
  - name: Job mandates
    description: >-
      Your organisation's job mandates, addressed by Record's mandate_id (read
      all; change only the ones you created)
  - name: Campaigns
    description: Contact candidates for one of your jobs and verify them. Spends credits
  - name: Results
    description: >-
      What Record collected from each candidate: status (pending, completed,
      declined, failed) and an output of answers and verdicts
  - name: Events
    description: >-
      Pull your result events and acknowledge them: the safety net behind the
      webhook, and a way to receive results without exposing a URL
  - name: Webhooks
    description: >-
      Endpoints that Record POSTs result events to: signed, retried until you
      acknowledge, replayable
  - name: Analytics
    description: >-
      The workflow Overview analytics of the Record playground: funnel,
      channels, follow-ups, calls, drop-offs, languages (read-only, scope
      analytics:read)
paths:
  /workflows:
    post:
      tags:
        - Workflows
      summary: Create a workflow
      description: >-
        Create the template your jobs run under: how candidates are reached,
        when, and which checks run by default. Only `name` and `schedule` are
        required. Returns `workflow_id`.


        **Scope:** `workflows:write` · **Idempotency-Key:** optional
      operationId: createWorkflow
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
            maxLength: 255
          description: >-
            Optional. A retry with the same key returns the first answer (kept
            24 h). Leave empty in Try it: a new one is made for every call.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                external_id:
                  type: string
                  pattern: ^[A-Za-z0-9._:-]{1,128}$
                  description: 'Your own id (1 to 128 of A-Z a-z 0-9 . _ : -)'
                name:
                  type: string
                  minLength: 1
                  maxLength: 200
                  description: Display name, 1–200 characters.
                status:
                  type: string
                  enum:
                    - active
                    - inactive
                    - draft
                  description: archived is reached only through DELETE
                  default: active
                default_methods:
                  type: array
                  items:
                    type: string
                    enum:
                      - data_enrichment
                      - skill_verification
                      - interest_collection
                  minItems: 1
                  maxItems: 3
                  description: Methods a mandate uses when it does not send its own
                  uniqueItems: true
                delivery:
                  type: object
                  properties:
                    whatsapp:
                      type: boolean
                    voice_call:
                      type: boolean
                    sms_backup:
                      type: boolean
                  additionalProperties: false
                  description: Channels used to reach candidates
                schedule:
                  type: object
                  properties:
                    start_time:
                      type: string
                      pattern: ^([01]\d|2[0-3]):[0-5]\d$
                      description: Send window start, HH:MM (24-hour)
                    end_time:
                      type: string
                      pattern: ^([01]\d|2[0-3]):[0-5]\d$
                      description: Send window end, HH:MM (24-hour)
                    days:
                      type: array
                      items:
                        type: string
                        enum:
                          - mon
                          - tue
                          - wed
                          - thu
                          - fri
                          - sat
                          - sun
                      minItems: 1
                      maxItems: 7
                      description: Days messages may go out, each listed once
                      uniqueItems: true
                    timezone:
                      type: string
                      maxLength: 64
                    max_retries:
                      type: integer
                      minimum: 1
                      maximum: 3
                      description: Follow-up calls, 1 to 3
                    retry_after_hours:
                      type: integer
                      enum:
                        - 6
                        - 8
                        - 12
                      description: 'Hours before a retry: 6, 8 or 12'
                  required:
                    - start_time
                    - end_time
                    - days
                    - timezone
                    - max_retries
                    - retry_after_hours
                  additionalProperties: false
                  description: >-
                    Required. Send all six: `start_time` and `end_time`
                    ("HH:MM"), `days` (mon…sun, at least one), `timezone`
                    (IANA), `max_retries` 1 to 3, `retry_after_hours` 6, 8 or
                    12.
              required:
                - name
                - schedule
              additionalProperties: false
            example:
              external_id: wf-warehouse-chennai
              name: Warehouse associates - Chennai
              status: active
              default_methods:
                - data_enrichment
                - skill_verification
              delivery:
                whatsapp: true
                voice_call: true
                sms_backup: false
              schedule:
                start_time: '09:00'
                end_time: '19:00'
                days:
                  - mon
                  - tue
                  - wed
                  - thu
                  - fri
                  - sat
                timezone: Asia/Kolkata
                max_retries: 3
                retry_after_hours: 6
      responses:
        '201':
          description: The new workflow
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                    type: boolean
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      workflow_id:
                        type: string
                      external_id:
                        anyOf:
                          - type: string
                          - type: 'null'
                      name:
                        type: string
                      collar:
                        const: blue
                        type: string
                      status:
                        type: string
                        enum:
                          - active
                          - inactive
                          - draft
                          - archived
                      default_methods:
                        type: array
                        items:
                          type: string
                          enum:
                            - data_enrichment
                            - skill_verification
                            - interest_collection
                      verification_methods:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - scenario-questions
                                - ai-phone-call
                              description: >-
                                scenario-questions = the scenario question
                                round; ai-phone-call = the AI phone call
                            enabled:
                              type: boolean
                        description: >-
                          Read-only: Record switches both methods on for every
                          workflow, so you do not send it. Empty only on a
                          workflow created before this field was stored.
                      delivery:
                        type: object
                        properties:
                          whatsapp:
                            type: boolean
                          voice_call:
                            type: boolean
                          sms_backup:
                            type: boolean
                      schedule:
                        type: object
                        properties:
                          start_time:
                            type: string
                          end_time:
                            type: string
                          days:
                            type: array
                            items:
                              type: string
                          timezone:
                            type: string
                          max_retries:
                            type: integer
                          retry_after_hours:
                            type: integer
                      is_external:
                        type: boolean
                        description: >-
                          true when the workflow was created through the Partner
                          API, false when it was made in the Record playground
                      created_at:
                        type: string
                      updated_at:
                        type: string
              example:
                success: true
                data:
                  workflow_id: WF_BG_261009101530123K7M2P9Q4X7R5T8
                  external_id: wf-warehouse-chennai
                  name: Warehouse associates - Chennai
                  collar: blue
                  status: active
                  default_methods:
                    - data_enrichment
                    - skill_verification
                  verification_methods:
                    - type: scenario-questions
                      enabled: true
                    - type: ai-phone-call
                      enabled: true
                  delivery:
                    whatsapp: true
                    voice_call: true
                    sms_backup: false
                  schedule:
                    start_time: '09:00'
                    end_time: '19:00'
                    days:
                      - mon
                      - tue
                      - wed
                      - thu
                      - fri
                      - sat
                    timezone: Asia/Kolkata
                    max_retries: 3
                    retry_after_hours: 6
                  is_external: true
                  created_at: '2026-10-09T10:15:30.123Z'
                  updated_at: '2026-10-09T10:15:30.123Z'
        '400':
          description: >-
            `VALIDATION_FAILED`: `name` or `schedule` missing, a `schedule` key
            missing, empty or repeated `days`, time not HH:MM, or an unknown
            field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: '`CONFLICT`: `external_id` is already used by another workflow.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKey: []
          SecretKey: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            pcall POST "/api/v1/partner/workflows" '{
              "external_id": "wf-warehouse-chennai",
              "name": "Warehouse associates - Chennai",
              "status": "active",
              "default_methods": [
                "data_enrichment",
                "skill_verification"
              ],
              "delivery": {
                "whatsapp": true,
                "voice_call": true,
                "sms_backup": false
              },
              "schedule": {
                "start_time": "09:00",
                "end_time": "19:00",
                "days": [
                  "mon",
                  "tue",
                  "wed",
                  "thu",
                  "fri",
                  "sat"
                ],
                "timezone": "Asia/Kolkata",
                "max_retries": 3,
                "retry_after_hours": 6
              }
            }'
        - lang: javascript
          label: JavaScript
          source: |-
            const res = await call("POST", "/api/v1/partner/workflows", {
              "external_id": "wf-warehouse-chennai",
              "name": "Warehouse associates - Chennai",
              "status": "active",
              "default_methods": [
                "data_enrichment",
                "skill_verification"
              ],
              "delivery": {
                "whatsapp": true,
                "voice_call": true,
                "sms_backup": false
              },
              "schedule": {
                "start_time": "09:00",
                "end_time": "19:00",
                "days": [
                  "mon",
                  "tue",
                  "wed",
                  "thu",
                  "fri",
                  "sat"
                ],
                "timezone": "Asia/Kolkata",
                "max_retries": 3,
                "retry_after_hours": 6
              }
            });
            const { data } = await res.json();
        - lang: python
          label: Python
          source: |-
            res = call("POST", "/api/v1/partner/workflows", {
                "external_id": "wf-warehouse-chennai",
                "name": "Warehouse associates - Chennai",
                "status": "active",
                "default_methods": [
                    "data_enrichment",
                    "skill_verification"
                ],
                "delivery": {
                    "whatsapp": True,
                    "voice_call": True,
                    "sms_backup": False
                },
                "schedule": {
                    "start_time": "09:00",
                    "end_time": "19:00",
                    "days": [
                        "mon",
                        "tue",
                        "wed",
                        "thu",
                        "fri",
                        "sat"
                    ],
                    "timezone": "Asia/Kolkata",
                    "max_retries": 3,
                    "retry_after_hours": 6
                }
            })
            data = res.json()["data"]
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          const: false
          type: boolean
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - VALIDATION_FAILED
                - LIMIT_EXCEEDED
                - UNAUTHORIZED
                - SCOPE_MISSING
                - FORBIDDEN
                - HTTPS_REQUIRED
                - NOT_FOUND
                - CONFLICT
                - WORKFLOW_IN_USE
                - INSUFFICIENT_CREDITS
                - IDEMPOTENCY_KEY_REQUIRED
                - IDEMPOTENCY_KEY_REUSED
                - IDEMPOTENCY_IN_PROGRESS
                - PAYLOAD_TOO_LARGE
                - UNSUPPORTED_MEDIA_TYPE
                - RATE_LIMITED
                - COOLDOWN
                - DAILY_CAP
                - SERVICE_DISABLED
                - SERVER_ERROR
            message:
              type: string
            details:
              type: array
              items:
                type: object
                properties:
                  path:
                    type: string
                  message:
                    type: string
            request_id:
              type: string
              description: Quote it to Record support
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your key id, `VFN_TEST_…` or `VFN_LIVE_…`. Sent on every request.
    SecretKey:
      type: apiKey
      in: header
      name: x-secret-key
      description: >-
        Your secret, `VFN_SK_…`. **Not a real header, and never sent to the
        API.** It is only a form field for Try it, which uses it to sign your
        request in your browser. In your own code you sign each request with the
        secret and send `x-api-key`, `x-timestamp` and `x-signature` (see
        Authentication).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.