AY Developer docs
ApiIdentity

Verify an RFC 9421 signed request

Re-runs the receiver-side verification of the AY profile (`docs/identity/t2t-signature-contract.md` §4) and returns every step with its outcome, so you can see *why* a signature fails. Read-only: it does **not** consume nonces (the `nonce` step is reported as `skipped`). Accepts all three tags (`ay-t2t`, `ay-t2a`, `ay-agent`). No authentication, rate-limited. Never returns key material.

POST
/identity/verify

Re-runs the receiver-side verification of the AY profile (docs/identity/t2t-signature-contract.md §4) and returns every step with its outcome, so you can see why a signature fails.

Read-only: it does not consume nonces (the nonce step is reported as skipped). Accepts all three tags (ay-t2t, ay-t2a, ay-agent). No authentication, rate-limited. Never returns key material.

Request Body

application/json
  1. body
method*string
Value in"GET""POST""PUT""PATCH""DELETE"
url*string

The URL as received (scheme is ignored; @authority + @path are what is signed).

Formaturi
headers*
bodyBase64?string

Exact body bytes, base64. Required whenever content-digest is covered (always, in the AY profile).

Response Body

Verification ran; result says whether the signature is valid. Envelope-wrapped: { "success": true, "data": <IdentityVerifyResult> }.

application/json
  1. response
result*string
Value in"ok""failed"
keyid*string
did?string
signer_type?string
Value in"twins""agents""machines""platform""unknown"
reason?string

Reason of the first failing step (absent when result=ok).

Value in"digest_mismatch""unresolvable""key_not_authorized""bad_signature""expired""malformed""revoked""replay"
steps*array<>

Same order as the contract §4. Revocation is enforced in resolve_did: a deactivated DID fails there with reason=revoked. status_list is the seat for the Bitstring Status List of capability credentials (ADR-020 D3) and reports skipped until those exist — it never claims an unrun check. nonce is always skipped here, since the read-only verifier consumes no nonces.

Example Request
curl -X POST 'https://api.aytwin.ai/api/v1/identity/verify' \  -H 'Content-Type: application/json' \  -d '{  "method": "GET",  "url": "http://example.com",  "headers": {    "signature-input": "string",    "signature": "string"  }}'
Example Response
{  "result": "ok",  "keyid": "string",  "did": "string",  "signer_type": "twins",  "reason": "digest_mismatch",  "steps": [    {      "step": "content_digest",      "status": "ok",      "detail": "string"    }  ]}