Test an API key
Check that an API key works and see what it is: publishable or secret, test or live, and which company it belongs to. Send the key as the bearer token, like any other call. Always returns 200: a bad key comes back as valid: false rather than an error, so it’s safe to wire into a healthcheck or setup step.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Successful Response
Whether the key resolved to an active account. An unknown or revoked key comes back as false, not an error.
Prefix of the key you sent: pk_live, pk_test, sk_live, sk_test, or unknown if it matched none of them.
"sk_test"
Whether the key is a test key. null when the key didn't resolve.
The company the key belongs to. null when the key didn't resolve.