Skip to navigation

Create an event

Draft scaffold — not implemented or available in the API.

Records one usage event for a customer and product. customer and product take a Paid ID or your external ID, and the response always returns Paid IDs. dedupeKey must be unique per event: resending a key returns the original event with duplicate: true and status 200 instead of 201, and ingests nothing. timestamp defaults to the time Paid receives the event.

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Headers

Paid-BetaenumRequired

This endpoint is in the events=v1 beta. Send this header to use it.

Allowed values:

Request

Body
customerstringRequired1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
dedupeKeystringRequired1-255 characters
Your stable identifier, 1 to 255 characters.
eventNamestringRequired1-255 characters

The event’s name, such as ticket.closed.

productstringRequired1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
correlationIdstringOptional1-255 characters
Your stable identifier, 1 to 255 characters.
costlist of objectsOptional

Cost lines; requires event_costs=v1.

creditHoldstringOptional1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
customerUnitstringOptional1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
payloadmap from strings to anyOptional

Free-form source event data.

timestampdatetimeOptional

When the event occurred; defaults to receipt time.

Response

200
idstring
The Event ID.
objectenum

The type of object. Always event.

Allowed values:
createdAtdatetime
When the object was created.
correlationIdstring or null1-255 characters
Your stable identifier, 1 to 255 characters.
customerstring1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
customerUnitstring or null1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
dedupeKeystring1-255 characters
Your stable identifier, 1 to 255 characters.
derivedobject

Derived measurement provenance; null on raw events.

duplicateboolean
True when returning the original deduplicated event.
eventNamestring1-255 characters

The event’s name, such as ticket.closed.

livemodeboolean

true for an object on a live account, false on a test account.

payloadmap from strings to any
Source event data.
productstring1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
quantityobject
A quantity or null.
sentAsobject
References exactly as sent by the caller.
timestampdatetime
When the event occurred.
warningslist of objects

Non-fatal acceptance warnings.

costlist of objectsOptional
Resolved cost lines.
creditHoldstring or nullOptional1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
413
Content Too Large Error
429
Too Many Requests Error
500
Internal Server Error
501
Not Implemented Error