curl --request POST \
--url https://api.messaging.phonovation.com/peopleevents/1/export \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"roleArn": "arn:aws:iam::account:role/role-name-with-path",
"bucket": "exported-events-bucket",
"region": "EU_CENTRAL_1",
"startTime": "2022-01-01T00:00:00.000+0000",
"endTime": "2022-01-01T01:00:00.000+0000"
}
'{
"requestId": "4c959f87-9a45-4e16-bcd2-7f2a79e95067"
}{
"requestError": {
"serviceException": {
"messageId": "BAD_REQUEST",
"text": "Bad request"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "UNAUTHORIZED",
"text": "Unauthorized"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "FORBIDDEN",
"text": "Forbidden"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "<string>",
"text": "<string>",
"validationErrors": {}
}
}
}{
"requestError": {
"serviceException": {
"messageId": "TOO_MANY_REQUESTS",
"text": "Too many requests"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "GENERAL_ERROR",
"text": "Something went wrong. Please contact support."
}
}
}Submit event export request
Events export allows you to asynchronously export People Events data to a compressed file or multiple files in your AWS S3 bucket.
Refer to product documentation for detailed information on configuring AWS S3 for export, export file format and event data schema.
Throttling
You can have maximum of 72 hours worth of export requests in progress at one time.
Required scope: Enable one of: people:manage.
curl --request POST \
--url https://api.messaging.phonovation.com/peopleevents/1/export \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"roleArn": "arn:aws:iam::account:role/role-name-with-path",
"bucket": "exported-events-bucket",
"region": "EU_CENTRAL_1",
"startTime": "2022-01-01T00:00:00.000+0000",
"endTime": "2022-01-01T01:00:00.000+0000"
}
'{
"requestId": "4c959f87-9a45-4e16-bcd2-7f2a79e95067"
}{
"requestError": {
"serviceException": {
"messageId": "BAD_REQUEST",
"text": "Bad request"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "UNAUTHORIZED",
"text": "Unauthorized"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "FORBIDDEN",
"text": "Forbidden"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "<string>",
"text": "<string>",
"validationErrors": {}
}
}
}{
"requestError": {
"serviceException": {
"messageId": "TOO_MANY_REQUESTS",
"text": "Too many requests"
}
}
}{
"requestError": {
"serviceException": {
"messageId": "GENERAL_ERROR",
"text": "Something went wrong. Please contact support."
}
}
}Authorizations
This is the most secure authorization type and the one with the most flexibility.
API keys can be generated by calling the dedicated API method. Furthermore, API keys can have a limited scope and cover only some API methods. Lastly, they can be revoked at any time. This range of possibilities makes API keys well suited for separating the API access rights across multiple applications or use cases. Finally, the loss of an API key is easily manageable.
You can manage your API keys from GUI, or programmatically with dedicated API.
API key Authorization header example:
Authorization: App 003026bbc133714df1834b8638bb496e-8f4b3d9a-e931-478d-a994-28a725159ab9
Body
AWS role ARN for accessing S3 bucket. Accepted format: arn:aws:iam::account:role/role-name-with-path. Must apply character rules as referenced in AWS documentation.
AWS S3 bucket name. Must only contain safe characters, as defined in AWS documentation.
AWS S3 client region.
Start time of the export query. Accepted format: yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g. 2022-03-01T01:00:00.000+0000. Must be earlier than the current time and endTime, but no more than 1 year ago. startTime and endTime must be at most 24 hours apart.
End time of the export query. Accepted format: yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g. 2022-03-01T01:00:00.000+0000. Must be earlier than the current time, and later than startTime. startTime and endTime must be at most 24 hours apart.
AWS S3 directory path. Use directory/ or a nested directory path dir1/dir2/directory/. Must only contain safe characters or an equal sign, as defined in AWS documentation.
An optional list of definitionIds to use as a whitelist filter for exported events. Accepted format: ["definitionId", "definitionId"], e.g. ["formSubmitted", "sms*"]. A wildcard character '*' may be used to match any number of characters in the definitionId. A list of all valid definitionIds can be obtained from the Get list of event definitions endpoint. The total number of matched definitionIds, after wildcard expansion, may not exceed 200. To export all events without filtering, do not specify a definitionIdList.
200If set to true, additional information, namely the campaign name, Flow's element name (if applicable), and the campaign start date and time are added to all existing events related to Moments. Defaults to false.
Response
Accepted
Event export request ID.