---
title: "Create a GitHub Personal Access Token provider"
method: POST
path: "/git-providers/github/pat"
tags: ["Git Providers"]
---

# Create a GitHub Personal Access Token provider

`POST /git-providers/github/pat`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/git-providers/github/pat`
- Auth: HTTP bearer

## Request body

- CreateGitHubPATRequest
  - `name` string, required
  - `token` string, password, required: A credential. Write-only: it is never returned, and the AI assistant supplies it through a secret slot instead of typing it into the conversation.

## Response `201`

GitHub PAT provider created successfully

- ProviderResponse
  - `auth_method` string, required
  - `base_url` string, nullable
  - `created_at` string, date-time, required
  - `id` integer, required
  - `is_active` boolean, required
  - `is_default` boolean, required
  - `name` string, required
  - `provider_type` string, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `500`: Internal server error

## Changes

- **2026-10-23** `7d41b820a372`: 1 breaking
  - the `token` request property format changed from no format to `password`
- **2026-10-23** `24af93ff5379`: 1 info
  - the `token` request property format was generalized from `password` to no format
- **2026-10-22** `842d42ed4659`: 1 breaking
  - the `token` request property format changed from no format to `password`
- **2026-10-22** `1a12a50b75ee`: 1 info
  - the `token` request property format was generalized from `password` to no format
- **2026-10-21** `79089e9f49ee`: 1 breaking
  - the `token` request property format changed from no format to `password`

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/git-providers/github/pat/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
