Create user
POST
/user
const url = 'https://api.colourbox.com/user';const options = { method: 'POST', headers: { Authorization: 'CBX-SIMPLE-TOKEN Token=<token>', 'Content-Type': 'application/json' }, body: '{"company_id":987,"fullname":"Some name","email":"test@example.com","locale":"da_DK","access":{"skyfish":"USER","cliques":[42]}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.colourbox.com/user \ --header 'Authorization: CBX-SIMPLE-TOKEN Token=<token>' \ --header 'Content-Type: application/json' \ --data '{ "company_id": 987, "fullname": "Some name", "email": "test@example.com", "locale": "da_DK", "access": { "skyfish": "USER", "cliques": [ 42 ] } }'Create a user on a company, or grant an existing user access to it.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
email
required
The user’s email address, also used as username
string
fullname
required
The user’s full name
string
company_id
required
The id of the company the user should be created on or gain access to
integer
locale
required
The language used when we send communications to the user
string
access
required
What access the user should have on the company
object
skyfish
Gives access to Skyfish on the company
string
colourbox
Gives access to Colourbox on the company
string
features
Extra features for the user. SIOD gives access to search in old downloads,
CONSENT makes the user a consent admin.
Array<string>
cliques
Clique ids. This is the way to give a user folder access: create a clique with access to the folders, and create the user as a member of that clique.
Array<integer>
Example
{ "company_id": 987, "fullname": "Some name", "email": "test@example.com", "locale": "da_DK", "access": { "skyfish": "USER", "cliques": [ 42 ] }}Responses
Section titled “Responses”The created user
Media typeapplication/json
object
id
integer
fullname
string
email
string
username
string
deleted
integer
last_login
Unix timestamp of the last login, null if the user never logged in
integer
href
string
Example
{ "id": 17, "fullname": "Some name", "email": "test@example.com", "username": "test@example.com", "deleted": 0, "last_login": null, "href": "https://api.colourbox.com/user/17"}