RathRath Finance
API Reference

Register webhooks

Registers one or more webhook endpoints for transaction status and execution notifications.

POST
/api/user/register-webhooks

Authorization

bearerAuth
AuthorizationBearer <token>

Dashboard JWT used for authenticated account configuration endpoints.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://tachyon.rath.fi/api/user/register-webhooks" \  -H "Content-Type: application/json" \  -d '[    {      "url": "https://myapp.com/webhook",      "authType": "bearer",      "secret": "my-bearer-token"    },    {      "url": "https://api.example.com/tachyon-events",      "authType": "api-key",      "apiKeyPlacement": "header",      "apiKeyVar": "X-API-Key",      "secret": "my-api-key-value"    },    {      "url": "https://myapp.com/public-webhook",      "authType": "none"    }  ]'
{
  "userId": "68c275846a6ba1c9a2198a8c",
  "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
  "webhooks": [
    {
      "url": "https://myapp.com/webhook",
      "authType": "bearer"
    },
    {
      "url": "https://api.example.com/tachyon-events",
      "authType": "api-key",
      "apiKeyPlacement": "header",
      "apiKeyVar": "X-API-Key"
    },
    {
      "url": "https://myapp.com/public-webhook",
      "authType": "none"
    }
  ]
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "category": "string",
    "details": null,
    "traceId": "string"
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "category": "string",
    "details": null,
    "traceId": "string"
  },
  "timestamp": "2019-08-24T14:15:22Z"
}
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "category": "string",
    "details": null,
    "traceId": "string"
  },
  "timestamp": "2019-08-24T14:15:22Z"
}