POST /v1/x402-endpoints
Create (import) a new x402 endpoint after successful test

Request Body required

Endpoint details

application/json
One of:
Option 1
Option 2
baseUrl string REQUIRED
Endpoint identity
bodyParams object
category string
defaultBody object
defaultHeaders object
defaultQueryParams object
Default values (applied if user doesn't provide at runtime)
description string
exampleBody unknown
exampleOutput unknown
exampleQueryParams object
Examples (for AI/docs/UI)
headerParams object
method string
Enum: GET, POST, PUT, PATCH, DELETE
mimeType string
name string
Metadata (optional - AI generates if empty)
network string REQUIRED
outputSchema object
Output schema
payTo string REQUIRED
price string REQUIRED
Payment info (from probe)
queryParams object
Input configuration (CDP-aligned flat structure) Format: {"paramName": {"type": "string", "description": "...", "required": true}}
source string
user_import or cdp_bazaar
tags string[]
Array of:
tokenAddress string REQUIRED
tokenDecimals integer
tokenSymbol string

Responses

200 OK
application/json
code integer
data object
avgResponseMs integer
baseUrl string
=== ENDPOINT IDENTITY === BaseURL is the clean URL without query params (e.g., "https://api.example.com/search")
bodyParams object
category string
createdAt string
=== TIMESTAMPS ===
defaultBody object
defaultHeaders object
defaultQueryParams object
Default values (applied if user doesn't provide at runtime)
description string
exampleBody unknown
exampleOutput unknown
exampleQueryParams object
=== EXAMPLES ===
failureCount integer
headerParams object
id string
inputSummary string
lastCalledAt string
lastError string
lastErrorAt string
maxAllowedPrice string
Price protection (auto 5x of import price)
method string
GET, POST, PUT, DELETE
mimeType string
name string
=== METADATA ===
network string
outputSchema object
=== OUTPUT ===
outputSummary string
payTo string
price string
=== PAYMENT INFO ===
queryParams object
=== INPUT CONFIGURATION === CDP-aligned flat structure: {"paramName": {"type": "string", "description": "...", "required": true}}
source string
Enum: user_import, cdp_bazaar
spentByToken object
Multi-token spending tracker: {"0x833...": "50000", "0xb3b...": "1000000000000000000"}
successCount integer
=== STATS ===
tags string[]
Array of:
tokenAddress string
tokenDecimals integer
tokenSymbol string
totalCalls integer
updatedAt string
useCases string[]
=== AI FIELDS ===
Array of:
message string
requestId string
400 Bad Request
curl -X POST 'https://api.example.com/v1/x402-endpoints' \  -H 'Authorization: Bearer YOUR_API_TOKEN' \  -H 'Content-Type: application/json' \  -d '{}'
const response = await fetch('https://api.example.com/v1/x402-endpoints', {  method: 'POST',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN",      "Content-Type": "application/json"  },  body: JSON.stringify({})});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://api.example.com/v1/x402-endpoints', headers=headers, json={})print(response.json())
package mainimport (	"fmt"	"io"	"net/http"	"strings")func main() {	body := strings.NewReader(`{}`)	req, _ := http.NewRequest("POST", "https://api.example.com/v1/x402-endpoints", body)	req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")	req.Header.Set("Content-Type", "application/json")	resp, _ := http.DefaultClient.Do(req)	defer resp.Body.Close()	result, _ := io.ReadAll(resp.Body)	fmt.Println(string(result))}
200 Response
{  "code": 200,  "data": {    "avgResponseMs": 123,    "baseUrl": "<string>",    "bodyParams": "<object>",    "category": "<string>",    "createdAt": "<string>",    "defaultBody": "<object>",    "defaultHeaders": "<object>",    "defaultQueryParams": "<object>",    "description": "<string>",    "exampleBody": "<unknown>",    "exampleOutput": "<unknown>",    "exampleQueryParams": "<object>",    "failureCount": 123,    "headerParams": "<object>",    "id": "<string>",    "inputSummary": "<string>",    "lastCalledAt": "<string>",    "lastError": "<string>",    "lastErrorAt": "<string>",    "maxAllowedPrice": "<string>",    "method": "<string>",    "mimeType": "<string>",    "name": "<string>",    "network": "<string>",    "outputSchema": "<object>",    "outputSummary": "<string>",    "payTo": "<string>",    "price": "<string>",    "queryParams": "<object>",    "source": "user_import",    "spentByToken": "<object>",    "successCount": 123,    "tags": [      "<string>"    ],    "tokenAddress": "<string>",    "tokenDecimals": 123,    "tokenSymbol": "<string>",    "totalCalls": 123,    "updatedAt": "<string>",    "useCases": [      "<string>"    ]  },  "message": "success",  "requestId": "abc-123"}