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

# Add recipe revision

> Append an immutable recipe revision.



## OpenAPI

````yaml /openapi.json post /v1/workflow/recipes/{recipeId}/revisions
openapi: 3.1.0
info:
  title: Sigmora API
  version: 1.0.0
  description: >-
    The priced, versioned public API. Every call authenticates with a workspace
    API key (`Authorization: Bearer sk_live_…`), names the project it files its
    output under, and reports what it cost. `GET /v1/capabilities` answers what
    this deployment can serve right now and at what price; anything it reports
    as unavailable answers 503 `capability_unavailable` rather than 404.
servers:
  - url: https://api.sigmora.org
security:
  - bearerAuth: []
tags:
  - name: Meta
    description: What this deployment serves, what it costs, and what you have spent.
  - name: Projects
    description: The container every capability files its output under.
  - name: Sessions
    description: Durable bindings between an external harness session and one project.
  - name: Assets
    description: 'Project media: direct-to-storage uploads, imports, ingest and transcripts.'
  - name: Jobs
    description: Where every asynchronous capability is collected, whatever produced it.
  - name: Text
    description: Scripts, research, articles, translation and question sets.
  - name: Video
    description: Narrated renders, footage edits, shorts and moment selection.
  - name: UGC
    description: >-
      Creator-led vertical videos: AI creators, their faces and voices, frames
      and clips.
  - name: Editing
    description: >-
      Sigma, the editor: conversational turns, granular transcript edits,
      approvals.
  - name: 3D
    description: Animated 3D renders from a description or a photograph.
  - name: Image
    description: Thumbnails, sized for the platform they are posted to.
  - name: Audio
    description: Generated music and audio engineering in Audiotool projects.
  - name: Publishing
    description: Connected destinations and queued posts.
  - name: Webhooks
    description: Signed, at-least-once delivery of job and publishing events.
  - name: Workflows
    description: Context snapshots, versioned recipes, costed proposals and their runs.
  - name: Agents
    description: Describe an outcome and let a bounded plan of capabilities run.
  - name: Research
    description: >-
      Observed hooks, creator outliers and production briefs from saved
      analyses.
  - name: Themes
    description: The canonical content taxonomy, and the niche profiles built on it.
  - name: Signals
    description: Evidence-backed trends and scored viral content.
  - name: Discovery
    description: Compiled watch plans, their runs, and source freshness.
  - name: Watchlist
    description: 'Accounts you watch: their usual reach and the posts that beat it.'
  - name: Performance
    description: Your own channels' videos against their usual, and fixes to live videos.
  - name: Autopilot
    description: The durable trend-to-distribution workflow and its checkpoints.
  - name: Campaigns
    description: Distribution records shared by the API, the dashboard and autopilot.
  - name: Brands
    description: >-
      Cross-platform identities with their own voice, rules and publishing
      commitments.
  - name: Products
    description: What a campaign promotes.
paths:
  /v1/workflow/recipes/{recipeId}/revisions:
    post:
      tags:
        - Workflows
      summary: Add recipe revision
      description: Append an immutable recipe revision.
      operationId: workflow.recipes.revision_create
      parameters:
        - name: recipeId
          in: path
          required: true
          description: Opaque workflow recipe id.
          schema:
            type: string
            minLength: 1
            maxLength: 200
            description: Opaque workflow recipe id.
        - name: idempotency-key
          in: header
          required: true
          description: >-
            Required stable id for this logical write; reuse it after a timeout.
            Upload endpoints also require the same value in body.idempotencyKey.
          schema:
            type: string
            minLength: 1
            maxLength: 255
            description: >-
              Required stable id for this logical write; reuse it after a
              timeout. Upload endpoints also require the same value in
              body.idempotencyKey.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                definition:
                  type: object
                  properties:
                    acceptedTriggers:
                      minItems: 1
                      maxItems: 8
                      type: array
                      items:
                        type: string
                        enum:
                          - manual
                          - conversation
                          - source_changed
                          - schedule
                          - approved_file
                          - business_record
                          - job_completed
                          - performance_signal
                      description: >-
                        Unique event types that are allowed to start this
                        recipe.
                    inputTypes:
                      minItems: 1
                      maxItems: 11
                      type: array
                      items:
                        type: string
                        enum:
                          - conversation
                          - document
                          - spreadsheet
                          - presentation
                          - audio
                          - video
                          - image
                          - url
                          - ticket
                          - crm_record
                          - sigmora_asset
                      description: Unique supported input artifact types.
                    requiredSourceRoles:
                      maxItems: 5
                      type: array
                      items:
                        type: string
                        enum:
                          - primary
                          - supporting
                          - brand
                          - policy
                          - performance
                      description: >-
                        Source roles that must be present in the frozen context
                        before execution.
                    steps:
                      minItems: 1
                      maxItems: 100
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            minLength: 1
                            maxLength: 200
                            description: Unique stable step id within this recipe revision.
                          kind:
                            type: string
                            enum:
                              - deterministic
                              - model_assisted
                              - human_gate
                            description: >-
                              Execution mode: deterministic code, model-assisted
                              work, or a human gate.
                          title:
                            type: string
                            minLength: 1
                            maxLength: 240
                            description: Short human-readable name for this workflow step.
                          retryable:
                            type: boolean
                            description: >-
                              Whether a transient failure may safely retry this
                              step.
                          compensates:
                            type: boolean
                            description: >-
                              Whether this step can compensate for a prior side
                              effect.
                        required:
                          - id
                          - kind
                          - title
                          - retryable
                          - compensates
                        additionalProperties: false
                      description: Ordered workflow steps, each with a unique id.
                    outputs:
                      minItems: 1
                      maxItems: 12
                      type: array
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - video
                              - clip
                              - script
                              - transcript
                              - captions
                              - thumbnail
                              - article
                              - email_copy
                              - social_copy
                              - quiz
                              - citations_manifest
                              - publish_draft
                            description: Artifact type the workflow may produce.
                          required:
                            type: boolean
                            description: >-
                              Whether the workflow is incomplete unless this
                              output is produced.
                        required:
                          - type
                          - required
                        additionalProperties: false
                      description: Unique artifact outputs the recipe promises to create.
                    qualityChecks:
                      minItems: 1
                      maxItems: 100
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                            minLength: 1
                            maxLength: 200
                            description: >-
                              Unique stable quality-check id within this recipe
                              revision.
                          kind:
                            type: string
                            enum:
                              - factual
                              - brand
                              - privacy
                              - accessibility
                              - media
                              - human
                            description: >-
                              Quality or policy check to perform before a
                              workflow can proceed.
                          blocking:
                            type: boolean
                            description: >-
                              Whether a failed check prevents the workflow from
                              advancing.
                        required:
                          - id
                          - kind
                          - blocking
                        additionalProperties: false
                      description: Quality and policy checks that govern execution.
                    autonomy:
                      type: object
                      properties:
                        mode:
                          type: string
                          enum:
                            - assist
                            - supervised
                            - policy_bound_autonomous
                          description: Autonomy level granted to this workflow recipe.
                        maxCredits:
                          type: integer
                          minimum: 0
                          maximum: 10000000
                          description: >-
                            Maximum credits this workflow may consume before it
                            stops.
                        allowedSourceConnectors:
                          maxItems: 25
                          type: array
                          items:
                            type: string
                            enum:
                              - sigmora
                              - slack
                              - discord
                              - telegram
                              - teams
                              - email
                              - google_drive
                              - dropbox
                              - onedrive
                              - sharepoint
                              - notion
                              - confluence
                              - zoom
                              - google_meet
                              - jira
                              - linear
                              - github
                              - crm
                              - helpdesk
                              - lms
                              - cms
                              - brand_policy
                              - performance
                              - upload
                              - url
                          description: >-
                            Unique connector allowlist; policy-bound autonomy
                            requires at least one.
                        allowedDestinations:
                          maxItems: 100
                          type: array
                          items:
                            type: string
                            minLength: 1
                            maxLength: 200
                            description: >-
                              Opaque Sigmora identifier returned by a prior
                              response; do not derive or invent it.
                          description: >-
                            Unique approved publish destination ids; no other
                            destination may be used.
                        generationApprovalRequired:
                          type: boolean
                          description: >-
                            Whether a human must approve generation before work
                            starts.
                        publishApprovalRequired:
                          type: boolean
                          description: Whether a human must separately approve publication.
                        reviewAt:
                          anyOf:
                            - type: string
                              format: date-time
                              pattern: >-
                                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                              description: RFC 3339 timestamp with an explicit UTC offset.
                            - type: 'null'
                          description: >-
                            Next required policy review time, or null when no
                            scheduled review is needed.
                        killSwitchEnabled:
                          type: boolean
                          description: >-
                            Whether an operator can immediately stop autonomous
                            execution.
                      required:
                        - mode
                        - maxCredits
                        - allowedSourceConnectors
                        - allowedDestinations
                        - generationApprovalRequired
                        - publishApprovalRequired
                        - reviewAt
                        - killSwitchEnabled
                      additionalProperties: false
                      description: >-
                        Credit, approval, destination, and emergency-stop policy
                        for this recipe.
                    retentionMode:
                      type: string
                      enum:
                        - artifacts_only
                        - snapshot_metadata
                        - full_with_consent
                      description: How long recipe execution context may be retained.
                    lockedParameters:
                      maxItems: 100
                      type: array
                      items:
                        type: string
                        minLength: 1
                        maxLength: 200
                        description: >-
                          Opaque Sigmora identifier returned by a prior
                          response; do not derive or invent it.
                      description: >-
                        Unique configuration keys that callers may not override
                        at execution time.
                  required:
                    - acceptedTriggers
                    - inputTypes
                    - requiredSourceRoles
                    - steps
                    - outputs
                    - qualityChecks
                    - autonomy
                    - retentionMode
                    - lockedParameters
                  additionalProperties: false
                  description: >-
                    Replacement immutable behavior for the newly appended
                    revision.
                title:
                  description: Optional replacement human-readable recipe name.
                  type: string
                  minLength: 1
                  maxLength: 240
                description:
                  description: >-
                    Optional replacement summary of purpose and operating
                    constraints.
                  type: string
                  minLength: 1
                  maxLength: 4000
                status:
                  description: >-
                    Initial lifecycle state for the appended revision; omit for
                    draft.
                  type: string
                  enum:
                    - draft
                    - approved
                    - archived
              required:
                - definition
              additionalProperties: false
            example:
              definition:
                acceptedTriggers:
                  - manual
                  - approved_file
                inputTypes:
                  - document
                requiredSourceRoles:
                  - primary
                  - brand
                steps:
                  - id: draft-script
                    kind: model_assisted
                    title: Draft a narrated lesson script
                    retryable: true
                    compensates: false
                  - id: editor-review
                    kind: human_gate
                    title: Editor approves the script
                    retryable: false
                    compensates: false
                  - id: render
                    kind: deterministic
                    title: Render the lesson video
                    retryable: true
                    compensates: false
                outputs:
                  - type: script
                    required: true
                  - type: video
                    required: true
                  - type: captions
                    required: false
                qualityChecks:
                  - id: claims-cited
                    kind: factual
                    blocking: true
                  - id: brand-voice
                    kind: brand
                    blocking: false
                autonomy:
                  mode: supervised
                  maxCredits: 1500
                  allowedSourceConnectors:
                    - google_drive
                    - sigmora
                  allowedDestinations: []
                  generationApprovalRequired: true
                  publishApprovalRequired: true
                  reviewAt: null
                  killSwitchEnabled: true
                retentionMode: artifacts_only
                lockedParameters:
                  - aspect
                  - renderer
              description: >-
                Also locks the renderer so every lesson in the course looks the
                same.
      responses:
        '201':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: true
                  recipe:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                        maxLength: 200
                    required:
                      - id
                    additionalProperties: {}
                  version:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                        maxLength: 200
                    required:
                      - id
                    additionalProperties: {}
                required:
                  - success
                  - recipe
                  - version
                additionalProperties: {}
        '400':
          description: 'Failure. `code` is one of: invalid_request.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 'Failure. `code` is one of: unauthorized.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: 'Failure. `code` is one of: insufficient_credits, budget_capped.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 'Failure. `code` is one of: forbidden, origin_not_allowed.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: 'Failure. `code` is one of: not_found.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: 'Failure. `code` is one of: conflict.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: 'Failure. `code` is one of: payload_too_large.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'Failure. `code` is one of: rate_limited.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: 'Failure. `code` is one of: upstream_error, internal_error.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            Failure. `code` is one of: capability_unavailable,
            upstream_unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      required:
        - success
        - error
        - code
      properties:
        success:
          const: false
        error:
          type: string
          description: >-
            Human-readable. Copy may change between releases — do not match on
            it.
        code:
          type: string
          enum:
            - invalid_request
            - unauthorized
            - forbidden
            - origin_not_allowed
            - not_found
            - conflict
            - payload_too_large
            - insufficient_credits
            - budget_capped
            - content_not_cleared
            - rate_limited
            - capability_unavailable
            - upstream_unavailable
            - upstream_error
            - internal_error
          description: Stable machine-readable cause. Branch on this.
        details:
          description: Optional structured context, e.g. the credits shortfall.
        requestId:
          type: string
          description: >-
            Identifies this request in our logs. Include it when you contact
            support.
        timestamp:
          type: string
          format: date-time
          description: When the failure was produced.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A workspace API key.

````

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