---
title: "Create or reuse a custom conversion"
method: POST
path: "/v1/accounts/{accountId}/custom-conversions"
tags: ["Ad Accounts"]
---

# Create or reuse a custom conversion

`POST /v1/accounts/{accountId}/custom-conversions`

Provision the Meta custom conversion an ads flow optimises toward, and hand back the
`customConversionId` for `promotedObject.customConversionId` on POST /v1/ads/create.
Removes the manual "create it in Ads Manager first" step.

**Reuse is ours, not Meta's.** Meta's create is not idempotent, so a retried request
would otherwise mint a duplicate carrying none of the original's optimisation history.
A non-archived conversion with the same `name` on the same `pixelId` is returned
instead of created, with `reused: true` and a 200 rather than a 201.

`rule` is forwarded verbatim in Meta's own grammar (e.g.
`{"url": {"i_contains": "thank-you"}}`); Meta validates it and rejects a malformed one
with "A conversion rule is required at creation time".

## Path parameters

- `accountId` string, required

## Request body

- object
  - `adAccountId` string, required — Meta ad account id (act_<n>).
  - `name` string, required — Also the reuse key, together with pixelId.
  - `pixelId` string, required — Meta pixel id (event_source_id). From GET /v1/accounts/{accountId}/tracking-tags.
  - `customEventType` string, required — Meta custom_event_type, e.g. LEAD, PURCHASE, OTHER.
  - `rule` object, required — Meta conversion rule, forwarded verbatim.

## Response `200`

An existing custom conversion was reused

- CustomConversionResult
  - `adAccountId` string
  - `customConversionId` string — Drops straight into promotedObject.customConversionId on POST /v1/ads/create.
  - `reused` boolean — True when an existing conversion matched name + pixelId; the response is then a 200.
  - `customConversion` CustomConversion
    - `id` string
    - `name` string, nullable
    - `rule` object, nullable — Meta's rule, parsed back from the string Meta stores.
    - `customEventType` string, nullable
    - `pixelId` string, nullable — Meta's event_source_id — the pixel the rule reads from.
    - `isArchived` boolean

## Other responses

- `201` — Custom conversion created
- `400` — Invalid input, or Meta rejected the conversion (bad rule, per-account cap reached)
- `401` — Unauthorized
- `403` — Ads access required, or the token lacks the ads permissions.

---

[API](https://skmtc.net/zernio/apis/zernio-api.md) · [All operations](https://skmtc.net/zernio/apis/zernio-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zernio/zernio-api/revisions/b8c9216f378a/schema)
