Skip to main content
POST
/
repos
Select repository for Boxes
curl --request POST \
  --url https://ascii.dev/api/box/v1/repos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "repositoryId": "<string>",
  "baseBranch": "main"
}
'
{
  "ok": true,
  "type": "repos.updated",
  "success": true,
  "environmentId": "env_123",
  "selectedRepositories": [
    {
      "databaseId": "repo_org_123456",
      "name": "web",
      "fullName": "acme/web",
      "baseBranch": "dev",
      "setupRoutineId": null,
      "setupScript": "",
      "setupBlocking": false,
      "preCommitHooks": []
    }
  ]
}

Authorizations

Authorization
string
header
required

Box API key in the form box_.... Create and rotate keys in the Box dashboard or through the v1 API key endpoints.

Body

application/json

Idempotently selects a repository for future Boxes. If the repository is already selected, the API updates its base branch instead of returning a conflict.

repositoryId
string
required

Internal repository databaseId returned by GET /repos.

baseBranch
string
default:main

Response

Updated repository selection.

ok
boolean
required
Example:

true

type
string
required

Stable success envelope discriminator added by v1.

success
boolean
required
environmentId
string
required
selectedRepositories
object[]
required