# Meta Conversions API

> Send server-side conversion events to Meta (Facebook and Instagram ads) with customer details hashed for you, check your datasets, manage custom conversions, and list your custom audiences.

App · 15 actions. Web page: https://docs.lodol.com/docs/integrations/meta-conversions-api

## Actions

### Create custom conversion

Create a custom conversion that counts visits to pages whose address contains some text, and/or a named event, on a dataset. Meta allows up to 100 per ad account.

**Inputs**

- Ad account (`ad_account_id`, text, required): The ad account. Pick one, or give its id (act_ followed by digits).
- Name (`name`, text, required): The conversion's name, shown in Ads Manager.
- Dataset (`dataset_id`, text, required): The dataset (pixel) to use. Pick one, or give its id from Events Manager.
- Page address contains (`url_contains`, text): Count page visits whose address contains this text, ignoring case, like /thank-you.
- Event name (`event_name`, text): Count only this event, like Purchase. Use with, or instead of, the page address.
- Conversion type (`custom_event_type`, text): The kind of conversion, so Meta can optimise for it. Meta guesses one if empty. One of: `PURCHASE`, `LEAD`, `COMPLETE_REGISTRATION` (Complete registration), `ADD_TO_CART` (Add to cart), `INITIATED_CHECKOUT` (Initiated checkout), `ADD_PAYMENT_INFO` (Add payment info), `ADD_TO_WISHLIST` (Add to wishlist), `CONTENT_VIEW` (Content view), `SEARCH`, `CONTACT`, and 9 more.
- Default value (`default_conversion_value`, number): The value to credit each conversion, in the ad account's currency. At least 0.
- Description (`description`, text): A short description.
- Custom rule (`rule`, object): A rule written in Meta's JSON rule format. Overrides the page address and event name.

**Outputs**

- `id` (text): The new custom conversion's id
- `is_custom_event_type_predicted` (true/false): True if Meta chose the conversion type

**Example output**

```json
{
  "id": "2345678901234567",
  "is_custom_event_type_predicted": false
}
```

### Get current user

Get the Meta user or system user the access token belongs to.

**Inputs**: None.

**Outputs**

- `user` (object): The token's user

**Example output**

```json
{
  "user": {
    "id": "61500000000000",
    "name": "Lodol system user"
  }
}
```

### Get custom conversion

Get one custom conversion with its rule, event type and default value.

**Inputs**

- Custom conversion ID (`custom_conversion_id`, text, required): The custom conversion's id, from 'List custom conversions' or 'Create custom conversion'.

**Outputs**

- `custom_conversion` (object): The custom conversion

**Example output**

```json
{
  "custom_conversion": {
    "creation_time": "2026-10-01T09:00:00Z",
    "custom_event_type": "PURCHASE",
    "default_conversion_value": 10,
    "description": "People who reach the thank-you page",
    "id": "2345678901234567",
    "is_archived": false,
    "is_unavailable": false,
    "last_fired_time": "",
    "name": "Thank-you page visit",
    "pixel": {
      "id": "1234567890123456"
    },
    "rule": "{\"url\":{\"i_contains\":\"thank-you\"}}"
  }
}
```

### Get dataset

Get one dataset with its automatic matching, cookie and data use settings.

**Inputs**

- Dataset (`dataset_id`, text, required): The dataset (pixel) to use. Pick one, or give its id from Events Manager.

**Outputs**

- `dataset` (object): The dataset

**Example output**

```json
{
  "dataset": {
    "automatic_matching_fields": [
      "em",
      "ph"
    ],
    "creation_time": "2025-01-10T09:00:00Z",
    "data_use_setting": "ADVERTISING_AND_ANALYTICS",
    "enable_automatic_matching": true,
    "first_party_cookie_status": "FIRST_PARTY_COOKIE_ENABLED",
    "id": "1234567890123456",
    "is_created_by_business": true,
    "is_unavailable": false,
    "last_fired_time": "2026-10-30T14:21:00Z",
    "name": "Lodol website dataset",
    "owner_business": {
      "id": "1111111111",
      "name": "Acme Inc"
    }
  }
}
```

### Get dataset event counts

Count the events a dataset received in the last 7 days, by event, device, browser, page or host.

**Inputs**

- Dataset (`dataset_id`, text, required): The dataset (pixel) to use. Pick one, or give its id from Events Manager.
- Break down by (`aggregation`, text): What to count by. Defaults to event. One of: `event` (Event (default)), `event_total_counts` (Event totals), `device_type` (Device type), `browser_type` (Browser), `host` (Website host), `url` (Page address), `pixel_fire` (Pixel fires).
- From (`start_time`, date and time): Start of the range. Meta keeps 7 days of data.
- Until (`end_time`, date and time): End of the range. Defaults to now.
- Source (`event_source`, text): Count only browser events or only server events. Leave empty for both. One of: `WEB_ONLY` (Browser events only), `SERVER_ONLY` (Server events only (Conversions API)).
- Page size (`limit`, number): How many to return, 1 to 100. The default is 25. From 1 to 100.
- Next page cursor (`after`, text): The 'next_cursor' from an earlier page, to get the page after it.

**Outputs**

- `count` (number): How many are in this page
- `next_cursor` (text): Pass as 'Next page cursor' for the next page; empty on the last page
- `stats` (list): The counts, one entry per hour or day

**Example output**

```json
{
  "count": 1,
  "next_cursor": "",
  "stats": [
    {
      "aggregation": "event",
      "data": [
        {
          "count": 12,
          "value": "Purchase"
        }
      ],
      "start_time": "2026-10-30T00:00:00Z"
    }
  ]
}
```

### List ad accounts

List the ad accounts the access token can reach, with currency and status.

**Inputs**

- Page size (`limit`, number): How many to return, 1 to 100. The default is 25. From 1 to 100.
- Next page cursor (`after`, text): The 'next_cursor' from an earlier page, to get the page after it.

**Outputs**

- `ad_accounts` (list): The ad accounts
- `count` (number): How many are in this page
- `next_cursor` (text): Pass as 'Next page cursor' for the next page; empty on the last page

**Example output**

```json
{
  "ad_accounts": [
    {
      "account_id": "1122334455",
      "account_status": 1,
      "account_status_label": "Active",
      "currency": "USD",
      "id": "act_1122334455",
      "name": "Acme Ads",
      "timezone_name": "America/Los_Angeles"
    }
  ],
  "count": 1,
  "next_cursor": ""
}
```

### List custom audiences

List an ad account's custom audiences with their size and status.

**Inputs**

- Ad account (`ad_account_id`, text, required): The ad account. Pick one, or give its id (act_ followed by digits).
- Page size (`limit`, number): How many to return, 1 to 100. The default is 25. From 1 to 100.
- Next page cursor (`after`, text): The 'next_cursor' from an earlier page, to get the page after it.

**Outputs**

- `audiences` (list): The custom audiences
- `count` (number): How many are in this page
- `next_cursor` (text): Pass as 'Next page cursor' for the next page; empty on the last page

**Example output**

```json
{
  "audiences": [
    {
      "approximate_count_lower_bound": 1000,
      "approximate_count_upper_bound": 1500,
      "customer_file_source": "USER_PROVIDED_ONLY",
      "delivery_status": {
        "code": 200,
        "description": "This audience is ready for use."
      },
      "description": "Everyone on the list",
      "id": "3456789012345678",
      "name": "Newsletter subscribers",
      "operation_status": {
        "code": 200,
        "description": "Normal"
      },
      "retention_days": 180,
      "subtype": "CUSTOM",
      "time_created": "2026-09-01T09:00:00Z",
      "time_updated": "2026-10-01T09:00:00Z"
    }
  ],
  "count": 1,
  "next_cursor": ""
}
```

### List custom conversions

List an ad account's custom conversions with their rules and last activity.

**Inputs**

- Ad account (`ad_account_id`, text, required): The ad account. Pick one, or give its id (act_ followed by digits).
- Page size (`limit`, number): How many to return, 1 to 100. The default is 25. From 1 to 100.
- Next page cursor (`after`, text): The 'next_cursor' from an earlier page, to get the page after it.

**Outputs**

- `count` (number): How many are in this page
- `custom_conversions` (list): The custom conversions
- `next_cursor` (text): Pass as 'Next page cursor' for the next page; empty on the last page

**Example output**

```json
{
  "count": 1,
  "custom_conversions": [
    {
      "creation_time": "2026-10-01T09:00:00Z",
      "custom_event_type": "PURCHASE",
      "default_conversion_value": 10,
      "description": "People who reach the thank-you page",
      "id": "2345678901234567",
      "is_archived": false,
      "is_unavailable": false,
      "last_fired_time": "",
      "name": "Thank-you page visit",
      "pixel": {
        "id": "1234567890123456"
      },
      "rule": "{\"url\":{\"i_contains\":\"thank-you\"}}"
    }
  ],
  "next_cursor": ""
}
```

### List datasets

List the datasets (pixels) of an ad account with when each last received an event.

**Inputs**

- Ad account (`ad_account_id`, text, required): The ad account. Pick one, or give its id (act_ followed by digits).
- Page size (`limit`, number): How many to return, 1 to 100. The default is 25. From 1 to 100.
- Next page cursor (`after`, text): The 'next_cursor' from an earlier page, to get the page after it.

**Outputs**

- `count` (number): How many are in this page
- `datasets` (list): The datasets
- `next_cursor` (text): Pass as 'Next page cursor' for the next page; empty on the last page

**Example output**

```json
{
  "count": 1,
  "datasets": [
    {
      "creation_time": "2025-01-10T09:00:00Z",
      "id": "1234567890123456",
      "is_unavailable": false,
      "last_fired_time": "2026-10-30T14:21:00Z",
      "name": "Lodol website dataset"
    }
  ],
  "next_cursor": ""
}
```

### Send event

Send one server-side event (a purchase, lead, sign-up or your own) to a dataset. Emails, phones and names are hashed for you; add a test event code to try it safely.

**Inputs**

- Dataset (`dataset_id`, text, required): The dataset (pixel) to use. Pick one, or give its id from Events Manager.
- Event (`event_name`, text, required): What happened. Pick Custom event to use your own name. One of: `Purchase`, `Lead`, `CompleteRegistration` (Complete registration), `AddToCart` (Add to cart), `InitiateCheckout` (Initiate checkout), `AddPaymentInfo` (Add payment info), `AddToWishlist` (Add to wishlist), `ViewContent` (View content), `Search`, `Contact`, and 8 more.
- Custom event name (`custom_event_name`, text): The name of your custom event, like QuoteRequested. Only when Event is Custom event (name it below).
- Value (`value`, number): The value of the event in the currency below, like 49.90. At least 0.
- Currency (`currency`, text): A three-letter currency code, like USD.
- Order ID (`order_id`, text): Your order or transaction id.
- Product IDs (`content_ids`, list): The product ids involved, one per row.
- Product ID type (`content_type`, text): Whether the ids are products or product groups. One of: `product`, `product_group` (Product group).
- Content name (`content_name`, text): The name of the product or page.
- Content category (`content_category`, text): The category of the product or page.
- Number of items (`num_items`, number): How many items, as a whole number. At least 0.
- Other details (`custom_properties`, object): Any other details to send with the event, as keys and values.
- Email (`email`, text): The customer's email address. It is lowercased and hashed for you.
- Phone (`phone`, text): The customer's phone number with its country code, like +1 650 555 1212. Symbols and leading zeros are removed and it is hashed for you.
- First name (`first_name`, text): First name. Lowercased and hashed for you.
- Last name (`last_name`, text): Last name. Lowercased and hashed for you.
- Date of birth (`date_of_birth`, date): Date of birth. Sent as YYYYMMDD after hashing.
- Gender (`gender`, text): Gender, as Meta matches it. One of: `f` (Female), `m` (Male).
- City (`city`, text): City. Lowercased, letters only, then hashed.
- State (`state`, text): State or region. Use the two-letter code for the US, like CA.
- Zip code (`zip_code`, text): Postal code. US codes are cut to the first 5 digits.
- Country (`country`, text): Two-letter ISO country code, like US or GB.
- External ID (`external_id`, text): Your own id for this customer (a CRM or user id). It is hashed for you.
- IP address (`client_ip_address`, text): The visitor's IPv4 or IPv6 address. Sent as it is, never hashed.
- Browser user agent (`client_user_agent`, text): The visitor's browser user agent. Required for website events. Sent as it is.
- Click ID (fbc) (`fbc`, text): The _fbc cookie value, or fb.1.<time>.<fbclid> built from the ad click.
- Browser ID (fbp) (`fbp`, text): The _fbp browser cookie value.
- Lead ID (`lead_id`, text): The Meta Lead Ads lead id, for events about a lead from a lead form.
- Event time (`event_time`, date and time): When it happened. Defaults to now. Meta accepts events up to 7 days old (62 for physical store events).
- Where it happened (`action_source`, text): Where the event happened. Defaults to website. One of: `website` (Website (default)), `app`, `email`, `phone_call` (Phone call), `chat`, `physical_store` (Physical store), `system_generated` (System generated (such as a subscription renewal)), `business_messaging` (Business messaging), `other`.
- Page address (`event_source_url`, text): The page address where it happened. Required for website events.
- Event ID (`event_id`, text): A unique id for this event. If your browser pixel sends the same event with the same id, Meta counts it once.
- Test event code (`test_event_code`, text): The code from Events Manager's Test events tab (such as TEST12345). With it, the event shows only under Test events and is kept out of real reporting. Leave empty to send live data.
- Limited Data Use (`limited_data_use`, true/false): Turn on to mark the event for Meta's Limited Data Use, which restricts how Meta uses US customers' data.

**Outputs**

- `dataset_id` (text): The dataset the events went to
- `events` (list): The events as sent, with customer details hashed
- `events_received` (number): How many events Meta says it received
- `events_sent` (number): How many events Lodol sent
- `fbtrace_id` (text): Meta's trace id, for support
- `messages` (list): Warnings Meta returned, if any
- `test_mode` (true/false): True when a test event code was used

**Example output**

```json
{
  "dataset_id": "1234567890123456",
  "events": [
    {
      "action_source": "website",
      "custom_data": {
        "currency": "USD",
        "value": 49.9
      },
      "event_id": "order-1001",
      "event_name": "Purchase",
      "event_source_url": "https://example.com/thank-you",
      "event_time": 1793000000,
      "user_data": {
        "client_user_agent": "Mozilla/5.0",
        "em": [
          "b36a0b3c8ce2d3f1e2ca5e6a2d6cbb6b3b2f8d2f6f5a0f2f9c3bd7e1d0a1c2e3"
        ]
      }
    }
  ],
  "events_received": 1,
  "events_sent": 1,
  "fbtrace_id": "AbCdEfGh123",
  "messages": [],
  "test_mode": true
}
```

### Send events in a batch

Send up to 1,000 events at once from a list, such as rows from a spreadsheet. Each event's user_data holds plain values (email, phone, first_name...) that are hashed for you.

**Inputs**

- Dataset (`dataset_id`, text, required): The dataset (pixel) to use. Pick one, or give its id from Events Manager.
- Events (`events`, list, required): The events, each an object with event_name, optional event_time (Unix seconds or ISO 8601), action_source, event_source_url, event_id, user_data (plain email, phone, first_name, last_name, ...) and custom_data (value, currency, ...).
- Test event code (`test_event_code`, text): The code from Events Manager's Test events tab (such as TEST12345). With it, the event shows only under Test events and is kept out of real reporting. Leave empty to send live data.

**Outputs**

- `dataset_id` (text): The dataset the events went to
- `events` (list): The events as sent, with customer details hashed
- `events_received` (number): How many events Meta says it received
- `events_sent` (number): How many events Lodol sent
- `fbtrace_id` (text): Meta's trace id, for support
- `messages` (list): Warnings Meta returned, if any
- `test_mode` (true/false): True when a test event code was used

**Example output**

```json
{
  "dataset_id": "1234567890123456",
  "events": [
    {
      "action_source": "website",
      "custom_data": {
        "currency": "USD",
        "value": 49.9
      },
      "event_id": "order-1001",
      "event_name": "Purchase",
      "event_source_url": "https://example.com/thank-you",
      "event_time": 1793000000,
      "user_data": {
        "client_user_agent": "Mozilla/5.0",
        "em": [
          "b36a0b3c8ce2d3f1e2ca5e6a2d6cbb6b3b2f8d2f6f5a0f2f9c3bd7e1d0a1c2e3"
        ]
      }
    }
  ],
  "events_received": 1,
  "events_sent": 1,
  "fbtrace_id": "AbCdEfGh123",
  "messages": [],
  "test_mode": true
}
```

### Send lead event

Send a Lead event for someone who asked to be contacted, so Meta can find more people like them. Customer details are hashed for you.

**Inputs**

- Dataset (`dataset_id`, text, required): The dataset (pixel) to use. Pick one, or give its id from Events Manager.
- Value (`value`, number): The value of the event in the currency below, like 49.90. At least 0.
- Currency (`currency`, text): A three-letter currency code, like USD.
- Order ID (`order_id`, text): Your order or transaction id.
- Product IDs (`content_ids`, list): The product ids involved, one per row.
- Product ID type (`content_type`, text): Whether the ids are products or product groups. One of: `product`, `product_group` (Product group).
- Content name (`content_name`, text): The name of the product or page.
- Content category (`content_category`, text): The category of the product or page.
- Number of items (`num_items`, number): How many items, as a whole number. At least 0.
- Other details (`custom_properties`, object): Any other details to send with the event, as keys and values.
- Email (`email`, text): The customer's email address. It is lowercased and hashed for you.
- Phone (`phone`, text): The customer's phone number with its country code, like +1 650 555 1212. Symbols and leading zeros are removed and it is hashed for you.
- First name (`first_name`, text): First name. Lowercased and hashed for you.
- Last name (`last_name`, text): Last name. Lowercased and hashed for you.
- Date of birth (`date_of_birth`, date): Date of birth. Sent as YYYYMMDD after hashing.
- Gender (`gender`, text): Gender, as Meta matches it. One of: `f` (Female), `m` (Male).
- City (`city`, text): City. Lowercased, letters only, then hashed.
- State (`state`, text): State or region. Use the two-letter code for the US, like CA.
- Zip code (`zip_code`, text): Postal code. US codes are cut to the first 5 digits.
- Country (`country`, text): Two-letter ISO country code, like US or GB.
- External ID (`external_id`, text): Your own id for this customer (a CRM or user id). It is hashed for you.
- IP address (`client_ip_address`, text): The visitor's IPv4 or IPv6 address. Sent as it is, never hashed.
- Browser user agent (`client_user_agent`, text): The visitor's browser user agent. Required for website events. Sent as it is.
- Click ID (fbc) (`fbc`, text): The _fbc cookie value, or fb.1.<time>.<fbclid> built from the ad click.
- Browser ID (fbp) (`fbp`, text): The _fbp browser cookie value.
- Lead ID (`lead_id`, text): The Meta Lead Ads lead id, for events about a lead from a lead form.
- Event time (`event_time`, date and time): When it happened. Defaults to now. Meta accepts events up to 7 days old (62 for physical store events).
- Where it happened (`action_source`, text): Where the event happened. Defaults to website. One of: `website` (Website (default)), `app`, `email`, `phone_call` (Phone call), `chat`, `physical_store` (Physical store), `system_generated` (System generated (such as a subscription renewal)), `business_messaging` (Business messaging), `other`.
- Page address (`event_source_url`, text): The page address where it happened. Required for website events.
- Event ID (`event_id`, text): A unique id for this event. If your browser pixel sends the same event with the same id, Meta counts it once.
- Test event code (`test_event_code`, text): The code from Events Manager's Test events tab (such as TEST12345). With it, the event shows only under Test events and is kept out of real reporting. Leave empty to send live data.
- Limited Data Use (`limited_data_use`, true/false): Turn on to mark the event for Meta's Limited Data Use, which restricts how Meta uses US customers' data.

**Outputs**

- `dataset_id` (text): The dataset the events went to
- `events` (list): The events as sent, with customer details hashed
- `events_received` (number): How many events Meta says it received
- `events_sent` (number): How many events Lodol sent
- `fbtrace_id` (text): Meta's trace id, for support
- `messages` (list): Warnings Meta returned, if any
- `test_mode` (true/false): True when a test event code was used

**Example output**

```json
{
  "dataset_id": "1234567890123456",
  "events": [
    {
      "action_source": "website",
      "custom_data": {
        "currency": "USD",
        "value": 49.9
      },
      "event_id": "order-1001",
      "event_name": "Lead",
      "event_source_url": "https://example.com/thank-you",
      "event_time": 1793000000,
      "user_data": {
        "client_user_agent": "Mozilla/5.0",
        "em": [
          "b36a0b3c8ce2d3f1e2ca5e6a2d6cbb6b3b2f8d2f6f5a0f2f9c3bd7e1d0a1c2e3"
        ]
      }
    }
  ],
  "events_received": 1,
  "events_sent": 1,
  "fbtrace_id": "AbCdEfGh123",
  "messages": [],
  "test_mode": true
}
```

### Send purchase event

Send a Purchase event with its value and currency, so Meta can measure and optimise for sales. Customer details are hashed for you.

**Inputs**

- Dataset (`dataset_id`, text, required): The dataset (pixel) to use. Pick one, or give its id from Events Manager.
- Value (`value`, number, required): The value of the event in the currency below, like 49.90. At least 0.
- Currency (`currency`, text, required): A three-letter currency code, like USD.
- Order ID (`order_id`, text): Your order or transaction id.
- Product IDs (`content_ids`, list): The product ids involved, one per row.
- Product ID type (`content_type`, text): Whether the ids are products or product groups. One of: `product`, `product_group` (Product group).
- Content name (`content_name`, text): The name of the product or page.
- Content category (`content_category`, text): The category of the product or page.
- Number of items (`num_items`, number): How many items, as a whole number. At least 0.
- Other details (`custom_properties`, object): Any other details to send with the event, as keys and values.
- Email (`email`, text): The customer's email address. It is lowercased and hashed for you.
- Phone (`phone`, text): The customer's phone number with its country code, like +1 650 555 1212. Symbols and leading zeros are removed and it is hashed for you.
- First name (`first_name`, text): First name. Lowercased and hashed for you.
- Last name (`last_name`, text): Last name. Lowercased and hashed for you.
- Date of birth (`date_of_birth`, date): Date of birth. Sent as YYYYMMDD after hashing.
- Gender (`gender`, text): Gender, as Meta matches it. One of: `f` (Female), `m` (Male).
- City (`city`, text): City. Lowercased, letters only, then hashed.
- State (`state`, text): State or region. Use the two-letter code for the US, like CA.
- Zip code (`zip_code`, text): Postal code. US codes are cut to the first 5 digits.
- Country (`country`, text): Two-letter ISO country code, like US or GB.
- External ID (`external_id`, text): Your own id for this customer (a CRM or user id). It is hashed for you.
- IP address (`client_ip_address`, text): The visitor's IPv4 or IPv6 address. Sent as it is, never hashed.
- Browser user agent (`client_user_agent`, text): The visitor's browser user agent. Required for website events. Sent as it is.
- Click ID (fbc) (`fbc`, text): The _fbc cookie value, or fb.1.<time>.<fbclid> built from the ad click.
- Browser ID (fbp) (`fbp`, text): The _fbp browser cookie value.
- Lead ID (`lead_id`, text): The Meta Lead Ads lead id, for events about a lead from a lead form.
- Event time (`event_time`, date and time): When it happened. Defaults to now. Meta accepts events up to 7 days old (62 for physical store events).
- Where it happened (`action_source`, text): Where the event happened. Defaults to website. One of: `website` (Website (default)), `app`, `email`, `phone_call` (Phone call), `chat`, `physical_store` (Physical store), `system_generated` (System generated (such as a subscription renewal)), `business_messaging` (Business messaging), `other`.
- Page address (`event_source_url`, text): The page address where it happened. Required for website events.
- Event ID (`event_id`, text): A unique id for this event. If your browser pixel sends the same event with the same id, Meta counts it once.
- Test event code (`test_event_code`, text): The code from Events Manager's Test events tab (such as TEST12345). With it, the event shows only under Test events and is kept out of real reporting. Leave empty to send live data.
- Limited Data Use (`limited_data_use`, true/false): Turn on to mark the event for Meta's Limited Data Use, which restricts how Meta uses US customers' data.

**Outputs**

- `dataset_id` (text): The dataset the events went to
- `events` (list): The events as sent, with customer details hashed
- `events_received` (number): How many events Meta says it received
- `events_sent` (number): How many events Lodol sent
- `fbtrace_id` (text): Meta's trace id, for support
- `messages` (list): Warnings Meta returned, if any
- `test_mode` (true/false): True when a test event code was used

**Example output**

```json
{
  "dataset_id": "1234567890123456",
  "events": [
    {
      "action_source": "website",
      "custom_data": {
        "currency": "USD",
        "value": 49.9
      },
      "event_id": "order-1001",
      "event_name": "Purchase",
      "event_source_url": "https://example.com/thank-you",
      "event_time": 1793000000,
      "user_data": {
        "client_user_agent": "Mozilla/5.0",
        "em": [
          "b36a0b3c8ce2d3f1e2ca5e6a2d6cbb6b3b2f8d2f6f5a0f2f9c3bd7e1d0a1c2e3"
        ]
      }
    }
  ],
  "events_received": 1,
  "events_sent": 1,
  "fbtrace_id": "AbCdEfGh123",
  "messages": [],
  "test_mode": true
}
```

### Update custom conversion

Change a custom conversion's name, description or default value. Meta does not allow changing its rule.

**Inputs**

- Custom conversion ID (`custom_conversion_id`, text, required): The custom conversion's id, from 'List custom conversions' or 'Create custom conversion'.
- Name (`name`, text): A new name. Leave empty to keep it.
- Description (`description`, text): A new description. Leave empty to keep it.
- Default value (`default_conversion_value`, number): A new default value. Leave empty to keep it. At least 0.

**Outputs**

- `id` (text): The id updated
- `updated` (true/false): Always true once updated

**Example output**

```json
{
  "id": "2345678901234567",
  "updated": true
}
```

### Update dataset

Rename a dataset or change its automatic matching, first-party cookie or data use settings. Only the fields given change.

**Inputs**

- Dataset (`dataset_id`, text, required): The dataset (pixel) to use. Pick one, or give its id from Events Manager.
- Name (`name`, text): A new name. Leave empty to keep it.
- Automatic matching (`automatic_matching`, text): Turn automatic advanced matching on or off. Leave empty to keep it. One of: `on`, `off`.
- Matching details (`automatic_matching_fields`, list): Which customer details automatic matching may use. Leave empty to keep them. One or more of: `em` (Email), `ph` (Phone), `fn` (First name), `ln` (Last name), `ge` (Gender), `db` (Date of birth), `ct` (City), `st` (State), `zp` (Zip code), `country`, `external_id` (External ID).
- First-party cookies (`first_party_cookie_status`, text): Whether the pixel uses first-party cookies. Leave empty to keep it. One of: `FIRST_PARTY_COOKIE_ENABLED` (Use first-party cookies), `FIRST_PARTY_COOKIE_DISABLED` (Do not use first-party cookies), `EMPTY` (Not set).
- Data use (`data_use_setting`, text): How Meta may use the data. Leave empty to keep it. One of: `ADVERTISING_AND_ANALYTICS` (Advertising and analytics), `ANALYTICS_ONLY` (Analytics only), `EMPTY` (Not set).

**Outputs**

- `dataset` (object): The dataset after the change
- `updated` (true/false): Always true once updated

**Example output**

```json
{
  "dataset": {
    "automatic_matching_fields": [
      "em",
      "ph"
    ],
    "creation_time": "2025-01-10T09:00:00Z",
    "data_use_setting": "ADVERTISING_AND_ANALYTICS",
    "enable_automatic_matching": true,
    "first_party_cookie_status": "FIRST_PARTY_COOKIE_ENABLED",
    "id": "1234567890123456",
    "is_created_by_business": true,
    "is_unavailable": false,
    "last_fired_time": "2026-10-30T14:21:00Z",
    "name": "Renamed dataset",
    "owner_business": {
      "id": "1111111111",
      "name": "Acme Inc"
    }
  },
  "updated": true
}
```
