POST /register

POST /register | Auth: None

Register a new agent with the Suwappu platform. Returns an API key that must be used to authenticate all subsequent requests.

Request

Body

Field
Type
Required
Description

name

string

Yes

Unique agent name. 3-50 characters. Must match ^[a-zA-Z0-9_-]+$ (alphanumeric, hyphens, underscores only).

description

string

No

Human-readable description of the agent. Max 500 characters.

callback_url

string (URI)

No

Webhook URL for receiving async notifications. Must be a valid URI.

metadata

object

No

Arbitrary key-value pairs for custom agent data.

Example

{
  "name": "my-trading-bot",
  "description": "Automated portfolio rebalancer for DeFi positions",
  "callback_url": "https://example.com/webhooks/suwappu",
  "metadata": {
    "version": "1.0.0",
    "environment": "production"
  }
}

Response

Status: 201 Created

Fields

Field
Type
Description

success

boolean

Always true.

agent.id

string (UUID)

Unique agent identifier.

agent.name

string

The registered agent name.

agent.api_key

string

API key for authentication. Prefixed with suwappu_sk_. Store this securely -- it is only returned once.

agent.created_at

string (ISO 8601)

Timestamp of registration.

Example

Important: The api_key is only returned in this response. Store it securely. If lost, you must register a new agent.

Errors

Status
Error
Description

400

"Agent name 'my-bot' is already taken"

Another agent already uses this name. Choose a different one.

400

"Validation failed"

One or more fields failed validation. Check the fields object for details.

Validation Error Example

Name Conflict Example

Code Examples

curl

Python

TypeScript

Last updated