---
title: "Create a GitHub data source"
method: POST
path: "/githubs"
tags: ["githubs"]
---

# Create a GitHub data source

`POST /githubs`

Creates a new GitHub data source and starts ingestion.

Required roles: All

## Request body

- CreateGitHubRequest
  - `name` string, required — Name of the GitHub data source
  - `repository` string, required — GitHub repository in owner/repo format (e.g. "octocat/Hello-World")
  - `path_filters` string[] — Path filters patterns. The total number of characters across all elements in the array must be 2000 or fewer.
  - `github_token` string — One-time GitHub personal access token (mutually exclusive with secret_id)
  - `secret_id` string — ID of a stored secret to use (mutually exclusive with github_token)
  - `reference_type` 'default' | 'branch' | 'tag' | 'commit' — Git reference type
  - `reference_param` string — Reference parameter (branch name, tag name, or commit hash)
  - `rrule` string — Recurrence rule (RFC 5545 RRULE). Requires secret_id (not one-time token).
  - `metadata` Metadata
    - `records` MetadataRecord[] — List of metadata records. A patch may contain up to 40 items; the merged result is capped at 20.
      - `key` string, required — Metadata key (max 20 characters)
      - `val` unknown, required
      - `type` 'string' | 'integer' | 'float' | 'date' | 'datetime' — Data type of the metadata value

## Response `200`

Successfully created GitHub data source

- GitHub
  - `id` string, required — GitHub data source ID
  - `ingestion_setting_id` string, required — GitHub ingestion setting ID
  - `name` string, required — Name of the GitHub ingestion setting
  - `repository` string, required — GitHub repository in owner/repo format (e.g. "octocat/Hello-World")
  - `path_filters` string[] — Path filter patterns
  - `reference_type` 'default' | 'branch' | 'tag' | 'commit', required — Git reference type
  - `reference_param` string — Reference parameter (branch name, tag name, or commit hash)
  - `creation_time` integer — Creation time (Unix timestamp in seconds)
  - `status` 'unknown' | 'queued' | 'not_started' | 'managed' | 'starting' | 'started' | 'success' | 'failure' | 'canceling' | 'canceled' | 'deleting' | 'delete_job_failure', required — Job status
  - `start_time` integer — Job start time (Unix timestamp in seconds)
  - `end_time` integer — Job end time (Unix timestamp in seconds)
  - `error` JobError, nullable
    - `title` string — Error title
    - `message` string — Error message
  - `metadata` Metadata
    - `records` MetadataRecord[] — List of metadata records. A patch may contain up to 40 items; the merged result is capped at 20.
      - `key` string, required — Metadata key (max 20 characters)
      - `val` unknown, required
      - `type` 'string' | 'integer' | 'float' | 'date' | 'datetime' — Data type of the metadata value

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `500` — Internal Server Error

---

[API](https://skmtc.net/qlonolink/apis/qaip-apis.md) · [All operations](https://skmtc.net/qlonolink/apis/qaip-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/qlonolink/qaip-apis/revisions/f5f5994dfe05/schema)
