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

# createCustomerEvent

> Record a single customer event. The event is queued for asynchronous processing and acknowledged immediately.

**Required scopes:** [`customer_events_write`](/docs/api-reference/v3/reference/scopes#scope-customer_events_write)

## Arguments

<ResponseField name="input" type={<a href="/docs/api-reference/v3/reference/events/create-customer-event-input">CreateCustomerEventInput!</a>} required>
  The event to record.

  <Expandable title="fields" lazyRender>
    <ResponseField name="customer" type={<a href="/docs/api-reference/v3/reference/events/customer-event-customer-input">CustomerEventCustomerInput!</a>} required>
      The customer the event belongs to.

      <Expandable title="fields" lazyRender>
        <ResponseField name="customFields" type={<a href="/docs/api-reference/v3/reference/common/json">JSON</a>}>
          Patches customer custom fields — a flat object of string, number, or boolean values.
        </ResponseField>

        <ResponseField name="email" type="String">
          The customer's email.
        </ResponseField>

        <ResponseField name="firstName" type="String">
          Patches the customer's first name.
        </ResponseField>

        <ResponseField name="id" type="String">
          The Redo customer id.
        </ResponseField>

        <ResponseField name="lastName" type="String">
          Patches the customer's last name.
        </ResponseField>

        <ResponseField name="location" type={<a href="/docs/api-reference/v3/reference/events/customer-event-location-input">CustomerEventLocationInput</a>}>
          Patches the customer's current location.
        </ResponseField>

        <ResponseField name="phoneNumber" type="String">
          The customer's phone number.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="data" type={<a href="/docs/api-reference/v3/reference/common/json">JSON</a>}>
      Custom event properties — a flat object of segmentable values (nest non-segmentable data under `$extra`). Max 400 properties, 100 KB per string, 4,000 array items.
    </ResponseField>

    <ResponseField name="eventName" type="String!" required>
      The event name (1–100 characters).
    </ResponseField>

    <ResponseField name="eventTimestamp" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime</a>}>
      When the event occurred (ISO-8601). Defaults to ingest time if omitted.
    </ResponseField>

    <ResponseField name="uniqueId" type="String">
      A merchant-controlled deduplication key (1–255 characters). Reusing it dedupes retries of the same event.
    </ResponseField>

    <ResponseField name="value" type="Float">
      A monetary or conversion value associated with the event.
    </ResponseField>

    <ResponseField name="valueCurrency" type="String">
      ISO 4217 currency code for `value`, e.g. "USD".
    </ResponseField>
  </Expandable>
</ResponseField>

## Returns

<ResponseField name="createCustomerEvent" type={<a href="/docs/api-reference/v3/reference/events/customer-event-ack">CustomerEventAck!</a>} required>
  Acknowledges that a customer event was accepted for asynchronous processing.

  <Expandable title="fields" lazyRender>
    <ResponseField name="accepted" type="Boolean!" required>
      Whether the event was accepted into the pipeline.
    </ResponseField>

    <ResponseField name="id" type="String!" required>
      The idempotency key the event was enqueued under, derived from `uniqueId` when supplied.
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

```graphql theme={null}
mutation {
  createCustomerEvent(input: { ... }) {
    accepted
    id
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.