SynapseDocumentation

Register a new service

Provider registers an API service on the Synapse marketplace. The gateway proxies incoming invocations to invoke.targets.

POST/api/v1/servicesWallet JWT

For AI agents

Provider publishes their API as a paid service. The gateway proxies calls to invoke.targets and handles payment automatically.

Requires: Valid JWT from a provider wallet

Generated OpenAPI reference

POST/api/v1/services

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

[key: string]?any

Response Body

application/json

application/json

application/json

curl -X POST "https://api-staging.synapse-network.ai/api/v1/services" \  -H "Content-Type: application/json" \  -d '{    "serviceName": "Sentiment Analysis",    "agentToolName": "sentiment-analysis",    "summary": "Analyze text sentiment via ML model",    "pricing": {      "currency": "USD",      "amount": "0.01"    },    "invoke": {      "method": "POST",      "targets": [        {          "url": "https://your-api.example.com/analyze",          "weight": 100        }      ],      "request": {},      "response": {}    }  }'
{
  "serviceId": "svc_xyz",
  "status": "active"
}
{
  "code": "DUPLICATE_SERVICE_ID",
  "message": "agentToolName already exists"
}
{
  "code": "INVALID_MANIFEST",
  "message": "Missing required fields: serviceName, invoke.targets"
}