---
title: "Clone code repo"
method: POST
path: "/repositories/code/clone"
---

# Clone code repo

`POST /repositories/code/clone`

## Request

- Base URL: `https://app.aikido.dev/api/public/v1`
- URL: `https://app.aikido.dev/api/public/v1/repositories/code/clone`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://app.aikido.io/api/oauth/token` scopes: `repositories:write`

Clone code repo for multi branch scanning

## Request body

- object
  - `code_repo_id` integer, required: The ID of the code repo
  - `branch` string, required: The other branch Aikido should scan

## Response `200`

The code repo has been cloned and multi branch scanning has been set up.

- object
  - `success` integer: The integer 1 indicating success
  - `code_repo_id` integer: The id of the newly created code repo

---

[API](https://skmtc.dev/aikido/apis/aikido-security-api-documentation.md) - [All operations](https://skmtc.dev/aikido/apis/aikido-security-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/aikido/apis/aikido-security-api-documentation/revisions/da8691338133?raw)
