connections

Create connection

Creates a connection in the CALLER's tenant (tenant_admin/admin only), or — for a platform admin whose role carries the cross_tenant grant — in the tenant named by the optional tenant_id. tenant_id omitted or equal to the caller's own tenant behaves exactly as before. A caller WITHOUT cross_tenant naming any other tenant gets 403 (never silently written to their own tenant); an unknown or deleted target tenant is 404; a target that already has a connection for this provider is 409 (update that one instead). config is sealed with AES-256-GCM before it touches the database and is never returned in plaintext by this or any other route — Create's response has the same redaction as Get. provider_id must resolve to a known provider (400 otherwise). A tenant-shaped body key other than tenant_id (e.g. tenantId) is a 400 unknown_param rather than being ignored. The audit event records both the caller's and the target tenant.

post/connections

Request

  • Base URL: https://api.instruxi.dev/api/v1/enforcer
  • URL: https://api.instruxi.dev/api/v1/enforcer/connections
  • Auth: one of:
    • API key in header Authorization
    • API key in header X-API-Key

Request body

configobject
namestring
provider_idstring
tenant_idstring

TenantID optionally names the tenant the connection is created IN. Omitted or equal to the caller's own tenant: unchanged caller-tenant behaviour. Any OTHER tenant requires the caller's role to carry the cross_tenant grant (platform admin) — anyone else is refused with 403, never silently narrowed to their own tenant. Lets a platform admin configure a new workspace's SendGrid/Twilio/storage before anyone can sign in to it.

Response

Created

successboolean

Example response

{
  "success": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.