Endpoint
Overview
Use this endpoint to generate an app key for your application. The app key is required to create access tokens via the/auth/token endpoint.
Creating a new app key renders the previous key unusable. Plan key rotation carefully to avoid service disruption.
Authentication
This endpoint requires only thex-api-key header. No Bearer token is needed.
| Header | Value | Required |
|---|---|---|
x-api-key | Your API key from onboarding | Yes |
Content-Type | application/json | Yes |
Request Body
Container for API data
Must be
"auth"Container for authentication attributes
Your application ID provided during onboarding
Example Request
Response
Success Response (201 Created)
Contains URLs related to the resource
Container for response data
Example Response
Code Examples
Error Responses
Common Error Scenarios
Missing x-api-key header
Missing x-api-key header
Error: 401 UnauthorizedSolution: Ensure the
x-api-key header is included in the request with your valid API key.Invalid appId
Invalid appId
Error: 400 Bad RequestSolution: Verify your application ID matches the ID provided during onboarding.
Account suspended
Account suspended
Error: 403 ForbiddenSolution: Contact Digitzs support to check your account status.
Best Practices
Store Securely: Save the returned app key in a secure location (environment variable or secret management service). You’ll need it to generate access tokens.
Key Rotation: When creating a new app key, the previous key becomes invalid immediately. Ensure all services are updated before rotating keys.
Next Steps
After creating an app key, use it to generate an access token:Create App Token
Generate an access token using your app key

