---
title: "Sign a request from a hosted agent"
description: "Get TAP identity headers for an exact HTTPS request from a hosted agent. Base URL: https://auth.visacli.sh"
url: https://app.visacli.sh/docs/reference/visa-cli/attest-a-hosted-agent-http-request
updated: 2026-11-10
---

# Sign a request from a hosted agent

> Get TAP identity headers for an exact HTTPS request from a hosted agent. Base URL: https://auth.visacli.sh

Canonical: https://app.visacli.sh/docs/reference/visa-cli/attest-a-hosted-agent-http-request. Updated: 2026-11-10. Full index: /llms.txt.

> [!NOTE] Visa CLI agents only
> This route needs a Visa CLI token, so a partner's agent can't call it.

```text
POST /agent/v1/http-attestations
```

Related guide: [Verify a signed request](/docs/verify-a-signed-request.md).

Hosted-agent HTTP attestation. Returns TAP identity headers for an exact structured HTTPS request. The caller then sends that request to the merchant.

**Authorization:** OAuth token or app token. The route signs no wallet message, sends no HTTP request and performs no payment.

| Request field | Presence | Meaning |
| --- | --- | --- |
| `idempotency_key` | Required UUID | One attestation request identity. |
| `request.url` | Required URL | Canonical HTTPS URL; credentials and fragments are refused. |
| `request.method` | Required enum | `GET`, `HEAD`, `POST`. |
| `request.headers` | Required header-pair array | Normalized application headers; ambient auth/session credentials are outside this profile. |
| `request.body_sha256` | Required string | Base64url SHA-256 of exact body bytes. `GET` and `HEAD` require the empty-body digest shown below; `POST` hashes the actual body bytes. |
| `created`, `expires` | Required integers | Epoch seconds; positive duration at most 60 seconds. |
| `nonce` | Required string | 32 random bytes as canonical base64. |

```json title="Hosted attestation request — regenerate timestamps / nonce"
{
  "idempotency_key": "5076bc2d-ff4d-4269-90cd-86d91587d0b8",
  "request": {
    "url": "https://merchant.example.com/prices?sku=1",
    "method": "GET",
    "headers": [
      [
        "accept",
        "application/json"
      ]
    ],
    "body_sha256": "47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU"
  },
  "created": 1793836800,
  "expires": 1793836860,
  "nonce": "GENERATE_32_RANDOM_BYTES_AND_BASE64_ENCODE"
}
```

HTTP 200 response fields: `profile`, `request_id`, `request`, `key_id`, `created`, `expires`, `nonce`, and `headers` containing `content-digest`, `signature-input` and `signature`.

It can refuse with `setup_required`, `agent_inactive`, `not_enabled`, `expired`, `unavailable`, `blocked`, `rate_limited`. Visa signs at most 5,000 requests per agent and 20,000 per owner in any rolling 24 hours; past that it answers `rate_limited` with `Retry-After` (also in `retry_after_seconds`), the seconds until the window has room again. Merchants validate this attestation against the hosted HTTP attestation profile: `@method` `@scheme` `@authority` `@path` `@query` `content-digest`, then normalized sorted application headers, lasting at most 60 seconds.
