> ## 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 GitHub integration



## OpenAPI

````yaml https://api.usenotra.com/openapi.json post /v1/integrations/github
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/integrations/github:
    post:
      tags:
        - Content
      summary: Create a GitHub integration
      operationId: createGitHubIntegration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                owner:
                  type: string
                  minLength: 1
                repo:
                  type: string
                  minLength: 1
                branch:
                  type:
                    - string
                    - 'null'
                  minLength: 1
                token:
                  type:
                    - string
                    - 'null'
                  minLength: 1
              required:
                - owner
                - repo
      responses:
        '201':
          description: GitHub integration created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  github:
                    type: object
                    properties:
                      id:
                        type: string
                      displayName:
                        type: string
                      owner:
                        type:
                          - string
                          - 'null'
                      repo:
                        type:
                          - string
                          - 'null'
                      defaultBranch:
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - displayName
                      - owner
                      - repo
                      - defaultBranch
                  organization:
                    type: object
                    properties:
                      id:
                        type: string
                      slug:
                        type: string
                      name:
                        type: string
                      logo:
                        type:
                          - string
                          - 'null'
                    required:
                      - id
                      - slug
                      - name
                      - logo
                required:
                  - github
                  - organization
        '400':
          description: Invalid request body or GitHub repository access error
          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: Repository already connected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: >-
            Rate limit exceeded. This endpoint allows 20 requests per 1 minute
            per API key.
          headers:
            RateLimit-Limit:
              description: Maximum requests allowed in the current window.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests remaining in the current window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the current window resets.
              schema:
                type: integer
            Retry-After:
              description: Seconds the client should wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitErrorResponse'
        '503':
          description: Authentication or integration 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
    RateLimitErrorResponse:
      type: object
      properties:
        error:
          type: string
        limit:
          type: integer
          minimum: 1
        remaining:
          type: integer
          minimum: 0
        reset:
          type: integer
      required:
        - error
        - limit
        - remaining
        - reset
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Send your API key in the Authorization header as Bearer API_KEY.

````