Skip to main content
POST
/
v1
/
x402
/
endpoints
Register an x402 endpoint
curl --request POST \
  --url https://api.getsly.ai/v1/v1/x402/endpoints \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "path": "<string>",
  "method": "GET",
  "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "basePrice": 499999.50005,
  "description": "<string>",
  "currency": "USDC",
  "volumeDiscounts": [
    {
      "threshold": 123,
      "priceMultiplier": 0
    }
  ],
  "webhookUrl": "<string>",
  "network": "base-mainnet"
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "tenantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "path": "<string>",
    "method": "GET",
    "basePrice": 123,
    "currency": "USDC",
    "paymentAddress": "<string>",
    "network": "<string>",
    "totalCalls": 123,
    "totalRevenue": 123,
    "status": "active",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "description": "<string>",
    "volumeDiscounts": [],
    "assetAddress": "<string>",
    "webhookUrl": "<string>"
  }
}

Authorizations

Authorization
string
header
required

API key (pk_test_* or pk_live_), JWT session, agent token (agent_), Ed25519 session (sess_), or portal token (portal_).

Body

application/json
name
string
required
Required string length: 1 - 255
path
string
required
Required string length: 1 - 500
Pattern: ^\/
method
enum<string>
required
Available options:
GET,
POST,
PUT,
DELETE,
PATCH,
ANY
accountId
string<uuid>
required
basePrice
number
required
Required range: 0.0001 < x <= 999999
description
string
Maximum string length: 1000
currency
enum<string>
default:USDC
Available options:
USDC,
EURC
volumeDiscounts
object[]
webhookUrl
string<uri>
network
string
default:base-mainnet

Response

Endpoint registered

data
object
required