Organization API
- Base URL:
https://organization-v2.sls.epilot.io - Full API Docs: https://docs.epilot.io/api/organization
Usageโ
import { epilot } from '@epilot/sdk'
epilot.authorize(() => '<token>')
const { data } = await epilot.organization.getCurrentOrganization(...)
Tree-shakeable importโ
import { getClient, authorize } from '@epilot/sdk/organization'
const organizationClient = getClient()
authorize(organizationClient, () => '<token>')
const { data } = await organizationClient.getCurrentOrganization(...)
Operationsโ
Organization
Organization Settings
Feature Settings
Announcements
Schemas
OrganizationIdOrganizationSettingsSettingsValueFeatureSettingsFeatureFlagMetadataI18nStringVisibilityRuleAnnouncementTypeAnnouncementMessageAnnouncementAnnouncementOrganizationStatusValueAnnouncementOrganizationStatusActiveAnnouncementResponse
getCurrentOrganizationโ
Retrieves the organization associated with the authenticated user's current session.
GET /v2/organization/current
const { data } = await client.getCurrentOrganization()
Response
{
"id": "739224",
"name": "Epilot",
"email": "someone@epilot.cloud",
"phone": "+49123123123",
"website": "https://epilot.cloud",
"address": {
"country": "string",
"city": "string",
"postal_code": "string",
"street": "string",
"street_number": "string"
},
"organization_use": "Production",
"parent_production_org_id": "string",
"created_date": "1970-01-01T00:00:00.000Z",
"logo_url": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png",
"logo_thumbnail_url": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png",
"signature": "<p>Thanks</p>",
"is_unlicensed_org": false,
"style": {},
"type": "Vendor",
"symbol": "EPI",
"pricing_tier": "professional",
"free_user_limit": 50,
"tags": ["test org"]
}
getOrganizationโ
Retrieves detailed information about a specific organization by its unique identifier.
GET /v2/organization/{org_id}
const { data } = await client.getOrganization({
org_id: 'example',
})
Response
{
"id": "739224",
"name": "Epilot",
"email": "someone@epilot.cloud",
"phone": "+49123123123",
"website": "https://epilot.cloud",
"address": {
"country": "string",
"city": "string",
"postal_code": "string",
"street": "string",
"street_number": "string"
},
"organization_use": "Production",
"parent_production_org_id": "string",
"created_date": "1970-01-01T00:00:00.000Z",
"logo_url": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png",
"logo_thumbnail_url": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png",
"signature": "<p>Thanks</p>",
"is_unlicensed_org": false,
"style": {},
"type": "Vendor",
"symbol": "EPI",
"pricing_tier": "professional",
"free_user_limit": 50,
"tags": ["test org"]
}
updateOrganizationโ
Updates an organization's profile information.
PATCH /v2/organization/{org_id}
const { data } = await client.updateOrganization(
{
org_id: 'example',
},
{
id: '739224',
name: 'Epilot',
email: 'someone@epilot.cloud',
phone: '+49123123123',
website: 'https://epilot.cloud',
address: {
country: 'string',
city: 'string',
postal_code: 'string',
street: 'string',
street_number: 'string'
},
organization_use: 'Production',
parent_production_org_id: 'string',
created_date: '1970-01-01T00:00:00.000Z',
logo_url: 'https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png',
logo_thumbnail_url: 'https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png',
signature: '<p>Thanks</p>',
is_unlicensed_org: false,
style: {},
type: 'Vendor',
symbol: 'EPI',
pricing_tier: 'professional',
free_user_limit: 50,
tags: ['test org']
},
)
Response
{
"id": "739224",
"name": "Epilot",
"email": "someone@epilot.cloud",
"phone": "+49123123123",
"website": "https://epilot.cloud",
"address": {
"country": "string",
"city": "string",
"postal_code": "string",
"street": "string",
"street_number": "string"
},
"organization_use": "Production",
"parent_production_org_id": "string",
"created_date": "1970-01-01T00:00:00.000Z",
"logo_url": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png",
"logo_thumbnail_url": "https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png",
"signature": "<p>Thanks</p>",
"is_unlicensed_org": false,
"style": {},
"type": "Vendor",
"symbol": "EPI",
"pricing_tier": "professional",
"free_user_limit": 50,
"tags": ["test org"]
}
getSettingsโ
Retrieves all configuration settings for an organization.
GET /v2/organization/{org_id}/settings
const { data } = await client.getSettings({
org_id: 'example',
})
Response
{
"double_opt_in": {
"enabled": true
},
"email_tracking": {
"enabled": true,
"track_opens": true
},
"default_language": "de"
}
putSettingsValueโ
Creates or updates a specific organization setting identified by its key.
PUT /v2/organization/{org_id}/settings/{key}
const { data } = await client.putSettingsValue(
{
org_id: 'example',
key: 'example',
},
{
enabled: true
},
)
Response
{
"enabled": true
}
deleteSettingsValueโ
Removes a specific organization setting identified by its key.
DELETE /v2/organization/{org_id}/settings/{key}
const { data } = await client.deleteSettingsValue({
org_id: 'example',
key: 'example',
})
notifySettingsValueUpdatedโ
Sends an internal notification that an organization setting was updated.
POST /v2/organization/{org_id}/settings/{key}/notifications
const { data } = await client.notifySettingsValueUpdated(
{
org_id: 'example',
key: 'example',
},
{
user_email: 'string',
org_name: 'string',
value: {
enabled: true
}
},
)
Response
{
"delivered": true
}
getOrganizationFeatureSettingsโ
Get organization feature settings.
GET /v2/organization/feature-settings
const { data } = await client.getOrganizationFeatureSettings()
getActiveAnnouncementโ
Returns the announcement (e.g. a subprocessor change notice) to show as a portal banner for the caller's organization.
GET /v2/organization/announcements/active
const { data } = await client.getActiveAnnouncement()
Response
{
"announcement": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "subprocessor_change",
"message": {
"de": "Wir haben unsere Liste der Subdienstleister aktualisiert (gรผltig ab 01.11.2026). Bitte prรผfe die รnderungen.",
"en": "We have updated our list of subprocessors (effective 01.11.2026). Please review the changes."
},
"link_url": "string",
"list_version": "string",
"effective_date": "1970-01-01",
"window_days": 0,
"status": "draft",
"created_at": "1970-01-01T00:00:00.000Z",
"created_by": "string",
"updated_at": "1970-01-01T00:00:00.000Z",
"published_at": "1970-01-01T00:00:00.000Z",
"published_by": "string",
"expires_at": "1970-01-01T00:00:00.000Z",
"archived_at": "1970-01-01T00:00:00.000Z",
"archived_by": "string",
"materialized_at": "1970-01-01T00:00:00.000Z"
},
"can_acknowledge": true
}
acknowledgeAnnouncementโ
Acknowledges an announcement on behalf of the caller's organization. Only org admins
(organization:edit) may acknowledge.
POST /v2/organization/announcements/{announcement_id}/acknowledge
const { data } = await client.acknowledgeAnnouncement(
{
announcement_id: 'example',
},
{
portal: '360'
},
)
Response
{
"announcement_id": "string",
"org_id": "string",
"org_name": "string",
"status": "acknowledged",
"acknowledged_by": {
"user_id": "string",
"name": "string",
"email": "string"
},
"acknowledged_at": "1970-01-01T00:00:00.000Z",
"portal": "360",
"list_version": "string",
"recorded_at": "1970-01-01T00:00:00.000Z"
}
Schemasโ
OrganizationIdโ
Unique identifier for an organization (tenant) in the epilot platform
type OrganizationId = string
Organizationโ
Represents an epilot organization (tenant).
An organization contains all the configuration, branding, and contact information for a tenant account on the epilot platform.
type Organization = {
id?: string
name?: string
email?: string
phone?: string
website?: string
address?: {
country?: string
city?: string
postal_code?: string
street?: string
street_number?: string
}
organization_use?: "Production" | "Sandbox" | "Preview"
parent_production_org_id?: string
created_date?: string // date-time
logo_url?: string
logo_thumbnail_url?: string
signature?: string
is_unlicensed_org?: boolean
style?: Record<string, unknown>
type?: "Vendor" | "Partner"
symbol?: string
pricing_tier?: string
free_user_limit?: number
tags?: string[]
}
Settingsโ
A key-value map of all organization settings. Keys are setting identifiers and values can be any valid JSON type.
type Settings = Record<string, unknown>
SettingsValueโ
The value of an organization setting. Can be any valid JSON type: string, number, boolean, array, or object.
type SettingsValue = string | number | boolean | Record<string, unknown>[] | Record<string, unknown>
FeatureSettingsโ
Feature settings metadata served to frontend applications.
type FeatureSettings = {
version: string
feature_flags: Array<{
feature_name: string
title?: {
key: { ... }
default_value?: { ... }
}
description?: {
key: { ... }
default_value?: { ... }
}
badge?: "alpha" | "beta" | "new" | "advanced" | "experiment" | "deprecated"
confetti?: boolean
one_way?: boolean
reverse_checked?: boolean
is_visible_for_partner?: boolean
visibility_rules: Array<{
type: { ... }
setting_key?: { ... }
flag_name?: { ... }
pricing_tier_classes?: { ... }
action?: { ... }
resource?: { ... }
rule?: { ... }
rules?: { ... }
}>
}>
}
FeatureFlagMetadataโ
Metadata for a single feature flag toggle
type FeatureFlagMetadata = {
feature_name: string
title?: {
key: string
default_value?: string
}
description?: {
key: string
default_value?: string
}
badge?: "alpha" | "beta" | "new" | "advanced" | "experiment" | "deprecated"
confetti?: boolean
one_way?: boolean
reverse_checked?: boolean
is_visible_for_partner?: boolean
visibility_rules: Array<{
type: "always" | "never" | "advanced_mode" | "pricing_tier" | "pricing_tier_class" | "production_org" | "feature_flag" | "permission" | "setting_enabled" | "flag_enabled" | "not" | "and" | "or"
setting_key?: string
flag_name?: string
pricing_tier_classes?: string[]
action?: string
resource?: string
rule?: { ... }
rules?: { ... }[]
}>
}
I18nStringโ
Internationalized string with a translation key and optional default value
type I18nString = {
key: string
default_value?: string
}
VisibilityRuleโ
A rule that determines feature visibility. Rules are combined with AND logic at the top level. Supports boolean combinators (and, or, not) for complex logic.
type VisibilityRule = {
type: "always" | "never" | "advanced_mode" | "pricing_tier" | "pricing_tier_class" | "production_org" | "feature_flag" | "permission" | "setting_enabled" | "flag_enabled" | "not" | "and" | "or"
setting_key?: string
flag_name?: string
pricing_tier_classes?: string[]
action?: string
resource?: string
rule?: { ... }
rules?: { ... }[]
}
AnnouncementTypeโ
type AnnouncementType = "subprocessor_change"
AnnouncementMessageโ
type AnnouncementMessage = {
de: string
en?: string
}
Announcementโ
type Announcement = {
id: string // uuid
type: "subprocessor_change"
message: {
de: string
en?: string
}
link_url: string
list_version: string
effective_date: string // date
window_days: number
status: "draft" | "published" | "archived"
created_at: string // date-time
created_by?: string
updated_at: string // date-time
published_at?: string // date-time
published_by?: string
expires_at?: string // date-time
archived_at?: string // date-time
archived_by?: string
materialized_at?: string // date-time
}
AnnouncementOrganizationStatusValueโ
type AnnouncementOrganizationStatusValue = "acknowledged" | "pending" | "expired" | "superseded"
AnnouncementOrganizationStatusโ
type AnnouncementOrganizationStatus = {
announcement_id: string
org_id: string
org_name?: string
status: "acknowledged" | "pending" | "expired" | "superseded"
acknowledged_by?: {
user_id: string
name?: string
email?: string
}
acknowledged_at?: string // date-time
portal?: string
list_version: string
recorded_at?: string // date-time
}
ActiveAnnouncementResponseโ
type ActiveAnnouncementResponse = {
announcement: {
id: string // uuid
type: "subprocessor_change"
message: {
de: { ... }
en?: { ... }
}
link_url: string
list_version: string
effective_date: string // date
window_days: number
status: "draft" | "published" | "archived"
created_at: string // date-time
created_by?: string
updated_at: string // date-time
published_at?: string // date-time
published_by?: string
expires_at?: string // date-time
archived_at?: string // date-time
archived_by?: string
materialized_at?: string // date-time
}
can_acknowledge: boolean
}