Skip to main content
POST
Create a scoped access token

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>. The token may be a Sourcebot API key, OAuth access token, or scoped access token, subject to endpoint requirements.

Body

application/json
repoIds
integer[]
required

Repository IDs to bind to the token. Every ID must identify a repository accessible to the API-key owner.

Minimum array length: 1
Required range: x > 0

Response

Scoped access token created. The opaque token value is returned only in this response.

id
string
required

Identifier used to revoke the token.

token
string
required

Opaque bearer token. This value is returned only when the token is created.

Pattern: ^sbst_
createdAt
string<date-time>
required
expiresAt
string<date-time>
required
repoIds
integer[]
required
Minimum array length: 1
Required range: x > 0