Skip to main content

Portal — API Keys

API keys authenticate your application to the normalization and artifact endpoints. You can create multiple keys for different environments or integrations and rotate them without downtime.

All portal endpoints require a JWT Bearer token. See Authentication for how to obtain one.

GET /api/portal/api-keys​

List all API keys for your organization.

Request​

GET https://api.pdfcanon.com/api/portal/api-keys
Authorization: Bearer <access_token>

Response (200 OK)​

Returns an array of ApiKeyResponse objects.

FieldTypeDescription
iduuidKey identifier
namestringDisplay name
keyPrefixstringFirst few characters of the key (e.g. pdfn_abc1...)
scopesstring[]Granted scopes (normalize, read)
isActivebooleanWhether the key is active
expiresAtdatetime (nullable)Expiration timestamp, if set
lastUsedAtdatetime (nullable)Timestamp of the last authenticated request
createdAtdatetimeCreation timestamp
note

The full key value is never returned after creation. Store it immediately when you create a key.

Example​

curl https://api.pdfcanon.com/api/portal/api-keys \
-H "Authorization: Bearer eyJ..."

POST /api/portal/api-keys​

Create a new API key.

Request​

POST https://api.pdfcanon.com/api/portal/api-keys
Authorization: Bearer <access_token>
Content-Type: application/json
FieldTypeRequiredDescription
namestring✅Display name for the key
scopesstring[]✅Array of scopes: "normalize" and/or "read"
expiresAtdatetime (nullable)NoOptional expiration date

Response (200 OK)​

Returns a CreateApiKeyResponse object.

FieldTypeDescription
iduuidKey identifier
namestringDisplay name
keyPrefixstringFirst few characters of the key
scopesstring[]Granted scopes
expiresAtdatetime (nullable)Expiration timestamp
createdAtdatetimeCreation timestamp
fullKeystringThe full secret key — shown only once. Store it securely.

Example​

curl -X POST https://api.pdfcanon.com/api/portal/api-keys \
-H "Authorization: Bearer eyJ..." \
-H "Content-Type: application/json" \
-d '{
"name": "Production",
"scopes": ["normalize", "read"]
}'

DELETE /api/portal/api-keys/{id}​

Revoke an API key immediately. Any requests using the revoked key will return 401.

Request​

DELETE https://api.pdfcanon.com/api/portal/api-keys/{id}
Authorization: Bearer <access_token>
ParameterDescription
idUUID of the key to revoke

Response​

StatusDescription
200Key revoked
404Key not found

Example​

curl -X DELETE https://api.pdfcanon.com/api/portal/api-keys/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer eyJ..."

Key rotation workflow​

To rotate an API key without downtime:

  1. Create a new key with the same scopes
  2. Copy the fullKey value and update your application configuration
  3. Deploy the updated configuration
  4. Verify the new key is working (check lastUsedAt)
  5. Delete the old key