---
title: "Create source connection (zendesk / github)"
method: POST
path: "/sources"
tags: ["Sources"]
---

# Create source connection (zendesk / github)

`POST /sources`

## Request

- Base URL: `https://api.untools.co/api`
- URL: `https://api.untools.co/api/sources`
- Auth: HTTP bearer

Create a connection by pasting a personal API token. Use POST /ingestion/upload for file-based connections.

## Request body

- CreateSourceConnectionInput: Two paths: (1) OAuth completion — set oauthPendingId (from /sources/oauth/{provider}/start). For GitHub, also include config.owner+config.repo from the repo picker. (2) Manual token paste — set credentials.token.
  - `provider` 'zendesk' | 'github', required
  - `label` string
  - `oauthPendingId` string, uuid, nullable: When present, the access token is pulled from the pending OAuth session.
  - `config` object: Provider-specific config. Zendesk: { subdomain } (also filled automatically from the pending OAuth session). GitHub: { owner, repo } (required — the repo the user picked).
  - `credentials` object: Manual token path only. Zendesk: { token: 'email/token:api_token' } (Basic auth). GitHub: { token: 'ghp_xxx' } (PAT). Not required when oauthPendingId is set.

## Response `201`

Created

- SourceConnection
  - `id` string, uuid
  - `provider` 'zendesk' | 'github' | 'upload'
  - `label` string
  - `config` object
  - `status` 'connected' | 'syncing' | 'error' | 'disconnected'
  - `lastSyncAt` string, date-time, nullable
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `itemCount` integer

## Other responses

- `400`: Validation error

---

[API](https://skmtc.dev/untools/apis/ai-note-taker-api.md) - [All operations](https://skmtc.dev/untools/apis/ai-note-taker-api/llms.txt) - [OpenAPI document](https://skmtc.dev/untools/apis/ai-note-taker-api/revisions/e2fd4308c6c3?raw)
