Skip to content

Portal API

11.04.2026

📧 Verify your email — check your inbox for a verification link from us.

Portal documentație API

Explorează documentația OpenAPI și fragmente de integrare pregătite pentru producție.

API base

http://localhost:8080/api/v1

Stare necunoscută

User auth

Use Bearer token + tenant header for dashboard APIs.

Authorization: Bearer <TOKEN>
X-Tenant-Id: <TENANT_ID>

Integration auth

Use API key for direct provider integrations.

X-API-Key: <API_KEY>
Content-Type: application/json

Integration Discovery

Use your API key to discover available integration IDs and defaults.

API Endpoints Reference

Messaging

MethodEndpointScopeDescription
POST/integrations/messages/sendsendSend single message (SMS, Email, WhatsApp)
POST/integrations/messages/send-batchsendSend batch messages (up to 500)
POST/integrations/calls/initiatesendInitiate a voice call
GET/integrations/messages/{id}/statusreadGet message delivery status
POST/integrations/messages/batch-statusreadBatch status check (up to 100)
GET/integrations/onboardingreadDiscover integration IDs and examples

Contacts

MethodEndpointScopeDescription
GET/integrations/contactsreadList contacts (paginated, searchable)
GET/integrations/contacts/{id}readGet single contact
POST/integrations/contactswriteCreate contact. Use name, email, phone, tags, metadata. first_name/last_name remain accepted for compatibility.
PUT/integrations/contacts/{id}writeUpdate contact. At least one of phone or email must remain set.
DELETE/integrations/contacts/{id}writeDelete contact

Campaigns

MethodEndpointScopeDescription
GET/integrations/campaignsreadList campaigns
POST/integrations/campaignswriteCreate campaign
POST/integrations/campaigns/{id}/sendsendSend or schedule campaign
GET/integrations/campaigns/{id}/statusreadCampaign delivery status & stats

Templates & Webhooks

MethodEndpointScopeDescription
GET/integrations/templatesreadList message templates
GET/integrations/webhooksreadList webhook endpoints
GET/integrations/webhooks/events-catalogreadList allowed event names and profiles
POST/integrations/webhookswriteRegister webhook endpoint
DELETE/integrations/webhooks/{id}writeRemove webhook endpoint

API Key Scopes

Each API key has scopes that control access: read (view data), write (create/update/delete), send (send messages/calls). Use * for full access. Create keys in Settings → API Keys.

API Tester

Send real requests to your API directly from the browser.

http://localhost:8080/api/v1

Fragmente rapide

cURL - Discover integration IDs

curl -X GET http://localhost:8080/api/v1/integrations/onboarding \
  -H "X-API-Key: <API_KEY>"

cURL - Send SMS via API Key

curl -X POST http://localhost:8080/api/v1/integrations/messages/send \
  -H "X-API-Key: <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "sms_routing": "platform",
    "channel": "sms",
    "to": "+40740111222",
    "template_key": "appointment_reminder",
    "variables": {"name":"Andrei","date":"2026-03-12 16:30"}
  }'

cURL - Send Email via API Key

curl -X POST http://localhost:8080/api/v1/integrations/messages/send \
  -H "X-API-Key: <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "integration_id": 1,
    "channel": "email",
    "to": "client@example.com",
    "body": "<h1>Hello</h1><p>Your order is confirmed.</p>",
    "variables": {"name":"Maria","order_id":"ORD-456"}
  }'

cURL - Send WhatsApp via API Key

curl -X POST http://localhost:8080/api/v1/integrations/messages/send \
  -H "X-API-Key: <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "integration_id": 1,
    "channel": "whatsapp",
    "to": "+40740111222",
    "template_key": "delivery_update",
    "variables": {"name":"Ana","order":"A12"}
  }'

cURL - Initiate Voice Call

curl -X POST http://localhost:8080/api/v1/integrations/calls/initiate \
  -H "X-API-Key: <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+40740111222",
    "message": "Hello, this is a reminder for your appointment tomorrow.",
    "webhook_url": "https://example.com/call-status"
  }'

cURL - API integrare (trimitere batch)

curl -X POST http://localhost:8080/api/v1/integrations/messages/send-batch \
  -H "X-API-Key: <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "integration_id": 1,
    "sms_routing": "platform",
    "channel": "whatsapp",
    "template_key": "delivery_update",
    "recipients": [
      {"to":"+40740111222","variables":{"name":"Ana","order":"A12"}},
      {"to":"+40740333444","variables":{"name":"Mihai","order":"A13"}}
    ]
  }'

JavaScript - Contacts CRUD

// List contacts
const contacts = await fetch('http://localhost:8080/api/v1/integrations/contacts?per_page=50', {
  headers: { 'X-API-Key': '<API_KEY>' }
});

// Create contact
await fetch('http://localhost:8080/api/v1/integrations/contacts', {
  method: 'POST',
  headers: { 'X-API-Key': '<API_KEY>', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    name: 'Maria Ionescu',
    email: 'maria@example.com', phone: '+40740111222',
    tags: ['vip', 'newsletter'],
    metadata: { source: 'crm' }
  })
});

// Backward compatibility: first_name + last_name are also accepted
// and combined into the stored name field.

Python - Campaign Management

import requests

headers = {'X-API-Key': '<API_KEY>', 'Content-Type': 'application/json'}

# Create campaign
campaign = requests.post('http://localhost:8080/api/v1/integrations/campaigns', headers=headers,
    json={'name': 'Spring Sale', 'channel': 'email',
          'message_template': '<h1>Spring Sale!</h1><p>50% off today only.</p>',
          'subject': 'Spring Sale - 50% Off'})

campaign_id = campaign.json()['data']['id']

# Schedule send
requests.post(f'http://localhost:8080/api/v1/integrations/campaigns/{campaign_id}/send',
    headers=headers,
    json={'scheduled_at': '2026-04-01T10:00:00Z'})

# Check status
status = requests.get(f'http://localhost:8080/api/v1/integrations/campaigns/{campaign_id}/status',
    headers=headers)

cURL - Check Message Status

# Single message status
curl -X GET http://localhost:8080/api/v1/integrations/messages/12345/status \
  -H "X-API-Key: <API_KEY>"

# Batch status check (up to 100 messages)
curl -X POST http://localhost:8080/api/v1/integrations/messages/batch-status \
  -H "X-API-Key: <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{"message_ids": [12345, 12346, 12347]}'

cURL - Configure Webhooks

# Register a webhook endpoint
curl -X POST http://localhost:8080/api/v1/integrations/webhooks \
  -H "X-API-Key: <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/webhooks/weconn",
    "delivery_profile": "sms_only",
    "description": "Production webhook"
  }'

# Discover available event names and profiles
curl -X GET http://localhost:8080/api/v1/integrations/webhooks/events-catalog \
  -H "X-API-Key: <API_KEY>"

# List webhooks
curl -X GET http://localhost:8080/api/v1/integrations/webhooks \
  -H "X-API-Key: <API_KEY>"

cURL - List Templates

# List all templates
curl -X GET http://localhost:8080/api/v1/integrations/templates \
  -H "X-API-Key: <API_KEY>"

# Filter by channel
curl -X GET "http://localhost:8080/api/v1/integrations/templates?channel=sms" \
  -H "X-API-Key: <API_KEY>"