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

# POST /v1/x402-endpoints/import

`POST /v1/x402-endpoints/import`

Import an x402 endpoint atomically (probe + pay + generate metadata + create)

## Request body

- union
  - object
  - ImportX402EndpointParams
    - `body` object
    - `description` string
    - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'
    - `name` string — Optional: User can override AI-generated values
    - `resourceUrl` string, required
    - `walletAddress` string — Optional: Specify which wallet to use for payment. If not provided, uses the organization's default wallet.

## Response `200`

OK

- ImportX402EndpointSuccessResponse
  - `code` integer
  - `data` ImportX402EndpointData
    - `endpoint` 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 ===
    - `paymentDetails` TestX402PaymentDetails
      - `amountPaid` string
      - `asset` string — Token address used for payment
      - `network` string
      - `payer` string
      - `transaction` string — May be null if server doesn't return it
  - `message` string
  - `requestId` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `409` — Conflict

---

[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)
