Skip to main content
API reference

Discovery

Generated HTTP reference for the 1 operation the published OpenAPI document describes under discovery.

1 min read
View MarkdownEdit on GitHub

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

StatusBodyDescription
200objectOK

Response 200

FieldTypeRequiredDescription
environment"live" | "test"yesEcho of the environment. It selects the paywalls AND the network and token in every accepts entry, so one manifest never mixes the two.
manifestobjectyes
project_idstringyesEcho 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"
Discovery | CodeSpar