---
title: "Create Git Provider"
method: POST
path: "/api/v1/git-providers/"
tags: ["git-integration", "Git Integration"]
---

# Create Git Provider

`POST /api/v1/git-providers/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/api/v1/git-providers/`
- Auth: none declared

Create a new git provider connection.

Args:
    provider_data: Provider creation data
    ctx: Application context with session, user, and company info

Returns:
    StandardResponse with created provider

## Headers

- `Authorization` string

## Request body

- GitProviderCreate: Schema for creating a git provider.
  - `provider_type` 'github' | 'gitlab' | 'bitbucket', required: Supported git provider types.
  - `base_url` string, uri, required: Base URL for git provider (e.g., https://github.com)
  - `oauth_client_id` string, nullable: OAuth app client ID (user-provided, e.g., GitHub OAuth app)
  - `oauth_client_secret` string, nullable: OAuth app client secret (user-provided)
  - `oauth_scopes` string[], nullable: OAuth scopes to request (e.g., ['repo', 'read:user'] for GitHub)

## Response `201`

Successful Response

- StandardResponse: Standard API response wrapper.
  - `success` boolean, required
  - `data` unknown
  - `message` string, nullable
  - `error` string, nullable
  - `meta` object, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api.md) · [All operations](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api/revisions/51c755fb5d0b?raw)
