POST
/
repos
curl --request POST \
  --url https://api.diversion.dev/v0/repos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "repo_name": "repo-name",
  "description": "<string>",
  "branchless": true
}'
{
  "repo_name": "repo-name",
  "description": "<string>",
  "repo_id": "example_id",
  "default_branch_id": "<string>",
  "default_branch_name": "<string>",
  "size_bytes": 123,
  "owner_user_id": "<string>",
  "created_timestamp": 123,
  "sync_git_repo_url": "<string>"
}

Authorizations

Authorization
string
headerrequired

This API uses OAuth 2 with the implicit grant flow

Body

application/json
repo_name
string
required
description
string
branchless
boolean

Response

201 - application/json
repo_name
string
required
description
string
repo_id
string
required
default_branch_id
string
default_branch_name
string
size_bytes
number
required
owner_user_id
string
required
created_timestamp
integer
required

Seconds since epoch UTC

sync_git_repo_url
string

Optional URL of the git repository being synced with the repo