Create a token
POST/tokens
The API endpoint creates a new API token. The returned bearer token is shown once — store it securely.
Request Body Properties
- name String — required
A unique name for the token. - description String
Optional free text. - environment String 'production' | 'test'
productiononly when exactly"production"; any other value defaults totest.
📘
Content-Type : application/json
NodeJS
var axios = require("axios").default;
const data = {
"name": "My integration",
"description": "Production integration token",
"environment": "production"
};
var options = {
method: 'POST',
url: 'https://api.signature.nc/api/v3/tokens',
headers: {'Authorization': 'Bearer {apiKey}', 'content-type': 'application/json'},
data: data
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});json
{
"token": "{API_ACCESS_KEY}",
"uuid": "a54af2ab-2668-44f8-896b-7e16cc6c8c53",
"environment": "production",
"nbUsed": 0
}Errors
All failures return 400 Bad Request.
| Message | Cause |
|---|---|
A name is required to create an API key. | Missing / blank name |
A key with this name already exists. Please choose a different name. | Duplicate name |
Unable to create the API key. Please try again. | Other failure |