Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Repository

List repositories

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

querystringOptional

The substring which is used to filter the repositories by their path name.

sortstring · enumOptional

The data by which the repositories are sorted.

Default: identifierPossible values:
orderstring · enumOptional

The order of the output.

Default: ascPossible values:
pageinteger · min: 1Optional

The page to return.

Default: 1
limitinteger · min: 1 · max: 100Optional

The maximum number of results to return.

Default: 30
only_favoritesbooleanOptional

The result should contain only the favorite entries for the logged in user.

Default: false
recursivebooleanOptional

The result should include entities from child spaces.

Default: false
tagstring[]Optional

The tags used to filter the repositories. Each entry is either a key (e.g. "team") to match any value, or a key:value pair (e.g. "team:backend"). The parameter may be repeated.

Responses
200

OK

application/json
archivedbooleanOptional
createdintegerOptional
created_byintegerOptional
default_branchstringOptional
deletedinteger · nullableOptional
descriptionstringOptional
fork_idintegerOptional
git_ssh_urlstringOptional
git_urlstringOptional
idintegerOptional
identifierstringOptional
import_failedbooleanOptional
importingbooleanOptional
is_emptybooleanOptional
is_favoritebooleanOptional
is_publicbooleanOptional
languagestringOptional
last_git_pushintegerOptional
locintegerOptional

source lines of code on the default branch

num_closed_pullsintegerOptional
num_forksintegerOptional
num_merged_pullsintegerOptional
num_open_pullsintegerOptional
num_pullsintegerOptional
parent_idintegerOptional
pathstringOptional
repo_typestringOptional
root_space_idintegerOptional
root_space_identifierstringOptional
sizeintegerOptional

size of the repository in KiB

size_lfsintegerOptional

size of the repository LFS in KiB

size_updatedintegerOptional
stateinteger · nullableOptional
tagsanyOptional
updatedintegerOptional
get/repos
GET /code/api/v1/repos?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
[
  {
    "archived": true,
    "created": 1,
    "created_by": 1,
    "default_branch": "text",
    "deleted": 1,
    "description": "text",
    "fork_id": 1,
    "git_ssh_url": "text",
    "git_url": "text",
    "id": 1,
    "identifier": "text",
    "import_failed": true,
    "importing": true,
    "is_empty": true,
    "is_favorite": true,
    "is_public": true,
    "language": "text",
    "last_git_push": 1,
    "loc": 1,
    "num_closed_pulls": 1,
    "num_forks": 1,
    "num_merged_pulls": 1,
    "num_open_pulls": 1,
    "num_pulls": 1,
    "parent_id": 1,
    "path": "text",
    "repo_type": "text",
    "root_space_id": 1,
    "root_space_identifier": "text",
    "size": 1,
    "size_lfs": 1,
    "size_updated": 1,
    "state": 1,
    "tags": null,
    "updated": 1,
    "upstream": {
      "default_branch": "text",
      "fork_id": 1,
      "id": 1,
      "identifier": "text",
      "parent_id": 1,
      "path": "text",
      "type": "text"
    }
  }
]

Create repository

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
default_branchstringOptional
descriptionstringOptional
git_ignorestringOptional
identifierstringOptional
is_publicbooleanOptional
licensestringOptional
parent_refstringOptional
readmebooleanOptional
uidstringOptionalDeprecated
Responses
201

Created

application/json
archivedbooleanOptional
createdintegerOptional
created_byintegerOptional
default_branchstringOptional
deletedinteger · nullableOptional
descriptionstringOptional
fork_idintegerOptional
git_ssh_urlstringOptional
git_urlstringOptional
idintegerOptional
identifierstringOptional
import_failedbooleanOptional
importingbooleanOptional
is_emptybooleanOptional
is_favoritebooleanOptional
is_publicbooleanOptional
languagestringOptional
last_git_pushintegerOptional
locintegerOptional

source lines of code on the default branch

num_closed_pullsintegerOptional
num_forksintegerOptional
num_merged_pullsintegerOptional
num_open_pullsintegerOptional
num_pullsintegerOptional
parent_idintegerOptional
pathstringOptional
repo_typestringOptional
root_space_idintegerOptional
root_space_identifierstringOptional
sizeintegerOptional

size of the repository in KiB

size_lfsintegerOptional

size of the repository LFS in KiB

size_updatedintegerOptional
stateinteger · nullableOptional
tagsanyOptional
updatedintegerOptional
post/repos
POST /code/api/v1/repos?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 196

{
  "default_branch": "text",
  "description": "text",
  "git_ignore": "text",
  "identifier": "text",
  "is_public": true,
  "license": "text",
  "parent_ref": "text",
  "readme": true,
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}
{
  "archived": true,
  "created": 1,
  "created_by": 1,
  "default_branch": "text",
  "deleted": 1,
  "description": "text",
  "fork_id": 1,
  "git_ssh_url": "text",
  "git_url": "text",
  "id": 1,
  "identifier": "text",
  "import_failed": true,
  "importing": true,
  "is_empty": true,
  "is_favorite": true,
  "is_public": true,
  "language": "text",
  "last_git_push": 1,
  "loc": 1,
  "num_closed_pulls": 1,
  "num_forks": 1,
  "num_merged_pulls": 1,
  "num_open_pulls": 1,
  "num_pulls": 1,
  "parent_id": 1,
  "path": "text",
  "repo_type": "text",
  "root_space_id": 1,
  "root_space_identifier": "text",
  "size": 1,
  "size_lfs": 1,
  "size_updated": 1,
  "state": 1,
  "tags": null,
  "updated": 1,
  "upstream": {
    "default_branch": "text",
    "fork_id": 1,
    "id": 1,
    "identifier": "text",
    "parent_id": 1,
    "path": "text",
    "type": "text"
  }
}

Get repository

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Responses
200

OK

application/json
archivedbooleanOptional
createdintegerOptional
created_byintegerOptional
default_branchstringOptional
deletedinteger · nullableOptional
descriptionstringOptional
fork_idintegerOptional
git_ssh_urlstringOptional
git_urlstringOptional
idintegerOptional
identifierstringOptional
import_failedbooleanOptional
importingbooleanOptional
is_emptybooleanOptional
is_favoritebooleanOptional
is_publicbooleanOptional
languagestringOptional
last_git_pushintegerOptional
locintegerOptional

source lines of code on the default branch

num_closed_pullsintegerOptional
num_forksintegerOptional
num_merged_pullsintegerOptional
num_open_pullsintegerOptional
num_pullsintegerOptional
parent_idintegerOptional
pathstringOptional
repo_typestringOptional
root_space_idintegerOptional
root_space_identifierstringOptional
sizeintegerOptional

size of the repository in KiB

size_lfsintegerOptional

size of the repository LFS in KiB

size_updatedintegerOptional
stateinteger · nullableOptional
tagsanyOptional
updatedintegerOptional
get/repos/{repo_identifier}
GET /code/api/v1/repos/{repo_identifier}?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
{
  "archived": true,
  "created": 1,
  "created_by": 1,
  "default_branch": "text",
  "deleted": 1,
  "description": "text",
  "fork_id": 1,
  "git_ssh_url": "text",
  "git_url": "text",
  "id": 1,
  "identifier": "text",
  "import_failed": true,
  "importing": true,
  "is_empty": true,
  "is_favorite": true,
  "is_public": true,
  "language": "text",
  "last_git_push": 1,
  "loc": 1,
  "num_closed_pulls": 1,
  "num_forks": 1,
  "num_merged_pulls": 1,
  "num_open_pulls": 1,
  "num_pulls": 1,
  "parent_id": 1,
  "path": "text",
  "repo_type": "text",
  "root_space_id": 1,
  "root_space_identifier": "text",
  "size": 1,
  "size_lfs": 1,
  "size_updated": 1,
  "state": 1,
  "tags": null,
  "updated": 1,
  "upstream": {
    "default_branch": "text",
    "fork_id": 1,
    "id": 1,
    "identifier": "text",
    "parent_id": 1,
    "path": "text",
    "type": "text"
  }
}

Soft delete repository

delete
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Responses
200

OK

application/json
deleted_atintegerOptional
delete/repos/{repo_identifier}
DELETE /code/api/v1/repos/{repo_identifier}?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
{
  "deleted_at": 1
}

Update repository

patch
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
descriptionstring · nullableOptional
stateinteger · nullableOptional
Responses
200

OK

application/json
archivedbooleanOptional
createdintegerOptional
created_byintegerOptional
default_branchstringOptional
deletedinteger · nullableOptional
descriptionstringOptional
fork_idintegerOptional
git_ssh_urlstringOptional
git_urlstringOptional
idintegerOptional
identifierstringOptional
import_failedbooleanOptional
importingbooleanOptional
is_emptybooleanOptional
is_favoritebooleanOptional
is_publicbooleanOptional
languagestringOptional
last_git_pushintegerOptional
locintegerOptional

source lines of code on the default branch

num_closed_pullsintegerOptional
num_forksintegerOptional
num_merged_pullsintegerOptional
num_open_pullsintegerOptional
num_pullsintegerOptional
parent_idintegerOptional
pathstringOptional
repo_typestringOptional
root_space_idintegerOptional
root_space_identifierstringOptional
sizeintegerOptional

size of the repository in KiB

size_lfsintegerOptional

size of the repository LFS in KiB

size_updatedintegerOptional
stateinteger · nullableOptional
tagsanyOptional
updatedintegerOptional
patch/repos/{repo_identifier}
PATCH /code/api/v1/repos/{repo_identifier}?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 74

{
  "description": "text",
  "state": 1,
  "tags": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}
{
  "archived": true,
  "created": 1,
  "created_by": 1,
  "default_branch": "text",
  "deleted": 1,
  "description": "text",
  "fork_id": 1,
  "git_ssh_url": "text",
  "git_url": "text",
  "id": 1,
  "identifier": "text",
  "import_failed": true,
  "importing": true,
  "is_empty": true,
  "is_favorite": true,
  "is_public": true,
  "language": "text",
  "last_git_push": 1,
  "loc": 1,
  "num_closed_pulls": 1,
  "num_forks": 1,
  "num_merged_pulls": 1,
  "num_open_pulls": 1,
  "num_pulls": 1,
  "parent_id": 1,
  "path": "text",
  "repo_type": "text",
  "root_space_id": 1,
  "root_space_identifier": "text",
  "size": 1,
  "size_lfs": 1,
  "size_updated": 1,
  "state": 1,
  "tags": null,
  "updated": 1,
  "upstream": {
    "default_branch": "text",
    "fork_id": 1,
    "id": 1,
    "identifier": "text",
    "parent_id": 1,
    "path": "text",
    "type": "text"
  }
}

List repository activities

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

afterintegerOptional

The result should contain only entries created at and after this timestamp (unix millis).

beforeintegerOptional

The result should contain only entries created before this timestamp (unix millis).

pageinteger · min: 1Optional

The page to return.

Default: 1
limitinteger · min: 1 · max: 100Optional

The maximum number of results to return.

Default: 30
Responses
200

OK

application/json
payloadanyOptional
principal_idintegerOptional
repo_idintegerOptional
timestampintegerOptional
typestring · enumOptionalPossible values:
get/repos/{repo_identifier}/activities
GET /code/api/v1/repos/{repo_identifier}/activities?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
[
  {
    "payload": null,
    "principal_id": 1,
    "repo_id": 1,
    "timestamp": 1,
    "type": "branch-created"
  }
]

Download repo in archived format

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
git_refstringRequired
formatstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

pathstring[]Optional

Without an optional path parameter, all files and subdirectories of the current working directory are included in the archive. If one or more paths are specified, only these are included.

prefixstringOptional

Prepend / to paths in the archive.

attributesstringOptional

Look for attributes in .gitattributes files in the working tree as well

timestringOptional

Set modification time of archive entries. Without this option the committer time is used if is a commit or tag, and the current time if it is a tree.

compressionintegerOptional

Specify compression level. Larger values allow the command to spend more time to compress to smaller size.

Responses
200

OK

stringOptional
get/repos/{repo_identifier}/archive/{git_ref}.{format}
GET /code/api/v1/repos/{repo_identifier}/archive/{git_ref}.{format}?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
text

Get git blame

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
pathstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

git_refstringOptional

The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.

Default: {Repository Default Branch}
line_fromintegerOptional

Line number from which the file data is considered

Default: 0
line_tointegerOptional

Line number to which the file data is considered

Default: 0
Responses
200

OK

application/json
linesstring[] · nullableOptional
get/repos/{repo_identifier}/blame/{path}
GET /code/api/v1/repos/{repo_identifier}/blame/{path}?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
[
  {
    "commit": {
      "author": {
        "identity": {
          "email": "text",
          "name": "text"
        },
        "when": "2026-01-01T00:00:00.000Z"
      },
      "committer": {
        "identity": {
          "email": "text",
          "name": "text"
        },
        "when": "2026-01-01T00:00:00.000Z"
      },
      "file_stats": [
        {}
      ],
      "message": "text",
      "parent_shas": [
        "text"
      ],
      "sha": "text",
      "title": "text"
    },
    "lines": [
      "text"
    ],
    "previous": {
      "commit_sha": "text",
      "file_name": "text"
    }
  }
]

List branches

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

include_commitbooleanOptional

Indicates whether optional commit information should be included in the response.

Default: false
querystringOptional

The substring by which the branches are filtered.

orderstring · enumOptional

The order of the output.

Default: ascPossible values:
sortstring · enumOptional

The data by which the branches are sorted.

Default: namePossible values:
pageinteger · min: 1Optional

The page to return.

Default: 1
limitinteger · min: 1 · max: 100Optional

The maximum number of results to return.

Default: 30
include_checksbooleanOptional

If true, the summary of check for the branch commit SHA would be included in the response.

Default: false
include_rulesbooleanOptional

If true, a list of rules that apply to this branch would be included in the response.

Default: false
include_pullreqsbooleanOptional

If true, a list of pull requests from the branch would be included in the response.

Default: false
include_merge_queuebooleanOptional

If true, merge queue info for the branch would be included in the response.

Default: false
max_divergenceintegerOptional

If greater than zero, branch divergence from the default branch will be included in the response. The divergence would be calculated up the this many commits.

Default: 0
Responses
200

OK

application/json
is_defaultbooleanOptional
namestringOptional
shastringOptional

Git object hash

get/repos/{repo_identifier}/branches
GET /code/api/v1/repos/{repo_identifier}/branches?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
[
  {
    "check_summary": {
      "error": 1,
      "failure": 1,
      "failure_ignored": 1,
      "pending": 1,
      "running": 1,
      "success": 1
    },
    "commit": {
      "author": {
        "identity": {
          "email": "text",
          "name": "text"
        },
        "when": "2026-01-01T00:00:00.000Z"
      },
      "committer": {
        "identity": {
          "email": "text",
          "name": "text"
        },
        "when": "2026-01-01T00:00:00.000Z"
      },
      "message": "text",
      "parent_shas": [
        "text"
      ],
      "sha": "text",
      "signature": {
        "created": 1,
        "key_fingerprint": "text",
        "key_id": "text",
        "key_scheme": "pgp",
        "result": "bad",
        "updated": 1
      },
      "stats": {
        "files": [
          {
            "changes": 1,
            "deletions": 1,
            "insertions": 1,
            "old_path": "text",
            "path": "text",
            "status": "text"
          }
        ],
        "total": {
          "changes": 1,
          "deletions": 1,
          "insertions": 1
        }
      },
      "title": "text"
    },
    "commit_divergence": {
      "ahead": 1,
      "behind": 1
    },
    "is_default": true,
    "merge_queue": {
      "active": true
    },
    "name": "text",
    "pull_requests": [
      {
        "author": {
          "created": 1,
          "display_name": "text",
          "email": "text",
          "id": 1,
          "type": "service",
          "uid": "text",
          "updated": 1
        },
        "check_summary": {
          "error": 1,
          "failure": 1,
          "failure_ignored": 1,
          "pending": 1,
          "running": 1,
          "success": 1
        },
        "closed": 1,
        "created": 1,
        "description": "text",
        "edited": 1,
        "is_draft": true,
        "labels": [
          {
            "color": "blue",
            "id": 1,
            "key": "text",
            "scope": 1,
            "value": "text",
            "value_color": "blue",
            "value_count": 1,
            "value_id": 1
          }
        ],
        "merge_base_sha": "text",
        "merge_check_status": "text",
        "merge_conflicts": [
          "text"
        ],
        "merge_method": "fast-forward",
        "merge_target_sha": "text",
        "merge_violations_bypassed": true,
        "merged": 1,
        "merger": {
          "created": 1,
          "display_name": "text",
          "email": "text",
          "id": 1,
          "type": "service",
          "uid": "text",
          "updated": 1
        },
        "number": 1,
        "pullreq_type": "text",
        "rebase_check_status": "text",
        "rebase_conflicts": [
          "text"
        ],
        "root_space_id": 1,
        "root_space_identifier": "text",
        "rules": [
          {
            "identifier": "text",
            "repo_path": "text",
            "space_path": "text",
            "state": "active",
            "type": "branch"
          }
        ],
        "source_branch": "text",
        "source_repo": {
          "default_branch": "text",
          "fork_id": 1,
          "id": 1,
          "identifier": "text",
          "parent_id": 1,
          "path": "text",
          "type": "text"
        },
        "source_repo_id": 1,
        "source_sha": "text",
        "state": "closed",
        "stats": {
          "additions": 1,
          "commits": 1,
          "conversations": 1,
          "deletions": 1,
          "files_changed": 1,
          "unresolved_count": 1
        },
        "substate": "",
        "target_branch": "text",
        "target_repo_id": 1,
        "title": "text",
        "updated": 1
      }
    ],
    "rules": [
      {
        "identifier": "text",
        "repo_path": "text",
        "space_path": "text",
        "state": "active",
        "type": "branch"
      }
    ],
    "sha": "text"
  }
]

Create branch

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
bypass_rulesbooleanOptional
dry_run_rulesbooleanOptional
namestringOptional
targetstringOptional
Responses
201

Created

application/json
dry_run_rulesbooleanOptional
namestringOptional
shastringOptional

Git object hash

post/repos/{repo_identifier}/branches
POST /code/api/v1/repos/{repo_identifier}/branches?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 72

{
  "bypass_rules": true,
  "dry_run_rules": true,
  "name": "text",
  "target": "text"
}
{
  "commit": {
    "author": {
      "identity": {
        "email": "text",
        "name": "text"
      },
      "when": "2026-01-01T00:00:00.000Z"
    },
    "committer": {
      "identity": {
        "email": "text",
        "name": "text"
      },
      "when": "2026-01-01T00:00:00.000Z"
    },
    "message": "text",
    "parent_shas": [
      "text"
    ],
    "sha": "text",
    "signature": {
      "created": 1,
      "key_fingerprint": "text",
      "key_id": "text",
      "key_scheme": "pgp",
      "result": "bad",
      "updated": 1
    },
    "stats": {
      "files": [
        {
          "changes": 1,
          "deletions": 1,
          "insertions": 1,
          "old_path": "text",
          "path": "text",
          "status": "text"
        }
      ],
      "total": {
        "changes": 1,
        "deletions": 1,
        "insertions": 1
      }
    },
    "title": "text"
  },
  "dry_run_rules": true,
  "name": "text",
  "rule_violations": [
    {
      "bypassable": true,
      "bypassed": true,
      "rule": {
        "identifier": "text",
        "repo_path": "text",
        "space_path": "text",
        "state": "active",
        "type": "branch"
      },
      "violations": [
        {
          "code": "text",
          "message": "text",
          "params": []
        }
      ]
    }
  ],
  "sha": "text"
}

Get branch

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
branch_namestringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

include_checksbooleanOptional

If true, the summary of check for the branch commit SHA would be included in the response.

Default: false
include_rulesbooleanOptional

If true, a list of rules that apply to this branch would be included in the response.

Default: false
include_pullreqsbooleanOptional

If true, a list of pull requests from the branch would be included in the response.

Default: false
include_merge_queuebooleanOptional

If true, merge queue info for the branch would be included in the response.

Default: false
max_divergenceintegerOptional

If greater than zero, branch divergence from the default branch will be included in the response. The divergence would be calculated up the this many commits.

Default: 0
Responses
200

OK

application/json
is_defaultbooleanOptional
namestringOptional
shastringOptional

Git object hash

get/repos/{repo_identifier}/branches/{branch_name}
GET /code/api/v1/repos/{repo_identifier}/branches/{branch_name}?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
{
  "check_summary": {
    "error": 1,
    "failure": 1,
    "failure_ignored": 1,
    "pending": 1,
    "running": 1,
    "success": 1
  },
  "commit": {
    "author": {
      "identity": {
        "email": "text",
        "name": "text"
      },
      "when": "2026-01-01T00:00:00.000Z"
    },
    "committer": {
      "identity": {
        "email": "text",
        "name": "text"
      },
      "when": "2026-01-01T00:00:00.000Z"
    },
    "message": "text",
    "parent_shas": [
      "text"
    ],
    "sha": "text",
    "signature": {
      "created": 1,
      "key_fingerprint": "text",
      "key_id": "text",
      "key_scheme": "pgp",
      "result": "bad",
      "updated": 1
    },
    "stats": {
      "files": [
        {
          "changes": 1,
          "deletions": 1,
          "insertions": 1,
          "old_path": "text",
          "path": "text",
          "status": "text"
        }
      ],
      "total": {
        "changes": 1,
        "deletions": 1,
        "insertions": 1
      }
    },
    "title": "text"
  },
  "commit_divergence": {
    "ahead": 1,
    "behind": 1
  },
  "is_default": true,
  "merge_queue": {
    "active": true
  },
  "name": "text",
  "pull_requests": [
    {
      "author": {
        "created": 1,
        "display_name": "text",
        "email": "text",
        "id": 1,
        "type": "service",
        "uid": "text",
        "updated": 1
      },
      "check_summary": {
        "error": 1,
        "failure": 1,
        "failure_ignored": 1,
        "pending": 1,
        "running": 1,
        "success": 1
      },
      "closed": 1,
      "created": 1,
      "description": "text",
      "edited": 1,
      "is_draft": true,
      "labels": [
        {
          "color": "blue",
          "id": 1,
          "key": "text",
          "scope": 1,
          "value": "text",
          "value_color": "blue",
          "value_count": 1,
          "value_id": 1
        }
      ],
      "merge_base_sha": "text",
      "merge_check_status": "text",
      "merge_conflicts": [
        "text"
      ],
      "merge_method": "fast-forward",
      "merge_target_sha": "text",
      "merge_violations_bypassed": true,
      "merged": 1,
      "merger": {
        "created": 1,
        "display_name": "text",
        "email": "text",
        "id": 1,
        "type": "service",
        "uid": "text",
        "updated": 1
      },
      "number": 1,
      "pullreq_type": "text",
      "rebase_check_status": "text",
      "rebase_conflicts": [
        "text"
      ],
      "root_space_id": 1,
      "root_space_identifier": "text",
      "rules": [
        {
          "identifier": "text",
          "repo_path": "text",
          "space_path": "text",
          "state": "active",
          "type": "branch"
        }
      ],
      "source_branch": "text",
      "source_repo": {
        "default_branch": "text",
        "fork_id": 1,
        "id": 1,
        "identifier": "text",
        "parent_id": 1,
        "path": "text",
        "type": "text"
      },
      "source_repo_id": 1,
      "source_sha": "text",
      "state": "closed",
      "stats": {
        "additions": 1,
        "commits": 1,
        "conversations": 1,
        "deletions": 1,
        "files_changed": 1,
        "unresolved_count": 1
      },
      "substate": "",
      "target_branch": "text",
      "target_repo_id": 1,
      "title": "text",
      "updated": 1
    }
  ],
  "rules": [
    {
      "identifier": "text",
      "repo_path": "text",
      "space_path": "text",
      "state": "active",
      "type": "branch"
    }
  ],
  "sha": "text"
}

Delete branch

delete
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
branch_namestringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

bypass_rulesbooleanOptional

Bypass rule violations if possible.

Default: false
dry_run_rulesbooleanOptional

Dry run rules for operations

Default: false
Responses
200

OK

application/json
dry_run_rulesbooleanOptional
delete/repos/{repo_identifier}/branches/{branch_name}
DELETE /code/api/v1/repos/{repo_identifier}/branches/{branch_name}?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
{
  "dry_run_rules": true,
  "rule_violations": [
    {
      "bypassable": true,
      "bypassed": true,
      "rule": {
        "identifier": "text",
        "repo_path": "text",
        "space_path": "text",
        "state": "active",
        "type": "branch"
      },
      "violations": [
        {
          "code": "text",
          "message": "text",
          "params": []
        }
      ]
    }
  ]
}

Validate code owners file

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

git_refstringOptional

The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.

Default: {Repository Default Branch}
Responses
200

OK

No content

get/repos/{repo_identifier}/codeowners/validate
GET /code/api/v1/repos/{repo_identifier}/codeowners/validate?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*

No content

List commits

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

git_refstringOptional

The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.

Default: {Repository Default Branch}
afterstringOptional

The result should only contain commits that occurred after the provided reference.

pathstringOptional

Path for which commit information should be retrieved

Default: ""
sinceintegerOptional

Epoch timestamp since when commit information should be retrieved.

Example: 1728348213
untilintegerOptional

Epoch timestamp until when commit information should be retrieved.

Example: 1746668446
committerstringOptional

Committer pattern for which commit information should be retrieved.

committer_idinteger[]Optional

Committer principal IDs list for which commit information should be retrieved.

authorstringOptional

Author pattern for which commit information should be retrieved.

author_idinteger[]Optional

Author principal IDs for which commit information should be retrieved.

pageinteger · min: 1Optional

The page to return.

Default: 1
limitinteger · min: 1 · max: 100Optional

The maximum number of results to return.

Default: 30
include_statsbooleanOptional

Indicates whether optional stats should be included in the response.

Default: false
Responses
200

OK

application/json
total_commitsintegerOptional
get/repos/{repo_identifier}/commits
GET /code/api/v1/repos/{repo_identifier}/commits?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
{
  "commits": [
    {
      "author": {
        "identity": {
          "email": "text",
          "name": "text"
        },
        "when": "2026-01-01T00:00:00.000Z"
      },
      "committer": {
        "identity": {
          "email": "text",
          "name": "text"
        },
        "when": "2026-01-01T00:00:00.000Z"
      },
      "message": "text",
      "parent_shas": [
        "text"
      ],
      "sha": "text",
      "signature": {
        "created": 1,
        "key_fingerprint": "text",
        "key_id": "text",
        "key_scheme": "pgp",
        "result": "bad",
        "updated": 1
      },
      "stats": {
        "files": [
          {
            "changes": 1,
            "deletions": 1,
            "insertions": 1,
            "old_path": "text",
            "path": "text",
            "status": "text"
          }
        ],
        "total": {
          "changes": 1,
          "deletions": 1,
          "insertions": 1
        }
      },
      "title": "text"
    }
  ],
  "rename_details": [
    {
      "commit_sha_after": "text",
      "commit_sha_before": "text",
      "new_path": "text",
      "old_path": "text"
    }
  ],
  "total_commits": 1
}

Commit files

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
branchstringOptional
bypass_rulesbooleanOptional
dry_run_rulesbooleanOptional
messagestringOptional
new_branchstringOptional
titlestringOptional
Responses
200

OK

application/json
commit_idstringOptional

Git object hash

dry_run_rulesbooleanOptional
post/repos/{repo_identifier}/commits
POST /code/api/v1/repos/{repo_identifier}/commits?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 246

{
  "actions": [
    {
      "action": "CREATE",
      "encoding": "base64",
      "path": "text",
      "payload": "text",
      "sha": "text"
    }
  ],
  "author": {
    "email": "text",
    "name": "text"
  },
  "branch": "text",
  "bypass_rules": true,
  "dry_run_rules": true,
  "message": "text",
  "new_branch": "text",
  "title": "text"
}
{
  "changed_files": [
    {
      "blob_sha": "text",
      "path": "text"
    }
  ],
  "commit_id": "text",
  "dry_run_rules": true,
  "rule_violations": [
    {
      "bypassable": true,
      "bypassed": true,
      "rule": {
        "identifier": "text",
        "repo_path": "text",
        "space_path": "text",
        "state": "active",
        "type": "branch"
      },
      "violations": [
        {
          "code": "text",
          "message": "text",
          "params": []
        }
      ]
    }
  ]
}

Get commit

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
commit_shastringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Responses
200

OK

application/json
messagestringOptional
parent_shasstring[]Optional

Git object hash

shastringOptional

Git object hash

titlestringOptional
get/repos/{repo_identifier}/commits/{commit_sha}
GET /code/api/v1/repos/{repo_identifier}/commits/{commit_sha}?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
{
  "author": {
    "identity": {
      "email": "text",
      "name": "text"
    },
    "when": "2026-01-01T00:00:00.000Z"
  },
  "committer": {
    "identity": {
      "email": "text",
      "name": "text"
    },
    "when": "2026-01-01T00:00:00.000Z"
  },
  "message": "text",
  "parent_shas": [
    "text"
  ],
  "sha": "text",
  "signature": {
    "created": 1,
    "key_fingerprint": "text",
    "key_id": "text",
    "key_scheme": "pgp",
    "result": "bad",
    "updated": 1
  },
  "stats": {
    "files": [
      {
        "changes": 1,
        "deletions": 1,
        "insertions": 1,
        "old_path": "text",
        "path": "text",
        "status": "text"
      }
    ],
    "total": {
      "changes": 1,
      "deletions": 1,
      "insertions": 1
    }
  },
  "title": "text"
}

Get raw git diff of a commit

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
commit_shastringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Responses
200

OK

text/plain
stringOptional
get/repos/{repo_identifier}/commits/{commit_sha}/diff
GET /code/api/v1/repos/{repo_identifier}/commits/{commit_sha}/diff?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
text

Get commit divergence

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
max_countintegerOptional
Responses
200

OK

application/json
aheadintegerOptional
behindintegerOptional
post/repos/{repo_identifier}/commits/calculate-divergence
POST /code/api/v1/repos/{repo_identifier}/commits/calculate-divergence?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 56

{
  "max_count": 1,
  "requests": [
    {
      "from": "text",
      "to": "text"
    }
  ]
}
[
  {
    "ahead": 1,
    "behind": 1
  }
]

Get content of a file

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
pathstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

git_refstringOptional

The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.

Default: {Repository Default Branch}
include_commitbooleanOptional

Indicates whether optional commit information should be included in the response.

Default: false
flatten_directoriesbooleanOptional

Flatten directories that contain just one subdirectory.

Default: false
Responses
200

OK

application/json
contentone ofOptional
or
or
or
namestringOptional
pathstringOptional
shastringOptional
typestring · enumOptionalPossible values:
get/repos/{repo_identifier}/content/{path}
GET /code/api/v1/repos/{repo_identifier}/content/{path}?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
{
  "content": {
    "data": "text",
    "data_size": 1,
    "encoding": "base64",
    "lfs_object_id": "text",
    "lfs_object_size": 1,
    "size": 1
  },
  "latest_commit": {
    "author": {
      "identity": {
        "email": "text",
        "name": "text"
      },
      "when": "2026-01-01T00:00:00.000Z"
    },
    "committer": {
      "identity": {
        "email": "text",
        "name": "text"
      },
      "when": "2026-01-01T00:00:00.000Z"
    },
    "message": "text",
    "parent_shas": [
      "text"
    ],
    "sha": "text",
    "signature": {
      "created": 1,
      "key_fingerprint": "text",
      "key_id": "text",
      "key_scheme": "pgp",
      "result": "bad",
      "updated": 1
    },
    "stats": {
      "files": [
        {
          "changes": 1,
          "deletions": 1,
          "insertions": 1,
          "old_path": "text",
          "path": "text",
          "status": "text"
        }
      ],
      "total": {
        "changes": 1,
        "deletions": 1,
        "insertions": 1
      }
    },
    "title": "text"
  },
  "name": "text",
  "path": "text",
  "sha": "text",
  "type": "file"
}

Update default branch

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
namestringOptional
Responses
200

OK

application/json
archivedbooleanOptional
createdintegerOptional
created_byintegerOptional
default_branchstringOptional
deletedinteger · nullableOptional
descriptionstringOptional
fork_idintegerOptional
git_ssh_urlstringOptional
git_urlstringOptional
idintegerOptional
identifierstringOptional
import_failedbooleanOptional
importingbooleanOptional
is_emptybooleanOptional
is_favoritebooleanOptional
is_publicbooleanOptional
languagestringOptional
last_git_pushintegerOptional
locintegerOptional

source lines of code on the default branch

num_closed_pullsintegerOptional
num_forksintegerOptional
num_merged_pullsintegerOptional
num_open_pullsintegerOptional
num_pullsintegerOptional
parent_idintegerOptional
pathstringOptional
repo_typestringOptional
root_space_idintegerOptional
root_space_identifierstringOptional
sizeintegerOptional

size of the repository in KiB

size_lfsintegerOptional

size of the repository LFS in KiB

size_updatedintegerOptional
stateinteger · nullableOptional
tagsanyOptional
updatedintegerOptional
post/repos/{repo_identifier}/default-branch
POST /code/api/v1/repos/{repo_identifier}/default-branch?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "name": "text"
}
{
  "archived": true,
  "created": 1,
  "created_by": 1,
  "default_branch": "text",
  "deleted": 1,
  "description": "text",
  "fork_id": 1,
  "git_ssh_url": "text",
  "git_url": "text",
  "id": 1,
  "identifier": "text",
  "import_failed": true,
  "importing": true,
  "is_empty": true,
  "is_favorite": true,
  "is_public": true,
  "language": "text",
  "last_git_push": 1,
  "loc": 1,
  "num_closed_pulls": 1,
  "num_forks": 1,
  "num_merged_pulls": 1,
  "num_open_pulls": 1,
  "num_pulls": 1,
  "parent_id": 1,
  "path": "text",
  "repo_type": "text",
  "root_space_id": 1,
  "root_space_identifier": "text",
  "size": 1,
  "size_lfs": 1,
  "size_updated": 1,
  "state": 1,
  "tags": null,
  "updated": 1,
  "upstream": {
    "default_branch": "text",
    "fork_id": 1,
    "id": 1,
    "identifier": "text",
    "parent_id": 1,
    "path": "text",
    "type": "text"
  }
}

Get diff stats

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
rangestringRequiredExample: main..dev
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

pathstring[]Optional

provide path for diff operation

Responses
200

OK

application/json
additionsinteger · nullableOptional
commitsinteger · nullableOptional
deletionsinteger · nullableOptional
files_changedinteger · nullableOptional
get/repos/{repo_identifier}/diff-stats/{range}
GET /code/api/v1/repos/{repo_identifier}/diff-stats/{range}?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
{
  "additions": 1,
  "commits": 1,
  "deletions": 1,
  "files_changed": 1
}

Get raw diff

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
rangestringRequiredExample: main..dev
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

pathstring[]Optional

provide path for diff operation

Responses
200

OK

additionsintegerOptional
changesintegerOptional
deletionsintegerOptional
is_binarybooleanOptional
is_submodulebooleanOptional
old_pathstringOptional
old_shastringOptional
patchinteger[]Optional
pathstringOptional
shastringOptional
statusstringOptional
get/repos/{repo_identifier}/diff/{range}
GET /code/api/v1/repos/{repo_identifier}/diff/{range}?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
[
  {
    "additions": 1,
    "changes": 1,
    "deletions": 1,
    "is_binary": true,
    "is_submodule": true,
    "old_path": "text",
    "old_sha": "text",
    "patch": [
      1
    ],
    "path": "text",
    "sha": "text",
    "status": "text"
  }
]

Get raw diff

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
rangestringRequiredExample: main..dev
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Bodyobject · ApiFileDiffRequest[]
pathstringOptional
start_lineintegerOptional
Responses
200

OK

additionsintegerOptional
changesintegerOptional
deletionsintegerOptional
is_binarybooleanOptional
is_submodulebooleanOptional
old_pathstringOptional
old_shastringOptional
patchinteger[]Optional
pathstringOptional
shastringOptional
statusstringOptional
post/repos/{repo_identifier}/diff/{range}
POST /code/api/v1/repos/{repo_identifier}/diff/{range}?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 32

[
  {
    "path": "text",
    "start_line": 1
  }
]
[
  {
    "additions": 1,
    "changes": 1,
    "deletions": 1,
    "is_binary": true,
    "is_submodule": true,
    "old_path": "text",
    "old_sha": "text",
    "patch": [
      1
    ],
    "path": "text",
    "sha": "text",
    "status": "text"
  }
]
post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
fork_branchstringOptional
identifierstringOptional
parent_refstringOptional
Responses
201

Created

application/json
archivedbooleanOptional
createdintegerOptional
created_byintegerOptional
default_branchstringOptional
deletedinteger · nullableOptional
descriptionstringOptional
fork_idintegerOptional
git_ssh_urlstringOptional
git_urlstringOptional
idintegerOptional
identifierstringOptional
import_failedbooleanOptional
importingbooleanOptional
is_emptybooleanOptional
is_favoritebooleanOptional
is_publicbooleanOptional
languagestringOptional
last_git_pushintegerOptional
locintegerOptional

source lines of code on the default branch

num_closed_pullsintegerOptional
num_forksintegerOptional
num_merged_pullsintegerOptional
num_open_pullsintegerOptional
num_pullsintegerOptional
parent_idintegerOptional
pathstringOptional
repo_typestringOptional
root_space_idintegerOptional
root_space_identifierstringOptional
sizeintegerOptional

size of the repository in KiB

size_lfsintegerOptional

size of the repository LFS in KiB

size_updatedintegerOptional
stateinteger · nullableOptional
tagsanyOptional
updatedintegerOptional
post/repos/{repo_identifier}/fork
POST /code/api/v1/repos/{repo_identifier}/fork?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 62

{
  "fork_branch": "text",
  "identifier": "text",
  "parent_ref": "text"
}
{
  "archived": true,
  "created": 1,
  "created_by": 1,
  "default_branch": "text",
  "deleted": 1,
  "description": "text",
  "fork_id": 1,
  "git_ssh_url": "text",
  "git_url": "text",
  "id": 1,
  "identifier": "text",
  "import_failed": true,
  "importing": true,
  "is_empty": true,
  "is_favorite": true,
  "is_public": true,
  "language": "text",
  "last_git_push": 1,
  "loc": 1,
  "num_closed_pulls": 1,
  "num_forks": 1,
  "num_merged_pulls": 1,
  "num_open_pulls": 1,
  "num_pulls": 1,
  "parent_id": 1,
  "path": "text",
  "repo_type": "text",
  "root_space_id": 1,
  "root_space_identifier": "text",
  "size": 1,
  "size_lfs": 1,
  "size_updated": 1,
  "state": 1,
  "tags": null,
  "updated": 1,
  "upstream": {
    "default_branch": "text",
    "fork_id": 1,
    "id": 1,
    "identifier": "text",
    "parent_id": 1,
    "path": "text",
    "type": "text"
  }
}
post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
branchstringOptional
branch_commit_shastringOptional

Git object hash

branch_upstreamstringOptional
Responses
200

OK

application/json
already_ancestorbooleanOptional
new_commit_shastringOptional

Git object hash

post/repos/{repo_identifier}/fork-sync
POST /code/api/v1/repos/{repo_identifier}/fork-sync?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 69

{
  "branch": "text",
  "branch_commit_sha": "text",
  "branch_upstream": "text"
}
{
  "already_ancestor": true,
  "new_commit_sha": "text"
}

Get repository language statistics

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Responses
200

OK

application/json
object · TypesRepoLangStat[]Optional
get/repos/{repo_identifier}/languages
GET /code/api/v1/repos/{repo_identifier}/languages?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
[
  {}
]
get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Responses
200

OK

application/json
urlstringOptional
get/repos/{repo_identifier}/linked/source
GET /code/api/v1/repos/{repo_identifier}/linked/source?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
{
  "url": "text"
}
post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
branchesstring[] · nullableOptional
Responses
200

OK

application/json
post/repos/{repo_identifier}/linked/sync
POST /code/api/v1/repos/{repo_identifier}/linked/sync?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 21

{
  "branches": [
    "text"
  ]
}
{
  "branches": [
    {
      "new": "text",
      "old": "text",
      "ref": "text"
    }
  ]
}

Check mergeability

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
rangestringRequiredExample: main..dev
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

pathstring[]Optional

provide path for diff operation

Responses
200

OK

application/json
conflict_filesstring[]Optional
mergeablebooleanOptional
post/repos/{repo_identifier}/merge-check/{range}
POST /code/api/v1/repos/{repo_identifier}/merge-check/{range}?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
{
  "conflict_files": [
    "text"
  ],
  "mergeable": true
}

Creates a merge commit on the head branch with changes from the base

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
base_branchstringOptional
base_commit_shastringOptional

Git object hash

bypass_rulesbooleanOptional
dry_runbooleanOptional
dry_run_rulesbooleanOptional
head_branchstringOptional
head_commit_shastringOptional

Git object hash

messagestringOptional
titlestringOptional
Responses
200

OK

application/json
already_ancestorbooleanOptional
conflict_filesstring[]Optional
dry_runbooleanOptional
dry_run_rulesbooleanOptional
new_head_branch_shastringOptional

Git object hash

post/repos/{repo_identifier}/merge-commit
POST /code/api/v1/repos/{repo_identifier}/merge-commit?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 181

{
  "base_branch": "text",
  "base_commit_sha": "text",
  "bypass_rules": true,
  "dry_run": true,
  "dry_run_rules": true,
  "head_branch": "text",
  "head_commit_sha": "text",
  "message": "text",
  "title": "text"
}
{
  "already_ancestor": true,
  "conflict_files": [
    "text"
  ],
  "dry_run": true,
  "dry_run_rules": true,
  "new_head_branch_sha": "text",
  "rule_violations": [
    {
      "bypassable": true,
      "bypassed": true,
      "rule": {
        "identifier": "text",
        "repo_path": "text",
        "space_path": "text",
        "state": "active",
        "type": "branch"
      },
      "violations": [
        {
          "code": "text",
          "message": "text",
          "params": []
        }
      ]
    }
  ]
}
get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
branch_namestringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Responses
200

OK

application/json
activebooleanOptional
get/repos/{repo_identifier}/mergequeue/{branch_name}
GET /code/api/v1/repos/{repo_identifier}/mergequeue/{branch_name}?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
{
  "active": true,
  "entries": [
    {
      "merge_queue_info": {
        "checks": [
          {
            "bypassable": true,
            "check": {
              "bypassed_by": {
                "created": 1,
                "display_name": "text",
                "email": "text",
                "id": 1,
                "type": "service",
                "uid": "text",
                "updated": 1
              },
              "created": 1,
              "ended": 1,
              "id": 1,
              "identifier": "text",
              "link": "text",
              "metadata": null,
              "payload": {
                "data": null,
                "kind": "",
                "version": "text"
              },
              "reported_by": {
                "created": 1,
                "display_name": "text",
                "email": "text",
                "id": 1,
                "type": "service",
                "uid": "text",
                "updated": 1
              },
              "started": 1,
              "status": "error",
              "summary": "text",
              "updated": 1
            },
            "required": true
          }
        ],
        "checks_commit_sha": "text",
        "merge_commit_sha": "text",
        "merge_method": "fast-forward",
        "pull_requests_ahead": 1,
        "state": "checks_in_progress"
      },
      "pull_request": {
        "author": {
          "created": 1,
          "display_name": "text",
          "email": "text",
          "id": 1,
          "type": "service",
          "uid": "text",
          "updated": 1
        },
        "check_summary": {
          "error": 1,
          "failure": 1,
          "failure_ignored": 1,
          "pending": 1,
          "running": 1,
          "success": 1
        },
        "closed": 1,
        "created": 1,
        "description": "text",
        "edited": 1,
        "is_draft": true,
        "labels": [
          {
            "color": "blue",
            "id": 1,
            "key": "text",
            "scope": 1,
            "value": "text",
            "value_color": "blue",
            "value_count": 1,
            "value_id": 1
          }
        ],
        "merge_base_sha": "text",
        "merge_check_status": "text",
        "merge_conflicts": [
          "text"
        ],
        "merge_method": "fast-forward",
        "merge_target_sha": "text",
        "merge_violations_bypassed": true,
        "merged": 1,
        "merger": {
          "created": 1,
          "display_name": "text",
          "email": "text",
          "id": 1,
          "type": "service",
          "uid": "text",
          "updated": 1
        },
        "number": 1,
        "pullreq_type": "text",
        "rebase_check_status": "text",
        "rebase_conflicts": [
          "text"
        ],
        "root_space_id": 1,
        "root_space_identifier": "text",
        "rules": [
          {
            "identifier": "text",
            "repo_path": "text",
            "space_path": "text",
            "state": "active",
            "type": "branch"
          }
        ],
        "source_branch": "text",
        "source_repo": {
          "default_branch": "text",
          "fork_id": 1,
          "id": 1,
          "identifier": "text",
          "parent_id": 1,
          "path": "text",
          "type": "text"
        },
        "source_repo_id": 1,
        "source_sha": "text",
        "state": "closed",
        "stats": {
          "additions": 1,
          "commits": 1,
          "conversations": 1,
          "deletions": 1,
          "files_changed": 1,
          "unresolved_count": 1
        },
        "substate": "",
        "target_branch": "text",
        "target_repo_id": 1,
        "title": "text",
        "updated": 1
      }
    }
  ],
  "setup": {
    "checks_concurrency": 1,
    "group_size": 1,
    "max_check_duration_seconds": 1,
    "required_checks": [
      "text"
    ]
  }
}
delete
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
branch_namestringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Responses
204

No Content

No content

delete/repos/{repo_identifier}/mergequeue/{branch_name}
DELETE /code/api/v1/repos/{repo_identifier}/mergequeue/{branch_name}?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*

No content

Get commit details

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

git_refstringOptional

The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.

Default: {Repository Default Branch}
Body
pathsstring[] · nullableOptional
Responses
200

OK

application/json
post/repos/{repo_identifier}/path-details
POST /code/api/v1/repos/{repo_identifier}/path-details?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "paths": [
    "text"
  ]
}
{
  "details": [
    {
      "last_commit": {
        "author": {
          "identity": {
            "email": "text",
            "name": "text"
          },
          "when": "2026-01-01T00:00:00.000Z"
        },
        "committer": {
          "identity": {
            "email": "text",
            "name": "text"
          },
          "when": "2026-01-01T00:00:00.000Z"
        },
        "message": "text",
        "parent_shas": [
          "text"
        ],
        "sha": "text",
        "signature": {
          "created": 1,
          "key_fingerprint": "text",
          "key_id": "text",
          "key_scheme": "pgp",
          "result": "bad",
          "updated": 1
        },
        "stats": {
          "files": [
            {
              "changes": 1,
              "deletions": 1,
              "insertions": 1,
              "old_path": "text",
              "path": "text",
              "status": "text"
            }
          ],
          "total": {
            "changes": 1,
            "deletions": 1,
            "insertions": 1
          }
        },
        "title": "text"
      },
      "path": "text"
    }
  ]
}

List all paths

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

git_refstringOptional

The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.

Default: {Repository Default Branch}
include_directoriesbooleanOptional

Indicates whether directories should be included in the response.

Default: false
Responses
200

OK

application/json
directoriesstring[]Optional
filesstring[]Optional
get/repos/{repo_identifier}/paths
GET /code/api/v1/repos/{repo_identifier}/paths?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
{
  "directories": [
    "text"
  ],
  "files": [
    "text"
  ]
}

Purge repository

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

deleted_atintegerRequired

The exact time the resource was delete at in epoch format.

Responses
204

No Content

No content

post/repos/{repo_identifier}/purge
POST /code/api/v1/repos/{repo_identifier}/purge?accountIdentifier=text&deleted_at=1 HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*

No content

Get raw file content

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
pathstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

git_refstringOptional

The git reference (branch / tag / commitID) that will be used to retrieve the data. If no value is provided the default branch of the repository is used.

Default: {Repository Default Branch}
Responses
200

OK

No content

get/repos/{repo_identifier}/raw/{path}
GET /code/api/v1/repos/{repo_identifier}/raw/{path}?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*

No content

Rebase a branch relative to another branch or a commit

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
base_branchstringOptional
base_commit_shastringOptional

Git object hash

bypass_rulesbooleanOptional
dry_runbooleanOptional
dry_run_rulesbooleanOptional
head_branchstringOptional
head_commit_shastringOptional

Git object hash

Responses
200

OK

application/json
already_ancestorbooleanOptional
conflict_filesstring[]Optional
dry_runbooleanOptional
dry_run_rulesbooleanOptional
new_head_branch_shastringOptional

Git object hash

post/repos/{repo_identifier}/rebase
POST /code/api/v1/repos/{repo_identifier}/rebase?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 149

{
  "base_branch": "text",
  "base_commit_sha": "text",
  "bypass_rules": true,
  "dry_run": true,
  "dry_run_rules": true,
  "head_branch": "text",
  "head_commit_sha": "text"
}
{
  "already_ancestor": true,
  "conflict_files": [
    "text"
  ],
  "dry_run": true,
  "dry_run_rules": true,
  "new_head_branch_sha": "text",
  "rule_violations": [
    {
      "bypassable": true,
      "bypassed": true,
      "rule": {
        "identifier": "text",
        "repo_path": "text",
        "space_path": "text",
        "state": "active",
        "type": "branch"
      },
      "violations": [
        {
          "code": "text",
          "message": "text",
          "params": []
        }
      ]
    }
  ]
}

Restore repository

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

deleted_atintegerRequired

The exact time the resource was delete at in epoch format.

Body
new_identifierstring · nullableOptional
new_parent_refstring · nullableOptional
Responses
200

OK

application/json
archivedbooleanOptional
createdintegerOptional
created_byintegerOptional
default_branchstringOptional
deletedinteger · nullableOptional
descriptionstringOptional
fork_idintegerOptional
git_ssh_urlstringOptional
git_urlstringOptional
idintegerOptional
identifierstringOptional
import_failedbooleanOptional
importingbooleanOptional
is_emptybooleanOptional
is_favoritebooleanOptional
is_publicbooleanOptional
languagestringOptional
last_git_pushintegerOptional
locintegerOptional

source lines of code on the default branch

num_closed_pullsintegerOptional
num_forksintegerOptional
num_merged_pullsintegerOptional
num_open_pullsintegerOptional
num_pullsintegerOptional
parent_idintegerOptional
pathstringOptional
repo_typestringOptional
root_space_idintegerOptional
root_space_identifierstringOptional
sizeintegerOptional

size of the repository in KiB

size_lfsintegerOptional

size of the repository LFS in KiB

size_updatedintegerOptional
stateinteger · nullableOptional
tagsanyOptional
updatedintegerOptional
post/repos/{repo_identifier}/restore
POST /code/api/v1/repos/{repo_identifier}/restore?accountIdentifier=text&deleted_at=1 HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 49

{
  "new_identifier": "text",
  "new_parent_ref": "text"
}
{
  "archived": true,
  "created": 1,
  "created_by": 1,
  "default_branch": "text",
  "deleted": 1,
  "description": "text",
  "fork_id": 1,
  "git_ssh_url": "text",
  "git_url": "text",
  "id": 1,
  "identifier": "text",
  "import_failed": true,
  "importing": true,
  "is_empty": true,
  "is_favorite": true,
  "is_public": true,
  "language": "text",
  "last_git_push": 1,
  "loc": 1,
  "num_closed_pulls": 1,
  "num_forks": 1,
  "num_merged_pulls": 1,
  "num_open_pulls": 1,
  "num_pulls": 1,
  "parent_id": 1,
  "path": "text",
  "repo_type": "text",
  "root_space_id": 1,
  "root_space_identifier": "text",
  "size": 1,
  "size_lfs": 1,
  "size_updated": 1,
  "state": 1,
  "tags": null,
  "updated": 1,
  "upstream": {
    "default_branch": "text",
    "fork_id": 1,
    "id": 1,
    "identifier": "text",
    "parent_id": 1,
    "path": "text",
    "type": "text"
  }
}

Get general settings

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Responses
200

OK

application/json
auto_merge_enabledboolean · nullableOptional
file_size_limitinteger · nullableOptional

file size limit in bytes

git_lfs_enabledboolean · nullableOptional
get/repos/{repo_identifier}/settings/general
GET /code/api/v1/repos/{repo_identifier}/settings/general?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
{
  "auto_merge_enabled": true,
  "file_size_limit": 1,
  "git_lfs_enabled": true
}

Update general settings

patch
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
auto_merge_enabledboolean · nullableOptional
file_size_limitinteger · nullableOptional

file size limit in bytes

git_lfs_enabledboolean · nullableOptional
Responses
200

OK

application/json
auto_merge_enabledboolean · nullableOptional
file_size_limitinteger · nullableOptional

file size limit in bytes

git_lfs_enabledboolean · nullableOptional
patch/repos/{repo_identifier}/settings/general
PATCH /code/api/v1/repos/{repo_identifier}/settings/general?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 70

{
  "auto_merge_enabled": true,
  "file_size_limit": 1,
  "git_lfs_enabled": true
}
{
  "auto_merge_enabled": true,
  "file_size_limit": 1,
  "git_lfs_enabled": true
}

Get security settings

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Responses
200

OK

application/json
principal_committer_matchboolean · nullableOptional
secret_scanning_enabledboolean · nullableOptional
vulnerability_scanning_modestring · enum · nullableOptionalPossible values:
get/repos/{repo_identifier}/settings/security
GET /code/api/v1/repos/{repo_identifier}/settings/security?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
{
  "principal_committer_match": true,
  "secret_scanning_enabled": true,
  "vulnerability_scanning_mode": "disabled"
}

Update security settings

patch
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
principal_committer_matchboolean · nullableOptional
secret_scanning_enabledboolean · nullableOptional
vulnerability_scanning_modestring · enum · nullableOptionalPossible values:
Responses
200

OK

application/json
principal_committer_matchboolean · nullableOptional
secret_scanning_enabledboolean · nullableOptional
vulnerability_scanning_modestring · enum · nullableOptionalPossible values:
patch/repos/{repo_identifier}/settings/security
PATCH /code/api/v1/repos/{repo_identifier}/settings/security?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 106

{
  "principal_committer_match": true,
  "secret_scanning_enabled": true,
  "vulnerability_scanning_mode": "disabled"
}
{
  "principal_committer_match": true,
  "secret_scanning_enabled": true,
  "vulnerability_scanning_mode": "disabled"
}

Squashes commits in a branch relative to another branch or a commit

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
base_branchstringOptional
base_commit_shastringOptional

Git object hash

bypass_rulesbooleanOptional
dry_runbooleanOptional
dry_run_rulesbooleanOptional
head_branchstringOptional
head_commit_shastringOptional

Git object hash

messagestringOptional
titlestringOptional
Responses
200

OK

application/json
conflict_filesstring[]Optional
dry_runbooleanOptional
dry_run_rulesbooleanOptional
new_head_branch_shastringOptional

Git object hash

post/repos/{repo_identifier}/squash
POST /code/api/v1/repos/{repo_identifier}/squash?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 181

{
  "base_branch": "text",
  "base_commit_sha": "text",
  "bypass_rules": true,
  "dry_run": true,
  "dry_run_rules": true,
  "head_branch": "text",
  "head_commit_sha": "text",
  "message": "text",
  "title": "text"
}
{
  "conflict_files": [
    "text"
  ],
  "dry_run": true,
  "dry_run_rules": true,
  "new_head_branch_sha": "text",
  "rule_violations": [
    {
      "bypassable": true,
      "bypassed": true,
      "rule": {
        "identifier": "text",
        "repo_path": "text",
        "space_path": "text",
        "state": "active",
        "type": "branch"
      },
      "violations": [
        {
          "code": "text",
          "message": "text",
          "params": []
        }
      ]
    }
  ]
}

Get repository summary

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Responses
200

OK

application/json
branch_countintegerOptional
default_branch_commit_countintegerOptional
locintegerOptional

source lines of code on the default branch

sizeintegerOptional

size of the repository in KiB

tag_countintegerOptional
get/repos/{repo_identifier}/summary
GET /code/api/v1/repos/{repo_identifier}/summary?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
{
  "branch_count": 1,
  "default_branch_commit_count": 1,
  "loc": 1,
  "pull_req_summary": {
    "closed_count": 1,
    "merged_count": 1,
    "open_count": 1
  },
  "size": 1,
  "tag_count": 1
}

List tags

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

include_commitbooleanOptional

Indicates whether optional commit information should be included in the response.

Default: false
querystringOptional

The substring by which the tags are filtered.

orderstring · enumOptional

The order of the output.

Default: ascPossible values:
sortstring · enumOptional

The data by which the tags are sorted.

Default: namePossible values:
pageinteger · min: 1Optional

The page to return.

Default: 1
limitinteger · min: 1 · max: 100Optional

The maximum number of results to return.

Default: 30
Responses
200

OK

application/json
is_annotatedbooleanOptional
messagestringOptional
namestringOptional
shastringOptional

Git object hash

titlestringOptional
get/repos/{repo_identifier}/tags
GET /code/api/v1/repos/{repo_identifier}/tags?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*
[
  {
    "commit": {
      "author": {
        "identity": {
          "email": "text",
          "name": "text"
        },
        "when": "2026-01-01T00:00:00.000Z"
      },
      "committer": {
        "identity": {
          "email": "text",
          "name": "text"
        },
        "when": "2026-01-01T00:00:00.000Z"
      },
      "message": "text",
      "parent_shas": [
        "text"
      ],
      "sha": "text",
      "signature": {
        "created": 1,
        "key_fingerprint": "text",
        "key_id": "text",
        "key_scheme": "pgp",
        "result": "bad",
        "updated": 1
      },
      "stats": {
        "files": [
          {
            "changes": 1,
            "deletions": 1,
            "insertions": 1,
            "old_path": "text",
            "path": "text",
            "status": "text"
          }
        ],
        "total": {
          "changes": 1,
          "deletions": 1,
          "insertions": 1
        }
      },
      "title": "text"
    },
    "is_annotated": true,
    "message": "text",
    "name": "text",
    "sha": "text",
    "signature": {
      "created": 1,
      "key_fingerprint": "text",
      "key_id": "text",
      "key_scheme": "pgp",
      "result": "bad",
      "updated": 1
    },
    "tagger": {
      "identity": {
        "email": "text",
        "name": "text"
      },
      "when": "2026-01-01T00:00:00.000Z"
    },
    "title": "text"
  }
]

Create tag

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
bypass_rulesbooleanOptional
dry_run_rulesbooleanOptional
messagestringOptional
namestringOptional
targetstringOptional
Responses
201

Created

application/json
is_annotatedbooleanOptional
messagestringOptional
namestringOptional
shastringOptional

Git object hash

titlestringOptional
post/repos/{repo_identifier}/tags
POST /code/api/v1/repos/{repo_identifier}/tags?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 89

{
  "bypass_rules": true,
  "dry_run_rules": true,
  "message": "text",
  "name": "text",
  "target": "text"
}
{
  "commit": {
    "author": {
      "identity": {
        "email": "text",
        "name": "text"
      },
      "when": "2026-01-01T00:00:00.000Z"
    },
    "committer": {
      "identity": {
        "email": "text",
        "name": "text"
      },
      "when": "2026-01-01T00:00:00.000Z"
    },
    "message": "text",
    "parent_shas": [
      "text"
    ],
    "sha": "text",
    "signature": {
      "created": 1,
      "key_fingerprint": "text",
      "key_id": "text",
      "key_scheme": "pgp",
      "result": "bad",
      "updated": 1
    },
    "stats": {
      "files": [
        {
          "changes": 1,
          "deletions": 1,
          "insertions": 1,
          "old_path": "text",
          "path": "text",
          "status": "text"
        }
      ],
      "total": {
        "changes": 1,
        "deletions": 1,
        "insertions": 1
      }
    },
    "title": "text"
  },
  "is_annotated": true,
  "message": "text",
  "name": "text",
  "sha": "text",
  "signature": {
    "created": 1,
    "key_fingerprint": "text",
    "key_id": "text",
    "key_scheme": "pgp",
    "result": "bad",
    "updated": 1
  },
  "tagger": {
    "identity": {
      "email": "text",
      "name": "text"
    },
    "when": "2026-01-01T00:00:00.000Z"
  },
  "title": "text"
}

Delete tag

delete
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Path parameters
repo_identifierstringRequired
tag_namestringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

bypass_rulesbooleanOptional

Bypass rule violations if possible.

Default: false
dry_run_rulesbooleanOptional

Dry run rules for operations

Default: false
Responses
204

No Content

No content

delete/repos/{repo_identifier}/tags/{tag_name}
DELETE /code/api/v1/repos/{repo_identifier}/tags/{tag_name}?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Accept: */*

No content

Import repository

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
descriptionstringOptional
identifierstringOptional
parent_refstringOptional
pipelinesstring · enumOptionalPossible values:
provider_repostringOptional
uidstringOptionalDeprecated
Responses
201

Created

application/json
archivedbooleanOptional
createdintegerOptional
created_byintegerOptional
default_branchstringOptional
deletedinteger · nullableOptional
descriptionstringOptional
fork_idintegerOptional
git_ssh_urlstringOptional
git_urlstringOptional
idintegerOptional
identifierstringOptional
import_failedbooleanOptional
importingbooleanOptional
is_emptybooleanOptional
is_favoritebooleanOptional
is_publicbooleanOptional
languagestringOptional
last_git_pushintegerOptional
locintegerOptional

source lines of code on the default branch

num_closed_pullsintegerOptional
num_forksintegerOptional
num_merged_pullsintegerOptional
num_open_pullsintegerOptional
num_pullsintegerOptional
parent_idintegerOptional
pathstringOptional
repo_typestringOptional
root_space_idintegerOptional
root_space_identifierstringOptional
sizeintegerOptional

size of the repository in KiB

size_lfsintegerOptional

size of the repository LFS in KiB

size_updatedintegerOptional
stateinteger · nullableOptional
tagsanyOptional
updatedintegerOptional
post/repos/import
POST /code/api/v1/repos/import?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 186

{
  "description": "text",
  "identifier": "text",
  "parent_ref": "text",
  "pipelines": "convert",
  "provider": {
    "host": "text",
    "password": "text",
    "type": "github",
    "username": "text"
  },
  "provider_repo": "text"
}
{
  "archived": true,
  "created": 1,
  "created_by": 1,
  "default_branch": "text",
  "deleted": 1,
  "description": "text",
  "fork_id": 1,
  "git_ssh_url": "text",
  "git_url": "text",
  "id": 1,
  "identifier": "text",
  "import_failed": true,
  "importing": true,
  "is_empty": true,
  "is_favorite": true,
  "is_public": true,
  "language": "text",
  "last_git_push": 1,
  "loc": 1,
  "num_closed_pulls": 1,
  "num_forks": 1,
  "num_merged_pulls": 1,
  "num_open_pulls": 1,
  "num_pulls": 1,
  "parent_id": 1,
  "path": "text",
  "repo_type": "text",
  "root_space_id": 1,
  "root_space_identifier": "text",
  "size": 1,
  "size_lfs": 1,
  "size_updated": 1,
  "state": 1,
  "tags": null,
  "updated": 1,
  "upstream": {
    "default_branch": "text",
    "fork_id": 1,
    "id": 1,
    "identifier": "text",
    "parent_id": 1,
    "path": "text",
    "type": "text"
  }
}
post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
x-api-keystringRequired
Query parameters
accountIdentifierstringRequired

Account Identifier for the Entity.

orgIdentifierstringOptional

Organization Identifier for the Entity.

projectIdentifierstringOptional

Project Identifier for the Entity.

Body
connector_refstringOptional
descriptionstringOptional
identifierstringOptional
is_publicbooleanOptional
parent_refstringOptional
repo_identifierstringOptional
Responses
200

OK

application/json
archivedbooleanOptional
createdintegerOptional
created_byintegerOptional
default_branchstringOptional
deletedinteger · nullableOptional
descriptionstringOptional
fork_idintegerOptional
git_ssh_urlstringOptional
git_urlstringOptional
idintegerOptional
identifierstringOptional
import_failedbooleanOptional
importingbooleanOptional
is_emptybooleanOptional
is_favoritebooleanOptional
is_publicbooleanOptional
languagestringOptional
last_git_pushintegerOptional
locintegerOptional

source lines of code on the default branch

num_closed_pullsintegerOptional
num_forksintegerOptional
num_merged_pullsintegerOptional
num_open_pullsintegerOptional
num_pullsintegerOptional
parent_idintegerOptional
pathstringOptional
repo_typestringOptional
root_space_idintegerOptional
root_space_identifierstringOptional
sizeintegerOptional

size of the repository in KiB

size_lfsintegerOptional

size of the repository LFS in KiB

size_updatedintegerOptional
stateinteger · nullableOptional
tagsanyOptional
updatedintegerOptional
post/repos/link
POST /code/api/v1/repos/link?accountIdentifier=text HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 127

{
  "connector_ref": "text",
  "description": "text",
  "identifier": "text",
  "is_public": true,
  "parent_ref": "text",
  "repo_identifier": "text"
}
{
  "archived": true,
  "created": 1,
  "created_by": 1,
  "default_branch": "text",
  "deleted": 1,
  "description": "text",
  "fork_id": 1,
  "git_ssh_url": "text",
  "git_url": "text",
  "id": 1,
  "identifier": "text",
  "import_failed": true,
  "importing": true,
  "is_empty": true,
  "is_favorite": true,
  "is_public": true,
  "language": "text",
  "last_git_push": 1,
  "loc": 1,
  "num_closed_pulls": 1,
  "num_forks": 1,
  "num_merged_pulls": 1,
  "num_open_pulls": 1,
  "num_pulls": 1,
  "parent_id": 1,
  "path": "text",
  "repo_type": "text",
  "root_space_id": 1,
  "root_space_identifier": "text",
  "size": 1,
  "size_lfs": 1,
  "size_updated": 1,
  "state": 1,
  "tags": null,
  "updated": 1,
  "upstream": {
    "default_branch": "text",
    "fork_id": 1,
    "id": 1,
    "identifier": "text",
    "parent_id": 1,
    "path": "text",
    "type": "text"
  }
}

Last updated

Was this helpful?