🟢API for Private Tokens
This page describes management of Private tokens via API.
Once you have the short-lived token from logging in, the next step is to create a long-living token (it's called a Private Token). This token is meant for backend server use, allowing you to make API requests without needing to constantly re-authenticate.
What can you do?
Create new private token
Authorizations
Body
namestring · min: 1Required
expiration_timestring · date-timeRequired
Responses
201Success
application/json
400Error
application/json
post
POST /api/v1/auth/private_tokens/ HTTP/1.1
Host: saas.haut.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 60
{
"name": "text",
"expiration_time": "2025-10-08T16:21:50.095Z"
}
{
"id": 1,
"name": "text",
"expiration_time": "2025-10-08T16:21:50.095Z",
"data": "text"
}
List your private tokens
Authorizations
Query parameters
orderingstringOptional
Which field to use when ordering the results.
qstringOptional
A search term.
pageintegerOptional
A page number within the paginated result set.
page_sizeintegerOptional
Number of results to return per page.
Responses
200Success
application/json
get
GET /api/v1/auth/private_tokens/ HTTP/1.1
Host: saas.haut.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200Success
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"results": [
{
"id": 1,
"name": "text",
"expiration_time": "2025-10-08T16:21:50.095Z"
}
]
}
Revoke your private token
Authorizations
Path parameters
idintegerRequired
A unique integer value identifying this private token.
Responses
204
No response body
No content
delete
DELETE /api/v1/auth/private_tokens/{id}/ HTTP/1.1
Host: saas.haut.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
204
No response body
No content
Last updated
Was this helpful?