Skip to content

staff.licence ​

11 methods on staff.licence. Each returns the answer's data and throws NoviqaError on a failed answer.

retrieve ​

GET/admin/v1/licence

Licence 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
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
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/licence

Apply 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
keystring
the licence key the vendor issued, e.g. HSL1...
Returns
Promise<Status>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
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/brands

List 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
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
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/brands

Create 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
addressstring
color_accentstring
color_primarystring
#rrggbb or empty = the terminal's own
color_secondarystring
companystring
default_symbolsstring[]
the first watch list of a new terminal
domainsstring[]
host names without port, lower case
enabledboolean
eula_urlstring
has_bannerboolean
has_iconboolean
has_logoboolean
idinteger
is_defaultboolean
served when no domain matches; at most one
is_licencedboolean
true: written by the applied licence key, read-only here; DELETE refuses it
linksobject
named pages besides website/support_email/eula_url
phonestring
program_namestring
server_namestring
short_namestring
support_emailstring
updated_atstring
UTC time, RFC 3339.
versioninteger
websitestring
Returns
Promise<WhiteLabel>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
409conflict: already exists
500internal: something went wrong
ts
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 · pathrequired
Returns
Promise<WhiteLabel>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
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 · pathrequired
Numeric id.
Request body
addressstring
color_accentstring
color_primarystring
#rrggbb or empty = the terminal's own
color_secondarystring
companystring
default_symbolsstring[]
the first watch list of a new terminal
domainsstring[]
host names without port, lower case
enabledboolean
eula_urlstring
has_bannerboolean
has_iconboolean
has_logoboolean
idinteger
is_defaultboolean
served when no domain matches; at most one
is_licencedboolean
true: written by the applied licence key, read-only here; DELETE refuses it
linksobject
named pages besides website/support_email/eula_url
phonestring
program_namestring
server_namestring
short_namestring
support_emailstring
updated_atstring
UTC time, RFC 3339.
versioninteger
websitestring
Returns
Promise<WhiteLabel>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
409conflict: already exists
500internal: something went wrong
ts
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 · pathrequired
Numeric id.
Returns
Promise<null>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
409conflict: already exists
500internal: something went wrong
ts
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}/default

Set 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 · pathrequired
Numeric id.
Returns
Promise<WhiteLabel>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
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 · pathrequired
Numeric id.
kindstring · pathrequired
logo banner icon
Request body
datastring
Returns
Promise<WhiteLabel>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
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 · pathrequired
Numeric id.
kindstring · pathrequired
logo banner icon
Returns
Promise<WhiteLabel>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
500internal: something went wrong
ts
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>
PUT/admin/v1/licence/brands/{id}/links

Replace 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 · pathrequired
Numeric id.
Request body
linksobject
versioninteger
Returns
Promise<WhiteLabel>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
404not_found: not found
409conflict: already exists
500internal: something went wrong
ts
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>