---
title: "POST /v1/x402-endpoints"
method: POST
path: "/v1/x402-endpoints"
---

# POST /v1/x402-endpoints

`POST /v1/x402-endpoints`

Create (import) a new x402 endpoint after successful test

## Request body

- union
  - object
  - CreateX402EndpointParams
    - `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` '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[]
    - `tokenAddress` string, required
    - `tokenDecimals` integer
    - `tokenSymbol` string

## Response `200`

OK

- CreateX402EndpointSuccessResponse
  - `code` integer
  - `data` GithubComB3FunB3MonoServicesB3osWorkflowInternalPkgEntityX402Endpoint
    - `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` 'user_import' | 'cdp_bazaar'
    - `spentByToken` object — Multi-token spending tracker: {"0x833...": "50000", "0xb3b...": "1000000000000000000"}
    - `successCount` integer — === STATS ===
    - `tags` string[]
    - `tokenAddress` string
    - `tokenDecimals` integer
    - `tokenSymbol` string
    - `totalCalls` integer
    - `updatedAt` string
    - `useCases` string[] — === AI FIELDS ===
  - `message` string
  - `requestId` string

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/b3-fun/apis/b3os-workflow-api.md) · [All operations](https://skmtc.net/b3-fun/apis/b3os-workflow-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/b3-fun/b3os-workflow-api/revisions/5a750a5a9596/schema)
