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

# Create Program



## OpenAPI

````yaml /openapi.json post /v1/organizations/{organization_id}/apps/{app_id}/environments/{environment_id}/programs
openapi: 3.1.0
info:
  description: Are we on the same page?
  title: Synapse
  version: 0.1.0
servers: []
security: []
paths:
  /v1/organizations/{organization_id}/apps/{app_id}/environments/{environment_id}/programs:
    post:
      tags:
        - v1-platform
      summary: Create Program
      operationId: >-
        create_program_v1_organizations__organization_id__apps__app_id__environments__environment_id__programs_post
      parameters:
        - in: path
          name: organization_id
          required: true
          schema:
            format: uuid
            title: Organization Id
            type: string
        - in: path
          name: app_id
          required: true
          schema:
            format: uuid
            title: App Id
            type: string
        - in: path
          name: environment_id
          required: true
          schema:
            format: uuid
            title: Environment Id
            type: string
        - in: header
          name: Idempotency-Key
          required: true
          schema:
            maxLength: 255
            minLength: 1
            title: Idempotency-Key
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProgramCreate'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Program'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: Authentication required
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: Insufficient scope
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: Resource not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: State or idempotency conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: Request validation failed
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
          description: Internal server error
      security:
        - BearerAuth: []
        - ApiKeyAuth: []
        - SessionCookie: []
components:
  schemas:
    ProgramCreate:
      additionalProperties: false
      properties:
        context_overrides:
          additionalProperties: true
          title: Context Overrides
          type: object
        mode:
          default: one_time
          enum:
            - one_time
            - continuous
          title: Mode
          type: string
        name:
          maxLength: 255
          minLength: 1
          title: Name
          type: string
        recurrence:
          $ref: '#/components/schemas/RecurrencePolicy'
        release_policy:
          default: automatic
          enum:
            - automatic
            - review_required
          title: Release Policy
          type: string
        version_bundle_id:
          format: uuid
          title: Version Bundle Id
          type: string
      required:
        - name
        - version_bundle_id
      title: ProgramCreate
      type: object
    Program:
      properties:
        app_id:
          format: uuid
          title: App Id
          type: string
        context_overrides:
          additionalProperties: true
          title: Context Overrides
          type: object
        created_at:
          format: date-time
          title: Created At
          type: string
        created_by_user_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Created By User Id
        environment_id:
          format: uuid
          title: Environment Id
          type: string
        id:
          format: uuid
          title: Id
          type: string
        mode:
          enum:
            - one_time
            - continuous
          title: Mode
          type: string
        name:
          title: Name
          type: string
        recurrence:
          additionalProperties: true
          title: Recurrence
          type: object
        release_policy:
          enum:
            - automatic
            - review_required
          title: Release Policy
          type: string
        status:
          enum:
            - draft
            - active
            - paused
            - archived
          title: Status
          type: string
        updated_at:
          format: date-time
          title: Updated At
          type: string
        version_bundle_id:
          format: uuid
          title: Version Bundle Id
          type: string
      required:
        - id
        - environment_id
        - app_id
        - name
        - version_bundle_id
        - mode
        - status
        - release_policy
        - recurrence
        - context_overrides
        - created_at
        - updated_at
      title: Program
      type: object
    ApiErrorResponse:
      additionalProperties: false
      properties:
        detail:
          anyOf:
            - $ref: '#/components/schemas/ErrorDetail'
            - type: string
            - items: {}
              type: array
            - additionalProperties: true
              type: object
          title: Detail
      required:
        - detail
      title: ApiErrorResponse
      type: object
    RecurrencePolicy:
      additionalProperties: false
      properties:
        day_of_month:
          anyOf:
            - maximum: 31
              minimum: 1
              type: integer
            - type: 'null'
          title: Day Of Month
        event_names:
          items:
            type: string
          maxItems: 50
          title: Event Names
          type: array
        frequency:
          default: one_time
          enum:
            - one_time
            - daily
            - weekly
            - fortnightly
            - monthly
            - quarterly
            - semiannually
            - annually
            - event_driven
          title: Frequency
          type: string
        local_time:
          default: '09:00'
          pattern: ^(?:[01]\d|2[0-3]):[0-5]\d$
          title: Local Time
          type: string
        starts_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Starts At
        timezone:
          default: UTC
          maxLength: 64
          minLength: 1
          title: Timezone
          type: string
        weekday:
          anyOf:
            - maximum: 6
              minimum: 0
              type: integer
            - type: 'null'
          title: Weekday
      title: RecurrencePolicy
      type: object
    ErrorDetail:
      additionalProperties: false
      description: Stable structured detail returned by versioned API errors.
      properties:
        code:
          title: Code
          type: string
        context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Context
        message:
          title: Message
          type: string
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
      required:
        - code
        - message
      title: ErrorDetail
      type: object
  securitySchemes:
    BearerAuth:
      description: Named syn_ API key or migration-only legacy key.
      scheme: bearer
      type: http
    ApiKeyAuth:
      description: Header alias for a named or legacy API key.
      in: header
      name: X-API-Key
      type: apiKey
    SessionCookie:
      description: Opaque administrator browser session.
      in: cookie
      name: synapse_session
      type: apiKey

````