/v1/introspect/api-keyAuthResolve a Platform API Key (PAK) to its workspace + IAM-style policy. Call it with the key a request to your backend carried, cache the answer for up to 60 seconds, and allow an action only when the returned `policy` allows it on the resource.
Response · 201
is_valid*booleanAlways `true` on a 200: unknown, revoked and expired keys answer 401.
workspace_id*string · uuidId of the workspace the key belongs to.
policy*arrayMerged effective policy across every managed policy bound to this PAK.
created_by*string · uuidAccount id of the person who minted the key, or `null` when that account is gone.
api_key_id*string · uuidId of the key.
Example
Request
POST https://api.platform-auth.productcraft.co/v1/introspect/api-key
Authorization: Bearer YOUR_TOKENResponse
{
"is_valid": false,
"workspace_id": "00000000-0000-0000-0000-000000000000",
"policy": [
{
"effect": "allow",
"actions": [
"social.read",
"social.list"
],
"resources": [
"*"
]
}
],
"created_by": "00000000-0000-0000-0000-000000000000",
"api_key_id": "00000000-0000-0000-0000-000000000000"
}