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

# Run a workflow once

> Starts one run, the same as **Run once** in the builder. For a scheduled workflow each call adds a new results row; otherwise the run reuses the first row of the results table. Returns at once with a `runId`, or waits up to 30 seconds when `waitForResult` is true. Needs edit access and enough credits.




## OpenAPI

````yaml /openapi/automations.yaml post /workflows/{workflowId}/run
openapi: 3.1.0
info:
  title: Connie Automations API
  version: 1.0.0
  description: >
    Endpoints the Connie web app uses for automations. They authenticate with
    your signed-in browser session — see
    https://docs.connie.ai/api-reference/authentication. These are the app's own
    endpoints and can change when the app changes.
servers:
  - url: https://connie.ai/api
security:
  - sessionCookie: []
tags:
  - name: Workflows
    description: List, create, read, update and delete workflows.
  - name: Runs
    description: >-
      Start, retry and stop workflow runs, switch a workflow Live, and read run
      counts.
  - name: Triggers
    description: A workflow's triggers and its schedule settings.
  - name: Templates
    description: The template gallery and copying a template into a workspace.
  - name: Agents
    description: Agents on the Agents page.
paths:
  /workflows/{workflowId}/run:
    post:
      tags:
        - Runs
      summary: Run a workflow once
      description: >
        Starts one run, the same as **Run once** in the builder. For a scheduled
        workflow each call adds a new results row; otherwise the run reuses the
        first row of the results table. Returns at once with a `runId`, or waits
        up to 30 seconds when `waitForResult` is true. Needs edit access and
        enough credits.
      operationId: runWorkflow
      parameters:
        - $ref: '#/components/parameters/workflowId'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                inputs:
                  type: object
                  additionalProperties: true
                  description: Values for the workflow's input variables.
                trigger:
                  type: object
                  additionalProperties: true
                  description: >
                    A sample trigger event to run with. `type` is the trigger id
                    and `payload` is the event data that `{{Trigger.field}}`
                    variables read.
                waitForResult:
                  type: boolean
                  default: false
                  description: Wait up to 30 seconds for the run to finish.
      responses:
        '200':
          description: >
            The run started. With `waitForResult`, `status` is `success`,
            `error`, or `running` if the run took longer than 30 seconds.
          content:
            application/json:
              schema:
                type: object
                properties:
                  runId:
                    type: string
                    description: Identifies this run.
                  status:
                    type: string
                    enum:
                      - running
                      - success
                      - error
                  error:
                    type:
                      - string
                      - 'null'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/InsufficientCredits'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '503':
          $ref: '#/components/responses/EngineUnavailable'
components:
  parameters:
    workflowId:
      name: workflowId
      in: path
      required: true
      description: >-
        The workflow's id, as in
        `https://connie.ai/<workspace-id>/workflows/<workflow-id>`.
      schema:
        type: string
        format: uuid
  responses:
    Unauthorized:
      description: >-
        Not signed in (`UNAUTHORIZED`), or the session cookie has expired
        (`SESSION_EXPIRED`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InsufficientCredits:
      description: Not enough credits to run (`INSUFFICIENT_CREDITS`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        You aren't a member of the workspace, or don't have the access this
        needs.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not found, or not visible to you.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    EngineUnavailable:
      description: >-
        The workflow engine is briefly unavailable: "Flow server is currently
        unavailable. Please try again later."
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable message.
        code:
          type: string
          description: Machine-readable code, when there is one.
        details:
          description: Extra detail, for example the invalid fields.
      required:
        - error
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: header
      name: Cookie
      description: >-
        The full Cookie header copied from a signed-in connie.ai browser
        request. See the Authentication page.

````

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