API reference

Add a provider

Stores encrypted provider credentials for the active tenant. Required role: admin or owner.

POST/v1/admin/providers

Request

bash
curl -X POST https://api-raven-cloud.autotribes.app/v1/admin/providers \
  -H "Authorization: Bearer eyJ..." \
  -H "X-App-Name: raven-cloud" \
  -H "X-Tenant-Slug: acme-co" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "africas_talking",
    "label": "AT production",
    "publicConfig": {
      "username": "acme_prod",
      "sender_id": "ACMECO",
      "region": "KE"
    },
    "secretConfig": {
      "api_key": "atsk_a1b2c3d4..."
    }
  }'

Body

FieldTypeNotes
providerenum · requiredOne of the provider IDs from the catalog
labelstring · requiredYour own label, 2–80 chars
publicConfigobject · optionalNon-secret fields (sender ID, region, etc.)
secretConfigobject · requiredSecret fields — encrypted at rest with a per-tenant key

Response

201 Created

json
{
  "id": "5f2c8a1d-7b9e-4a3c-91d2-f4a7e8c1b3d6",
  "provider": "africas_talking",
  "channel": "sms",
  "label": "AT production",
  "status": "unverified",
  "configPublic": { "username": "acme_prod", "sender_id": "ACMECO", "region": "KE" },
  "createdAt": "2026-05-01T10:23:18.114Z"
}

ENCRYPTED ON WRITE

The secretConfig values are encrypted with a per-tenant key before they touch the database. The plaintext is decrypted only at send-time, in worker memory, and never written back to disk.