Skip to main content
Version: 1

Brila API

The Brila public API.

Brila is a free link-in-bio platform for creators and brands: one page at brila.me/<username> that gathers their social links, their discount codes, and Instagram automations that auto-reply to DMs and comments.

This API lets an account manage its own discount codes programmatically. It is not a directory or a search API — a token only ever reaches the data of the account that issued it.

Authentication​

Create a personal access token in Settings → API Tokens at https://brila.me/settings/api-tokens, then send it on every request:

Authorization: Bearer brla_mgcBOuYvXlBRij2hg7vN-ghyWdIA8UhZ9MiWDlfg-4Y

Tokens are 48 characters: the prefix brla_ followed by 43 URL-safe base64 characters (32 random bytes, unpadded). The full token is shown once, at creation — only a hash is stored, so it cannot be retrieved afterwards. If it is lost, revoke it and create another.

A token can expire after 30, 60, 90 or 365 days, or never; the default is 90 days. An expired or revoked token returns 401 exactly like an invalid one, so a long-running integration should treat a sudden 401 as "this token has ended" rather than as a transient failure to retry.

Each token carries explicit scopes. An operation's description names the scope it needs; calling without it returns 403 with a forbidden error rather than an empty result.

Rate limits​

Per token, in a rolling 5-minute window: 300 reads and 60 writes, budgeted separately so read traffic cannot exhaust the write allowance. Exceeding either returns 429 with a Retry-After header.

Errors​

Failures return a JSON body with a stable machine-readable error.code and a human-readable error.message. Branch on the code, not the message. Codes in use: unauthorized (401), forbidden (403), not_found (404), validation_error (422), max_codes_reached (422) and rate_limited (429).

Authentication​

A personal access token created in Settings > API Tokens. Send it as Authorization: Bearer <token>. Each token carries specific scopes (e.g. discount_codes:read, discount_codes:write) — see each operation's description for the scope it requires.

Security Scheme Type:

http

HTTP Authorization Scheme:

bearer

Bearer format:

opaque token