Discovery
1 operation under /v1/discovery/manifest (GET): parameters, status codes, refusal bodies, and the same request in curl, HTTP, Python and TypeScript.
Base URL: https://api.codespar.dev
Every operation below requires a Bearer token. See Authentication.
GET /v1/discovery/manifest
https://api.codespar.dev/v1/discovery/manifestThe project's x402 discovery manifest
The caller's own x402 manifest: the machine-readable index of what a crawler or an agent can pay for, in the same shape the public gateway serves it, so a dashboard can preview the real thing rather than a reconstruction.
The content is the project's ACTIVE paywalls in the environment the credential authenticates in, oldest first. Nothing here is a secret: the same manifest is served unauthenticated at the gateway, because every field in it is already exposed by the paywall URLs it indexes. A project with no active paywalls answers with an empty resources array, which is a well-formed manifest and not an error.
The prices mirror the live challenge, including the current tier for a tiered paywall — so what a crawler reads here is what it would be quoted by calling the URL.
Requires the servers:read scope.
Responses
| Status | Body | Description |
|---|---|---|
200 | object | OK |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
environment | "live" | "test" | yes | Echo of the environment. It selects the paywalls AND the network and token in every accepts entry, so one manifest never mixes the two. |
manifest | object | yes | — |
project_id | string | yes | Echo of the project the credential resolved to. |
curl -X GET https://api.codespar.dev/v1/discovery/manifest \
-H "Authorization: Bearer $CODESPAR_API_KEY"GET /v1/discovery/manifest HTTP/1.1
Host: api.codespar.dev
Authorization: Bearer $CODESPAR_API_KEYimport os
import requests
res = requests.get(
"https://api.codespar.dev/v1/discovery/manifest",
headers={"Authorization": f"Bearer {os.environ['CODESPAR_API_KEY']}"},
)
res.raise_for_status()
data = res.json()const res = await fetch("https://api.codespar.dev/v1/discovery/manifest", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.CODESPAR_API_KEY}`,
},
});
const data = await res.json();const result = await cs.api.get("/v1/discovery/manifest");{
"manifest": {
"x402Version": 2,
"resources": [
{
"url": "https://example.com/hook",
"description": "string",
"pricing_model": "flat",
"variable_price": true,
"accepts": [
{
"scheme": "exact",
"network": "string",
"asset": "string",
"amount": "1000",
"payTo": "string",
"maxTimeoutSeconds": 1,
"extra": {
"name": "Example",
"version": "string"
}
}
]
}
],
"gateway_unavailable_reason": "gateway_origin_not_configured"
},
"project_id": "prj_0000000000000000",
"environment": "live"
}