---
title: "Add GitHub with Token"
method: POST
path: "/api/v1/repositories/add-github-with-token"
tags: ["Repositories"]
---

# Add GitHub with Token

`POST /api/v1/repositories/add-github-with-token`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v1/repositories/add-github-with-token`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

Add a GitHub Repository using a personal access token or other access token

## Request body

- object
  - `organizationId` string, required: Organization to add the repository to
  - `repositoryUrl` string, required: URL of the GitHub repository
  - `accessToken` string, required: GitHub personal access token or other access token
  - `defaultBranch` string: Default branch for repository operations

## Response `200`

Successfully added repository

- object
  - `id` string, required: Unique identifier of the created repository

---

[API](https://skmtc.dev/zeropath/apis/zeropath-api.md) - [All operations](https://skmtc.dev/zeropath/apis/zeropath-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zeropath/apis/zeropath-api/revisions/126e9c80ba0d?raw)
