{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Create a new event to track a profile's activity.\n\nNote that this endpoint allows you to create a new profile or update an existing profile's properties.\n\nAt a minimum, profile and metric objects should include at least one profile identifier (e.g., `id`, `email`, or `phone_number`) and the metric `name`, respectively.\n\nSuccessful response indicates that the event was validated and submitted for processing, but does not guarantee that processing is complete.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m`\n\n**Scopes:**\n`events:write`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/create_event.json)","properties":{"headers":{"type":"object","properties":{"revision":{"type":"string","default":"2026-10-15","enum":["2026-10-15"],"description":"API endpoint revision (format: YYYY-MM-DD[.suffix])"}},"required":["revision"],"additionalProperties":false},"body":{"$ref":"#/definitions/EventCreateQueryV2"}},"required":["headers","body"],"additionalProperties":false,"definitions":{"EventCreateQueryV2":{"type":"object","properties":{"data":{"$ref":"#/definitions/EventCreateQueryV2ResourceObject"}},"required":["data"]},"EventCreateQueryV2ResourceObject":{"type":"object","properties":{"type":{"$ref":"#/definitions/EventEnum"},"attributes":{"type":"object","properties":{"properties":{"description":"Properties of this event (must not exceed 400 properties). The size of the event payload must not exceed 5 MB,\nand each string cannot be larger than 100 KB. For a full list of data limits on event payloads,\nsee [Limitations](https://developers.klaviyo.com/en/reference/events_api_overview#limitations).\n\nNote any top-level property that is not an object can be\nused to create segments. The `$extra` property records any\nnon-segmentable values that can be referenced later, e.g., HTML templates are\nuseful on a segment but are not used to create a segment.","type":"object","examples":[{"Brand":"Kids Book","ProductID":1111,"ProductName":"Winnie the Pooh"}]},"time":{"description":"When this event occurred. By default, the time the request was received will be used.\nThe time is truncated to the second. The time must be after the year 1990 and can only\nbe up to 1 year in the future.","type":["string","null"],"format":"date-time","examples":["2022-11-08T00:00:00+00:00"]},"value":{"description":"A numeric, monetary value to associate with this event. For example, the dollar amount of a purchase.","type":["number","null"],"examples":[9.99]},"value_currency":{"description":"The ISO 4217 currency code of the value associated with the event.","type":["string","null"],"examples":["USD"]},"unique_id":{"description":"A unique identifier for an event. If the unique_id is repeated for the same\nprofile and metric, only the first processed event will be recorded. If this is not\npresent, this will use the time to the second. Using the default, this limits only one\nevent per profile per second.","type":["string","null"]},"backfill":{"description":"When true, the event is recorded but does NOT trigger flows. Use this when backfilling\nhistorical events so existing flow definitions do not re-fire on events that already\nfired in the past.","type":["boolean","null"],"default":false},"metric":{"type":"object","properties":{"data":{"$ref":"#/definitions/MetricCreateQueryResourceObject"}},"required":["data"]},"profile":{"type":"object","properties":{"data":{"$ref":"#/definitions/EventProfileCreateQueryResourceObject"}},"required":["data"]}},"required":["properties","metric","profile"]}},"required":["type","attributes"]},"EventEnum":{"type":"string","enum":["event"]},"MetricCreateQueryResourceObject":{"type":"object","properties":{"type":{"$ref":"#/definitions/MetricEnum"},"attributes":{"type":"object","properties":{"name":{"description":"Name of the event. Must be less than 128 characters.","type":"string","examples":["Viewed Product"]},"service":{"description":"This is for advanced usage. For api requests, this should use the default, which is set to api.","type":["string","null"]}},"required":["name"]}},"required":["type","attributes"]},"EventProfileCreateQueryResourceObject":{"type":"object","properties":{"type":{"$ref":"#/definitions/ProfileEnum"},"id":{"description":"Primary key that uniquely identifies this profile. Generated by Klaviyo.","type":["string","null"]},"attributes":{"type":"object","properties":{"email":{"description":"Individual's email address","type":["string","null"],"examples":["sarah.mason@klaviyo-demo.com"]},"phone_number":{"description":"Individual's phone number in E.164 format","type":["string","null"],"examples":["+15005550006"]},"external_id":{"description":"A unique identifier used by customers to associate Klaviyo profiles with profiles in an external system, such as a point-of-sale system. Format varies based on the external system.","type":["string","null"]},"anonymous_id":{"type":["string","null"]},"_kx":{"description":"Also known as the `exchange_id`, this is an encrypted identifier used for identifying a\nprofile by Klaviyo's web tracking.\n\nYou can use this field as a filter when retrieving profiles via the Get Profiles endpoint.","type":["string","null"]},"first_name":{"description":"Individual's first name","type":["string","null"],"examples":["Sarah"]},"last_name":{"description":"Individual's last name","type":["string","null"],"examples":["Mason"]},"organization":{"description":"Name of the company or organization within the company for whom the individual works","type":["string","null"],"examples":["Example Corporation"]},"locale":{"description":"The locale of the profile, in the IETF BCP 47 language tag format like (ISO 639-1/2)-(ISO 3166 alpha-2)","type":["string","null"],"examples":["en-US"]},"title":{"description":"Individual's job title","type":["string","null"],"examples":["Regional Manager"]},"image":{"description":"URL pointing to the location of a profile image","type":["string","null"],"examples":["https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg"]},"location":{"$ref":"#/definitions/ProfileLocation"},"properties":{"description":"An object containing key/value pairs for any custom properties assigned to this profile","type":["object","null"],"examples":[{"pseudonym":"Dr. Octopus"}]}}},"meta":{"$ref":"#/definitions/OnsiteProfileMeta"}},"required":["type","attributes"]},"MetricEnum":{"type":"string","enum":["metric"]},"ProfileEnum":{"type":"string","enum":["profile"]},"ProfileLocation":{"type":"object","properties":{"address1":{"description":"First line of street address","type":["string","null"],"examples":["89 E 42nd St"]},"address2":{"description":"Second line of street address","type":["string","null"],"examples":["1st floor"]},"city":{"description":"City name","type":["string","null"],"examples":["New York"]},"country":{"description":"Country name","type":["string","null"],"examples":["United States"]},"latitude":{"description":"Latitude coordinate. We recommend providing a precision of four decimal places.","oneOf":[{"type":"string"},{"type":"number"}],"examples":["40.7128"]},"longitude":{"description":"Longitude coordinate. We recommend providing a precision of four decimal places.","oneOf":[{"type":"string"},{"type":"number"}],"examples":["74.0060"]},"region":{"description":"Region within a country, such as state or province","type":["string","null"],"examples":["NY"]},"zip":{"description":"Zip code","type":["string","null"],"examples":["10017"]},"timezone":{"description":"Time zone name. We recommend using time zones from the IANA Time Zone Database.","type":["string","null"],"examples":["America/New_York"]},"ip":{"description":"IP Address","type":["string","null"],"examples":["127.0.0.1"]}}},"OnsiteProfileMeta":{"type":"object","properties":{"patch_properties":{"$ref":"#/definitions/ProfileMetaPatchProperties"},"patch_identifiers":{"$ref":"#/definitions/PatchIdentifiers"}}},"ProfileMetaPatchProperties":{"type":"object","properties":{"append":{"description":"Append a simple value or values to this property array","type":["object","null"],"examples":[{"skus":"92538"}]},"unappend":{"description":"Remove a simple value or values from this property array","type":["object","null"],"examples":[{"skus":"40571"}]},"unset":{"description":"Remove a key or keys (and their values) completely from properties","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"examples":["skus"]}}},"PatchIdentifiers":{"type":"object","properties":{"append":{"type":"object"},"unappend":{"type":"object"}}}}},"name":"Create Event","id":"klaviyo.create_event","example":{"headers":{"revision":"2026-10-15"},"body":{"data":{"type":"event","attributes":{"properties":{"Brand":"Kids Book","ProductID":1111,"ProductName":"Winnie the Pooh"},"metric":{"data":{"type":"metric","attributes":{"name":"Viewed Product"}}},"profile":{"data":{"type":"profile","attributes":{}}}}}}},"maxRequests":1,"summary":false}}