OmniStream Docs
  • Panduan Pengguna
  • Developer
  • API Reference
Information
Auth
    Login with email and passwordpostGet current agent profilegetLogout (clears cookie)postIssue a fresh JWT for the current sessiongetRegister a new tenant organizationpost
Conversations
    List conversationsgetGet a single conversationgetAssign or unassign an agentpatchUpdate conversation statuspatchMark conversation as readpostExpire stale conversationspostUpdate conversation tagspatchTakeover a conversationpostBulk conversation actionspost
Messages
    List messages in a conversationgetSend an outbound messagepostSearch messages across conversationsget
Contacts
    List contactsgetGet a contact by IDgetUpdate a contactpatchList conversations for a contactget
Agents
    List all agentsgetCreate a new agentpostGet an agent by IDgetDelete an agentdeleteUpdate an agentpatchToggle agent online/offline statuspatch
Notes
    List notes for a conversationgetCreate a notepostDelete a notedeleteUpdate a notepatch
Quick Replies
    List all quick repliesgetCreate a quick replypostDelete a quick replydeleteUpdate a quick replypatchExport quick replies as CSVgetImport quick replies from CSVpostRecord usage of a quick replypostAdd quick reply to favoritespostRemove quick reply from favoritesdelete
Analytics
    Dashboard overview KPIsgetConversation and message trendsgetPer-agent workload metricsgetPer-channel metricsgetCSAT analyticsgetWhatsApp message analyticsgetWhatsApp conversation analyticsgetWhatsApp template analyticsget
Media
    Upload a media filepostDownload or proxy a media filegetUpload a file to S3/MinIOpost
Divisions
    List divisionsgetCreate a divisionpostGet a division with agentsgetDelete a divisiondeleteUpdate a divisionpatchList agents in a divisiongetAssign agents to a divisionpostRemove agents from a divisiondelete
Transfers
    Transfer a conversationpostList transfer history for a conversationget
Scheduled Messages
    Schedule a message for future deliverypostList scheduled messages for a conversationgetCancel a scheduled messagedelete
CSAT
    Get CSAT survey for a conversationgetCreate a CSAT survey for a conversationpostSubmit a CSAT ratingpatchCSAT analyticsget
SLA
    List SLA policiesgetCreate an SLA policypostDelete an SLA policydeleteUpdate an SLA policypatchList SLA breaches for a policygetGet SLA status for a conversationget
Outgoing Webhooks
    List outgoing webhooksgetCreate an outgoing webhookpostList available webhook event typesgetDelete an outgoing webhookdeleteUpdate an outgoing webhookpatchList deliveries for a webhookgetSend a test event to the webhookpost
Campaigns
    List campaignsgetCreate a new campaign (draft)postGet a campaigngetDelete a draft campaigndeleteUpdate a draft campaignpatchList campaign recipientsgetAdd recipients to a campaignpostClear all recipients from a campaigndeleteSend or schedule a campaignpostCancel a campaignpost
Integrations
    List all channel integrationsgetGet a single integration by channelgetCreate or update an integration (upsert)putDelete an integrationdeleteList integration accountsgetCreate an integration accountpostGet an integration account by IDgetDelete an integration accountdeleteUpdate an integration accountpatchSet an integration account as the default for its channelpostFetch WhatsApp account health from Meta Graph APIgetGet WhatsApp Embedded Signup configgetComplete WhatsApp Embedded SignuppostGet Instagram OAuth app configgetConnect Instagram account via OAuthpostGet Messenger OAuth app configgetConnect Messenger via Facebook Login OAuthpostSubscribe selected Facebook Pages to Messenger webhookspostDisconnect a Messenger pagepostGet Messenger persistent menugetSet or delete Messenger persistent menupost
Activity Logs
    List activity logsget
WA Templates
    List WhatsApp message templatesgetCreate a WhatsApp message templatepostSync templates from MetapostGet a WhatsApp template by IDgetDelete a WhatsApp template (local only)deleteUpdate template header media URLpatch
Webhooks
    Meta webhook verificationgetReceive Meta webhook (WhatsApp + Instagram)postReceive inbound email webhookpostMeta webhook verification for MessengergetReceive Messenger inbound webhook eventspostMeta webhook verification for InstagramgetReceive Instagram inbound webhook eventspost
Roles
    List all roles with permissionsgetCreate a custom rolepostGet a single role with permissionsgetDelete a custom roledeleteUpdate a rolepatchList all available permissionsget
API Keys
    List caller's API keysgetCreate a new API keypostRevoke an API keydelete
Health
    API Gateway health checkget
Automation
    List automation rulesgetCreate an automation rulepostList snoozed automation rulesgetSnooze multiple automation rulespostAutomation stats overviewgetAutomation stats time seriesgetAutomation alert statsgetDry-run an automation rule against a test payloadpostGet an automation rule by IDgetDelete an automation ruledeleteUpdate an automation rulepatchToggle automation rule active statepostSnooze an automation rule until a given timepostUnsnooze an automation rulepostGet stats for a specific automation rulegetGet time series stats for a specific automation rulegetGet the effective state of an automation rulegetUpdate alert settings for an automation rulepatchUpdate schedule settings for an automation rulepatchUpdate rollout percentage for an automation rulepatchPreview upcoming schedule windows for an automation rulegetGet global automation control stategetUpdate global automation control statepatchList automation rule runsgetExport automation runs as CSVgetList automation runs for a specific rulegetList automation runs for a specific eventgetGet a single automation run by IDgetGet replay context for an automation rungetList automation event queue itemsgetAutomation event queue statsgetExport automation events as CSVgetRetry all failed automation eventspostClean up old failed automation eventspostList automation events for a conversationgetList automation events for a rulegetList automation events by payload fingerprintgetGet a single automation event by IDgetRetry a single automation eventpostReprocess an automation event with the current rule setpostGet automation worker metricsget
Chat Expiration
    List chat expiration rulesgetUpsert a chat expiration rule for a channelput
AI Agents
    List all AI agentsgetCreate a new AI agentpostGet an AI agent by IDgetUpdate an AI agentputDelete an AI agentdeleteToggle AI agent active stateputList AI agent assignmentsgetCreate an AI agent assignmentpostUpdate an AI agent assignmentputDelete an AI agent assignmentdeleteList handoff rules for an AI agentgetCreate a handoff rulepostUpdate a handoff ruleputDelete a handoff ruledeleteGet daily usage stats for an AI agentgetList knowledge sources for an AI agentgetAdd a knowledge sourcepostDelete a knowledge sourcedeleteReprocess a knowledge sourcepostList QnA pairs for a knowledge sourcegetAdd a QnA pairpostDelete a QnA pairdeleteList products for an AI agentgetCreate a productpostBulk import productspostUpdate a productputDelete a productdeleteList orchestration rulesgetCreate an orchestration rulepostUpdate an orchestration ruleputDelete an orchestration ruledeleteList evaluations for an AI agentgetCreate an AI response evaluationpostUpdate an AI evaluationputDelete an AI evaluationdeleteGet aggregated AI usage summarygetSend a test message to an AI agentpost
Working Hours
    List global working hoursgetUpsert global working hoursputList division working hoursgetUpsert division working hours overrideputDelete division working hours overridedeleteGet tenant timezonegetUpdate tenant timezoneputCheck working hours status (public)get
Super Admin
    Super-admin loginpostList all tenant organizationsgetProvision a new tenantpostGet a tenant organizationgetSuspend a tenant organizationdeleteUpdate a tenant organizationpatchImpersonate a tenant adminpostList all tenants with usage statisticsgetSystem health checkgetList super-admin accountsgetCreate a super-admin accountpostDelete a super-admin accountdeleteReset a super-admin's passwordpostList tenant usersgetReset a tenant user's passwordpostSuspend a tenant userpostActivate a tenant userpostImpersonate a tenant userpost
Billing Admin
    List all billing plansgetCreate a billing planpostGet a billing plan by IDgetDelete a billing plandeleteUpdate a billing planpatchList all couponsgetCreate a couponpostDelete a coupondeleteUpdate a couponpatchList all add-onsgetCreate an add-onpostDelete an add-ondeleteUpdate an add-onpatchCombined analytics dashboardgetMonthly recurring revenue summarygetRevenue breakdown by plangetMonthly revenue over time (last 12 months)getChurn metrics for current monthgetRefund an invoicepost
Billing
    Get current subscription and plangetList available billing plansgetSubscribe to a planpostUpgrade or downgrade subscription planpostCancel subscriptionpostGet current month's usagegetList invoicesgetDownload invoice PDFgetList payment methodsgetAdd a payment methodpostDelete a payment methoddeleteValidate a coupon codepostList available add-onsgetList attached add-onsgetAttach an add-on to subscriptionpostDetach an add-on from subscriptiondelete
Schemas
OmniStream CRM API
OmniStream CRM API

Analytics

Endpoint

Dashboard analytics (supervisor/admin only)


Dashboard overview KPIs

GET
https://api-chat.bara.my.id
/api/analytics/overview

Supervisor or admin only.

Dashboard overview KPIs › Responses

Overview metrics

total_conversations
​integer · required
open_conversations
​integer · required
pending_conversations
​integer · required
resolved_conversations
​integer · required
total_contacts
​integer · required
total_agents
​integer · required
online_agents
​integer · required
messages_today
​integer · required
resolution_rate
​number · double · required

Percentage (0.0 - 100.0)

GET/api/analytics/overview
curl --request GET \ --url https://api-chat.bara.my.id/api/analytics/overview
shell
Example Responses
{ "total_conversations": 0, "open_conversations": 0, "pending_conversations": 0, "resolved_conversations": 0, "total_contacts": 0, "total_agents": 0, "online_agents": 0, "messages_today": 0, "resolution_rate": 0 }
json
application/json

Conversation and message trends

GET
https://api-chat.bara.my.id
/api/analytics/trends

Supervisor or admin only.

Conversation and message trends › query Parameters

period
​string · enum

Time period: 7d, 30d, or 90d

Enum values:
7d
30d
90d
Default: 7d

Conversation and message trends › Responses

Trend data

period
​string · required

7d, 30d, or 90d

days
​integer · required
​object[] · required
​object[] · required
GET/api/analytics/trends
curl --request GET \ --url https://api-chat.bara.my.id/api/analytics/trends
shell
Example Responses
{ "period": "period", "days": 0, "conversation_trend": [ { "date": "2024-08-25", "count": 0 } ], "message_trend": [ { "date": "2024-08-25", "count": 0 } ] }
json
application/json

Per-agent workload metrics

GET
https://api-chat.bara.my.id
/api/analytics/agents

Supervisor or admin only.

Per-agent workload metrics › Responses

Agent metrics

​object[] · required
GET/api/analytics/agents
curl --request GET \ --url https://api-chat.bara.my.id/api/analytics/agents
shell
Example Responses
{ "agents": [ { "agent_id": "agent_id", "full_name": "full_name", "email": "email", "is_online": true, "open_conversations": 0, "resolved_conversations": 0, "total_conversations": 0 } ] }
json
application/json

Per-channel metrics

GET
https://api-chat.bara.my.id
/api/analytics/channels

Supervisor or admin only.

Per-channel metrics › Responses

Channel metrics

​object[] · required
GET/api/analytics/channels
curl --request GET \ --url https://api-chat.bara.my.id/api/analytics/channels
shell
Example Responses
{ "channels": [ { "channel": "channel", "contact_count": 0, "conversation_count": 0 } ] }
json
application/json

CSAT analytics

GET
https://api-chat.bara.my.id
/api/analytics/csat

Supervisor or admin only. Returns overall and per-agent CSAT metrics.

CSAT analytics › query Parameters

period
​string · enum
Enum values:
7d
30d
90d
Default: 30d

CSAT analytics › Responses

CSAT analytics

period
​string · required
​object · required
​object[] · required
GET/api/analytics/csat
curl --request GET \ --url https://api-chat.bara.my.id/api/analytics/csat
shell
Example Responses
{ "period": "period", "summary": { "total_surveys": 0, "rated_count": 0, "average_rating": 0, "rating_1": 0, "rating_2": 0, "rating_3": 0, "rating_4": 0, "rating_5": 0 }, "agents": [ { "agent_id": "00000000-0000-0000-0000-000000000000", "agent_name": "agent_name", "total_surveys": 0, "rated_count": 0, "average_rating": 0 } ] }
json
application/json

WhatsApp message analytics

GET
https://api-chat.bara.my.id
/api/wa-insights/messages

Supervisor or admin only. Fetches SENT/DELIVERED/READ/FAILED counts per day from Meta Graph API.

WhatsApp message analytics › query Parameters

start
​string · date · required

Start date (YYYY-MM-DD)

end
​string · date · required

End date (YYYY-MM-DD)

integration_account_id
​string · uuid

Use specific WABA account. Falls back to META_WABA_ID env var.

WhatsApp message analytics › Responses

Message analytics data

​object[]
GET/api/wa-insights/messages
curl --request GET \ --url 'https://api-chat.bara.my.id/api/wa-insights/messages?start=%3Cstring%3E&end=%3Cstring%3E'
shell
Example Responses
{ "data": [ { "date": "2024-08-25", "sent": 0, "delivered": 0, "read": 0, "failed": 0 } ] }
json
application/json

WhatsApp conversation analytics

GET
https://api-chat.bara.my.id
/api/wa-insights/conversations

Supervisor or admin only. Fetches conversation counts by type and direction from Meta Graph API.

WhatsApp conversation analytics › query Parameters

start
​string · date · required

Start date (YYYY-MM-DD)

end
​string · date · required

End date (YYYY-MM-DD)

integration_account_id
​string · uuid

Use specific WABA account. Falls back to META_WABA_ID env var.

WhatsApp conversation analytics › Responses

Conversation analytics data

​object[]
GET/api/wa-insights/conversations
curl --request GET \ --url 'https://api-chat.bara.my.id/api/wa-insights/conversations?start=%3Cstring%3E&end=%3Cstring%3E'
shell
Example Responses
{ "data": [ { "date": "2024-08-25", "conversation_type": "conversation_type", "direction": "direction", "count": 0 } ] }
json
application/json

WhatsApp template analytics

GET
https://api-chat.bara.my.id
/api/wa-insights/templates

Supervisor or admin only. Fetches SENT/DELIVERED/READ/CLICKED counts per template from Meta Graph API.

WhatsApp template analytics › query Parameters

start
​string · date · required

Start date (YYYY-MM-DD)

end
​string · date · required

End date (YYYY-MM-DD)

integration_account_id
​string · uuid

Use specific WABA account. Falls back to META_WABA_ID env var.

WhatsApp template analytics › Responses

Template analytics data

​object[]
GET/api/wa-insights/templates
curl --request GET \ --url 'https://api-chat.bara.my.id/api/wa-insights/templates?start=%3Cstring%3E&end=%3Cstring%3E'
shell
Example Responses
{ "data": [ { "template_id": "template_id", "template_name": "template_name", "sent": 0, "delivered": 0, "read": 0, "clicked": 0 } ] }
json
application/json

Quick RepliesMedia