Search the docs
Start for FreeAuthentication
Authenticate your API requests with bearer tokens.
Bearer token authentication
All API requests must include a valid token in the Authorization header:
Authorization headerbash
Authorization: Bearer YOUR_API_TOKENRequests without a valid token receive a 401 Unauthenticated response.
Creating a token
- Go to Settings → API Tokens in your dashboard
- Click Create New Token
- Enter a name (e.g. "Production", "Staging", "CI/CD")
- Click Create
- Copy the token immediately
Important
The token is only displayed once at creation time. Store it securely. If you lose it, delete the token and create a new one.
If no permissions are selected, the token has full access. We recommend creating tokens with the minimum permissions needed for your use case.
Example request
Authenticated API callbash
curl https://pdfstork.com/api/v1/templates \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"Revoking tokens
To revoke a token, go to Settings → API Tokens and delete the token. The token becomes immediately invalid and all requests using it will be rejected.
Security best practices
- Store tokens as environment variables, never in source code
- Use different tokens for different environments (production, staging, development)
- Grant the minimum permissions needed for each token
- Rotate tokens periodically by creating a new one and deleting the old one
- Revoke tokens immediately if they are compromised
