OmniStream Docs
  • Dokumentasi
  • Developer
  • API Reference
Information
Auth
    Login with email and passwordpostRequest a password-reset code (agent)postSet a new password with a reset code (agent)postGet current agent profilegetLogout (clears cookie)postAdvertise available SSO login methodsgetBegin Google SSO logingetGoogle SSO callback (OIDC redirect URI)getDiscover company SSO availability for an emailpostBegin company SSO login (ticket from /discover)getCompany SSO callback (OIDC redirect URI)getBegin a passkey (WebAuthn) login ceremonypostComplete a passkey loginpostBegin passkey registration for the current agentpostComplete passkey registrationpostList the current agent's passkeysgetDelete one of the current agent's passkeysdeleteList company SSO providersgetCreate a company SSO providerpostUpdate a company SSO providerputDelete a company SSO providerdeleteIssue a fresh JWT for the current sessiongetRegister a new tenant organizationpost
Conversations
    List conversationsgetGet a single conversationgetAssign or unassign an agentpatchAdd an assignee (human agent or AI agent) to a conversationpostRemove an assignee (human agent or AI agent) from a conversationdeleteUpdate conversation statuspatchMark conversation as readpostExpire stale conversationspostUpdate conversation tagspatchTakeover a conversationpostBulk conversation actionspost
Messages
    List messages in a conversationgetSend an outbound messagepostSend a WhatsApp template message in one callpostSearch messages across conversationsget
Contacts
    List contactsgetImport contacts from a CSV filepostPreview a CSV before importing (wizard step 1)postImport contacts from CSV with explicit column mapping (wizard step 2)postGet a contact by IDgetUpdate a contactpatchList conversations for a contactget
Outgoing Webhooks
    List outgoing webhooksgetCreate an outgoing webhookpostList available webhook event typesgetAggregated delivery statisticsgetBulk-replay deliveries by idpostReplay all dead-lettered deliveriespostReplay a single deliverypostDelete an outgoing webhookdeleteUpdate an outgoing webhookpatchList deliveries for a webhookgetSend a test event to the webhookpostStart a signing-secret rotationpostComplete a pending secret rotationpostCancel a pending secret rotationpost
WA Templates
    List WhatsApp message templatesgetCreate a WhatsApp message templatepostSync templates from MetapostGet a WhatsApp template by IDgetEdit a template (status-aware; re-submits to Meta)putDelete a WhatsApp template (Meta-first)deleteBulk-send an approved template to a list of contactspostUpdate template header media URLpatch
Schemas
OmniStream CRM API
OmniStream CRM API

WA Templates

Endpoint

WhatsApp message template management


List WhatsApp message templates

GET
https://api-chat.misindo.id
/api/wa-templates

List WhatsApp message templates › query Parameters

status
​string · enum
Enum values:
APPROVED
PENDING
REJECTED
PAUSED
DISABLED
category
​string · enum
Enum values:
MARKETING
UTILITY
AUTHENTICATION
waba_id
​string

Filter by WhatsApp Business Account ID

List WhatsApp message templates › Responses

List of templates

​object[]
id
​string · uuid · required
waba_id
​string · required

WhatsApp Business Account ID

name
​string · required
language
​string · required

BCP-47 language code (e.g. id, en_US)

category
​string · enum · required
Enum values:
MARKETING
UTILITY
AUTHENTICATION
status
​string · enum · required
Enum values:
APPROVED
PENDING
REJECTED
PAUSED
DISABLED
components
​required

Meta template components array (HEADER, BODY, FOOTER, BUTTONS)

created_at
​string · date-time · required
updated_at
​string · date-time · required
meta_template_id
​string

Template ID assigned by Meta

header_media_url
​string

Public MinIO URL for the header media (IMAGE/VIDEO/DOCUMENT)

GET/api/wa-templates
curl --request GET \ --url https://api-chat.misindo.id/api/wa-templates
shell
Example Responses
[ { "id": "00000000-0000-0000-0000-000000000000", "meta_template_id": "meta_template_id", "waba_id": "waba_id", "name": "name", "language": "language", "category": "MARKETING", "status": "APPROVED", "components": {}, "header_media_url": "header_media_url", "created_at": "2024-08-25T15:00:00Z", "updated_at": "2024-08-25T15:00:00Z" } ]
json
application/json

Create a WhatsApp message template

POST
https://api-chat.misindo.id
/api/wa-templates

Submits the template to Meta for review and stores it locally.

Create a WhatsApp message template › Request Body

name
​string · required

Lowercase letters, numbers, and underscores only. Max 512 chars.

components
​required

Meta template components array

language
​string
Default: id
category
​string · enum
Enum values:
MARKETING
UTILITY
AUTHENTICATION
Default: MARKETING
integration_account_id
​string · uuid

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

Create a WhatsApp message template › Responses

Template created and submitted to Meta

id
​string · uuid · required
waba_id
​string · required

WhatsApp Business Account ID

name
​string · required
language
​string · required

BCP-47 language code (e.g. id, en_US)

category
​string · enum · required
Enum values:
MARKETING
UTILITY
AUTHENTICATION
status
​string · enum · required
Enum values:
APPROVED
PENDING
REJECTED
PAUSED
DISABLED
components
​required

Meta template components array (HEADER, BODY, FOOTER, BUTTONS)

created_at
​string · date-time · required
updated_at
​string · date-time · required
meta_template_id
​string

Template ID assigned by Meta

header_media_url
​string

Public MinIO URL for the header media (IMAGE/VIDEO/DOCUMENT)

POST/api/wa-templates
curl --request POST \ --url https://api-chat.misindo.id/api/wa-templates \ --header 'Content-Type: application/json' \ --data ' { "name": "name", "language": "id", "category": "MARKETING", "components": {}, "integration_account_id": "00000000-0000-0000-0000-000000000000" } '
shell
Example Request Body
{ "name": "name", "language": "id", "category": "MARKETING", "components": {}, "integration_account_id": "00000000-0000-0000-0000-000000000000" }
json
Example Responses
{ "id": "00000000-0000-0000-0000-000000000000", "meta_template_id": "meta_template_id", "waba_id": "waba_id", "name": "name", "language": "language", "category": "MARKETING", "status": "APPROVED", "components": {}, "header_media_url": "header_media_url", "created_at": "2024-08-25T15:00:00Z", "updated_at": "2024-08-25T15:00:00Z" }
json
application/json

Sync templates from Meta

POST
https://api-chat.misindo.id
/api/wa-templates/sync

Downloads all templates from the WABA and upserts them locally. Optionally re-hosts header media to MinIO for persistent public URLs. Optionally scope to a specific integration account via query param.

Sync templates from Meta › query Parameters

integration_account_id
​string · uuid

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

Sync templates from Meta › Responses

Sync result

message
​string
total_from_meta
​integer
synced
​integer
errors
​integer
POST/api/wa-templates/sync
curl --request POST \ --url https://api-chat.misindo.id/api/wa-templates/sync
shell
Example Responses
{ "message": "message", "total_from_meta": 0, "synced": 0, "errors": 0 }
json
application/json

Get a WhatsApp template by ID

GET
https://api-chat.misindo.id
/api/wa-templates/{id}

Get a WhatsApp template by ID › path Parameters

id
​string · uuid · required

Get a WhatsApp template by ID › Responses

Template details

id
​string · uuid · required
waba_id
​string · required

WhatsApp Business Account ID

name
​string · required
language
​string · required

BCP-47 language code (e.g. id, en_US)

category
​string · enum · required
Enum values:
MARKETING
UTILITY
AUTHENTICATION
status
​string · enum · required
Enum values:
APPROVED
PENDING
REJECTED
PAUSED
DISABLED
components
​required

Meta template components array (HEADER, BODY, FOOTER, BUTTONS)

created_at
​string · date-time · required
updated_at
​string · date-time · required
meta_template_id
​string

Template ID assigned by Meta

header_media_url
​string

Public MinIO URL for the header media (IMAGE/VIDEO/DOCUMENT)

GET/api/wa-templates/{id}
curl --request GET \ --url https://api-chat.misindo.id/api/wa-templates/:id
shell
Example Responses
{ "id": "00000000-0000-0000-0000-000000000000", "meta_template_id": "meta_template_id", "waba_id": "waba_id", "name": "name", "language": "language", "category": "MARKETING", "status": "APPROVED", "components": {}, "header_media_url": "header_media_url", "created_at": "2024-08-25T15:00:00Z", "updated_at": "2024-08-25T15:00:00Z" }
json
application/json

Edit a template (status-aware; re-submits to Meta)

PUT
https://api-chat.misindo.id
/api/wa-templates/{id}

Edits a template's components/category. APPROVED/PAUSED templates are edited in place on Meta (the old approved version keeps sending until re-approval); REJECTED templates are deleted and recreated ("fix & resubmit"); templates under review (PENDING/IN_REVIEW/IN_APPEAL) return 409. Name and language are immutable. Status becomes PENDING on success.

Edit a template (status-aware; re-submits to Meta) › path Parameters

id
​string · uuid · required

Edit a template (status-aware; re-submits to Meta) › Request Body

​object[] · required
category
​string · enum
Enum values:
MARKETING
UTILITY
AUTHENTICATION
integration_account_id
​string · uuid

Edit a template (status-aware; re-submits to Meta) › Responses

Updated template, now PENDING re-review

id
​string · uuid · required
waba_id
​string · required

WhatsApp Business Account ID

name
​string · required
language
​string · required

BCP-47 language code (e.g. id, en_US)

category
​string · enum · required
Enum values:
MARKETING
UTILITY
AUTHENTICATION
status
​string · enum · required
Enum values:
APPROVED
PENDING
REJECTED
PAUSED
DISABLED
components
​required

Meta template components array (HEADER, BODY, FOOTER, BUTTONS)

created_at
​string · date-time · required
updated_at
​string · date-time · required
meta_template_id
​string

Template ID assigned by Meta

header_media_url
​string

Public MinIO URL for the header media (IMAGE/VIDEO/DOCUMENT)

PUT/api/wa-templates/{id}
curl --request PUT \ --url https://api-chat.misindo.id/api/wa-templates/:id \ --header 'Content-Type: application/json' \ --data ' { "components": [ {} ], "category": "MARKETING", "integration_account_id": "00000000-0000-0000-0000-000000000000" } '
shell
Example Request Body
{ "components": [ {} ], "category": "MARKETING", "integration_account_id": "00000000-0000-0000-0000-000000000000" }
json
Example Responses
{ "id": "00000000-0000-0000-0000-000000000000", "meta_template_id": "meta_template_id", "waba_id": "waba_id", "name": "name", "language": "language", "category": "MARKETING", "status": "APPROVED", "components": {}, "header_media_url": "header_media_url", "created_at": "2024-08-25T15:00:00Z", "updated_at": "2024-08-25T15:00:00Z" }
json
application/json

Delete a WhatsApp template (Meta-first)

DELETE
https://api-chat.misindo.id
/api/wa-templates/{id}

Deletes the template on Meta first (per-language, by name + hsm_id), then locally. Fails and keeps the local row if the Meta delete fails. Fails if any campaign references this template.

Delete a WhatsApp template (Meta-first) › path Parameters

id
​string · uuid · required

Delete a WhatsApp template (Meta-first) › query Parameters

integration_account_id
​string · uuid

WABA integration account whose credentials are used to delete on Meta.

Delete a WhatsApp template (Meta-first) › Responses

Template deleted

message
​string
DELETE/api/wa-templates/{id}
curl --request DELETE \ --url https://api-chat.misindo.id/api/wa-templates/:id
shell
Example Responses
{ "message": "message" }
json
application/json

Bulk-send an approved template to a list of contacts

POST
https://api-chat.misindo.id
/api/wa-templates/{id}/bulk-send

Executes as a campaign (visible in Campaigns with per-recipient delivery stats). Requires campaigns.broadcast. The template must be APPROVED; sends go through the unified outbound pipeline (issue #170).

Bulk-send an approved template to a list of contacts › path Parameters

id
​string · uuid · required

Bulk-send an approved template to a list of contacts › Request Body

contact_ids
​string[] · maxItems: 500 · required
variables
​object

Positional template variables shared by all recipients (e.g. {"1": "value"})

integration_account_id
​string · uuid

WhatsApp account to send from; defaults to the active default account

Bulk-send an approved template to a list of contacts › Responses

Bulk send executed as a campaign

message
​string
template_id
​string · uuid
campaign_id
​string · uuid
sent
​integer
failed
​integer
skipped
​integer
POST/api/wa-templates/{id}/bulk-send
curl --request POST \ --url https://api-chat.misindo.id/api/wa-templates/:id/bulk-send \ --header 'Content-Type: application/json' \ --data ' { "contact_ids": [ "00000000-0000-0000-0000-000000000000" ], "variables": {}, "integration_account_id": "00000000-0000-0000-0000-000000000000" } '
shell
Example Request Body
{ "contact_ids": [ "00000000-0000-0000-0000-000000000000" ], "variables": {}, "integration_account_id": "00000000-0000-0000-0000-000000000000" }
json
Example Responses
{ "message": "message", "template_id": "00000000-0000-0000-0000-000000000000", "campaign_id": "00000000-0000-0000-0000-000000000000", "sent": 0, "failed": 0, "skipped": 0 }
json
application/json

Update template header media URL

PATCH
https://api-chat.misindo.id
/api/wa-templates/{id}/header-media

Sets or replaces the header_media_url for a template. Use this when the automatic re-hosting during sync fails (e.g. expired scontent URL).

Update template header media URL › path Parameters

id
​string · uuid · required

Update template header media URL › Request Body

header_media_url
​string · required

Publicly accessible URL for the header media

Update template header media URL › Responses

Header media URL updated

id
​string · uuid · required
waba_id
​string · required

WhatsApp Business Account ID

name
​string · required
language
​string · required

BCP-47 language code (e.g. id, en_US)

category
​string · enum · required
Enum values:
MARKETING
UTILITY
AUTHENTICATION
status
​string · enum · required
Enum values:
APPROVED
PENDING
REJECTED
PAUSED
DISABLED
components
​required

Meta template components array (HEADER, BODY, FOOTER, BUTTONS)

created_at
​string · date-time · required
updated_at
​string · date-time · required
meta_template_id
​string

Template ID assigned by Meta

header_media_url
​string

Public MinIO URL for the header media (IMAGE/VIDEO/DOCUMENT)

PATCH/api/wa-templates/{id}/header-media
curl --request PATCH \ --url https://api-chat.misindo.id/api/wa-templates/:id/header-media \ --header 'Content-Type: application/json' \ --data ' { "header_media_url": "header_media_url" } '
shell
Example Request Body
{ "header_media_url": "header_media_url" }
json
Example Responses
{ "id": "00000000-0000-0000-0000-000000000000", "meta_template_id": "meta_template_id", "waba_id": "waba_id", "name": "name", "language": "language", "category": "MARKETING", "status": "APPROVED", "components": {}, "header_media_url": "header_media_url", "created_at": "2024-08-25T15:00:00Z", "updated_at": "2024-08-25T15:00:00Z" }
json
application/json

Outgoing Webhooks