---
title: "Create conversation — estimate"
method: POST
path: "/v1/messaging/inbox/conversations/estimate"
tags: ["Messages"]
---

# Create conversation — estimate

`POST /v1/messaging/inbox/conversations/estimate`

## Request

- Base URL: `https://apihub.co.il`
- URL: `https://apihub.co.il/v1/messaging/inbox/conversations/estimate`
- Auth: HTTP bearer

Price the request without executing it. Same body as `POST /v1/messaging/inbox/conversations`.

## Request body

- object
  - `message` string: Text content of the message. At least one of message, attachment, or (for WhatsApp) templateName is required. Required when category is set (a Direct Send utility message is a text message).
  - `category` 'utility': WhatsApp only (Meta Direct Send). Combined with message and without templateName, starts the conversation with a business-initiated UTILITY message and no pre-approved template; Meta matches or auto-creates a template asynchronously. The WhatsApp Business Account must be eligible for Direct Send, otherwise the send fails with an error telling you to use an approved message template instead. Cannot be combined with templateName (templates are already categorized at creation). Utility messages only; marketing content is not allowed under this category. Accepted on the JSON body only, not on multipart requests.
  - `accountId` string, required: The account ID to send from
  - `headerMedia` object: WhatsApp only. Overrides a media-header template's header asset for THIS send, so a template with an image/video/document header can carry a different asset per message (e.g. each recipient their own invoice PDF). Without it, the template's approved sample asset is sent. Provide exactly one of link or id.
    - `id` string: A Meta media id (from the media upload endpoint), as an alternative to link.
    - `link` string: Public URL of the asset to send. Must be reachable without auth.
    - `type` 'image' | 'video' | 'document', required: Must match the template header's media type.
    - `filename` string: Document display name shown to the recipient (e.g. "Factura 0001-123.pdf"). document type only; ignored for image/video.
  - `linkPreview` boolean: WhatsApp only. Set false to send the Direct Send (category: 'utility') text message without a link-preview thumbnail for the first URL in the text. Defaults to true, which is how every WhatsApp text has been sent to date. Does not apply to template sends. Accepted on the JSON body only, not on multipart requests.
  - `skipDmCheck` boolean: X only. Skip the receives_your_dm eligibility check before sending. Use if you have already verified the recipient accepts DMs.
  - `templateName` string: WhatsApp only. Name of the approved template to start the conversation with. Required for WhatsApp unless category is used instead (Direct Send). Cannot be combined with category.
  - `participantId` string: Recipient identifier. For X this is the numeric user ID; for WhatsApp and SMS, the recipient phone number in international format (digits, country code included); for Slack, the workspace member id (e.g. U01ABCDEF); for iMessage, a phone number in international format with the leading + or an iMessage email. Provide either this or participantUsername.
  - `templateCards` object[]: WhatsApp only. Per-card overrides for a CAROUSEL template, each addressed by the card's card_index. Carousel card body variables restart at {{1}} per card, so they cannot be expressed in the flat templateParams slot order; use this instead. A cardIndex naming a card the approved template does not have, a duplicate cardIndex, or a params count that does not match the card body's token count is rejected with 400 (INVALID_TEMPLATE_CARD_PARAM).
    - `params` string[]: Values for this card's own body variables, in the card's own {{1}}, {{2}}, ... order (or named-slot order of appearance).
    - `buttons` object[]: Values for this card's own buttons, each addressed by the button's index within the card.
      - `index` integer, required: Zero-based position of the button within the card's buttons.
      - `value` string, required: The value to send (quick_reply payload, or the URL dynamic suffix).
      - `subType` 'quick_reply' | 'url', required: The button kind, which decides how the value is sent.
    - `cardIndex` integer, required: The card's card_index in the approved template.
    - `headerMedia` object: Overrides this card's header asset for THIS send. Without it, the card's approved sample asset is sent.
      - `id` string: A Meta media id (from the media upload endpoint), as an alternative to link.
      - `link` string: Public URL of the asset to send. Must be reachable without auth.
      - `type` 'image' | 'video' | 'document', required: Must match the card header's media type.
  - `headerLocation` object: WhatsApp only. Required to send a template whose approved header format is LOCATION: Meta only accepts the location's lat/long at send time, never at template creation, so there is nothing to fill in automatically. Cannot be combined with headerMedia (a template has exactly one header).
    - `name` string: Location name shown to the recipient (e.g. a business name).
    - `address` string: Location address shown to the recipient.
    - `latitude` number, required: Latitude in decimal degrees.
    - `longitude` number, required: Longitude in decimal degrees.
  - `templateParams` string[]: WhatsApp only. Template variable values as one flat array, in the order the variables appear across the whole template: text-header variables first, then body variables, then one value per dynamic URL button (in button order). Works with positional placeholders ({{1}}, {{2}}, ...) and with named placeholders ({{name}}, {{company}} - how Meta Business Manager creates templates), where values fill the named slots in order of appearance. Example - a body with {{1}}, {{2}} plus a URL button https://example.com/{{1}} takes three values: [body1, body2, buttonSuffix]. For positional templates the list must cover every slot: supplying fewer values than the template's header + body + dynamic URL-button count is rejected with a 400 (code INVALID_TEMPLATE_PARAMS) naming the expected split, rather than delivering a template whose button URL was filled from the wrong value. A dynamic URL button covered by templateButtonParams needs no value here unless another uncovered dynamic URL button follows it, since the override applies after slot numbering. Media headers (image, video, document) are filled automatically from the approved template and take no value here (use headerMedia to override the header asset per send). Buttons that are not dynamic-URL buttons (copy-code, flow) take no value here either; use templateButtonParams.
  - `templateLanguage` string: WhatsApp only. Template language code (e.g. en_US).
  - `participantUsername` string: Recipient handle/username, an X or Bluesky handle (with or without @) or a Reddit username (with or without u/). Resolved via lookup. Provide either this or participantId.
  - `templateButtonParams` object[]: WhatsApp only. Values for template buttons that carry one at send time, each addressed by the button's position in the approved template. This is the only way to send a copy-code button's payload (a Pix payment code, a coupon) or a flow token, because templateParams is a flat array of text variables and covers dynamic URL buttons only. Supplying a button here overrides whatever templateParams would have derived for that same index, so the send never carries one button twice; repeating an index within this array is rejected with 400. Each index must name a button of the matching kind on the approved template, which is also checked before the send and returns 400 (INVALID_TEMPLATE_BUTTON_PARAM) rather than a Meta rejection.
    - `index` integer, required: Zero-based position of the button in the approved template's buttons.
    - `value` string, required: The value to send (e.g. the Pix copy-and-paste code for a copy_code button).
    - `subType` 'url' | 'copy_code' | 'flow', required: The button kind, which decides how the value is sent: copy_code sends it as the coupon_code payload, flow as the flow token, url as the dynamic suffix appended to the button's base URL.

## Response `200`

Estimate

- Estimate
  - `operation` string
  - `estimated_credits` number
  - `credits_to_reserve` number
  - `estimated_usage` object
  - `note` string, nullable
  - `balance` object
    - `available` number
  - `sufficient` boolean

---

[API](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai.md) · [All operations](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai/llms.txt) · [OpenAPI document](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai/revisions/a8caa42835ce?raw)
