Skip to main content

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.

Scopeconnectors:write (sensitive)
AsynchronousNo
MCP toolcreate_github_repository
Portal permissionscreate_github_repository_mappings

Parameters​

NameInTypeRequiredDescription
Docwize-Versionheaderstring (date)Optional
Idempotency-KeyheaderstringOptionalmax 255

Request body​

Content typeType
application/jsonGitHubRepositoryCreateInput

Responses​

StatusDescriptionBody
201Success.application/json GitHubRepository or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409idempotency_in_progressapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

GitHubBranchMappingInputInput​

FieldTypeRequiredDescription
branch_namestringRequired
is_enabledboolean or nullOptionalDefaults to true.
number_prefixstring or nullOptionalEmpty falls back to the repository's prefix.

GitHubRepository​

FieldTypeRequiredDescription
auth_typestringRequired
created_atstring (date-time) or nullRequired
display_namestring or nullRequired
edit_group_idsarray of stringRequiredGroups that may edit the imported documents.
edit_user_idsarray of stringRequiredUsers that may edit the imported documents.
file_extensionsarray of stringRequired
github_account_loginstring or nullRequired
github_installation_idstring or nullRequired
github_repository_idstringRequired
has_credentialsbooleanRequiredWhether the repository has its GitHub App installation.
is_activeboolean or nullRequired
last_synced_atstring (date-time) or nullRequired
number_prefixstring or nullRequired
path_prefixesarray of stringRequired
read_group_idsarray of stringRequiredGroups that may read the imported documents.
read_user_idsarray of stringRequiredUsers that may read the imported documents.
repo_namestringRequired
repo_ownerstringRequired
schedule_dayinteger or nullRequired
schedule_hourinteger or nullRequired
schedule_typestring or nullRequired

GitHubRepositoryCreateInput​

FieldTypeRequiredDescription
branch_mappingsarray of GitHubBranchMappingInputInputOptional
display_namestring or nullOptional
edit_group_idsarray of stringOptional
edit_user_idsarray of stringOptional
file_extensionsarray of stringOptional
github_account_loginstring or nullOptional
github_installation_idstring or nullOptional
number_prefixstring or nullOptionalDefault GH.
path_prefixesarray of stringOptional
read_group_idsarray of stringOptional
read_user_idsarray of stringOptional
repo_namestringRequired
repo_ownerstringRequired
schedule_dayinteger or nullOptional
schedule_hourinteger or nullOptional
schedule_typestring or nullOptional