/v1/api-keys/selfAuthDescribe the workspace key making this request: its name, workspace, expiry and what it may do in plain sentences. Call it with `Authorization: Bearer pcft_live_…` to test a key right after minting it.
Response · 200
key_id*string · uuidId of the key that made this request.
name*stringName given to the key when it was minted.
Example: "Production mailer"
workspace_id*string · uuidId of the workspace the key belongs to (also `workspace.id`). The SDKs read it once per process to bind `workspace_id` on product calls.
workspace*objectThe workspace the key belongs to.
expires_at*string · date-timeWhen the key stops working. `null` means it never expires.
allowed*arrayWhat the key may do, one plain sentence per action, as `<Product>: <action>`. A sentence ends in `(only some resources)` when the key holds the action on specific resources only, `(with exceptions)` when some resources are denied, and `(with conditions)` when it applies only under a condition. Empty when the key can do nothing.
Example: ["Mail: Read domains and templates","Mail: Send email from your verified domains"]
actions*arrayThe permission catalog actions behind `allowed`, in the same order.
Example: ["mail.read","mail.send"]
Example
Request
GET https://api.platform-auth.productcraft.co/v1/api-keys/self
Authorization: Bearer YOUR_TOKENResponse
{
"key_id": "00000000-0000-0000-0000-000000000000",
"name": "Production mailer",
"workspace_id": "00000000-0000-0000-0000-000000000000",
"workspace": {},
"expires_at": "2026-01-01T00:00:00.000Z",
"allowed": [
"Mail: Read domains and templates",
"Mail: Send email from your verified domains"
],
"actions": [
"mail.read",
"mail.send"
]
}