---
title: "Import skills from GitHub"
method: POST
path: "/api/skills/import"
tags: ["Skills"]
---

# Import skills from GitHub

`POST /api/skills/import`

Import one or more skills selected from a GitHub source preview. Each source URL is fetched and persisted as an independent skill with source provenance. This operation does not create a durable source resource. The import is atomic: if any source cannot be fetched, validated, or persisted, no skills are created.

## Request body

- PlatformSkillImportRequest
  - `source_urls` string[], required — Resolved GitHub skill URLs selected from a source preview.

## Response `200`

Skills imported successfully.

- PlatformSkillImportResponse
  - `skills` PlatformSkill[], required — Independently persisted skills in request order.
    - `id` string, required — Glean skill ID.
    - `display_name` string, required — Human-readable skill name.
    - `description` string, required — Human-readable skill description.
    - `latest_version` integer, required — Latest major version number for the skill.
    - `latest_minor_version` integer, required — Latest minor version number for the skill.
    - `status` 'DRAFT' | 'ENABLED' | 'DISABLED', required — Current skill status.
    - `origin` 'CUSTOM', required — Source category for the skill.
    - `source_provenance` PlatformSkillSourceProvenance
      - `source_url` string — URL of the external source the skill was imported from.
      - `commit_sha` string — Source commit SHA for the imported skill.
      - `imported_at` string, date-time — Time the skill was imported.
      - `last_synced_at` string, date-time — Time the skill was last synced from its source.
      - `sync_status` 'UP_TO_DATE' | 'UPDATE_AVAILABLE' | 'SYNC_FAILED' — Current external-source sync status.
      - `sync_error` string — Human-readable sync failure reason, present only when sync_status is SYNC_FAILED.
    - `owner` PlatformPersonReference, required — A lightweight reference to a person, used where a payload merely points at someone.
      - `id` string — Opaque Glean person ID.
      - `name` string, required — Display name.
    - `created_at` string, date-time, required — Time the skill was created.
    - `updated_at` string, date-time, required — Time the skill was last updated.
  - `request_id` string, required — Platform-generated request ID for support correlation.

## Other responses

- `400` — Invalid request (malformed JSON, invalid parameter values, unknown fields).
- `401` — Missing or invalid authentication token.
- `403` — Token valid but lacks permission for the requested operation.
- `408` — Backend did not respond within the timeout window.
- `409` — Request conflicts with current state of the resource.
- `413` — Request body exceeds the maximum allowed size.
- `429` — Rate limit exceeded. Includes Retry-After header.
- `500` — Unexpected server-side failure.
- `503` — Backend temporarily unavailable.

---

[API](https://skmtc.dev/gleanwork/apis/glean-platform-api.md) · [All operations](https://skmtc.dev/gleanwork/apis/glean-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gleanwork/glean-platform-api/revisions/46c121f70527/schema)
