Add a GitHub repository.
POST/api/v1/github-repositoriesconnectors:write
Connects a repository through one of the company's GitHub App installations, with its filters, access lists, schedule and optional branch mappings. A changed or unknown installation is a 422 reference.
| Scope | connectors:write (sensitive) |
| Asynchronous | No |
| MCP tool | create_github_repository |
| Portal permissions | create_github_repository_mappings |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Docwize-Version | header | string (date) | Optional | |
Idempotency-Key | header | string | Optional | max 255 |
Request body
| Content type | Type |
|---|---|
application/json | GitHubRepositoryCreateInput |
Responses
| Status | Description | Body |
|---|---|---|
201 | Success. | application/json GitHubRepository or object |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
409 | idempotency_in_progress | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | idempotency_key_reused, validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
GitHubBranchMappingInputInput
| Field | Type | Required | Description |
|---|---|---|---|
branch_name | string | Required | |
is_enabled | boolean or null | Optional | Defaults to true. |
number_prefix | string or null | Optional | Empty falls back to the repository's prefix. |
GitHubRepository
| Field | Type | Required | Description |
|---|---|---|---|
auth_type | string | Required | |
created_at | string (date-time) or null | Required | |
display_name | string or null | Required | |
edit_group_ids | array of string | Required | Groups that may edit the imported documents. |
edit_user_ids | array of string | Required | Users that may edit the imported documents. |
file_extensions | array of string | Required | |
github_account_login | string or null | Required | |
github_installation_id | string or null | Required | |
github_repository_id | string | Required | |
has_credentials | boolean | Required | Whether the repository has its GitHub App installation. |
is_active | boolean or null | Required | |
last_synced_at | string (date-time) or null | Required | |
number_prefix | string or null | Required | |
path_prefixes | array of string | Required | |
read_group_ids | array of string | Required | Groups that may read the imported documents. |
read_user_ids | array of string | Required | Users that may read the imported documents. |
repo_name | string | Required | |
repo_owner | string | Required | |
schedule_day | integer or null | Required | |
schedule_hour | integer or null | Required | |
schedule_type | string or null | Required |
GitHubRepositoryCreateInput
| Field | Type | Required | Description |
|---|---|---|---|
branch_mappings | array of GitHubBranchMappingInputInput | Optional | |
display_name | string or null | Optional | |
edit_group_ids | array of string | Optional | |
edit_user_ids | array of string | Optional | |
file_extensions | array of string | Optional | |
github_account_login | string or null | Optional | |
github_installation_id | string or null | Optional | |
number_prefix | string or null | Optional | Default GH. |
path_prefixes | array of string | Optional | |
read_group_ids | array of string | Optional | |
read_user_ids | array of string | Optional | |
repo_name | string | Required | |
repo_owner | string | Required | |
schedule_day | integer or null | Optional | |
schedule_hour | integer or null | Optional | |
schedule_type | string or null | Optional |