AY Developer docs
ApiIdentity

Verify a Verifiable Credential (vc+jwt)

Verifies a credential issued by the AY platform or a listed issuer: signature (EdDSA, key resolved from the issuer DID), issuer allowlist, validity window and the Token Status List. Returns one verdict: `valid`, `expired`, `suspended`, `revoked`, `invalid` or `unknown` (`unknown` = a source was unreachable, no verdict). Use it for Agent Passports, BusinessVerificationCredentials and TwinMandateCredentials. No authentication, rate-limited. Never returns key material. TwinMandateCredential (AIOAY-5541): issued by the person, not the platform. `alg` is `ES256` (raw R||S, 64 bytes, RFC 7518 §3.4; DER is `invalid`), `kid` is `<user-did>#key-device` under `assertionMethod`. `iss` must equal the `controller` of the twin DID document (`sub`), otherwise `invalid` with reason `issuer_not_controller`. Status list: `/identity/status-list/mandates`.

POST
/identity/credentials/verify

Verifies a credential issued by the AY platform or a listed issuer: signature (EdDSA, key resolved from the issuer DID), issuer allowlist, validity window and the Token Status List. Returns one verdict: valid, expired, suspended, revoked, invalid or unknown (unknown = a source was unreachable, no verdict). Use it for Agent Passports, BusinessVerificationCredentials and TwinMandateCredentials. No authentication, rate-limited. Never returns key material.

TwinMandateCredential (AIOAY-5541): issued by the person, not the platform. alg is ES256 (raw R||S, 64 bytes, RFC 7518 §3.4; DER is invalid), kid is <user-did>#key-device under assertionMethod. iss must equal the controller of the twin DID document (sub), otherwise invalid with reason issuer_not_controller. Status list: /identity/status-list/mandates.

Request Body

application/json
  1. body
jwt*string

The compact vc+jwt.

Length20 <= length <= 16384

Response Body

Verdict. Envelope-wrapped: { "success": true, "data": <CredentialVerifyResult> }.

application/json
  1. response
status*string
Value in"valid""expired""suspended""revoked""invalid""unknown"
reason?string

Why the verdict is not valid, for example status_list_revoked, issuer_not_trusted, issuer_not_controller (TwinMandateCredential whose iss is not the twin's controller), bad_signature, alg_key_mismatch, status_list_unavailable.

checked_at?string
Formatdate-time
vct?string
sub?string

Subject DID.

iss?string

Issuer DID.

iat?integer
exp?integer
status_list?
Example Request
curl -X POST 'https://api.aytwin.ai/api/v1/identity/credentials/verify' \  -H 'Content-Type: application/json' \  -d '{  "jwt": "stringstringstringst"}'
Example Response
{  "status": "valid",  "reason": "string",  "checked_at": "2019-08-24T14:15:22Z",  "vct": "string",  "sub": "string",  "iss": "string",  "iat": 0,  "exp": 0,  "status_list": {    "uri": "http://example.com",    "idx": 0  }}