Skip to main content

GET /v1/tenant/me

Returns the full configuration for the authenticated tenant. Requires authentication (JWT or API key).

Example

curl https://api.wede.pt/v1/tenant/me \
  -H "x-wede-api-key: wede_live_YOUR_KEY"

Response

{
  "id": "9c145f7e-83be-4039-8e9c-650796acd3ee",
  "name": "Hospital Lisboa",
  "slug": "hospital-lisboa",
  "email": "admin@hospital-lisboa.pt",
  "license_type": "saas_api",
  "status": "active",
  "country": "PT",
  "verticals": ["healthcare", "emergency"],
  "dispatch_threshold": 0.20,
  "reinforcement_timeout_min": 10,
  "feature_flags": {
    "dispatch_mode": true
  },
  "sla_target_uptime_pct": 99.9,
  "created_at": "2026-01-15T10:00:00Z",
  "updated_at": "2026-06-09T18:00:00Z"
}

Response Fields

FieldTypeDescription
idstringTenant UUID
namestringOrganisation name
slugstringURL-safe identifier
countrystringISO 3166-1 alpha-2 country code
verticalsstring[]Active operational verticals
dispatch_thresholdnumberMinimum score for auto-dispatch (0–1)
reinforcement_timeout_minintegerMinutes before auto-reinforcement (0 = disabled)
feature_flags.dispatch_modebooleanAuto-dispatch enabled
statusstringactive, suspended, inactive

PATCH /v1/tenant/dispatch-settings

Configure auto-dispatch behaviour for the tenant. Requires company_admin or company_tech role.

Request Body

{
  "dispatch_mode": true,
  "dispatch_threshold": 0.20,
  "reinforcement_timeout_min": 10
}
FieldTypeDescription
dispatch_modebooleanEnable or disable auto-dispatch
dispatch_thresholdnumber (0–1)Minimum score for auto-dispatch
reinforcement_timeout_minintegerMinutes before backup auto-dispatch if team doesn’t ACK (0 = disabled)

Threshold Reference

LevelValueBehaviour
Low0.10Dispatch any available team
Medium0.20Team must be well positioned
High0.40Only the best-matched team

Response

{
  "dispatch_mode": true,
  "dispatch_threshold": 0.20,
  "reinforcement_timeout_min": 10
}

SDK

// Get tenant info
const tenant = await client.getTenantInfo()
console.log(tenant.data.verticals)         // ['healthcare', 'emergency']
console.log(tenant.data.dispatch_threshold) // 0.20

// Update dispatch settings
await client.updateDispatchSettings({
  dispatch_mode: true,
  dispatch_threshold: 0.20,
  reinforcement_timeout_min: 10
})