Super AdminCreate Namespace User Token

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"
  }
}
{
  "data": {
    "auth_key": "<NAMESPACE_USER_AUTH_TOKEN>"
  },
  "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

MethodEndpoint
PUThttps://<domain>/api/vault/super-admin/namespace/auth-token/generate

Request body

body
namespace_namestring
Required

Target namespace. Created automatically if it does not exist.

body
_idstring
Required

User ID or email to associate with the token.

body
permissionsarray[string]
Required

Allowed actions. Values: mask, unmask, metadata_change.

body
start_datestring

Token validity start date. Format: YYYY-MM-DD.

body
end_datestring

Token validity end date. Format: YYYY-MM-DD.

Notes

  • namespace_creation is returned only when the namespace is newly created

  • Use the tracking_id with the Track Namespace Jobs API to confirm namespace creation completes

  • The auth token is valid between start_date and end_date if provided