Event write keys
Event write keys are used for authentication when ingesting events through the Ingest events and Ingest event endpoints.
Create event write key
Creates an event write key for an SDK or webhook connection. Returns an error if the connection already has the maximum limit of 20 keys.
Request
-
:id
int RequiredThe ID of the connection for which to create the key. It must be an SDK or webhook connection.
Response
-
key
stringThe newly created key.
curl -X POST https://example.com/v1/connections/1371036433/event-write-keys \ -H "Authorization: Bearer api_xxxxxxx" {
"key": "aC7B37Bug92OI2JSnl9eKrfGeecZT5hA"
}List all event write keys
Returns all event write keys for an SDK or webhook connection.
Request
-
:id
int RequiredThe ID of the connection for which to return the keys. It must be an SDK or webhook connection.
Response
-
keys
array of stringThe keys of the connection. At least one key is guaranteed to be present.
curl https://example.com/v1/connections/1371036433/event-write-keys \ -H "Authorization: Bearer api_xxxxxxx" {
"keys": [
"aC7B37Bug92OI2JSnl9eKrfGeecZT5hA",
"9HnSIbfreXvzD8tCb0L04xSseUNOavEp"
]
}Delete event write key
Deletes an event write key from an SDK or webhook connection. If the connection has only one key, it cannot be deleted.
Request
-
:id
int RequiredThe ID of the connection for which to delete the key. It must be an SDK or webhook connection.
-
:key
string RequiredThe key to delete.
Response
No response.curl -X DELETE https://example.com/v1/connections/1371036433/event-write-keys/aC7B37Bug92OI2JSnl9eKrfGeecZT5hA \ -H "Authorization: Bearer api_xxxxxxx"