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

# Create a workflow

> Creates an automation (draft). The trigger declares what starts it — including { type:"event", config:{ name } } for custom events; the graph is the ordered node list (emails + delays).



## OpenAPI

````yaml /openapi.json post /marketing/workflows
openapi: 3.0.0
info:
  title: JetEmail API
  version: 1.0.0
  description: API documentation for JetEmail's transactional email service.
servers:
  - url: https://api.jetemail.com
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Email
    description: Send transactional email
  - name: Outbound
    description: 'Outbound sending: keys, SMTP users, domains, logs, suppression'
  - name: Inbound
    description: Inbound routing, domains and forward destinations
  - name: Marketing
    description: >-
      Marketing suite: templates, audiences, contacts, broadcasts, themes,
      assets
externalDocs:
  description: Download OpenAPI Specification
  url: /openapi.json
paths:
  /marketing/workflows:
    post:
      tags:
        - Marketing
      summary: Create a workflow
      description: >-
        Creates an automation (draft). The trigger declares what starts it —
        including { type:"event", config:{ name } } for custom events; the graph
        is the ordered node list (emails + delays).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                trigger:
                  type: object
                  description: >-
                    { type, config } — e.g. { type:"event", config:{
                    name:"signup" } }
                graph:
                  type: object
                  description: '{ entry, nodes }'
                reentry:
                  type: string
                  enum:
                    - once
                    - after_complete
                    - always
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  id:
                    type: string
components:
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: API key for account management endpoints. Use your api_ prefixed token.

````