Documentation

Alpha

API authentication

Create personal access tokens, choose scopes and limit them to repositories.

The Upstream API is in alpha. Endpoints, fields and limits can change before it's stable. Send feedback to support@coline.app.

Programs authenticate as you with a personal access token. A token can never do more than your account can; scopes and repository limits only narrow it.

Create a token

Go to Tokens settings and choose Generate token. Pick:

  • Expiration: 7, 30, 60 or 90 days, 1 year, or none.
  • Repository access: all repositories you can access, or only the ones you select.
  • Permissions: for each area, no access, read-only, or read and write.

The token starts with upt_ and is shown once. Upstream stores only a hash of it.

Send the token

Use either header form:

Authorization: Bearer upt_...
Authorization: token upt_...

Tokens from upstream auth login (ucs_...) are accepted too, with every scope.

Scopes

ScopeAllows
repo:readRead repositories, files, commits, branches, tags and releases
repo:writeCreate repositories and forks, and push over HTTPS
repo:adminChange repository settings, transfer and delete repositories
issues:readRead issues, comments, labels and reactions
issues:writeOpen and edit issues, comment, label, assign and react
changes:readRead change requests, reviews and review comments
changes:writeOpen, review, comment on and merge change requests
releases:writeCreate and edit releases, and upload assets
checks:writeReport check runs and commit statuses
actions:readRead workflows and workflow runs
actions:writeDispatch, cancel and re-run workflows
webhooks:adminManage repository and organization webhooks
user:readRead your profile
user:writeUpdate your profile
notifications:readRead your notifications and mark them read
org:readRead private organization membership
org:adminManage organizations, members and teams

A write scope includes the matching read scope, and repo:admin includes repo:write. Without the read scope for an area, the token reads that area like a signed-out visitor: public data still works and private data returns 404.

Repository access

A token limited to selected repositories can still read public repositories. Writes to any other repository return 403 with TOKEN_REPOSITORY_FORBIDDEN. Tokens limited to selected repositories can't create new repositories or forks, because the new repository wouldn't be on the list.

Git over HTTPS

A token with repo:read can clone and fetch, and one with repo:write can push. Use any non-empty username and the token as the password:

git clone https://git.coline.app/{namespace}/{repository}.git
# Username: x-token
# Password: upt_...

Pushes still follow branch protection and your repository role.

Organizations with SSO

If an organization requires SSO, authorize the token for it in the organization's security settings before using it on that organization's repositories.

Revoke and regenerate

Revoking a token stops it immediately. Regenerating replaces the secret and keeps the token's name, permissions and expiration. Each token shows when it was last used.