Skip to content
Assistants

PATCHhttps://core-api.heysadie.ai/assistants/{id}/whatsapp-enabled

id whatsappEnabled success data featureFlags metadata timestamp version path error code message details field

Set WhatsApp enabled

Enable or disable the **WhatsApp** channel for an assistant. - `whatsappEnabled`: `true` turns WhatsApp on, `false` turns it off. The value is stored in the assistant's `feature_flags` JSON under the `whatsapp_enabled` key; any other channel flags (e.g. SMS) are preserved. When WhatsApp is disabled, OnCore ignores inbound WhatsApp text for this assistant. No messaging prompt is required to toggle this. Enabling requires a linked phone number that has already been onboarded to WhatsApp (a Meta phone-number ID on the number row). Enabling fails with 400 (`NO_PHONE_NUMBER_LINKED` / `NUMBER_NOT_WHATSAPP_ONBOARDED`) and leaves the flag unchanged when that check fails. Disabling only clears the flag. There is no attach side effect: WABA registration happens in the onboarding flow, not here.

Try it in the API Explorer

Example request

Terminal
curl -X PATCH "https://core-api.heysadie.ai/assistants/ASSISTANT_ID/whatsapp-enabled" \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "whatsappEnabled": true
  }'

Authentication

Authenticate with an API key in the Authorization header using the ApiKey scheme. See Authentication for how keys work and where to get them.

Authorizationstringrequired

API key in the ApiKey scheme: ApiKey YOUR_API_KEY. Tenant keys authorize their own tenant; organization keys can act on any tenant in the organization.

X-Tenant-Idstring (uuid)optional

Required when authenticating with an organization key: it selects the tenant the request acts on. Omit with tenant keys.

Request

Path parameters

idstringrequired

The resource's UUID.

Body application/json · required

whatsappEnabledbooleanrequired

Enable (true) or disable (false) the WhatsApp channel for this assistant. Stored under feature_flags.whatsapp_enabled; other channel flags are preserved.

Responses

200
successbooleanrequired

true on every 2xx

dataobjectoptional

The result

Show 2 child properties
idstringrequired
featureFlagsmap<string, boolean>required
metadataobjectoptional

Request metadata

Show 3 child properties
timestampstringrequired

When the server answered, ISO 8601 UTC

versionstringrequired

API version

pathstringoptional

The URL that was requested

400The request is invalid. `details` lists each field that failed
successbooleanrequired

false on every error

errorobjectoptional

What went wrong: a stable `code` to branch on and a human-readable `message`

Show 3 child properties
codeenumrequired

A parameter or body field broke a rule

Allowed values:"VALIDATION_ERROR"
messagestringrequired

Human-readable explanation. Do not parse it; branch on `code`

detailsobject[]optional

One entry per field that failed

Show 2 item properties
fieldstringrequired

The offending field

messagestringrequired

The rule it broke

metadataobjectoptional

Request metadata

Show 3 child properties
timestampstringrequired

When the server answered, ISO 8601 UTC

versionstringrequired

API version

pathstringoptional

The URL that was requested

401Missing or invalid credentials
successbooleanrequired

false on every error

errorobjectoptional

What went wrong: a stable `code` to branch on and a human-readable `message`

Show 2 child properties
codeenumrequired

No valid credentials

Allowed values:"UNAUTHORIZED"
messagestringrequired

Human-readable explanation. Do not parse it; branch on `code`

metadataobjectoptional

Request metadata

Show 3 child properties
timestampstringrequired

When the server answered, ISO 8601 UTC

versionstringrequired

API version

pathstringoptional

The URL that was requested

403The credentials are valid but may not use this route
successbooleanrequired

false on every error

errorobjectoptional

What went wrong: a stable `code` to branch on and a human-readable `message`

Show 2 child properties
codeenumrequired

The credentials may not use this route

Allowed values:"FORBIDDEN"
messagestringrequired

Human-readable explanation. Do not parse it; branch on `code`

metadataobjectoptional

Request metadata

Show 3 child properties
timestampstringrequired

When the server answered, ISO 8601 UTC

versionstringrequired

API version

pathstringoptional

The URL that was requested

404Not found, or outside the caller's scope
successbooleanrequired

false on every error

errorobjectoptional

What went wrong: a stable `code` to branch on and a human-readable `message`

Show 2 child properties
codeenumrequired

An id names nothing the caller can see

Allowed values:"RESOURCE_NOT_FOUND"
messagestringrequired

Human-readable explanation. Do not parse it; branch on `code`

metadataobjectoptional

Request metadata

Show 3 child properties
timestampstringrequired

When the server answered, ISO 8601 UTC

versionstringrequired

API version

pathstringoptional

The URL that was requested

500An unexpected server error
successbooleanrequired

false on every error

errorobjectoptional

What went wrong: a stable `code` to branch on and a human-readable `message`

Show 2 child properties
codeenumrequired

An unexpected server failure

Allowed values:"INTERNAL_SERVER_ERROR"
messagestringrequired

Human-readable explanation. Do not parse it; branch on `code`

metadataobjectoptional

Request metadata

Show 3 child properties
timestampstringrequired

When the server answered, ISO 8601 UTC

versionstringrequired

API version

pathstringoptional

The URL that was requested