API reference
Discovery
Generated HTTP reference for the 1 operation the published OpenAPI document describes under discovery.
1 min read
Discovery
This page is generated from the published OpenAPI document. It is complete with respect to that document and says nothing about surfaces the document does not describe yet. See what is generated here for what that means.
Base URL: https://api.codespar.dev
Every operation below requires a Bearer token. See Authentication.
GET /v1/discovery/manifest
The project's x402 discovery manifest
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. |
Example response
{
"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"
}
}
]
}
]
},
"project_id": "prj_0000000000000000",
"environment": "live"
}Example request
curl -X GET https://api.codespar.dev/v1/discovery/manifest \
-H "Authorization: Bearer $CODESPAR_API_KEY"