curl -X POST "https://app.nicecall.ai/api/user/whatsapp/send-freeform" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "sender_id": 12, "recipient_phone": "+1234567890", "message": "Thank you for your inquiry! Our team will review your request and get back to you within 2 hours." }'
const response = await fetch( 'https://app.nicecall.ai/api/user/whatsapp/send-freeform', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ sender_id: 12, recipient_phone: '+1234567890', message: 'Thank you for your inquiry! Our team will review your request and get back to you within 2 hours.' }) });const data = await response.json();console.log(data);
import requestsresponse = requests.post( 'https://app.nicecall.ai/api/user/whatsapp/send-freeform', headers={ 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, json={ 'sender_id': 12, 'recipient_phone': '+1234567890', 'message': 'Thank you for your inquiry! Our team will review your request and get back to you within 2 hours.' })print(response.json())
curl -X POST "https://app.nicecall.ai/api/user/whatsapp/send-freeform" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "sender_id": 12, "recipient_phone": "+1234567890", "message": "Here is the menu you asked for!", "media_url": "https://example.com/files/menu.pdf", "filename": "menu.pdf" }'
{ "success": false, "error": "Insufficient balance. Please top up your account.", "error_code": "INSUFFICIENT_BALANCE"}
{ "success": false, "error": "The 24-hour messaging window is closed. Customer must reply first, or use a template message.", "error_code": "SESSION_EXPIRED", "session_status": { "is_open": false, "can_send_freeform": false, "requires_template": true, "message": "Session expired. Send a template or wait for customer to reply.", "expired_at": "2026-02-23T10:30:00+00:00" }}
{ "success": false, "error": "Sender not found or does not belong to you", "error_code": "SENDER_NOT_FOUND"}
{ "success": false, "error": "Invalid phone number format. Use E.164 format (e.g., +14155551234).", "error_code": "INVALID_PHONE"}
{ "success": false, "error": "Sender is not online. Current status: Offline", "error_code": "SENDER_OFFLINE"}
WhatsApp
Send Freeform Message
Send a free-text WhatsApp message within an active 24-hour session
POST
/
user
/
whatsapp
/
send-freeform
curl -X POST "https://app.nicecall.ai/api/user/whatsapp/send-freeform" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "sender_id": 12, "recipient_phone": "+1234567890", "message": "Thank you for your inquiry! Our team will review your request and get back to you within 2 hours." }'
const response = await fetch( 'https://app.nicecall.ai/api/user/whatsapp/send-freeform', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ sender_id: 12, recipient_phone: '+1234567890', message: 'Thank you for your inquiry! Our team will review your request and get back to you within 2 hours.' }) });const data = await response.json();console.log(data);
import requestsresponse = requests.post( 'https://app.nicecall.ai/api/user/whatsapp/send-freeform', headers={ 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, json={ 'sender_id': 12, 'recipient_phone': '+1234567890', 'message': 'Thank you for your inquiry! Our team will review your request and get back to you within 2 hours.' })print(response.json())
curl -X POST "https://app.nicecall.ai/api/user/whatsapp/send-freeform" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "sender_id": 12, "recipient_phone": "+1234567890", "message": "Here is the menu you asked for!", "media_url": "https://example.com/files/menu.pdf", "filename": "menu.pdf" }'
{ "success": false, "error": "Insufficient balance. Please top up your account.", "error_code": "INSUFFICIENT_BALANCE"}
{ "success": false, "error": "The 24-hour messaging window is closed. Customer must reply first, or use a template message.", "error_code": "SESSION_EXPIRED", "session_status": { "is_open": false, "can_send_freeform": false, "requires_template": true, "message": "Session expired. Send a template or wait for customer to reply.", "expired_at": "2026-02-23T10:30:00+00:00" }}
{ "success": false, "error": "Sender not found or does not belong to you", "error_code": "SENDER_NOT_FOUND"}
{ "success": false, "error": "Invalid phone number format. Use E.164 format (e.g., +14155551234).", "error_code": "INVALID_PHONE"}
{ "success": false, "error": "Sender is not online. Current status: Offline", "error_code": "SENDER_OFFLINE"}
This endpoint sends a freeform (free-text) WhatsApp message to a recipient. Unlike template messages, freeform messages can contain any text but require an active 24-hour messaging window — meaning the recipient must have sent a message to your WhatsApp sender within the last 24 hours.
Freeform messages can only be sent during an active 24-hour messaging window. If the session has expired, you must send a template message first to re-initiate the conversation. Use the Session Status endpoint to check if a session is active.
This endpoint is rate-limited to 5 requests per second per user.
Request Body
integer
required
The ID of the WhatsApp sender to send from (obtained from the Get Senders endpoint)
string
required
The recipient’s phone number in international format (e.g., +1234567890)
string
The message content to send (max 4096 characters). Optional when media_url is provided — in that case it is used as the media caption. Audio files are the exception: WhatsApp does not support captions on audio, so the text is ignored when media_url points to an audio file.Either message or media_url is required.
string
Optional public URL of a file to send — an image, audio file, video, or document. The file must be reachable at a public URL (WhatsApp fetches it at send time). When set, message is used as the caption for images, videos and documents. Audio files cannot carry a caption — if you send an audio file, any message text is ignored.Either message or media_url is required.
string
Optional filename shown to the recipient, mainly useful for documents (e.g. invoice.pdf).
Response Fields
boolean
Whether the message was sent successfully
integer
The ID of the conversation associated with this message
integer
The ID of the conversation message record
integer
The ID of the WhatsApp message record
string
The Twilio message SID for tracking delivery
object
Updated session status after sending the message
Show Session status properties
boolean
Whether the 24-hour messaging window is currently open
boolean
Whether freeform messages can be sent right now
boolean
Whether a template message is required
string
Human-readable description of the session state
integer
Minutes remaining in the 24-hour window
string
ISO 8601 timestamp when the session expires
Error Responses
Show Error Response
boolean
false
string
Insufficient balance. Please top up your account.
string
INSUFFICIENT_BALANCE
Show Error Response
boolean
false
string
Message indicating the 24-hour messaging window has expired
string
SESSION_EXPIRED
object
Current session status with is_open, can_send_freeform, requires_template, and message fields
Show Error Response
boolean
false
string
Sender not found or does not belong to you
string
SENDER_NOT_FOUND
Show Error Response
boolean
false
string
Message indicating the sender is currently offline
string
SENDER_OFFLINE
curl -X POST "https://app.nicecall.ai/api/user/whatsapp/send-freeform" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "sender_id": 12, "recipient_phone": "+1234567890", "message": "Thank you for your inquiry! Our team will review your request and get back to you within 2 hours." }'
const response = await fetch( 'https://app.nicecall.ai/api/user/whatsapp/send-freeform', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ sender_id: 12, recipient_phone: '+1234567890', message: 'Thank you for your inquiry! Our team will review your request and get back to you within 2 hours.' }) });const data = await response.json();console.log(data);
import requestsresponse = requests.post( 'https://app.nicecall.ai/api/user/whatsapp/send-freeform', headers={ 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, json={ 'sender_id': 12, 'recipient_phone': '+1234567890', 'message': 'Thank you for your inquiry! Our team will review your request and get back to you within 2 hours.' })print(response.json())
curl -X POST "https://app.nicecall.ai/api/user/whatsapp/send-freeform" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "sender_id": 12, "recipient_phone": "+1234567890", "message": "Here is the menu you asked for!", "media_url": "https://example.com/files/menu.pdf", "filename": "menu.pdf" }'
{ "success": false, "error": "Insufficient balance. Please top up your account.", "error_code": "INSUFFICIENT_BALANCE"}
{ "success": false, "error": "The 24-hour messaging window is closed. Customer must reply first, or use a template message.", "error_code": "SESSION_EXPIRED", "session_status": { "is_open": false, "can_send_freeform": false, "requires_template": true, "message": "Session expired. Send a template or wait for customer to reply.", "expired_at": "2026-02-23T10:30:00+00:00" }}
{ "success": false, "error": "Sender not found or does not belong to you", "error_code": "SENDER_NOT_FOUND"}
{ "success": false, "error": "Invalid phone number format. Use E.164 format (e.g., +14155551234).", "error_code": "INVALID_PHONE"}
{ "success": false, "error": "Sender is not online. Current status: Offline", "error_code": "SENDER_OFFLINE"}
24-Hour Messaging Window
WhatsApp enforces a 24-hour messaging window policy:
When a customer sends a message to your WhatsApp Business number, a 24-hour window opens.
During this window, you can send freeform messages without restrictions.
After the window expires, you must use a template message to re-initiate the conversation.
Each new customer message resets the 24-hour timer.
Use the Session Status endpoint to check whether a session is active before attempting to send a freeform message.
Notes
Maximum message length is 4,096 characters (WhatsApp limit).
A file (image, audio, video, or document) can be attached with media_url. It must be hosted at a publicly reachable URL — WhatsApp fetches it at send time. When sending media, message is optional and is used as the caption. Audio is the exception: WhatsApp does not support captions on audio files, so when media_url points to an audio file the message text is not sent.
The sender must be online. Offline senders return a 503 error.
Message costs are automatically deducted from your account balance.
Rate limit: 5 requests per second per user.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Nicecall","colors":{"primary":"#8c52ff","light":"#af87ff","dark":"#6534c7"},"favicon":"https://mintcdn.com/nicecall/duBwEVBVgUQwLK-f/favicon.png?fit=max\u0026auto=format\u0026n=duBwEVBVgUQwLK-f\u0026q=85\u0026s=4895a74f857aaf4cecfec8e3ed3d9c6a","logo":{"light":"https://mintcdn.com/nicecall/HTh8wkgVLtCuGyKd/resources/logo/light.png?fit=max\u0026auto=format\u0026n=HTh8wkgVLtCuGyKd\u0026q=85\u0026s=fdc82ec4d433cd78b059eef7224a785e","dark":"https://mintcdn.com/nicecall/HTh8wkgVLtCuGyKd/resources/logo/dark.png?fit=max\u0026auto=format\u0026n=HTh8wkgVLtCuGyKd\u0026q=85\u0026s=6bd88933aeaa6f9c6137c6c784face5b"},"api":{"mdx":{"server":"https://app.nicecall.ai/api/","auth":{"method":"bearer","name":null}}},"navbar":{"links":[{"label":"Home","href":"https://nicecall.ai"},{"label":"Support","href":"https://nicecall.ai/contact"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.nicecall.ai"}},"footer":{"socials":{}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"nicecall","hasAudioNarration":false,"actualSubdomain":"nicecall","customDomains":["docs.nicecall.ai"],"gitSource":{"type":"github","owner":"nicecall-ai","repo":"documentation","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6af652f5099366755051dc0d","clientVersion":"0.0.4205","searchFilterCounts":[{"language":"default","tag":"API Reference","count":105},{"language":"default","tag":"Platform Guide","count":94},{"language":"default","tag":"AI Assistants Overview","count":29},{"language":"default","tag":"Assistants","count":16},{"language":"default","tag":"Troubleshooting \u0026 FAQs","count":12},{"language":"default","tag":"Automations","count":10},{"language":"default","tag":"Knowledgebases","count":10},{"language":"default","tag":"Phone Numbers","count":10},{"language":"default","tag":"No-Code Automation","count":10},{"language":"default","tag":"Conversations","count":9}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/whatsapp/send-freeform","slug":"/api-reference/whatsapp/send-freeform","pageMetadata":{"title":"Send Freeform Message","api":"POST /user/whatsapp/send-freeform","description":"Send a free-text WhatsApp message within an active 24-hour session","href":"/api-reference/whatsapp/send-freeform"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Send a free-text WhatsApp message within an active 24-hour session\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Expandable,Heading,Note,ParamField,ResponseField,Warning}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`This endpoint sends a freeform (free-text) WhatsApp message to a recipient. Unlike template messages, freeform messages can contain any text but `,_jsx(_components.strong,{children:`require an active 24-hour messaging window`}),` — meaning the recipient must have sent a message to your WhatsApp sender within the last 24 hours.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Freeform messages can only be sent during an active 24-hour messaging window. If the session has expired, you must send a `,_jsx(_components.a,{href:`/api-reference/whatsapp/send-template`,children:`template message`}),` first to re-initiate the conversation. Use the `,_jsx(_components.a,{href:`/api-reference/whatsapp/session-status`,children:`Session Status`}),` endpoint to check if a session is active.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`This endpoint is rate-limited to `,_jsx(_components.strong,{children:`5 requests per second`}),` per user.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`request-body`,children:`Request Body`}),`\n`,_jsx(ParamField,{body:`sender_id`,type:`integer`,required:true,id:`param-sender-id`,children:_jsxs(_components.p,{children:[`The ID of the WhatsApp sender to send from (obtained from the `,_jsx(_components.a,{href:`/api-reference/whatsapp/get-senders`,children:`Get Senders`}),` endpoint)`]})}),`\n`,_jsx(ParamField,{body:`recipient_phone`,type:`string`,required:true,id:`param-recipient-phone`,children:_jsxs(_components.p,{children:[`The recipient’s phone number in international format (e.g., `,_jsx(_components.code,{children:`+1234567890`}),`)`]})}),`\n`,_jsx(ParamField,{body:`message`,type:`string`,id:`param-message`,children:_jsxs(_components.p,{children:[`The message content to send (max 4096 characters). Optional when `,_jsx(_components.code,{children:`media_url`}),` is provided — in that case it is used as the media caption. `,_jsxs(_components.strong,{children:[`Audio files are the exception: WhatsApp does not support captions on audio, so the text is ignored when `,_jsx(_components.code,{children:`media_url`}),` points to an audio file.`]}),` `,_jsxs(_components.strong,{children:[`Either `,_jsx(_components.code,{children:`message`}),` or `,_jsx(_components.code,{children:`media_url`}),` is required.`]})]})}),`\n`,_jsx(ParamField,{body:`media_url`,type:`string`,id:`param-media-url`,children:_jsxs(_components.p,{children:[`Optional public URL of a file to send — an image, audio file, video, or document. The file must be reachable at a public URL (WhatsApp fetches it at send time). When set, `,_jsx(_components.code,{children:`message`}),` is used as the caption for images, videos and documents. `,_jsxs(_components.strong,{children:[`Audio files cannot carry a caption — if you send an audio file, any `,_jsx(_components.code,{children:`message`}),` text is ignored.`]}),` `,_jsxs(_components.strong,{children:[`Either `,_jsx(_components.code,{children:`message`}),` or `,_jsx(_components.code,{children:`media_url`}),` is required.`]})]})}),`\n`,_jsx(ParamField,{body:`filename`,type:`string`,id:`param-filename`,children:_jsxs(_components.p,{children:[`Optional filename shown to the recipient, mainly useful for documents (e.g. `,_jsx(_components.code,{children:`invoice.pdf`}),`).`]})}),`\n`,_jsx(Heading,{level:`3`,id:`response-fields`,children:`Response Fields`}),`\n`,_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success`,children:_jsx(_components.p,{children:`Whether the message was sent successfully`})}),`\n`,_jsx(ResponseField,{name:`conversation_id`,type:`integer`,id:`param-conversation-id`,children:_jsx(_components.p,{children:`The ID of the conversation associated with this message`})}),`\n`,_jsx(ResponseField,{name:`message_id`,type:`integer`,id:`param-message-id`,children:_jsx(_components.p,{children:`The ID of the conversation message record`})}),`\n`,_jsx(ResponseField,{name:`whatsapp_message_id`,type:`integer`,id:`param-whatsapp-message-id`,children:_jsx(_components.p,{children:`The ID of the WhatsApp message record`})}),`\n`,_jsx(ResponseField,{name:`message_sid`,type:`string`,id:`param-message-sid`,children:_jsx(_components.p,{children:`The Twilio message SID for tracking delivery`})}),`\n`,_jsxs(ResponseField,{name:`session_status`,type:`object`,id:`param-session-status`,children:[_jsx(_components.p,{children:`Updated session status after sending the message`}),_jsxs(Expandable,{title:`Session status properties`,children:[_jsx(ResponseField,{name:`is_open`,type:`boolean`,id:`param-is-open`,children:_jsx(_components.p,{children:`Whether the 24-hour messaging window is currently open`})}),_jsx(ResponseField,{name:`can_send_freeform`,type:`boolean`,id:`param-can-send-freeform`,children:_jsx(_components.p,{children:`Whether freeform messages can be sent right now`})}),_jsx(ResponseField,{name:`requires_template`,type:`boolean`,id:`param-requires-template`,children:_jsx(_components.p,{children:`Whether a template message is required`})}),_jsx(ResponseField,{name:`message`,type:`string`,id:`param-message-1`,children:_jsx(_components.p,{children:`Human-readable description of the session state`})}),_jsx(ResponseField,{name:`minutes_remaining`,type:`integer`,id:`param-minutes-remaining`,children:_jsx(_components.p,{children:`Minutes remaining in the 24-hour window`})}),_jsx(ResponseField,{name:`expires_at`,type:`string`,id:`param-expires-at`,children:_jsx(_components.p,{children:`ISO 8601 timestamp when the session expires`})})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`error-responses`,children:`Error Responses`}),`\n`,_jsx(ResponseField,{name:`402 Insufficient Balance`,id:`param-402-insufficient-balance`,children:_jsxs(Expandable,{title:`Error Response`,children:[_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success-1`,children:_jsx(_components.code,{children:`false`})}),_jsx(ResponseField,{name:`error`,type:`string`,id:`param-error`,children:_jsx(_components.code,{children:`Insufficient balance. Please top up your account.`})}),_jsx(ResponseField,{name:`error_code`,type:`string`,id:`param-error-code`,children:_jsx(_components.code,{children:`INSUFFICIENT_BALANCE`})})]})}),`\n`,_jsx(ResponseField,{name:`403 Session Expired`,id:`param-403-session-expired`,children:_jsxs(Expandable,{title:`Error Response`,children:[_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success-2`,children:_jsx(_components.code,{children:`false`})}),_jsx(ResponseField,{name:`error`,type:`string`,id:`param-error-1`,children:`Message indicating the 24-hour messaging window has expired`}),_jsx(ResponseField,{name:`error_code`,type:`string`,id:`param-error-code-1`,children:_jsx(_components.code,{children:`SESSION_EXPIRED`})}),_jsx(ResponseField,{name:`session_status`,type:`object`,id:`param-session-status-1`,children:_jsxs(_components.p,{children:[`Current session status with `,_jsx(_components.code,{children:`is_open`}),`, `,_jsx(_components.code,{children:`can_send_freeform`}),`, `,_jsx(_components.code,{children:`requires_template`}),`, and `,_jsx(_components.code,{children:`message`}),` fields`]})})]})}),`\n`,_jsx(ResponseField,{name:`404 Not Found`,id:`param-404-not-found`,children:_jsxs(Expandable,{title:`Error Response`,children:[_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success-3`,children:_jsx(_components.code,{children:`false`})}),_jsx(ResponseField,{name:`error`,type:`string`,id:`param-error-2`,children:_jsx(_components.code,{children:`Sender not found or does not belong to you`})}),_jsx(ResponseField,{name:`error_code`,type:`string`,id:`param-error-code-2`,children:_jsx(_components.code,{children:`SENDER_NOT_FOUND`})})]})}),`\n`,_jsx(ResponseField,{name:`503 Sender Offline`,id:`param-503-sender-offline`,children:_jsxs(Expandable,{title:`Error Response`,children:[_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success-4`,children:_jsx(_components.code,{children:`false`})}),_jsx(ResponseField,{name:`error`,type:`string`,id:`param-error-3`,children:`Message indicating the sender is currently offline`}),_jsx(ResponseField,{name:`error_code`,type:`string`,id:`param-error-code-3`,children:_jsx(_components.code,{children:`SENDER_OFFLINE`})})]})}),`\n`,`\n`,`\n`,_jsx(Heading,{level:`3`,id:`24-hour-messaging-window`,children:`24-Hour Messaging Window`}),`\n`,_jsxs(_components.p,{children:[`WhatsApp enforces a `,_jsx(_components.strong,{children:`24-hour messaging window`}),` policy:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`When a customer sends a message to your WhatsApp Business number, a 24-hour window opens.`}),`\n`,_jsx(_components.li,{children:`During this window, you can send freeform messages without restrictions.`}),`\n`,_jsxs(_components.li,{children:[`After the window expires, you must use a `,_jsx(_components.a,{href:`/api-reference/whatsapp/send-template`,children:`template message`}),` to re-initiate the conversation.`]}),`\n`,_jsx(_components.li,{children:`Each new customer message resets the 24-hour timer.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Use the `,_jsx(_components.a,{href:`/api-reference/whatsapp/session-status`,children:`Session Status`}),` endpoint to check whether a session is active before attempting to send a freeform message.`]}),`\n`,_jsx(Heading,{level:`3`,id:`notes`,children:`Notes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Maximum message length is `,_jsx(_components.strong,{children:`4,096 characters`}),` (WhatsApp limit).`]}),`\n`,_jsxs(_components.li,{children:[`A file (image, audio, video, or document) can be attached with `,_jsx(_components.code,{children:`media_url`}),`. It must be hosted at a publicly reachable URL — WhatsApp fetches it at send time. When sending media, `,_jsx(_components.code,{children:`message`}),` is optional and is used as the caption. `,_jsxs(_components.strong,{children:[`Audio is the exception: WhatsApp does not support captions on audio files, so when `,_jsx(_components.code,{children:`media_url`}),` points to an audio file the `,_jsx(_components.code,{children:`message`}),` text is not sent.`]})]}),`\n`,_jsxs(_components.li,{children:[`The sender must be `,_jsx(_components.code,{children:`online`}),`. Offline senders return a `,_jsx(_components.code,{children:`503`}),` error.`]}),`\n`,_jsx(_components.li,{children:`Message costs are automatically deducted from your account balance.`}),`\n`,_jsx(_components.li,{children:`Rate limit: 5 requests per second per user.`}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Send Freeform Message","api":"POST /user/whatsapp/send-freeform","description":"Send a free-text WhatsApp message within an active 24-hour session","href":"/api-reference/whatsapp/send-freeform"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,RequestExample,ResponseExample,ResponseField,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`This endpoint sends a freeform (free-text) WhatsApp message to a recipient. Unlike template messages, freeform messages can contain any text but `,_jsx(_components.strong,{children:`require an active 24-hour messaging window`}),` — meaning the recipient must have sent a message to your WhatsApp sender within the last 24 hours.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Freeform messages can only be sent during an active 24-hour messaging window. If the session has expired, you must send a `,_jsx(_components.a,{href:`/api-reference/whatsapp/send-template`,children:`template message`}),` first to re-initiate the conversation. Use the `,_jsx(_components.a,{href:`/api-reference/whatsapp/session-status`,children:`Session Status`}),` endpoint to check if a session is active.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`This endpoint is rate-limited to `,_jsx(_components.strong,{children:`5 requests per second`}),` per user.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`request-body`,children:`Request Body`}),`\n`,_jsx(ParamField,{body:`sender_id`,type:`integer`,required:true,id:`param-sender-id`,children:_jsxs(_components.p,{children:[`The ID of the WhatsApp sender to send from (obtained from the `,_jsx(_components.a,{href:`/api-reference/whatsapp/get-senders`,children:`Get Senders`}),` endpoint)`]})}),`\n`,_jsx(ParamField,{body:`recipient_phone`,type:`string`,required:true,id:`param-recipient-phone`,children:_jsxs(_components.p,{children:[`The recipient’s phone number in international format (e.g., `,_jsx(_components.code,{children:`+1234567890`}),`)`]})}),`\n`,_jsx(ParamField,{body:`message`,type:`string`,id:`param-message`,children:_jsxs(_components.p,{children:[`The message content to send (max 4096 characters). Optional when `,_jsx(_components.code,{children:`media_url`}),` is provided — in that case it is used as the media caption. `,_jsxs(_components.strong,{children:[`Audio files are the exception: WhatsApp does not support captions on audio, so the text is ignored when `,_jsx(_components.code,{children:`media_url`}),` points to an audio file.`]}),` `,_jsxs(_components.strong,{children:[`Either `,_jsx(_components.code,{children:`message`}),` or `,_jsx(_components.code,{children:`media_url`}),` is required.`]})]})}),`\n`,_jsx(ParamField,{body:`media_url`,type:`string`,id:`param-media-url`,children:_jsxs(_components.p,{children:[`Optional public URL of a file to send — an image, audio file, video, or document. The file must be reachable at a public URL (WhatsApp fetches it at send time). When set, `,_jsx(_components.code,{children:`message`}),` is used as the caption for images, videos and documents. `,_jsxs(_components.strong,{children:[`Audio files cannot carry a caption — if you send an audio file, any `,_jsx(_components.code,{children:`message`}),` text is ignored.`]}),` `,_jsxs(_components.strong,{children:[`Either `,_jsx(_components.code,{children:`message`}),` or `,_jsx(_components.code,{children:`media_url`}),` is required.`]})]})}),`\n`,_jsx(ParamField,{body:`filename`,type:`string`,id:`param-filename`,children:_jsxs(_components.p,{children:[`Optional filename shown to the recipient, mainly useful for documents (e.g. `,_jsx(_components.code,{children:`invoice.pdf`}),`).`]})}),`\n`,_jsx(Heading,{level:`3`,id:`response-fields`,children:`Response Fields`}),`\n`,_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success`,children:_jsx(_components.p,{children:`Whether the message was sent successfully`})}),`\n`,_jsx(ResponseField,{name:`conversation_id`,type:`integer`,id:`param-conversation-id`,children:_jsx(_components.p,{children:`The ID of the conversation associated with this message`})}),`\n`,_jsx(ResponseField,{name:`message_id`,type:`integer`,id:`param-message-id`,children:_jsx(_components.p,{children:`The ID of the conversation message record`})}),`\n`,_jsx(ResponseField,{name:`whatsapp_message_id`,type:`integer`,id:`param-whatsapp-message-id`,children:_jsx(_components.p,{children:`The ID of the WhatsApp message record`})}),`\n`,_jsx(ResponseField,{name:`message_sid`,type:`string`,id:`param-message-sid`,children:_jsx(_components.p,{children:`The Twilio message SID for tracking delivery`})}),`\n`,_jsxs(ResponseField,{name:`session_status`,type:`object`,id:`param-session-status`,children:[_jsx(_components.p,{children:`Updated session status after sending the message`}),_jsxs(Expandable,{title:`Session status properties`,children:[_jsx(ResponseField,{name:`is_open`,type:`boolean`,id:`param-is-open`,children:_jsx(_components.p,{children:`Whether the 24-hour messaging window is currently open`})}),_jsx(ResponseField,{name:`can_send_freeform`,type:`boolean`,id:`param-can-send-freeform`,children:_jsx(_components.p,{children:`Whether freeform messages can be sent right now`})}),_jsx(ResponseField,{name:`requires_template`,type:`boolean`,id:`param-requires-template`,children:_jsx(_components.p,{children:`Whether a template message is required`})}),_jsx(ResponseField,{name:`message`,type:`string`,id:`param-message-1`,children:_jsx(_components.p,{children:`Human-readable description of the session state`})}),_jsx(ResponseField,{name:`minutes_remaining`,type:`integer`,id:`param-minutes-remaining`,children:_jsx(_components.p,{children:`Minutes remaining in the 24-hour window`})}),_jsx(ResponseField,{name:`expires_at`,type:`string`,id:`param-expires-at`,children:_jsx(_components.p,{children:`ISO 8601 timestamp when the session expires`})})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`error-responses`,children:`Error Responses`}),`\n`,_jsx(ResponseField,{name:`402 Insufficient Balance`,id:`param-402-insufficient-balance`,children:_jsxs(Expandable,{title:`Error Response`,children:[_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success-1`,children:_jsx(_components.code,{children:`false`})}),_jsx(ResponseField,{name:`error`,type:`string`,id:`param-error`,children:_jsx(_components.code,{children:`Insufficient balance. Please top up your account.`})}),_jsx(ResponseField,{name:`error_code`,type:`string`,id:`param-error-code`,children:_jsx(_components.code,{children:`INSUFFICIENT_BALANCE`})})]})}),`\n`,_jsx(ResponseField,{name:`403 Session Expired`,id:`param-403-session-expired`,children:_jsxs(Expandable,{title:`Error Response`,children:[_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success-2`,children:_jsx(_components.code,{children:`false`})}),_jsx(ResponseField,{name:`error`,type:`string`,id:`param-error-1`,children:`Message indicating the 24-hour messaging window has expired`}),_jsx(ResponseField,{name:`error_code`,type:`string`,id:`param-error-code-1`,children:_jsx(_components.code,{children:`SESSION_EXPIRED`})}),_jsx(ResponseField,{name:`session_status`,type:`object`,id:`param-session-status-1`,children:_jsxs(_components.p,{children:[`Current session status with `,_jsx(_components.code,{children:`is_open`}),`, `,_jsx(_components.code,{children:`can_send_freeform`}),`, `,_jsx(_components.code,{children:`requires_template`}),`, and `,_jsx(_components.code,{children:`message`}),` fields`]})})]})}),`\n`,_jsx(ResponseField,{name:`404 Not Found`,id:`param-404-not-found`,children:_jsxs(Expandable,{title:`Error Response`,children:[_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success-3`,children:_jsx(_components.code,{children:`false`})}),_jsx(ResponseField,{name:`error`,type:`string`,id:`param-error-2`,children:_jsx(_components.code,{children:`Sender not found or does not belong to you`})}),_jsx(ResponseField,{name:`error_code`,type:`string`,id:`param-error-code-2`,children:_jsx(_components.code,{children:`SENDER_NOT_FOUND`})})]})}),`\n`,_jsx(ResponseField,{name:`503 Sender Offline`,id:`param-503-sender-offline`,children:_jsxs(Expandable,{title:`Error Response`,children:[_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success-4`,children:_jsx(_components.code,{children:`false`})}),_jsx(ResponseField,{name:`error`,type:`string`,id:`param-error-3`,children:`Message indicating the sender is currently offline`}),_jsx(ResponseField,{name:`error_code`,type:`string`,id:`param-error-code-3`,children:_jsx(_components.code,{children:`SENDER_OFFLINE`})})]})}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://app.nicecall.ai/api/user/whatsapp/send-freeform\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"sender_id\": 12,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"recipient_phone\": \"+1234567890\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"message\": \"Thank you for your inquiry! Our team will review your request and get back to you within 2 hours.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`18`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://app.nicecall.ai/api/user/whatsapp/send-freeform'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Bearer YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sender_id:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 12`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` recipient_phone:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '+1234567890'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` message:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Thank you for your inquiry! Our team will review your request and get back to you within 2 hours.'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`16`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://app.nicecall.ai/api/user/whatsapp/send-freeform'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Bearer YOUR_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'application/json'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'sender_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'recipient_phone'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'+1234567890'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'message'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Thank you for your inquiry! Our team will review your request and get back to you within 2 hours.'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(response.json())`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL (with media)`,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://app.nicecall.ai/api/user/whatsapp/send-freeform\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"sender_id\": 12,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"recipient_phone\": \"+1234567890\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"message\": \"Here is the menu you asked for!\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"media_url\": \"https://example.com/files/menu.pdf\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"filename\": \"menu.pdf\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200 Success`,numberOfLines:`15`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"conversation_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1234`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`567`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"whatsapp_message_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`890`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message_sid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"session_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"is_open\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"can_send_freeform\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"requires_template\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Session open (23 hr 45 min remaining). Unlimited free-form messages allowed.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"minutes_remaining\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1425`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"expires_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-02-25T10:30:00+00:00\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`402 Insufficient Balance`,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Insufficient balance. Please top up your account.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"INSUFFICIENT_BALANCE\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`403 Session Expired`,numberOfLines:`12`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The 24-hour messaging window is closed. Customer must reply first, or use a template message.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SESSION_EXPIRED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"session_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"is_open\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"can_send_freeform\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"requires_template\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Session expired. Send a template or wait for customer to reply.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"expired_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-02-23T10:30:00+00:00\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`404 Sender Not Found`,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Sender not found or does not belong to you\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SENDER_NOT_FOUND\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`422 Invalid Phone`,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invalid phone number format. Use E.164 format (e.g., +14155551234).\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"INVALID_PHONE\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`503 Sender Offline`,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Sender is not online. Current status: Offline\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SENDER_OFFLINE\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`24-hour-messaging-window`,children:`24-Hour Messaging Window`}),`\n`,_jsxs(_components.p,{children:[`WhatsApp enforces a `,_jsx(_components.strong,{children:`24-hour messaging window`}),` policy:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`When a customer sends a message to your WhatsApp Business number, a 24-hour window opens.`}),`\n`,_jsx(_components.li,{children:`During this window, you can send freeform messages without restrictions.`}),`\n`,_jsxs(_components.li,{children:[`After the window expires, you must use a `,_jsx(_components.a,{href:`/api-reference/whatsapp/send-template`,children:`template message`}),` to re-initiate the conversation.`]}),`\n`,_jsx(_components.li,{children:`Each new customer message resets the 24-hour timer.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Use the `,_jsx(_components.a,{href:`/api-reference/whatsapp/session-status`,children:`Session Status`}),` endpoint to check whether a session is active before attempting to send a freeform message.`]}),`\n`,_jsx(Heading,{level:`3`,id:`notes`,children:`Notes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Maximum message length is `,_jsx(_components.strong,{children:`4,096 characters`}),` (WhatsApp limit).`]}),`\n`,_jsxs(_components.li,{children:[`A file (image, audio, video, or document) can be attached with `,_jsx(_components.code,{children:`media_url`}),`. It must be hosted at a publicly reachable URL — WhatsApp fetches it at send time. When sending media, `,_jsx(_components.code,{children:`message`}),` is optional and is used as the caption. `,_jsxs(_components.strong,{children:[`Audio is the exception: WhatsApp does not support captions on audio files, so when `,_jsx(_components.code,{children:`media_url`}),` points to an audio file the `,_jsx(_components.code,{children:`message`}),` text is not sent.`]})]}),`\n`,_jsxs(_components.li,{children:[`The sender must be `,_jsx(_components.code,{children:`online`}),`. Offline senders return a `,_jsx(_components.code,{children:`503`}),` error.`]}),`\n`,_jsx(_components.li,{children:`Message costs are automatically deducted from your account balance.`}),`\n`,_jsx(_components.li,{children:`Rate limit: 5 requests per second per user.`}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Send Freeform Message","api":"POST /user/whatsapp/send-freeform","description":"Send a free-text WhatsApp message within an active 24-hour session","href":"/api-reference/whatsapp/send-freeform"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Request Body","slug":"request-body","depth":3,"children":[]},{"title":"Response Fields","slug":"response-fields","depth":3,"children":[]},{"title":"Error Responses","slug":"error-responses","depth":3,"children":[]},{"title":"24-Hour Messaging Window","slug":"24-hour-messaging-window","depth":3,"children":[]},{"title":"Notes","slug":"notes","depth":3,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"8\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://app.nicecall.ai/api/user/whatsapp/send-freeform\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer YOUR_API_KEY\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"sender_id\": 12,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"recipient_phone\": \"+1234567890\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"message\": \"Thank you for your inquiry! Our team will review your request and get back to you within 2 hours.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"JavaScript","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"18\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> response\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> fetch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'https://app.nicecall.ai/api/user/whatsapp/send-freeform'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> method:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'POST'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> headers:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Authorization'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Bearer YOUR_API_KEY'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Content-Type'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'application/json'\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> body:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> JSON\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">stringify\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">({\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> sender_id:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\"> 12\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> recipient_phone:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '+1234567890'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> message:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Thank you for your inquiry! Our team will review your request and get back to you within 2 hours.'\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> })\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> data\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> response\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">json\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">();\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">console\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">log\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">data\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"16\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">response \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests.post(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'https://app.nicecall.ai/api/user/whatsapp/send-freeform'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> headers\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Authorization'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'Bearer YOUR_API_KEY'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Content-Type'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'application/json'\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> json\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'sender_id'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">12\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'recipient_phone'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'+1234567890'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'message'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'Thank you for your inquiry! Our team will review your request and get back to you within 2 hours.'\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">print\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(response.json())\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"cURL (with media)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"10\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://app.nicecall.ai/api/user/whatsapp/send-freeform\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer YOUR_API_KEY\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"sender_id\": 12,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"recipient_phone\": \"+1234567890\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"message\": \"Here is the menu you asked for!\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"media_url\": \"https://example.com/files/menu.pdf\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"filename\": \"menu.pdf\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200 Success","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"15\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"conversation_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1234\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">567\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"whatsapp_message_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">890\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message_sid\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"SMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"session_status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"is_open\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"can_send_freeform\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"requires_template\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Session open (23 hr 45 min remaining). Unlimited free-form messages allowed.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"minutes_remaining\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1425\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"expires_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-02-25T10:30:00+00:00\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"402 Insufficient Balance","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"5\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Insufficient balance. Please top up your account.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error_code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"INSUFFICIENT_BALANCE\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"403 Session Expired","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"12\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"The 24-hour messaging window is closed. Customer must reply first, or use a template message.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error_code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"SESSION_EXPIRED\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"session_status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"is_open\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"can_send_freeform\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"requires_template\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Session expired. Send a template or wait for customer to reply.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"expired_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-02-23T10:30:00+00:00\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"404 Sender Not Found","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"5\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Sender not found or does not belong to you\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error_code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"SENDER_NOT_FOUND\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"422 Invalid Phone","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"5\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Invalid phone number format. Use E.164 format (e.g., +14155551234).\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error_code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"INVALID_PHONE\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"503 Sender Offline","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"5\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Sender is not online. Current status: Offline\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error_code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"SENDER_OFFLINE\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Send Freeform Message","path":"/user/whatsapp/send-freeform","servers":[{"url":"https://app.nicecall.ai/api/"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"sender_id":[{"type":"integer","description":"The ID of the WhatsApp sender to send from (obtained from the Get Senders endpoint)","required":true}],"recipient_phone":[{"type":"string","description":"The recipient’s phone number in international format (e.g., `+1234567890` )","required":true}],"message":[{"type":"string","description":"The message content to send (max 4096 characters). Optional when `media_url` is provided — in that case it is used as the media caption. Audio files are the exception: WhatsApp does not support captions on audio, so the text is ignored when `media_url` points to an audio file. Either `message` or `media_url` is required."}],"media_url":[{"type":"string","description":"Optional public URL of a file to send — an image, audio file, video, or document. The file must be reachable at a public URL (WhatsApp fetches it at send time). When set, `message` is used as the caption for images, videos and documents. Audio files cannot carry a caption — if you send an audio file, any `message` text is ignored. Either `message` or `media_url` is required."}],"filename":[{"type":"string","description":"Optional filename shown to the recipient, mainly useful for documents (e.g. `invoice.pdf` )."}]}}],"examples":{"example":{"value":{"sender_id":123,"recipient_phone":"\u003cstring>","message":"\u003cstring>","media_url":"\u003cstring>","filename":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"success":[{"type":"boolean","description":"Whether the message was sent successfully"}],"conversation_id":[{"type":"integer","description":"The ID of the conversation associated with this message"}],"message_id":[{"type":"integer","description":"The ID of the conversation message record"}],"whatsapp_message_id":[{"type":"integer","description":"The ID of the WhatsApp message record"}],"message_sid":[{"type":"string","description":"The Twilio message SID for tracking delivery"}],"session_status":[{"type":"object","properties":{"is_open":[{"type":"boolean","description":"Whether the 24-hour messaging window is currently open"}],"can_send_freeform":[{"type":"boolean","description":"Whether freeform messages can be sent right now"}],"requires_template":[{"type":"boolean","description":"Whether a template message is required"}],"message":[{"type":"string","description":"Human-readable description of the session state"}],"minutes_remaining":[{"type":"integer","description":"Minutes remaining in the 24-hour window"}],"expires_at":[{"type":"string","description":"ISO 8601 timestamp when the session expires"}]},"description":"Updated session status after sending the message"}]}}],"examples":{"example":{"value":{"success":true,"conversation_id":123,"message_id":123,"whatsapp_message_id":123,"message_sid":"\u003cstring>","session_status":{"is_open":true,"can_send_freeform":true,"requires_template":true,"message":"\u003cstring>","minutes_remaining":123,"expires_at":"\u003cstring>"}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"nicecall","siteName":"Nicecall","title":"Send Freeform Message - Nicecall","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-17T20:46:21.153Z","originalFileLocation":"api-reference/whatsapp/send-freeform.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Send a free-text WhatsApp message within an active 24-hour session\">\u003cmeta data-mint-head name=\"application-name\" content=\"Nicecall\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/nicecall/IHGQv35ipSjPch5Z/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/nicecall/IHGQv35ipSjPch5Z/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/nicecall/IHGQv35ipSjPch5Z/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/nicecall/IHGQv35ipSjPch5Z/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/nicecall/IHGQv35ipSjPch5Z/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/nicecall/IHGQv35ipSjPch5Z/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/nicecall/IHGQv35ipSjPch5Z/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/nicecall/IHGQv35ipSjPch5Z/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/nicecall/IHGQv35ipSjPch5Z/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Send Freeform Message - Nicecall\">\u003cmeta data-mint-head property=\"og:description\" content=\"Send a free-text WhatsApp message within an active 24-hour session\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Nicecall\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.nicecall.ai/api-reference/whatsapp/send-freeform\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://nicecall.mintlify.site/_mintlify/api/og/v2?division=WhatsApp\u0026amp;title=Send+Freeform+Message\u0026amp;description=Send+a+free-text+WhatsApp+message+within+an+active+24-hour+session\u0026amp;theme=d271cb126dbc2ea417dc93d3\u0026amp;signature=3835b3648c6c5db8eafed4127cf4d18f1882c247d071539d8867df0556e79ce1\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Send Freeform Message - Nicecall\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Send a free-text WhatsApp message within an active 24-hour session\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://nicecall.mintlify.site/_mintlify/api/og/v2?division=WhatsApp\u0026amp;title=Send+Freeform+Message\u0026amp;description=Send+a+free-text+WhatsApp+message+within+an+active+24-hour+session\u0026amp;theme=d271cb126dbc2ea417dc93d3\u0026amp;signature=3835b3648c6c5db8eafed4127cf4d18f1882c247d071539d8867df0556e79ce1\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/nicecall/IHGQv35ipSjPch5Z/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Nicecall\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#8c52ff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.nicecall.ai/api-reference/whatsapp/send-freeform\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/whatsapp/send-freeform.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.nicecall.ai/#organization\",\"name\":\"Nicecall\",\"url\":\"https://docs.nicecall.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/nicecall/HTh8wkgVLtCuGyKd/resources/logo/light.png?fit=max\u0026auto=format\u0026n=HTh8wkgVLtCuGyKd\u0026q=85\u0026s=fdc82ec4d433cd78b059eef7224a785e\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.nicecall.ai#website\",\"name\":\"Nicecall\",\"url\":\"https://docs.nicecall.ai\",\"publisher\":{\"@id\":\"https://docs.nicecall.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.nicecall.ai/api-reference/whatsapp/send-freeform#webpage\",\"url\":\"https://docs.nicecall.ai/api-reference/whatsapp/send-freeform\",\"name\":\"Send Freeform Message\",\"description\":\"Send a free-text WhatsApp message within an active 24-hour session\",\"dateModified\":\"2026-08-17T20:46:21.153Z\",\"isPartOf\":{\"@id\":\"https://docs.nicecall.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.nicecall.ai/api-reference/whatsapp/send-freeform#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.nicecall.ai/api-reference/whatsapp/send-freeform#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"WhatsApp\",\"item\":\"https://docs.nicecall.ai/api-reference/whatsapp/get-senders\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Send Freeform Message\",\"item\":\"https://docs.nicecall.ai/api-reference/whatsapp/send-freeform\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.nicecall.ai/api-reference/whatsapp/send-freeform#apireference\",\"headline\":\"Send Freeform Message\",\"name\":\"Send Freeform Message\",\"description\":\"Send a free-text WhatsApp message within an active 24-hour session\",\"url\":\"https://docs.nicecall.ai/api-reference/whatsapp/send-freeform\",\"mainEntityOfPage\":{\"@id\":\"https://docs.nicecall.ai/api-reference/whatsapp/send-freeform#webpage\"},\"dateModified\":\"2026-08-17T20:46:21.153Z\",\"publisher\":{\"@id\":\"https://docs.nicecall.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.nicecall.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Nicecall\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Nicecall\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/whatsapp/send-freeform.md","siteName":"Nicecall","nav":{"global":null,"anchors":[{"anchor":"Platform Guide","icon":"book","pages":[{"title":"Platform Guide","href":"/introduction/what-is-platform"}]},{"anchor":"No-Code Automation","icon":"wand-magic-sparkles","color":{"light":"#6c63ff","dark":"#6c63ff"},"pages":[{"title":"No-Code Automation","href":"/automation-platform/introduction"}]},{"anchor":"API Reference","icon":"code","color":{"light":"#1c51fc","dark":"#1c51fc"},"groups":[{"group":"API Reference","pages":[{"title":"Introduction","icon":"book-open","href":"/api-reference/introduction"},{"title":"Authentication","icon":"key","href":"/api-reference/authentication"},{"title":"Get current user","api":"GET /user/me","href":"/api-reference/user/me"}]},{"group":"Assistants","pages":[{"title":"List assistants","api":"GET /user/assistants/get","href":"/api-reference/assistants/get-assistants"},{"title":"Get outbound assistants","api":"GET /user/assistants/outbound","href":"/api-reference/assistants/get-outbound-assistants"},{"title":"Create assistant","api":"POST /user/assistant","href":"/api-reference/assistants/create-assistant"},{"title":"Update assistant","api":"PUT /user/assistant/{id}","href":"/api-reference/assistants/update-assistant"},{"title":"Delete assistant","api":"DELETE /user/assistant/{id}","href":"/api-reference/assistants/delete-assistant"},{"title":"Enable assistant inbound webhook","api":"POST /user/assistants/enable-inbound-webhook","href":"/api-reference/assistants/enable-inbound-webhook"},{"title":"Disable assistant inbound webhook","api":"POST /user/assistants/disable-inbound-webhook","href":"/api-reference/assistants/disable-inbound-webhook"},{"title":"Enable conversation ended webhook","api":"POST /user/assistants/enable-conversation-ended-webhook","href":"/api-reference/assistants/enable-conversation-ended-webhook"},{"title":"Disable conversation ended webhook","api":"POST /user/assistants/disable-conversation-ended-webhook","href":"/api-reference/assistants/disable-conversation-ended-webhook"},{"title":"Disable assistant webhook","api":"POST /user/assistants/disable-webhook","href":"/api-reference/assistants/disable-webhook"},{"title":"Get available languages","api":"GET /user/assistants/languages","href":"/api-reference/assistants/get-languages"},{"title":"Get available voices","api":"GET /user/assistants/voices","href":"/api-reference/assistants/get-voices"},{"title":"Get available models","api":"GET /user/assistants/models","href":"/api-reference/assistants/get-models"},{"title":"Get synthesizer providers","api":"GET /user/assistants/synthesizer-providers","href":"/api-reference/assistants/get-synthesizer-providers"},{"title":"Get transcriber providers","api":"GET /user/assistants/transcriber-providers","href":"/api-reference/assistants/get-transcriber-providers"},{"title":"Get available phone numbers","api":"GET /user/assistants/phone-numbers","href":"/api-reference/assistants/get-phone-numbers"}]},{"group":"Folders","pages":[{"title":"List folders","api":"GET /user/folders","href":"/api-reference/folders/get-folders"},{"title":"Create folder","api":"POST /user/folder","href":"/api-reference/folders/create-folder"},{"title":"Update folder","api":"PUT /user/folder/{id}","href":"/api-reference/folders/update-folder"},{"title":"Delete folder","api":"DELETE /user/folder/{id}","href":"/api-reference/folders/delete-folder"}]},{"group":"Labels","pages":[{"title":"List labels","api":"GET /user/labels","href":"/api-reference/labels/get-labels"},{"title":"Create label","api":"POST /user/label","href":"/api-reference/labels/create-label"},{"title":"Update label","api":"PUT /user/label/{id}","href":"/api-reference/labels/update-label"},{"title":"Delete label","api":"DELETE /user/label/{id}","href":"/api-reference/labels/delete-label"}]},{"group":"Calls","pages":[{"title":"List calls","api":"GET /user/calls","href":"/api-reference/calls/get-calls"},{"title":"Get call","api":"GET /user/calls/{id}","href":"/api-reference/calls/get-call"},{"title":"Make a phone call","api":"POST /user/make_call","href":"/api-reference/calls/make-phone-call"},{"title":"Delete call","api":"DELETE /user/calls/{call}","href":"/api-reference/calls/delete-call"},{"title":"Resend call webhooks","api":"POST /user/calls/resend-webhooks","href":"/api-reference/calls/resend-call-webhooks"}]},{"group":"Conversations","pages":[{"title":"List Conversations","api":"GET /user/conversations","href":"/api-reference/conversations/list-conversations"},{"title":"Create Conversation","api":"POST /conversations","href":"/api-reference/conversations/create-conversation"},{"title":"Get Conversation","api":"GET /conversations/{uuid}","href":"/api-reference/conversations/get-conversation"},{"title":"Send Message","api":"POST /conversations/{uuid}/messages","href":"/api-reference/conversations/send-message"},{"title":"Disable AI","api":"POST /user/conversations/{uuid}/disable-ai","href":"/api-reference/conversations/disable-ai"},{"title":"Enable AI","api":"POST /user/conversations/{uuid}/enable-ai","href":"/api-reference/conversations/enable-ai"},{"title":"Resend conversation webhooks","api":"POST /user/conversations/resend-webhooks","href":"/api-reference/conversations/resend-conversation-webhooks"}]},{"group":"AI","pages":[{"title":"Generate AI Reply","api":"POST /user/ai/generate-reply","href":"/api-reference/ai/generate-reply"}]},{"group":"Realtime","pages":[{"title":"Create realtime session","api":"POST /user/realtime/session","href":"/api-reference/realtime/create-session"}]},{"group":"Mid Call Tools","pages":[{"title":"List mid call tools","api":"GET /user/tools","href":"/api-reference/mid-call-tools/get-tools"},{"title":"Get mid call tool","api":"GET /user/tools/{id}","href":"/api-reference/mid-call-tools/get-tool"},{"title":"Create mid call tool","api":"POST /user/tools","href":"/api-reference/mid-call-tools/create-tool"},{"title":"Update mid call tool","api":"PUT /user/tools/{id}","href":"/api-reference/mid-call-tools/update-tool"},{"title":"Delete mid call tool","api":"DELETE /user/tools/{id}","href":"/api-reference/mid-call-tools/delete-tool"}]},{"group":"Leads","pages":[{"title":"List leads","api":"GET /user/leads","href":"/api-reference/leads/get-lead"},{"title":"Create lead","api":"POST /user/lead","href":"/api-reference/leads/create"},{"title":"Update Lead","api":"PUT /user/leads/{id}","href":"/api-reference/leads/update-lead"},{"title":"Delete lead","api":"DELETE /user/leads/{id}","href":"/api-reference/leads/delete"}]},{"group":"Campaigns","pages":[{"title":"List campaigns","api":"GET /user/campaigns","href":"/api-reference/campaigns/get-campaigns"},{"title":"Get campaign","api":"GET /user/campaign/{id}","href":"/api-reference/campaigns/get-campaign"},{"title":"Create campaign","api":"POST /user/campaign","href":"/api-reference/campaigns/create-campaign"},{"title":"Update campaign status","api":"POST /user/campaigns/update-status","href":"/api-reference/campaigns/update-status"},{"title":"Delete campaign","api":"DELETE /user/campaign/{id}","href":"/api-reference/campaigns/delete-campaign"},{"title":"Update campaign","api":"PATCH /user/campaign/{id}","href":"/api-reference/campaigns/update-campaign"}]},{"group":"Automations","pages":[{"title":"List automations","api":"GET /user/automate/flows","href":"/api-reference/automations/list-automations"},{"title":"Get automation","api":"GET /user/automate/flows/{id}","href":"/api-reference/automations/get-automation"},{"title":"Create automation","api":"POST /user/automate/flows","href":"/api-reference/automations/create-automation"},{"title":"Update automation","api":"PUT /user/automate/flows/{id}","href":"/api-reference/automations/update-automation"},{"title":"Restore previous version","api":"POST /user/automate/flows/{id}/restore","href":"/api-reference/automations/restore-automation"},{"title":"Delete automation","api":"DELETE /user/automate/flows/{id}","href":"/api-reference/automations/delete-automation"},{"title":"List automation runs","api":"GET /user/automate/flows/{id}/runs","href":"/api-reference/automations/list-automation-runs"},{"title":"Retry automation run","api":"POST /user/automate/flows/{id}/runs/{run_id}/retry","href":"/api-reference/automations/retry-automation-run"},{"title":"List automation templates","api":"GET /user/automate/templates","href":"/api-reference/automations/list-automation-templates"},{"title":"Apply automation template","api":"POST /user/automate/templates/{key}","href":"/api-reference/automations/apply-automation-template"}]},{"group":"Phone Numbers","pages":[{"title":"Get all phone numbers","api":"GET /user/phone-numbers/all","href":"/api-reference/phone-numbers/get-phone-numbers"},{"title":"Search available phone numbers","api":"GET /user/phone-numbers/search","href":"/api-reference/phone-numbers/search-phone-numbers"},{"title":"Purchase phone number","api":"POST /user/phone-numbers/purchase","href":"/api-reference/phone-numbers/purchase-phone-number"},{"title":"Release phone number","api":"DELETE /user/phone-numbers/{id}","href":"/api-reference/phone-numbers/release-phone-number"},{"title":"Update phone number","api":"PUT /user/phone-numbers/{id}","href":"/api-reference/phone-numbers/update-phone-number"}]},{"group":"SIP Trunks","pages":[{"title":"List SIP trunks","api":"GET /user/phone-numbers/sip-trunks","href":"/api-reference/sip-trunks/list-sip-trunks"},{"title":"Get SIP trunk","api":"GET /user/phone-numbers/sip-trunks/{id}","href":"/api-reference/sip-trunks/get-sip-trunk"},{"title":"Create SIP trunk","api":"POST /user/phone-numbers/sip-trunks","href":"/api-reference/sip-trunks/create-sip-trunk"},{"title":"Update SIP trunk","api":"PUT /user/phone-numbers/sip-trunks/{id}","href":"/api-reference/sip-trunks/update-sip-trunk"},{"title":"Delete SIP trunk","api":"DELETE /user/phone-numbers/{id}","href":"/api-reference/sip-trunks/delete-sip-trunk"}]},{"group":"Knowledgebases","pages":[{"title":"Get knowledgebases","api":"GET /user/knowledgebases","href":"/api-reference/knowledgebases/get-knowledgebases"},{"title":"Get knowledgebase","api":"GET /user/knowledgebases/{id}","href":"/api-reference/knowledgebases/get-knowledgebase"},{"title":"Create knowledgebase","api":"POST /user/knowledgebases","href":"/api-reference/knowledgebases/create-knowledgebase"},{"title":"Update knowledgebase","api":"PUT /user/knowledgebases/{id}","href":"/api-reference/knowledgebases/update-knowledgebase"},{"title":"Delete knowledgebase","api":"DELETE /user/knowledgebases/{id}","href":"/api-reference/knowledgebases/delete-knowledgebase"},{"title":"Get documents","api":"GET /user/knowledgebases/{knowledgebaseId}/documents","href":"/api-reference/knowledgebases/get-documents"},{"title":"Get document","api":"GET /user/knowledgebases/{knowledgebaseId}/documents/{documentId}","href":"/api-reference/knowledgebases/get-document"},{"title":"Create document","api":"POST /user/knowledgebases/{knowledgebaseId}/documents","href":"/api-reference/knowledgebases/create-document"},{"title":"Update document","api":"PUT /user/knowledgebases/{knowledgebaseId}/documents/{documentId}","href":"/api-reference/knowledgebases/update-document"},{"title":"Delete document","api":"DELETE /user/knowledgebases/{knowledgebaseId}/documents/{documentId}","href":"/api-reference/knowledgebases/delete-document"}]},{"group":"SMS","pages":[{"title":"Send SMS","api":"POST /user/sms","href":"/api-reference/sms/send-sms"}]},{"group":"WhatsApp","pages":[{"title":"Get WhatsApp Senders","api":"GET /user/whatsapp/senders","href":"/api-reference/whatsapp/get-senders"},{"title":"Get Templates","api":"GET /user/whatsapp/senders/{senderId}/templates","href":"/api-reference/whatsapp/get-templates"},{"title":"Send Template Message","api":"POST /user/whatsapp/send","description":"Send a WhatsApp message using an approved template","href":"/api-reference/whatsapp/send-template"},{"title":"Send Freeform Message","api":"POST /user/whatsapp/send-freeform","href":"/api-reference/whatsapp/send-freeform"},{"title":"Get Session Status","api":"GET /user/whatsapp/session-status","description":"Check the 24-hour messaging window status for a WhatsApp conversation","href":"/api-reference/whatsapp/session-status"},{"title":"Get call permission","api":"GET /user/whatsapp/voice/permission","href":"/api-reference/whatsapp/get-call-permission"},{"title":"Request call permission","api":"POST /user/whatsapp/voice/request","href":"/api-reference/whatsapp/request-call-permission"},{"title":"Place a WhatsApp call","api":"POST /user/whatsapp/voice/call","href":"/api-reference/whatsapp/place-whatsapp-call"}]},{"group":"Webhooks","pages":[{"title":"Post-Call Webhook","icon":"webhook","href":"/api-reference/webhooks/post-call-webhook"},{"title":"Conversation Ended Webhook","icon":"webhook","href":"/api-reference/webhooks/conversation-ended-webhook"},{"title":"Read Receipts Webhook","icon":"webhook","href":"/api-reference/webhooks/read-receipts-webhook"},{"title":"WhatsApp Voice Webhook","icon":"webhook","href":"/api-reference/webhooks/whatsapp-voice-webhook"}]},{"group":"API Keys","pages":[{"title":"Create API key","api":"POST /user/api-keys","href":"/api-reference/authentication/create-api-key"},{"title":"List API keys","api":"GET /user/api-keys","href":"/api-reference/authentication/list-api-keys"},{"title":"Delete API key","api":"DELETE /user/api-keys/{id}","href":"/api-reference/authentication/delete-api-key"}]}]},{"anchor":"Platform updates","icon":"scroll","color":{"light":"#ffbb00","dark":"#ffbb00"},"pages":[{"title":"Platform updates","href":"/releases"}]}]},"basePath":"","title":"Send Freeform Message - Nicecall","deploymentId":"dpl_FZMKUpaaKiVETbfqhoUe4sPFDTmY","buildId":"dpl_FZMKUpaaKiVETbfqhoUe4sPFDTmY","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-B6WFFOBL.js","utils-BN5um1KA.js","cloneDeep-C3md22mN.js","_Uint8Array-DLlL8L26.js","isObject-FP1Yky1u.js","utils-BSmbkXJR.js","addUniqueKeysToSchema-2tqcVnUE.js","snippetPresets-CtWfvr2J.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-DkKHBy30.js","isEqual-O3q7y6pq.js","usePlaygroundInputsStore-Brc5H9UJ.js","shallow-C4L4xvbs.js","getApiPlaygroundDisplay-2bxyq_aI.js","CodeSnippet-BJu8ddd5.js","CodeSnippets-dazWmoqB.js","Page-CnLhKuUV.js","getPastedJson-Chy3Qa1S.js","icon-CyO7h3jh.js","MethodPill-Dle0_91v.js","DuplicateIcon-CVvWAf4a.js","createIcon-Di07A27B.js","DynamicMarkdown-C4w9kavL.js","SectionHeading-XiBebVYC.js","axios-vUo_bRtp.js"]}