> ## Documentation Index
> Fetch the complete documentation index at: https://docs.embedads.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Record Conversion

> Sends a conversion event to the Advertiser's Meta pixel (if one exists). This is an alternative to the methods available on the Advertiser's Settings page in the admin portal.

<Warning>We do not store conversion data. We immediately forward it to the Ad Networks, without storing it on our servers.</Warning>

<Warning>Do not send data regulated under HIPAA, nor data from minors, non-US persons, or those who have not consented to data sharing.</Warning>

### Path Parameters

<ParamField path="advertiserID" type="string" required={true} placeholder="123">
  The ID of the advertiser.
</ParamField>

### Body Parameters

<ParamField body="event_name" type="string" required>
  The name of the event that triggered the conversion.  Should be one of the following:

  * `Purchase`
  * `Lead`
  * `ViewContent`
  * `CompleteRegistration`
  * `AddToCart`
  * `PhoneCall`
</ParamField>

<ParamField body="value" type="number">
  Value of the conversion. Required if event\_name is Purchase
</ParamField>

<ParamField body="currency" type="string" default="USD">
  Currency of the conversion.  Must be specified as `"USD"`. Only include this if you include value.
</ParamField>

<ParamField body="country" type="string" default="us">
  A two-letter lowercase country code.
</ParamField>

<ParamField body="ip_address" type="string">
  The IP address of the customer.
</ParamField>

<ParamField body="user_agent" type="string">
  The user agent of the customer.
</ParamField>

<ParamField body="email" type="string">
  The email address of the customer.
</ParamField>

<ParamField body="phone" type="string">
  The phone number of the customer. Optionally including country code. Formatting is flexible.
</ParamField>

<ParamField body="first_name" type="string">
  The first name of the customer.
</ParamField>

<ParamField body="last_name" type="string">
  The last name of the customer.
</ParamField>

<ParamField body="zip_code" type="string">
  The zip code of the customer.
</ParamField>

<ParamField body="event_id" type="string">
  Used to deduplicate events sent within 48 hours of one another. If specified, ensure that it is unique to the event, otherwise conversions may be dropped.
</ParamField>

### Response

<ResponseField name="events_received" type="number">
  The number of events received.
</ResponseField>

<ResponseField name="success" type="boolean">
  Whether the conversion was successfully recorded.
</ResponseField>

<ResponseExample>
  ```json 202 theme={null}
  {
      "events_received": 1,
      "success": true
  }
  ```

  ```json 400 theme={null}
  {
      "error": "Conversion not tracked. It is likely that invalid fields were provided."
  }
  ```

  ```json 500 theme={null}
  {
      "error": "Internal server error."
  }
  ```
</ResponseExample>
