AY Developer docs

Errors

Every error code of the agent and identity API, with its status, its reason values, and what to do.

All errors under /api/v1 share one envelope:

{ "success": false, "error": "<code>", "message": "<text>" }

Codes written in lower case come from the authentication and identity layer. They add error_code (same value as error) and, where useful, a reason. Codes written in upper case come from the agent routes and carry only error and message.

Authentication

Statuserrorreason valuesWhat to do
400ambiguous_authsignature_and_authorizationSend either Signature-Input or Authorization, never both.
401AGENT_AUTH_REQUIREDAdd a token or a signature.
401token_invalidmalformed, alg, kid, expired, nbf, aud, iss, signature, sub, sub_unknown, key_custodyCheck the token: RS256, issued by https://auth.machine-identity.com, scope with the project audience, not expired. sub_unknown means no agent owns this machine user; key_custody means the agent uses a developer key and must sign instead.
401signature_invalidbad_signature, expired, digest_mismatch, replay, key_not_authorized, unresolvable, malformed, signer_type, unknown_agentCheck the profile: four components, tag ay-agent, fresh nonce, keyid is the current #dev-N. key_not_authorized means the key is not the agent's current developer key.
401INVALID_AGENT_KEYThe legacy API key is unknown. Move to a token.
401AGENT_INACTIVEThe agent is deactivated or still pending_attestation.
403AGENT_HALTEDThe kill switch is on. Turn it off with PATCH /agents/{id}/config.
403DAILY_LIMIT_EXCEEDEDToday's spend reached daily_limit_eur. Wait for the next day or raise the limit.
403OWNER_NOT_VERIFIEDThe business that owns the agent is not verified, suspended, or revoked.
403OWNER_MANDATE_MISSINGowner_mandateOnly when mandate enforcement is on. The person who owns the agent has no valid mandate for their twin, or has revoked it. The person signs a new mandate in the AY app.
503verifier_unavailablenot_configured, jwks, nonce_store, owner_credentialAY could not run a check and refused the request. Retry with backoff.

Registration and attestation

StatuserrorWhat to do
400TWIN_REQUIREDThe owner account has no twin yet. Finish onboarding first.
422INVALID_PUBLIC_KEYpublic_key_multibase is not an Ed25519 Multikey, or, on rotation, equals the current key.
422AGENT_VISIBILITY_BUSINESS_PRIVATEBusiness agents are always private. Omit visibility or send private.
409IDENTITY_NOT_REGISTEREDThe acting person has not paired the AY app. With X-Act-As this is the person acting for the business. Every agent passport needs a paired person behind it. Pair the app, then register or attest again.
409TWIN_DID_MISSINGThe business twin has no DID yet, so the passport would have no owner. Retry later or contact support.
409MANDATE_REQUIREDOnly when mandate enforcement is on. The acting person has no valid mandate for their twin. Confirm the mandate in the AY app, then register or attest again. Not returned with X-Act-As: a business needs no mandate.
409BUSINESS_NOT_VERIFIEDThe business is not verified yet. Registration and attestation of business agents wait for the verification.
429AGENT_LIMIT_REACHEDTen active agents per account. Deactivate one first.
502AGENT_CREDENTIAL_FAILEDThe identity provider rejected the change. The registration was rolled back; retry.
503AGENT_AUTH_NOT_CONFIGUREDThe agents project is not configured in this environment. Contact support.
409ATTESTATION_NOT_PENDINGThe agent is not waiting for a proof of possession.
410attestation_expiredThe challenge is older than ten minutes. Register again, or request a new rotation challenge.
422attestation_invalidThe challenge does not match or the signature does not verify.

Rotation

StatuserrorWhat to do
403ROTATION_REQUIRES_SIGNATURESelf-rotation requires a signed request (tag ay-agent), not a token.
409ROTATION_NOT_ALLOWEDThe agent has no developer key or is not active.
409IDENTITY_NOT_REGISTEREDThe acting person (with X-Act-As: the person acting for the business) or the owner has not paired the AY app. Pair it, then rotate.
409TWIN_DID_MISSINGThe business twin has no DID yet.
409MANDATE_REQUIREDOnly when mandate enforcement is on. The acting person has no valid mandate for their twin. Confirm it in the AY app, then rotate.
409ROTATION_CHALLENGE_MISSINGRequest a challenge first.
409AGENT_CREDENTIAL_NOT_ROTATABLENo Zitadel credential to rotate (developer custody or legacy agent).

Identity

StatuserrorWhat to do
404DID_NOT_FOUNDThe DID is not published by its host.
422INVALID_DIDSend a did:webvh identifier of at most 512 characters.
422validation_failedThe request body did not match the schema; messages lists the fields.

Generic

StatuserrorWhat to do
404not_foundThe agent does not exist or does not belong to you.
429rate_limitedSlow down; read Retry-After. See Rate limits.