Make a one-time enrolment code for a new node
POST
/api/v1/nodes/enrolment-codes
const url = 'https://deck.example.com/api/v1/nodes/enrolment-codes';const options = {method: 'POST', headers: {cookie: 'qd_auth=<qd_auth>'}};
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://deck.example.com/api/v1/nodes/enrolment-codes \ --cookie qd_auth=<qd_auth>Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Media typeapplication/json
object
code
required
string
expires_at
required
Unix seconds.
integer format: int64
Example generated
{ "code": "example", "expires_at": 1}default
Section titled “default”An error, with its message.
Media typeapplication/json
Every error the REST API returns, with an HTTP status.
object
error
required
string
Example generated
{ "error": "example"}