# Create event summaries

Create event summaries for a user. Event summaries are used to track the number of times an event has occurred, the first time it occurred and the last time it occurred.
Identify the user with one of `id`, `user_id` or `email`. If more than one is sent, `id` is used first, then `user_id`, then `email`.
Requires the `write_events` OAuth scope.

Endpoint: POST /events/summaries
Version: 2.18
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer

## Header parameters:

  - `Intercom-Version` (string)

## Request fields (application/json):

  - `user_id` (string)
    Your identifier for the user.
    Example: 314159

  - `id` (string)
    The Intercom defined id of the user. Takes precedence over `user_id` and `email`.
    Example: 63a0979a5eeebeaf28dd56ba

  - `email` (string)
    The user's email address. Only used when neither `id` nor `user_id` is supplied.
    Example: frodo.baggins@example.com

  - `event_summaries` (array, required)
    A list of event summaries for the user. Each event summary should contain the event name, the time the event occurred, and the number of times the event occurred. The event name should be a past tense 'verb-noun' combination, to improve readability, for example `updated-plan`.

  - `event_summaries.event_name` (string, required)
    The name of the event that occurred. A good event name is typically a past tense 'verb-noun' combination, to improve readability, for example `updated-plan`.
    Example: invited-friend

  - `event_summaries.count` (integer, required)
    The number of times the event occurred.
    Example: 1

  - `event_summaries.first` (integer, required)
    The first time the event was sent
    Example: 1671028894

  - `event_summaries.last` (integer, required)
    The last time the event was sent
    Example: 1671028894

## Response 200:

  - `200` (unknown)
    successful

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code.
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

  - `errors.data` (object)
    Optional. Extra detail about the error, for example `required_permissions` on a 403 `action_forbidden` error.
    Example: {"required_permissions":["read_conversations"]}

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code.
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

  - `errors.data` (object)
    Optional. Extra detail about the error, for example `required_permissions` on a 403 `action_forbidden` error.
    Example: {"required_permissions":["read_conversations"]}

## Response 404:

  - `404` (unknown)
    Contact not found

## Response 404 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code.
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

  - `errors.data` (object)
    Optional. Extra detail about the error, for example `required_permissions` on a 403 `action_forbidden` error.
    Example: {"required_permissions":["read_conversations"]}

## Response 400 examples:

  - `No user identifier` (unknown)

  - `No summaries` (unknown)

  - `Summary field has the wrong type` (unknown)

## Response 401 examples:

  - `Unauthorized` (unknown)

  - `Token lacks required scope` (unknown)

## Response 404 examples:

  - `User not found` (unknown)

