Skip to main content
POST
/
v2
/
enterprise
/
organizations
/
{org_id}
/
clone
Clone Repo
curl --request POST \
  --url https://api.devin.ai/v2/enterprise/organizations/{org_id}/clone \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "repo_path": "<string>",
  "pull_repo_commands": [
    "<string>"
  ],
  "repo_note": "<string>",
  "run_lint_commands": [
    "<string>"
  ],
  "run_project_commands": [
    "<string>"
  ],
  "run_tests_commands": [
    "<string>"
  ],
  "update_dependencies_commands": [
    "<string>"
  ]
}
'
{
  "created_at": "2023-11-07T05:31:56Z",
  "org_id": "<string>",
  "snapshot_id": "<string>",
  "status": "<string>",
  "ami_id": "<string>"
}
Requires an enterprise admin personal API key. Clones a git repository in an organization and updates into a new snapshot version.

Authorizations

Authorization
string
header
required

Personal API Key (apk_user_*) for Enterprise Admins only

Path Parameters

org_id
string
required

Body

application/json
repo_path
string
required

Repository path in the format 'owner/repo_name' (e.g., 'acme/my-project')

Example:

"owner/repo_name"

pull_repo_commands
string[] | null

Commands to pull the repository. Recommended to leave blank as it is auto-generated.

repo_note
string | null
run_lint_commands
string[] | null
run_project_commands
string[] | null
run_tests_commands
string[] | null
update_dependencies_commands
string[] | null

Response

Successful Response

Response from creating a snapshot.

created_at
string<date-time>
required

Timestamp when the snapshot was created

org_id
string
required

Organization ID the snapshot belongs to

snapshot_id
string
required

ID of the created snapshot

status
string
required

Status of the snapshot (e.g., 'pending', 'available')

ami_id
string | null

AMI ID of the snapshot (may be null if still being created)