---
title: "Create website conversion action"
method: POST
path: "/v1/messaging/ads/conversions/actions"
tags: ["Conversions"]
---

# Create website conversion action

`POST /v1/messaging/ads/conversions/actions`

## Request

- Base URL: `https://apihub.co.il`
- URL: `https://apihub.co.il/v1/messaging/ads/conversions/actions`
- Auth: HTTP bearer

Creates a Google Ads website conversion action and returns the tag snippets to install on your site.

Creates a `WEBPAGE` conversion action (category `DEFAULT`) and returns it with
its tag snippets, read back after creation since Google never returns them on
the create response itself. Invalidates the cached list `GET` on this resource
would otherwise keep serving. Google-only; other platforms return `501`.
Requires the Ads add-on.


**Billing:** Request; paid actions are priced in credits (see GET /v1/messaging/prices) · **Rate limit:** 60/min

## Headers

- `Idempotency-Key` string
- `X-Tag` string

## Request body

- object
  - `name` string, required
  - `type` 'WEBPAGE', required: Only WEBPAGE is supported for creation today.
  - `category` 'DEFAULT' | 'PAGE_VIEW' | 'PURCHASE' | 'SIGNUP' | 'DOWNLOAD' | 'ADD_TO_CART' | 'BEGIN_CHECKOUT' | 'SUBSCRIBE_PAID' | 'PHONE_CALL_LEAD' | 'IMPORTED_LEAD' | 'SUBMIT_LEAD_FORM' | 'BOOK_APPOINTMENT' | 'REQUEST_QUOTE' | 'GET_DIRECTIONS' | 'OUTBOUND_CLICK' | 'CONTACT' | 'ENGAGEMENT' | 'STORE_VISIT' | 'STORE_SALE' | 'QUALIFIED_LEAD' | 'CONVERTED_LEAD': conversion_action.category. Defaults to DEFAULT on create.
  - `accountId` string, required: SocialAccount ID. Must be a `googleads` account.
  - `customerId` string: Alias of adAccountId, kept for existing callers
  - `adAccountId` string: Platform ad account ID (Google customer ID, digits only). Resolved automatically when the connection has exactly one accessible customer.
  - `countingType` 'ONE_PER_CLICK' | 'MANY_PER_CLICK': ONE_PER_CLICK counts one conversion per ad click (leads); MANY_PER_CLICK counts every one (purchases).
  - `defaultValue` number: Default conversion value used when an event doesn't carry its own value.
  - `primaryForGoal` boolean: true = primary (counts toward bidding when its goal is biddable), false = secondary.
  - `defaultCurrency` string: ISO 4217 currency of defaultValue (value_settings.default_currency_code).
  - `alwaysUseDefaultValue` boolean: When true, always use defaultValue and ignore any value sent with the event. Defaults to true when defaultValue is set.
  - `viewThroughLookbackWindowDays` integer: Days after an ad view a view-through conversion still counts.
  - `clickThroughLookbackWindowDays` integer: Days after an ad click a conversion still counts.

## Response `200`

Completed

- object
  - `id` string: Execution id — stable across internal retries; use it with GET /v1/executions/{id}
  - `status` 'pending' | 'processing' | 'completed' | 'partial' | 'failed' | 'cancelled' | 'timeout'
  - `operation` string
  - `tag` string, nullable: Your X-Tag, if sent
  - `created_at` string, date-time
  - `completed_at` string, date-time, nullable
  - `output` object: Operation result (see each operation). While a Studio render is processing: `stage` (queued · transcribing · downloading · preparing · cleaning_voice · mixing_audio · rendering · finishing), `phase` (the engine's: download · prepare · voice · audio · encode · qa · upload, or null), `progress` (a percent, 0–100) and `progress_fraction` (0–1), `eta_seconds` (seconds left, never below 0) and `estimate_seconds`
    - `action` object: A Google Ads conversion action, e.g. a WEBPAGE conversion created via `createConversionAction`. Returned by `listConversionActions` and `createConversionAction`.
      - `id` string, required: Google Ads conversion action id.
      - `name` string, required
      - `type` string, required: Google's ConversionActionType, e.g. WEBPAGE, UPLOAD_CLICKS.
      - `origin` string: Google's ConversionOrigin, e.g. WEBSITE, APP. Together with category it names the goal the action belongs to (see GET /v1/ads/conversions/goals).
      - `status` string, required: Google's ConversionActionStatus, e.g. ENABLED, REMOVED, HIDDEN.
      - `category` string, required: Google's ConversionActionCategory, e.g. DEFAULT, PURCHASE, LEAD.
      - `tagSnippets` object[], required: The code a customer pastes onto their site. Present for types Google generates a snippet for (e.g. WEBPAGE); empty otherwise.
        - `type` string, required: Google's TrackingCodeType, e.g. WEBPAGE.
        - `pageFormat` string: Google's TrackingCodePageFormat, e.g. HTML, AMP.
        - `eventSnippet` string: The per-conversion-page snippet that fires the event.
        - `globalSiteTag` string: The gtag.js snippet to install once per site.
      - `countingType` string: Google's ConversionActionCountingType: ONE_PER_CLICK or MANY_PER_CLICK.
      - `defaultValue` number: Value recorded when the conversion carries none.
      - `primaryForGoal` boolean: true = primary (counts toward bidding when its goal is biddable), false = secondary. Change it with PATCH /v1/ads/conversions/actions/{actionId}.
      - `defaultCurrency` string: ISO 4217 currency of defaultValue.
      - `alwaysUseDefaultValue` boolean: true = defaultValue is used even when the conversion sends its own value.
      - `viewThroughLookbackWindowDays` integer: Days after an ad view a conversion is still credited (1 to 30).
      - `clickThroughLookbackWindowDays` integer: Days after an ad click a conversion is still credited (1 to 90).
  - `error` string, nullable
  - `usage` object
    - `credits_charged` number, nullable
    - `credits_reserved` number
    - `estimated_credits` number
    - `cost_source` 'provider_reported' | 'calculated' | 'estimated' | 'null', nullable
    - `provider_usage` object, nullable: Normalised consumption, e.g. { VIDEO_SECOND: 22.4 }
  - `balance` object
    - `available` number
    - `reserved` number

## Other responses

- `400`: Invalid input
- `402`: Insufficient credits / project budget
- `404`: Resource not found (or not yours)
- `429`: Rate limited
- `503`: Service temporarily paused

---

[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)
