Appearance
staff.licence
11 methods on staff.licence. Each returns the answer's data and throws NoviqaError on a failed answer.
retrieve
GET
/admin/v1/licenceLicence status
The applied licence checked again now (signature, expiry, server binding) with what it issues (licence companies, brands), what it allows and uses (accounts, groups), valid, and warnings (no key applied, no vendor public key configured, invalid or expiring within 30 days, groups of a company the licence no longer issues). The key itself is never returned.
More details
Rights: the staff member needs every one of: config.servers.
Returns
Promise<Status>The answer's
data.Errors
401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.licence.retrieve()bash
curl -X GET "$NOVIQA_API_URL/admin/v1/licence" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"applied_at": "2026-09-25T10:15:00Z",
"applied_by": 1,
"brands": [
{
"address": "1 High St",
"color_accent": "string",
"color_primary": "string",
"color_secondary": "string",
"company": "HS Markets Ltd",
"default_symbols": [
"string"
],
"domains": [
"string"
],
"enabled": true,
"eula_url": "string",
"has_banner": true,
"has_icon": true,
"has_logo": true
}
],
"companies": [
{
"created_at": "2026-09-25T10:15:00Z",
"main": true,
"name": "Ann Smith"
}
],
"entitlements": {
"max_accounts": 1,
"max_groups": 1
},
"expires_at": "2026-09-25T10:15:00Z",
"issued_at": "2026-09-25T10:15:00Z",
"licence_id": "string",
"server_id": "string",
"used_accounts": 1,
"used_groups": 1,
"valid": true
},
"request_id": "5b7f2c1e"
}ts
staff.licence.retrieve(options?: RequestOptions): Promise<whitelabel.Status>create
POST
/admin/v1/licenceApply a licence key
Verifies the key (vendor signature, expiry, server binding, contents, not issued before the applied licence; at most 8 MiB) and applies it: the licence companies and brands become what it issues, the main company is renamed in place with its groups, and brands of companies it no longer issues are removed. A key that fails any check changes nothing, answers invalid_input with the reason and writes a warning line to the journal; an applied key writes a config line. Answers the new status.
More details
Rights: the staff member needs every one of: config.servers.
Request body
keystringthe licence key the vendor issued, e.g. HSL1...
Returns
Promise<Status>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.licence.create({
key: "HSL1.eyJsaWNlbmNlX2lkIjoiTDAwMSJ9.c2lnbmF0dXJl"
})bash
curl -X POST "$NOVIQA_API_URL/admin/v1/licence" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"key": "HSL1.eyJsaWNlbmNlX2lkIjoiTDAwMSJ9.c2lnbmF0dXJl"
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"applied_at": "2026-09-25T10:15:00Z",
"applied_by": 1,
"brands": [
{
"address": "1 High St",
"color_accent": "string",
"color_primary": "string",
"color_secondary": "string",
"company": "HS Markets Ltd",
"default_symbols": [
"string"
],
"domains": [
"string"
],
"enabled": true,
"eula_url": "string",
"has_banner": true,
"has_icon": true,
"has_logo": true
}
],
"companies": [
{
"created_at": "2026-09-25T10:15:00Z",
"main": true,
"name": "Ann Smith"
}
],
"entitlements": {
"max_accounts": 1,
"max_groups": 1
},
"expires_at": "2026-09-25T10:15:00Z",
"issued_at": "2026-09-25T10:15:00Z",
"licence_id": "string",
"server_id": "string",
"used_accounts": 1,
"used_groups": 1,
"valid": true
},
"request_id": "5b7f2c1e"
}ts
staff.licence.create(body: http.docSystemLicenceKey, options?: RequestOptions): Promise<whitelabel.Status>listBrands
GET
/admin/v1/licence/brandsList brands
Every brand (white label) the licence issues, the default first.
More details
Rights: the staff member needs every one of: config.servers.
Returns
Promise<WhiteLabel[]>The answer's
data.Errors
401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.licence.listBrands()bash
curl -X GET "$NOVIQA_API_URL/admin/v1/licence/brands" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": [
{
"address": "1 High St",
"color_accent": "string",
"color_primary": "string",
"color_secondary": "string",
"company": "HS Markets Ltd",
"default_symbols": [
"string"
],
"domains": [
"string"
],
"enabled": true,
"eula_url": "string",
"has_banner": true,
"has_icon": true,
"has_logo": true
}
],
"request_id": "5b7f2c1e"
}ts
staff.licence.listBrands(options?: RequestOptions): Promise<models.WhiteLabel[]>createBrands
POST
/admin/v1/licence/brandsCreate a brand
Adds a brand for a company the licence lists (the main company or an added white label); a company that already has one answers conflict. It is never licence-sourced (is_licenced false), so it may always be deleted. Left-out fields default to their zero value, enabled true. Every other rule of a brand applies (see the licence document for the field list).
More details
Rights: the staff member needs every one of: config.white_labels; and every one of: config.servers.
Request body
addressstringcolor_accentstringcolor_primarystring#rrggbb or empty = the terminal's own
color_secondarystringcompanystringdefault_symbolsstring[]the first watch list of a new terminal
domainsstring[]host names without port, lower case
enabledbooleaneula_urlstringhas_bannerbooleanhas_iconbooleanhas_logobooleanidintegeris_defaultbooleanserved when no domain matches; at most one
is_licencedbooleantrue: written by the applied licence key, read-only here; DELETE refuses it
linksobjectnamed pages besides website/support_email/eula_url
phonestringprogram_namestringserver_namestringshort_namestringsupport_emailstringupdated_atstringUTC time, RFC 3339.
versionintegerwebsitestringReturns
Promise<WhiteLabel>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action409
conflict: already exists500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.licence.createBrands({
address: "1 High St",
color_accent: "string",
color_primary: "string",
color_secondary: "string",
company: "HS Markets Ltd",
default_symbols: [
"string"
],
domains: [
"string"
],
enabled: true,
eula_url: "string",
has_banner: true,
has_icon: true,
has_logo: true
})bash
curl -X POST "$NOVIQA_API_URL/admin/v1/licence/brands" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"address": "1 High St",
"color_accent": "string",
"color_primary": "string",
"color_secondary": "string",
"company": "HS Markets Ltd",
"default_symbols": [
"string"
],
"domains": [
"string"
],
"enabled": true,
"eula_url": "string",
"has_banner": true,
"has_icon": true,
"has_logo": true
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"address": "1 High St",
"color_accent": "string",
"color_primary": "string",
"color_secondary": "string",
"company": "HS Markets Ltd",
"default_symbols": [
"string"
],
"domains": [
"string"
],
"enabled": true,
"eula_url": "string",
"has_banner": true,
"has_icon": true,
"has_logo": true
},
"request_id": "5b7f2c1e"
}ts
staff.licence.createBrands(body: models.WhiteLabel, options?: RequestOptions): Promise<models.WhiteLabel>retrieveBrands
GET
/admin/v1/licence/brands/{id}Get a brand
Rights: the staff member needs every one of: config.servers.
Parameters
idinteger · pathrequiredReturns
Promise<WhiteLabel>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.licence.retrieveBrands(1)bash
curl -X GET "$NOVIQA_API_URL/admin/v1/licence/brands/1" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"address": "1 High St",
"color_accent": "string",
"color_primary": "string",
"color_secondary": "string",
"company": "HS Markets Ltd",
"default_symbols": [
"string"
],
"domains": [
"string"
],
"enabled": true,
"eula_url": "string",
"has_banner": true,
"has_icon": true,
"has_logo": true
},
"request_id": "5b7f2c1e"
}ts
staff.licence.retrieveBrands(id: number, options?: RequestOptions): Promise<models.WhiteLabel>updateBrands
PATCH
/admin/v1/licence/brands/{id}Change a brand
Send version (the one you last read) and the fields to change; id, company, is_licenced, has_logo, has_banner and has_icon cannot be sent (images: see the images route below). A licence-sourced brand may be edited too, but the next licence apply overwrites every field it ships again, as it always has. A change that changes nothing answers the brand as it is.
More details
Rights: the staff member needs every one of: config.white_labels; and every one of: config.servers.
Parameters
idinteger · pathrequiredNumeric id.
Request body
addressstringcolor_accentstringcolor_primarystring#rrggbb or empty = the terminal's own
color_secondarystringcompanystringdefault_symbolsstring[]the first watch list of a new terminal
domainsstring[]host names without port, lower case
enabledbooleaneula_urlstringhas_bannerbooleanhas_iconbooleanhas_logobooleanidintegeris_defaultbooleanserved when no domain matches; at most one
is_licencedbooleantrue: written by the applied licence key, read-only here; DELETE refuses it
linksobjectnamed pages besides website/support_email/eula_url
phonestringprogram_namestringserver_namestringshort_namestringsupport_emailstringupdated_atstringUTC time, RFC 3339.
versionintegerwebsitestringReturns
Promise<WhiteLabel>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found409
conflict: already exists500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.licence.updateBrands(1, {
address: "1 High St",
color_accent: "string",
color_primary: "string",
color_secondary: "string",
company: "HS Markets Ltd",
default_symbols: [
"string"
],
domains: [
"string"
],
enabled: true,
eula_url: "string",
has_banner: true,
has_icon: true,
has_logo: true
})bash
curl -X PATCH "$NOVIQA_API_URL/admin/v1/licence/brands/1" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"address": "1 High St",
"color_accent": "string",
"color_primary": "string",
"color_secondary": "string",
"company": "HS Markets Ltd",
"default_symbols": [
"string"
],
"domains": [
"string"
],
"enabled": true,
"eula_url": "string",
"has_banner": true,
"has_icon": true,
"has_logo": true
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"address": "1 High St",
"color_accent": "string",
"color_primary": "string",
"color_secondary": "string",
"company": "HS Markets Ltd",
"default_symbols": [
"string"
],
"domains": [
"string"
],
"enabled": true,
"eula_url": "string",
"has_banner": true,
"has_icon": true,
"has_logo": true
},
"request_id": "5b7f2c1e"
}ts
staff.licence.updateBrands(id: number, body: models.WhiteLabel, options?: RequestOptions): Promise<models.WhiteLabel>deleteBrands
DELETE
/admin/v1/licence/brands/{id}Delete a brand
Removes a staff-created brand. A licence-sourced one (is_licenced true) answers conflict: remove it from the applied key instead.
More details
Rights: the staff member needs every one of: config.white_labels; and every one of: config.servers.
Parameters
idinteger · pathrequiredNumeric id.
Returns
Promise<null>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found409
conflict: already exists500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.licence.deleteBrands(1)bash
curl -X DELETE "$NOVIQA_API_URL/admin/v1/licence/brands/1" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": null,
"request_id": "5b7f2c1e"
}ts
staff.licence.deleteBrands(id: number, options?: RequestOptions): Promise<null>brandsDefault
POST
/admin/v1/licence/brands/{id}/defaultSet a brand as default
Makes the brand the one served when no domain matches, and no other (at most one default). It must be enabled first.
More details
Rights: the staff member needs every one of: config.white_labels; and every one of: config.servers.
Parameters
idinteger · pathrequiredNumeric id.
Returns
Promise<WhiteLabel>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.licence.brandsDefault(1)bash
curl -X POST "$NOVIQA_API_URL/admin/v1/licence/brands/1/default" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"address": "1 High St",
"color_accent": "string",
"color_primary": "string",
"color_secondary": "string",
"company": "HS Markets Ltd",
"default_symbols": [
"string"
],
"domains": [
"string"
],
"enabled": true,
"eula_url": "string",
"has_banner": true,
"has_icon": true,
"has_logo": true
},
"request_id": "5b7f2c1e"
}ts
staff.licence.brandsDefault(id: number, options?: RequestOptions): Promise<models.WhiteLabel>updateBrandsImages
PUT
/admin/v1/licence/brands/{id}/images/{kind}Replace a brand image
Replaces the brand's logo, banner or icon. data is the image bytes, base64 in JSON (at most 512 KB decoded; png, jpeg, gif, webp or ico, sniffed from the bytes, never trusted from a filename or header). Served back at GET /admin/v1/branding/{id}/{kind}.
More details
Rights: the staff member needs every one of: config.white_labels; and every one of: config.servers.
Parameters
idinteger · pathrequiredNumeric id.
kindstring · pathrequiredlogo banner iconRequest body
datastringReturns
Promise<WhiteLabel>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.licence.updateBrandsImages(1, "logo", {
data: "string"
})bash
curl -X PUT "$NOVIQA_API_URL/admin/v1/licence/brands/1/images/logo" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"data": "string"
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"address": "1 High St",
"color_accent": "string",
"color_primary": "string",
"color_secondary": "string",
"company": "HS Markets Ltd",
"default_symbols": [
"string"
],
"domains": [
"string"
],
"enabled": true,
"eula_url": "string",
"has_banner": true,
"has_icon": true,
"has_logo": true
},
"request_id": "5b7f2c1e"
}ts
staff.licence.updateBrandsImages(id: number, kind: string, body: http.brandImageBody, options?: RequestOptions): Promise<models.WhiteLabel>deleteBrandsImages
DELETE
/admin/v1/licence/brands/{id}/images/{kind}Clear a brand image
Removes the brand's logo, banner or icon.
More details
Rights: the staff member needs every one of: config.white_labels; and every one of: config.servers.
Parameters
idinteger · pathrequiredNumeric id.
kindstring · pathrequiredlogo banner iconReturns
Promise<WhiteLabel>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.licence.deleteBrandsImages(1, "logo")bash
curl -X DELETE "$NOVIQA_API_URL/admin/v1/licence/brands/1/images/logo" \
-H "Authorization: Bearer $NOVIQA_TOKEN"json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"address": "1 High St",
"color_accent": "string",
"color_primary": "string",
"color_secondary": "string",
"company": "HS Markets Ltd",
"default_symbols": [
"string"
],
"domains": [
"string"
],
"enabled": true,
"eula_url": "string",
"has_banner": true,
"has_icon": true,
"has_logo": true
},
"request_id": "5b7f2c1e"
}ts
staff.licence.deleteBrandsImages(id: number, kind: string, options?: RequestOptions): Promise<models.WhiteLabel>updateBrandsLinks
PUT
/admin/v1/licence/brands/{id}/linksReplace a brand's links
Replaces the whole set of named pages (e.g. deposit, withdraw, faq), each an http(s) address (the [login]/[lang] macros are not filled here, unlike a group's own links); at most 16, name 1-32 characters. Send version (the one you last read).
More details
Rights: the staff member needs every one of: config.white_labels; and every one of: config.servers.
Parameters
idinteger · pathrequiredNumeric id.
Request body
linksobjectversionintegerReturns
Promise<WhiteLabel>The answer's
data.Errors
400
invalid_input: invalid input401
auth.session_expired: session expired, sign in again403
auth.csrf_invalid: request refused: reload the page and try again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action404
not_found: not found409
conflict: already exists500
internal: something went wrongts
import { staff } from "@/lib/noviqa"
const data = await staff.licence.updateBrandsLinks(1, {
links: {
deposit: "https://example.com/deposit"
},
version: 1
})bash
curl -X PUT "$NOVIQA_API_URL/admin/v1/licence/brands/1/links" \
-H "Authorization: Bearer $NOVIQA_TOKEN" \
-H "Content-Type: application/json" \
--data-raw '{
"links": {
"deposit": "https://example.com/deposit"
},
"version": 1
}'json
{
"success": true,
"code": "ok",
"message": "done",
"data": {
"address": "1 High St",
"color_accent": "string",
"color_primary": "string",
"color_secondary": "string",
"company": "HS Markets Ltd",
"default_symbols": [
"string"
],
"domains": [
"string"
],
"enabled": true,
"eula_url": "string",
"has_banner": true,
"has_icon": true,
"has_logo": true
},
"request_id": "5b7f2c1e"
}ts
staff.licence.updateBrandsLinks(id: number, body: http.brandLinksBody, options?: RequestOptions): Promise<models.WhiteLabel>