API reference
Every Cloud Bridge endpoint, grouped by resource.
Base URL
https://<your-project>.cloudfunctions.net
All endpoints are prefixed with /api.
Health check
/api/health
Returns service health status. No authentication required.
{
"status": "healthy",
"timestamp": "2026-03-14T12:00:00.000Z"
}
Authentication
/api/auth/login
Validate Neural DSP cloud credentials. Free
| Header | Value |
|---|---|
x-api-key | Your API key |
Content-Type | application/json |
{
"credentials": {
"email": "user@example.com",
"password": "..."
}
}
{ "success": true, "message": "Login successful" }
Account
All account endpoints require a Firebase ID token in the Authorization header.
/api/account/credits
Returns your current credit balance.
{ "credits": 250 }
/api/account/api-keys
Create a new API key.
{ "name": "My Store Key" }
{
"apiKeyId": "key_abc123",
"apiKey": "ndsp_live_xxxxxxxxxxxxxxxx",
"keyPreview": "ndsp_...x4f2"
}
/api/account/api-keys
List all your API keys.
{
"items": [
{
"id": "key_abc123",
"name": "My Store Key",
"keyPreview": "ndsp_...x4f2",
"createdAt": "Mar 14, 2026",
"isActive": true
}
]
}
/api/account/api-keys/:id/usage
Get usage statistics for a specific API key.
| Query param | Type | Default | Description |
|---|---|---|---|
days | number | 30 | Number of days to look back |
{
"totalRequests": 142,
"creditsUsed": 87,
"lastActivity": "2026-03-14T10:30:00Z",
"operationBreakdown": {
"presetShare": 8,
"follow": 3,
"login": 12
}
}
NDSP Credentials
Manage your stored Neural DSP cloud credentials. All endpoints require Firebase authentication.
/api/account/ndsp-credentials/status
Check if credentials are stored and their validation status.
/api/account/ndsp-credentials
Save or update your NDSP credentials. Free
{
"email": "ndsp-user@example.com",
"password": "your-ndsp-password"
}
/api/account/ndsp-credentials/validate
Validate your currently stored credentials against Cortex Cloud. Free
/api/account/ndsp-credentials
Permanently delete your stored credentials.
Store Integrations
Manage webhook integrations for your stores. All endpoints require Firebase authentication.
/api/account/store-integrations
List all your store integrations.
/api/account/store-integrations
Create a new store integration.
{
"name": "My Shopify Store",
"provider": "shopify",
"apiKeyId": "key_abc123",
"itemMappings": [
{
"matchType": "sku",
"externalRef": "STORM-LEAD-V2",
"resourceType": "preset",
"resourceId": "abc123-preset-id"
}
]
}
/api/account/store-integrations/:id
Update an existing store integration (name, mappings, etc.).
/api/account/store-integrations/:id/rotate-secret
Rotate the webhook signing secret for an integration.
/api/account/store-integrations/:id/deliveries
List delivery attempts for an integration.
| Query param | Type | Default | Description |
|---|---|---|---|
limit | number | 20 | Number of records to return |
/api/account/store-integrations/:id/deliveries/:deliveryId
Update a delivery's target NDSP username (for failed deliveries with incorrect usernames).
{ "targetUsername": "correct_username" }
/api/account/store-integrations/:id/deliveries/:deliveryId/retry
Retry a failed or waiting delivery.
Webhooks
/api/webhooks/:provider/:integrationId
Receive order webhooks from store platforms. Authenticated via HMAC signature verification. See the Webhooks guide for payload formats.
Credit packs
List packs, check account credits, and create one-time Stripe Checkout sessions.
/api/account/credit-packs
List available credit packs and current operation costs. Public, no authentication required.
/api/account/credits
Get the authenticated account credit balance. Requires Firebase authentication.
/api/account/credits/checkout
Create a Stripe Checkout session for a credit pack. Requires Firebase authentication.
{
"packId": "growth",
"currency": "usd",
"successUrl": "https://yoursite.com/success",
"cancelUrl": "https://yoursite.com/cancel"
}
{
"sessionId": "cs_live_xxxxx",
"url": "https://checkout.stripe.com/c/pay/..."
}
Billing
Credit balance and pricing endpoints for API key clients.
/api/billing/balance
Get your current credit balance and rate limit info.
/api/billing/pricing
Get credit costs for all operations. Public, no authentication required.
Error responses
All errors follow a consistent format:
{
"error": {
"message": "Human-readable error description",
"code": "MACHINE_READABLE_CODE"
}
}
| Status | Code | Description |
|---|---|---|
400 | BAD_REQUEST | Invalid or missing request parameters |
401 | UNAUTHORIZED | Missing or invalid authentication |
403 | FORBIDDEN | Insufficient permissions |
404 | NOT_FOUND | Resource not found |
429 | RATE_LIMIT_EXCEEDED | Too many requests |
500 | INTERNAL_ERROR | Unexpected server error |