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

# Create a schedule



## OpenAPI

````yaml https://api.usenotra.com/openapi.json post /v1/schedules
openapi: 3.1.1
info:
  title: Notra API
  version: 1.0.0
  description: >-
    OpenAPI schema for Notra content endpoints. Use GET /v1/status for public
    reachability. Error responses include recovery guidance.
servers:
  - url: https://api.usenotra.com
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Content
    description: >-
      Read content. Organization is inferred from the API key
      (identity.externalId).
  - name: Schedules
    description: >-
      Manage scheduled content generation. Organization is inferred from the API
      key (identity.externalId).
  - name: Event Triggers
    description: >-
      Manage event-based content generation triggered by GitHub webhooks.
      Organization is inferred from the API key (identity.externalId).
  - name: Chats
    description: >-
      Manage chat sessions. Organization is inferred from the API key
      (identity.externalId).
  - name: Skills
    description: >-
      Manage reusable writing skills. Organization is inferred from the API key
      (identity.externalId).
paths:
  /v1/schedules:
    post:
      tags:
        - Schedules
      summary: Create a schedule
      operationId: createSchedule
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 120
                sourceType:
                  type: string
                  enum:
                    - cron
                sourceConfig:
                  type: object
                  properties:
                    cron:
                      type: object
                      properties:
                        frequency:
                          type: string
                          enum:
                            - daily
                            - weekly
                            - monthly
                        hour:
                          type: integer
                          minimum: 0
                          maximum: 23
                        minute:
                          type: integer
                          minimum: 0
                          maximum: 59
                        dayOfWeek:
                          type: integer
                          minimum: 0
                          maximum: 6
                        dayOfMonth:
                          type: integer
                          minimum: 1
                          maximum: 31
                      required:
                        - frequency
                        - hour
                        - minute
                  required:
                    - cron
                targets:
                  type: object
                  properties:
                    repositoryIds:
                      type: array
                      items:
                        type: string
                        minLength: 1
                      minItems: 1
                  required:
                    - repositoryIds
                outputType:
                  type: string
                  enum:
                    - changelog
                    - blog_post
                    - linkedin_post
                    - twitter_post
                    - image
                outputConfig:
                  type: object
                  properties:
                    publishDestination:
                      type: string
                      enum:
                        - webflow
                        - framer
                        - custom
                    brandVoiceId:
                      type: string
                      minLength: 1
                enabled:
                  type: boolean
                autoPublish:
                  type: boolean
                  default: false
                lookbackWindow:
                  type: string
                  enum:
                    - current_day
                    - yesterday
                    - last_7_days
                    - last_14_days
                    - last_30_days
                  default: last_7_days
              required:
                - name
                - sourceType
                - sourceConfig
                - targets
                - outputType
                - enabled
      responses:
        '201':
          description: Schedule created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  schedule:
                    type: object
                    properties:
                      id:
                        type: string
                      organizationId:
                        type: string
                      name:
                        type: string
                      sourceType:
                        type: string
                        enum:
                          - cron
                      sourceConfig:
                        type: object
                        properties:
                          cron:
                            type: object
                            properties:
                              frequency:
                                type: string
                                enum:
                                  - daily
                                  - weekly
                                  - monthly
                              hour:
                                type: integer
                                minimum: 0
                                maximum: 23
                              minute:
                                type: integer
                                minimum: 0
                                maximum: 59
                              dayOfWeek:
                                type: integer
                                minimum: 0
                                maximum: 6
                              dayOfMonth:
                                type: integer
                                minimum: 1
                                maximum: 31
                            required:
                              - frequency
                              - hour
                              - minute
                        required:
                          - cron
                      targets:
                        type: object
                        properties:
                          repositoryIds:
                            type: array
                            items:
                              type: string
                              minLength: 1
                            minItems: 1
                        required:
                          - repositoryIds
                      outputType:
                        type: string
                        enum:
                          - changelog
                          - blog_post
                          - linkedin_post
                          - twitter_post
                          - image
                      outputConfig:
                        type:
                          - object
                          - 'null'
                        properties:
                          publishDestination:
                            type: string
                            enum:
                              - webflow
                              - framer
                              - custom
                          brandVoiceId:
                            type: string
                            minLength: 1
                      enabled:
                        type: boolean
                      autoPublish:
                        type: boolean
                      createdAt:
                        type: string
                      updatedAt:
                        type: string
                      lookbackWindow:
                        type: string
                        enum:
                          - current_day
                          - yesterday
                          - last_7_days
                          - last_14_days
                          - last_30_days
                    required:
                      - id
                      - organizationId
                      - name
                      - sourceType
                      - sourceConfig
                      - targets
                      - outputType
                      - enabled
                      - autoPublish
                      - createdAt
                      - updatedAt
                      - lookbackWindow
                  organization:
                    type: object
                    properties:
                      id:
                        type: string
                      slug:
                        type: string
                      name:
                        type: string
                      logo:
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - slug
                      - name
                      - logo
                required:
                  - schedule
                  - organization
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Organization not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Duplicate schedule
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Failed to create schedule
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Authentication service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        recovery:
          type: string
      required:
        - error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Send your API key in the Authorization header as Bearer API_KEY.

````