API Reference

Complete API documentation with examples and code samples.

Authentication
User registration, login, and profile management
POST/api/auth/signup
Public

Create a new user account

Request Body:

{
  "email": "user@example.com",
  "password": "securepassword"
}

Response:

{
  "user": {
    "id": "user_id",
    "email": "user@example.com",
    "role": "FREE"
  },
  "token": "jwt_token"
}
POST/api/auth/login
Public

Authenticate user and get token

Request Body:

{
  "email": "user@example.com",
  "password": "securepassword"
}

Response:

{
  "user": {
    "id": "user_id",
    "email": "user@example.com",
    "role": "FREE"
  },
  "token": "jwt_token"
}
GET/api/auth/me
Auth Required

Get current user information

Response:

{
  "id": "user_id",
  "email": "user@example.com",
  "role": "FREE",
  "displayName": "User Name"
}
Callbacks
Create, manage, and configure webhook endpoints
GET/api/callbacks
Auth Required

List all user callbacks

Response:

[
  {
    "id": "callback_id",
    "name": "My Webhook",
    "callbackUrl": "https://api.example.com/webhook",
    "activeStatus": true,
    "customPath": "my-trigger",
    "createdAt": "2025-01-01T00:00:00.000Z"
  }
]
POST/api/callbacks
Auth Required

Create a new callback

Request Body:

{
  "name": "Order Webhook",
  "callbackUrl": "https://api.example.com/orders",
  "activeStatus": true,
  "customPath": "new-order"
}

Response:

{
  "id": "callback_id",
  "name": "Order Webhook",
  "callbackUrl": "https://api.example.com/orders",
  "activeStatus": true,
  "customPath": "new-order",
  "triggerToken": "token_here",
  "createdAt": "2025-01-01T00:00:00.000Z"
}
GET/api/callbacks/{id}
Auth Required

Get specific callback details

Response:

{
  "id": "callback_id",
  "name": "My Webhook",
  "callbackUrl": "https://api.example.com/webhook",
  "activeStatus": true,
  "customPath": "my-trigger",
  "logs": [
    {
      "event": "Callback triggered",
      "details": "Called https://api.example.com/webhook",
      "createdAt": "2025-01-01T00:00:00.000Z"
    }
  ]
}
PUT/api/callbacks/{id}
Auth Required

Update callback settings

Request Body:

{
  "name": "Updated Webhook",
  "customPath": "updated-trigger"
}

Response:

{
  "id": "callback_id",
  "name": "Updated Webhook",
  "customPath": "updated-trigger"
}
DELETE/api/callbacks/{id}
Auth Required

Delete a callback

Response:

{
  "message": "Callback deleted successfully"
}
Triggers
Execute webhooks using various trigger methods
GET/api/trigger/token/{token}
Public

Trigger callback using token

Response:

{
  "message": "Callback executed successfully",
  "data": {
    // Response from your webhook endpoint
  }
}
GET/api/trigger/custom/{path}
Public

Trigger callback using custom path

Response:

{
  "message": "Callback executed successfully via custom path",
  "customPath": "my-trigger",
  "data": {
    // Response from your webhook endpoint
  }
}
GET/api/callbacks/{id}/trigger
Public

Trigger callback by ID

Response:

{
  "message": "Callback executed successfully",
  "data": {
    // Response from your webhook endpoint
  }
}
Logs
View execution history and debugging information
GET/api/logs
Auth Required

Get all user logs

Response:

[
  {
    "id": "log_id",
    "event": "Callback triggered",
    "details": "Called https://api.example.com/webhook",
    "callbackId": "callback_id",
    "createdAt": "2025-01-01T00:00:00.000Z"
  }
]
GET/api/logs/{id}
Auth Required

Get logs for specific callback

Response:

[
  {
    "id": "log_id",
    "event": "Callback triggered",
    "details": "Called https://api.example.com/webhook",
    "createdAt": "2025-01-01T00:00:00.000Z"
  }
]
Subscription
Manage billing and subscription details
GET/api/subscription
Auth Required

Get user subscription details

Response:

{
  "id": "subscription_id",
  "planId": "plan_id",
  "status": "ACTIVE",
  "currentPeriodStart": "2025-01-01T00:00:00.000Z",
  "currentPeriodEnd": "2025-02-01T00:00:00.000Z",
  "plan": {
    "name": "Pro",
    "price": 29.99,
    "maxTriggers": 500
  }
}
Error Codes
Common HTTP status codes and their meanings

Success Codes

200 OKRequest successful
201 CreatedResource created

Error Codes

400 Bad RequestInvalid request data
401 UnauthorizedAuthentication required
403 ForbiddenAccess denied
404 Not FoundResource not found
409 ConflictResource already exists
500 Server ErrorInternal server error