Skip to content

API Reference

Base URL

https:class=class="hl-str">"hl-comment">//api.suwappu.bot/v1/agent

All endpoints are relative to this base URL.

Content Type

All requests and responses use application/json.

Authentication

Most endpoints require a Bearer token in the Authorization header:

Authorization: Bearer suwappu_sk_your_api_key_here

API keys are issued during agent registration. Keys use the prefix suwappu_sk_ followed by a random string.

Response Envelope

Every response follows a consistent envelope format.

Success

{

"hl-key">"success": true,

...data

}

The success field is always true for 2xx responses. Additional fields depend on the endpoint.

Error

{

"hl-key">"success": false,

"hl-key">"error": "Human-readable error message",

"hl-key">"fields": {

"hl-key">"field_name": "Validation error for this field"

}

}

The fields object is included only for validation errors (400). Other error responses omit it.

Common HTTP Status Codes

CodeMeaning
200Success
201Created
204No Content (successful deletion)
400Bad Request / Validation Error
401Unauthorized (missing or invalid API key)
404Resource Not Found
409Conflict (e.g., duplicate name)
429Rate Limit Exceeded
500Internal Server Error

Rate Limiting

Rate limits are applied per API key. The current tier and limits are returned in the agent profile via GET /me. Rate limit headers are included in every response:

HeaderDescription
X-RateLimit-LimitMaximum requests per window
X-RateLimit-RemainingRemaining requests in current window
X-RateLimit-ResetUnix timestamp when the window resets

Endpoint Index

MethodPathAuthDescription
POST/registerNoneRegister a new agent and receive an API key
GET/meRequiredGet current agent profile and stats
PATCH/meRequiredUpdate agent profile
DELETE/meRequiredPermanently delete agent
POST/me/deactivateRequiredTemporarily deactivate agent
POST/reactivateRequiredReactivate a deactivated agent
GET/chainsNoneList supported blockchain networks
GET/tokensRequiredList tokens for a chain
GET/pricesRequiredGet current token prices
GET/portfolioRequiredGet wallet balances and portfolio value
POST/quoteRequiredGet a swap quote
POST/swapRequiredBuild an unsigned swap transaction