Create Namespace User Token
Create an authentication token for a user within a namespace. If the namespace does not exist, it is created asynchronously.
{
"data": {
"namespace_name": "customer_ns_1",
"_id": "alice@company.com",
"permissions": ["mask", "unmask"],
"start_date": "2024-07-11",
"end_date": "2029-07-10"
}
}
curl -X PUT https://<domain>/api/vault/super-admin/namespace/auth-token/generate \
-H "Authorization: Bearer <MASTER_API_KEY>" \
-H "Content-Type: application/json; charset=utf-8" \
-d '{
"data": {
"namespace_name": "customer_ns_1",
"_id": "alice@company.com",
"permissions": ["mask", "unmask"],
"start_date": "2024-07-11",
"end_date": "2025-07-10"
}
}'
{
"data": {
"auth_key": "<NAMESPACE_USER_AUTH_TOKEN>"
},
"success": true,
"error": { "message": "" }
}
{
"data": {
"auth_key": "<NAMESPACE_USER_AUTH_TOKEN>",
"namespace_creation": {
"tracking_id": "9f799cb6-5315-4199-8d47-3a7ced21dd1d",
"status": "PENDING",
"job_type": "namespace-creation"
}
},
"success": true,
"error": { "message": "" }
}
Creates an authentication token for a user within a specific namespace. If the namespace does not already exist, it is created asynchronously.
Endpoint
| Method | Endpoint |
|---|---|
PUT | https://<domain>/api/vault/super-admin/namespace/auth-token/generate |
Request body
Target namespace. Created automatically if it does not exist.
User ID or email to associate with the token.
Allowed actions. Values: mask, unmask, metadata_change.
Token validity start date. Format: YYYY-MM-DD.
Token validity end date. Format: YYYY-MM-DD.
Notes
-
namespace_creationis returned only when the namespace is newly created -
Use the
tracking_idwith the Track Namespace Jobs API to confirm namespace creation completes -
The auth token is valid between
start_dateandend_dateif provided
Last updated 1 day ago
Built with Documentation.AI