Skip to main content
POST
Create a client

Authorizations

Authorization
string
header
required

OAuth 2.0 client credentials. The token request also needs the audience form field (the Account ID), which OAuth tooling does not always send; see POST /v1/oauth/token.

Headers

Idempotency-Key
string
required

Required on every POST, at most 255 characters. Use a new UUID for each logical operation. The first request with a key runs, and its answer (any status below 500) is stored for 7 days. A retry with the same key, method, path and body gets the stored answer again with Idempotency-Replayed: true, and nothing runs twice. The same key with a different body or path is 422 idempotency-key-reused; the same key while the first request is still running is 409 idempotency-key-in-progress. A 5xx answer is not stored, so the same key may be retried. A key belongs to the API client's grant (one environment).

Maximum string length: 255

Body

application/json

The client.

A new client.

name
string
required

The client's name. Required.

type
string | null

business (the default) or consumer.

orgNumber
string | null

Organisation number. Required for a Norwegian business (9 digits).

vatNumber
string | null

A foreign client's VAT number.

country
string | null

ISO 3166-1 alpha-2 country code; NO when left out.

email
string | null

Email address.

phone
string | null

Phone number.

address
string | null

Street address.

postalCode
string | null

Postal code.

city
string | null

City.

contactPerson
string | null

Contact person.

Response

The new client.

A client in the account's customer register.

id
string<uuid>
required

The client's id.

name
string
required

The client's name.

type
string
required

business or consumer.

orgNumber
string
required

Organisation number; empty when none.

country
string
required

ISO 3166-1 alpha-2 country code, for example NO.

email
string
required

Email address; empty when none.

phone
string
required

Phone number; empty when none.

address
string
required

Street address.

postalCode
string
required

Postal code.

city
string
required

City.

contactPerson
string
required

Contact person; empty when none.

createdAt
string<date-time>
required

When it was created (UTC).

updatedAt
string<date-time>
required

When it last changed (UTC).

vatNumber
string | null

A foreign client's VAT number, or null.