# Call credential format

The open formats behind verified calls, with their JSON Schemas. The call credential is a JWS an agent signs before it dials, and the call receipt is a JWS Provenance signs for a verified check. Anyone can verify both without Provenance.

A verified call rests on two signed documents. The call credential is signed by the calling agent's key before it dials. The call receipt is signed by Provenance when a business checks the call. Both are compact JWS, both formats are published here with a JSON Schema, and both verify offline from public keys.

| Document | Signed by | Algorithm and `typ` | JSON Schema |
| --- | --- | --- | --- |
| Call credential | The calling agent's Ed25519 key | `EdDSA`, `call+jws` | [/schemas/call-credential/v1.json](https://provenanceauth.com/schemas/call-credential/v1.json) |
| Call receipt | Provenance's receipt key | `ES256`, `provenance-receipt+jwt` | [/schemas/call-receipt/v1.json](https://provenanceauth.com/schemas/call-receipt/v1.json) |

## The call credential

The protected header is `{ "alg": "EdDSA", "typ": "call+jws", "kid": "<thumbprint>" }`. `kid` is the RFC 7638 JWK thumbprint of the agent's public key, the same key id its Web Bot Auth signatures use.

```json
{ "alg": "EdDSA", "typ": "call+jws", "kid": "V7_l6WrhdXBQZSsMrtRPyZ2ho1C8U-YxfhT_3wNAFYc" }
```

### Claims

- `v` (integer, required): The format version: `1`.
- `iss` (string, required): The agent's key directory: its Provenance directory, or the agent's own directory or JWKS URL over https.
- `agent` (string, required): The agent's ID.
- `from` (string, required): The number the agent calls from, in E.164.
- `to` (string, required): The number the agent calls, in E.164.
- `nbf` (integer, required): The start of the window, in seconds since the epoch. Provenance registers a credential only when this is within 60 seconds of now.
- `exp` (integer, required): The end of the window. At most 900 seconds after `nbf`.
- `jti` (string, required): A unique ID, at most 200 characters. A credential registers once.
- `purpose` (string, required): The purpose, from the closed list below.
- `purpose_text` (string): The purpose in a sentence, at most 120 characters. The business sees it.
- `grant` (string): The grant behind the call. Give this or `approval`.
- `approval` (string): A one-time approval behind the call, approved and unused.
- `disclosure` (object): `{ ai, statement }`: the caller's AI-disclosure record, designed to support disclosure rules.
- `consent` (object): `{ basis, ref? }`: the caller's consent record, designed to support consent rules.

| Purpose | Use it for |
| --- | --- |
| `book` | Making a booking or reservation |
| `buy` | Buying something, payment included |
| `cancel` | Cancelling a booking, order or subscription |
| `change` | Changing an existing booking or order |
| `support` | Asking for help with an order or account |
| `inquire` | Asking a question |

```json
{
  "v": 1,
  "iss": "https://api.provenanceauth.com/v1/public/agents/agt_01M6XS88KNFTWDGP2MRBSJG3WR/directory",
  "agent": "agt_01M6XS88KNFTWDGP2MRBSJG3WR",
  "from": "+14155550100",
  "to": "+14155550123",
  "nbf": 1794148410,
  "exp": 1794149010,
  "jti": "1613c43c-f8f1-47ab-b777-ff173bbba3aa",
  "purpose": "book",
  "purpose_text": "Table for 2 at 7pm Friday",
  "grant": "grt_01M6XS88MSV3GBK874W606KSBA",
  "disclosure": { "ai": true, "statement": "spoken_at_start" },
  "consent": { "basis": "customer_request", "ref": "booking-4471" }
}
```

### Verify a credential

1. Split the JWS, and check that the header has `alg: EdDSA`, `typ: call+jws` and a `kid`.
2. Fetch the keys from the directory `iss` names, over https, and pick the key whose thumbprint is `kid`.
3. Check the Ed25519 signature over the first two segments.
4. Check that `exp - nbf` is at most 900, that the call happens inside the window, that `from` and `to` are the call's numbers, and that you haven't seen `jti` before.

Provenance runs the same checks when an agent registers, then also checks that the account verified `from` and that the call is inside the grant's call scope.

## The call receipt

A verified check carries a receipt, and [`GET /v1/authorize/call_checks/{id}/receipt`](https://provenanceauth.com/docs/api/call-checks.md#get-v1-authorize-call-checks-id-receipt) returns it decoded. The receipt holds no phone number. `numbers_digest` is the SHA-256 hex of `from|to|jti`, so a holder who knows both numbers can recompute it and match the receipt to a call.

- `receipt_id` (string, required): The receipt's ID (`rcpt_`).
- `type` (string, required): Always `verified_call`.
- `check_id` (string, required): The business's check.
- `call_id` (string | null, required): The registered call that matched.
- `transport` (string, required): How the call was matched: by its numbers, its short code, or an in-call path.
- `agent` (object | null, required): The agent's ID, the `kid` that signed the credential and its directory.
- `person` (object, required): Whether a person approved, when and how, and their pseudonym at this business only.
- `window` (object | null, required): The call's window.
- `numbers_digest` (string | null, required): SHA-256 hex of `from|to|jti`.
- `disclosure` (object | null, required): The disclosure record, as the agent signed it.
- `consent` (object | null, required): The consent record, as the agent signed it.
- `checked_at` (string, required): When the check ran.
- `iss` (string, required): The issuer: the Provenance site's URL.

```json
{
  "receipt_id": "rcpt_825314cb8e8b6cc71e7d640a3bdaddd3",
  "type": "verified_call",
  "v": 1,
  "check_id": "ccx_01M6XS88NC03EVE2XZ21T2VWCR",
  "call_id": "call_01M6XS88MWEMC2TK5MM9Y9MAWE",
  "result": "verified",
  "transport": "lookup",
  "agent": {
    "id": "agt_01M6XS88KNFTWDGP2MRBSJG3WR",
    "kid": "V7_l6WrhdXBQZSsMrtRPyZ2ho1C8U-YxfhT_3wNAFYc",
    "directory": "https://api.provenanceauth.com/v1/public/agents/agt_01M6XS88KNFTWDGP2MRBSJG3WR/directory"
  },
  "person": { "approved": true, "approved_at": "2026-11-08T14:33:30.010Z", "approved_via": "grant", "pseudonym": "hum_d3v3dtfd6rqyq6ifahve" },
  "purpose": "book",
  "window": { "from": "2026-11-08T14:33:30.000Z", "until": "2026-11-08T14:43:30.000Z" },
  "jti": "1613c43c-f8f1-47ab-b777-ff173bbba3aa",
  "numbers_digest": "74eeaa63adec20f5b8b7800263f5dc11d6eb5d9ee400a16872892ad2c8a216cb",
  "disclosure": { "ai": true, "statement": "spoken_at_start" },
  "consent": { "basis": "customer_request", "ref": "booking-4471" },
  "checked_at": "2026-11-08T14:33:30.028Z",
  "iss": "https://provenanceauth.com"
}
```

### Verify a receipt

1. Fetch the published keys from `/.well-known/jwks.json` on the Provenance API, and pick the key whose `kid` the receipt's header names.
2. Check the ES256 signature over the first two segments.
3. Check that `type` is `verified_call` and `result` is `verified`.
4. To tie the receipt to a call, compute the SHA-256 hex of `from|to|jti` and compare it with `numbers_digest`.

The free [`POST /v1/verify`](https://provenanceauth.com/docs/api/verify.md#post-v1-verify) checks a receipt without a key. Any JWS library that supports ES256 can run the same checks offline.

## Versioning

Both formats carry `v: 1`. A new version gets a new `v` value and its own schema URL.
