Skip to main content
GET
https://sandbox.finhub.cloud
/
api
/
v2.1
/
channels
/
available
Channel Management API
curl --request GET \
  --url https://sandbox.finhub.cloud/api/v2.1/channels/available \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'X-Tenant-ID: <x-tenant-id>' \
  --data '
{
  "preferences": {}
}
'
{
  "success": true,
  "data": {
    "channels": [
      {
        "code": "EMAIL",
        "name": "Email",
        "description": "Email notifications",
        "status": "ACTIVE",
        "capabilities": ["NOTIFICATION", "VERIFICATION", "MARKETING"]
      },
      {
        "code": "SMS",
        "name": "SMS",
        "description": "SMS text messages",
        "status": "ACTIVE",
        "capabilities": ["NOTIFICATION", "VERIFICATION", "OTP"]
      },
      {
        "code": "PUSH",
        "name": "Push Notification",
        "description": "Mobile push notifications",
        "status": "ACTIVE",
        "capabilities": ["NOTIFICATION", "ALERT"]
      },
      {
        "code": "IN_APP",
        "name": "In-App Message",
        "description": "In-application messaging",
        "status": "ACTIVE",
        "capabilities": ["NOTIFICATION", "ALERT", "MARKETING"]
      },
      {
        "code": "WEBHOOK",
        "name": "Webhook",
        "description": "HTTP webhook callbacks",
        "status": "ACTIVE",
        "capabilities": ["NOTIFICATION", "EVENT"]
      }
    ]
  }
}

Channel Management API

APIs for managing communication channels, feature availability, and customer notification preferences.
Base URL: https://sandbox.finhub.cloud/api/v2.1/channels

Available Endpoints

Available Channels

List all available channels

Customer Preferences

Manage customer channel preferences

Feature Channels

Get channels for specific features

Get Available Channels

Retrieves all available communication channels for the tenant.

Request

Authorization
string
required
Bearer token for authentication
X-Tenant-ID
string
required
Tenant identifier

Code Examples

curl -X GET "https://sandbox.finhub.cloud/api/v2.1/channels/available" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: YOUR_TENANT_ID"
{
  "success": true,
  "data": {
    "channels": [
      {
        "code": "EMAIL",
        "name": "Email",
        "description": "Email notifications",
        "status": "ACTIVE",
        "capabilities": ["NOTIFICATION", "VERIFICATION", "MARKETING"]
      },
      {
        "code": "SMS",
        "name": "SMS",
        "description": "SMS text messages",
        "status": "ACTIVE",
        "capabilities": ["NOTIFICATION", "VERIFICATION", "OTP"]
      },
      {
        "code": "PUSH",
        "name": "Push Notification",
        "description": "Mobile push notifications",
        "status": "ACTIVE",
        "capabilities": ["NOTIFICATION", "ALERT"]
      },
      {
        "code": "IN_APP",
        "name": "In-App Message",
        "description": "In-application messaging",
        "status": "ACTIVE",
        "capabilities": ["NOTIFICATION", "ALERT", "MARKETING"]
      },
      {
        "code": "WEBHOOK",
        "name": "Webhook",
        "description": "HTTP webhook callbacks",
        "status": "ACTIVE",
        "capabilities": ["NOTIFICATION", "EVENT"]
      }
    ]
  }
}

Get Customer Preferences

Retrieves channel preferences for a specific customer.

Request

customerId
string
required
Customer identifier
tenantId
string
Tenant ID (optional override)

Code Examples

curl -X GET "https://sandbox.finhub.cloud/api/v2.1/channels/customers/cust_12345/preferences" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: YOUR_TENANT_ID"
{
  "success": true,
  "data": {
    "customerId": "cust_12345",
    "preferences": {
      "EMAIL": {
        "enabled": true,
        "notifications": true,
        "marketing": false,
        "verification": true
      },
      "SMS": {
        "enabled": true,
        "notifications": true,
        "marketing": false,
        "verification": true,
        "otp": true
      },
      "PUSH": {
        "enabled": true,
        "notifications": true,
        "alerts": true
      },
      "IN_APP": {
        "enabled": true,
        "notifications": true,
        "marketing": true
      }
    },
    "lastUpdated": "2024-01-15T10:30:00Z"
  }
}

Update Customer Preferences

Updates channel preferences for a customer.

Request

customerId
string
required
Customer identifier
preferences
object
required
Channel preference settings

Code Examples

curl -X PUT "https://sandbox.finhub.cloud/api/v2.1/channels/customers/cust_12345/preferences" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: YOUR_TENANT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "EMAIL": {
      "enabled": true,
      "notifications": true,
      "marketing": false
    },
    "SMS": {
      "enabled": true,
      "notifications": true,
      "otp": true
    }
  }'
{
  "success": true,
  "data": {
    "customerId": "cust_12345",
    "preferences": {
      "EMAIL": {
        "enabled": true,
        "notifications": true,
        "marketing": false
      },
      "SMS": {
        "enabled": true,
        "notifications": true,
        "otp": true
      }
    },
    "updatedAt": "2024-01-15T11:00:00Z"
  }
}

Get Feature Channels

Retrieves available channels for a specific feature.

Request

featureName
string
required
Feature name (e.g., VERIFICATION, NOTIFICATION, OTP)
customerId
string
Filter by customer eligibility

Code Examples

curl -X GET "https://sandbox.finhub.cloud/api/v2.1/channels/features/VERIFICATION" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: YOUR_TENANT_ID"
{
  "success": true,
  "data": {
    "featureName": "VERIFICATION",
    "channels": [
      {
        "code": "EMAIL",
        "name": "Email",
        "priority": 1,
        "fallbackTo": "SMS"
      },
      {
        "code": "SMS",
        "name": "SMS",
        "priority": 2,
        "fallbackTo": null
      }
    ],
    "defaultChannel": "EMAIL"
  }
}

Get Feature Channel Details

Get specific channel configuration for a feature.

Request

featureName
string
required
Feature name
channelCode
string
required
Channel code (EMAIL, SMS, PUSH, etc.)

Code Examples

curl -X GET "https://sandbox.finhub.cloud/api/v2.1/channels/features/OTP/channels/SMS" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: YOUR_TENANT_ID"
{
  "success": true,
  "data": {
    "featureName": "OTP",
    "channel": {
      "code": "SMS",
      "name": "SMS",
      "status": "ACTIVE",
      "configuration": {
        "expirySeconds": 300,
        "maxRetries": 3,
        "cooldownSeconds": 60,
        "messageTemplate": "Your verification code is: {{code}}"
      }
    }
  }
}

Channel Types

ChannelDescription
EMAILEmail messages
SMSText messages
PUSHMobile push notifications
IN_APPIn-application messages

Response Codes

CodeDescription
200Request successful
400Invalid request parameters
401Unauthorized
404Customer or channel not found
500Internal server error