> ## 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.

# Create context snapshot

> Freeze selected authorized sources into a context snapshot. The authenticated control plane stamps ownership and rejects personal/workspace source mixing.



## OpenAPI

````yaml /openapi.json post /v1/workflow/context-snapshots
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/context-snapshots:
    post:
      tags:
        - Workflows
      summary: Create context snapshot
      description: >-
        Freeze selected authorized sources into a context snapshot. The
        authenticated control plane stamps ownership and rejects
        personal/workspace source mixing.
      operationId: workflow.context_snapshots.create
      parameters:
        - 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:
                schemaVersion:
                  description: >-
                    Optional contract version; the server always persists
                    context-snapshot.v1.
                  type: string
                  const: context-snapshot.v1
                scope:
                  oneOf:
                    - type: object
                      properties:
                        kind:
                          type: string
                          const: personal
                          description: Use personal scope for sources owned by one user.
                        ownerUserId:
                          type: string
                          minLength: 1
                          maxLength: 200
                          description: User that owns the personal scope.
                      required:
                        - kind
                        - ownerUserId
                      additionalProperties: false
                    - type: object
                      properties:
                        kind:
                          type: string
                          const: workspace
                          description: Use workspace scope for shared workspace sources.
                        workspaceId:
                          type: string
                          minLength: 1
                          maxLength: 200
                          description: Workspace that owns the shared scope.
                      required:
                        - kind
                        - workspaceId
                      additionalProperties: false
                  description: Scope shared by every source in the snapshot.
                projectId:
                  type: string
                  minLength: 1
                  maxLength: 200
                  description: Authorized project the snapshot may support.
                purpose:
                  type: string
                  minLength: 1
                  maxLength: 4000
                  description: Specific task or decision this frozen context will support.
                audience:
                  type: string
                  minLength: 1
                  maxLength: 1000
                  description: >-
                    Intended readers or downstream consumers of the resulting
                    work.
                sources:
                  minItems: 1
                  maxItems: 500
                  type: array
                  items:
                    type: object
                    properties:
                      sourceId:
                        type: string
                        minLength: 1
                        maxLength: 200
                        description: Stable source id from the authorized connector result.
                      connector:
                        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: Connector that supplied this source.
                      externalRef:
                        type: string
                        minLength: 1
                        maxLength: 2048
                        description: >-
                          Provider-side reference for this source, without
                          signed query credentials.
                      version:
                        type: string
                        minLength: 1
                        maxLength: 200
                        description: >-
                          Connector version, revision, or immutable change token
                          for the source.
                      contentHash:
                        description: >-
                          SHA-256 digest of the normalized source content used
                          for this snapshot.
                        type: string
                        pattern: ^[a-f0-9]{64}$
                      aclDecisionId:
                        type: string
                        minLength: 1
                        maxLength: 200
                        description: >-
                          Recorded authorization decision that allowed this
                          source to be used.
                      aclCheckedAt:
                        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: >-
                          When the source authorization decision was last
                          checked.
                      capturedAt:
                        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: When the connector captured this source version.
                      scope:
                        oneOf:
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: personal
                                description: >-
                                  Use personal scope for sources owned by one
                                  user.
                              ownerUserId:
                                type: string
                                minLength: 1
                                maxLength: 200
                                description: User that owns the personal scope.
                            required:
                              - kind
                              - ownerUserId
                            additionalProperties: false
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: workspace
                                description: >-
                                  Use workspace scope for shared workspace
                                  sources.
                              workspaceId:
                                type: string
                                minLength: 1
                                maxLength: 200
                                description: Workspace that owns the shared scope.
                            required:
                              - kind
                              - workspaceId
                            additionalProperties: false
                        description: Personal or workspace scope the source belongs to.
                      role:
                        type: string
                        enum:
                          - primary
                          - supporting
                          - brand
                          - policy
                          - performance
                        description: How this source should be used by the workflow.
                      displayName:
                        description: Optional human-readable source name.
                        type: string
                        minLength: 1
                        maxLength: 512
                      mimeType:
                        description: Optional normalized MIME type of the source.
                        type: string
                        minLength: 1
                        maxLength: 160
                    required:
                      - sourceId
                      - connector
                      - externalRef
                      - version
                      - contentHash
                      - aclDecisionId
                      - aclCheckedAt
                      - capturedAt
                      - scope
                      - role
                    additionalProperties: false
                  description: At least one authorized, version-pinned source to freeze.
                retrievedPassages:
                  description: >-
                    Optional cited passage references selected from the frozen
                    sources. Defaults to none.
                  maxItems: 5000
                  type: array
                  items:
                    type: object
                    properties:
                      sourceId:
                        type: string
                        minLength: 1
                        maxLength: 200
                        description: >-
                          Source id from the snapshot source set that supplied
                          this passage.
                      location:
                        type: string
                        minLength: 1
                        maxLength: 2048
                        description: >-
                          Stable provider location, page, range, or anchor for
                          the passage.
                      textHash:
                        description: SHA-256 digest of the retrieved passage text.
                        type: string
                        pattern: ^[a-f0-9]{64}$
                      relevance:
                        type: number
                        minimum: 0
                        maximum: 1
                        description: >-
                          Retrieval relevance score from 0 (lowest) to 1
                          (highest).
                    required:
                      - sourceId
                      - location
                      - textHash
                      - relevance
                    additionalProperties: false
                exclusions:
                  default: []
                  description: >-
                    Optional audit trail of candidate sources intentionally
                    excluded. Defaults to none.
                  maxItems: 500
                  type: array
                  items:
                    type: object
                    properties:
                      sourceId:
                        type: string
                        minLength: 1
                        maxLength: 200
                        description: >-
                          Source id considered but deliberately excluded from
                          the snapshot.
                      reason:
                        type: string
                        minLength: 1
                        maxLength: 1000
                        description: >-
                          Human-readable policy or relevance reason the source
                          was excluded.
                    required:
                      - sourceId
                      - reason
                    additionalProperties: false
                policyVersion:
                  type: string
                  minLength: 1
                  maxLength: 200
                  description: Policy version evaluated when the snapshot was frozen.
                retentionMode:
                  type: string
                  enum:
                    - artifacts_only
                    - snapshot_metadata
                    - full_with_consent
                  description: How much snapshot material may be retained after use.
              required:
                - scope
                - projectId
                - purpose
                - audience
                - sources
                - policyVersion
                - retentionMode
              additionalProperties: false
            example:
              scope:
                kind: workspace
                workspaceId: ws_91c2
              projectId: prj_9x2a4c
              purpose: >-
                Draft Week 5 of the Statistics for AI course from the approved
                lesson plan.
              audience: Course students and the editor who approves each lesson.
              sources:
                - sourceId: src_lesson_plan_w5
                  connector: google_drive
                  externalRef: drive:file/1aB2cD3eF4gH5iJ6kL7mN8oP9
                  version: '42'
                  contentHash: >-
                    c08e3351fa65c229dddbf93f49178b53ebb085597e2902cb901b9447d2eb9161
                  aclDecisionId: acl_7f3a91
                  aclCheckedAt: '2026-08-12T08:30:00Z'
                  capturedAt: '2026-08-12T08:30:00Z'
                  scope:
                    kind: workspace
                    workspaceId: ws_91c2
                  role: primary
                  displayName: Week 5 lesson plan
                  mimeType: application/vnd.google-apps.document
              retrievedPassages: []
              exclusions: []
              policyVersion: policy-2026-08
              retentionMode: artifacts_only
      responses:
        '201':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: true
                  contextSnapshot:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                        maxLength: 200
                    required:
                      - id
                    additionalProperties: {}
                required:
                  - success
                  - contextSnapshot
                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.