Skip to main content

Export Data API

This endpoint allows Enterprise administrators to export design variations, media, and content for specific users within a specified date range.

Endpoint

POST enterprise/export-data

Authentication

Include your Enterprise API credentials in the request headers:

sivi-api-key: YOUR_ENTERPRISE_API_KEY
Enterprise Admin Access Required

This endpoint can only be accessed using an Enterprise Admin API key. Regular API keys do not have sufficient privileges.

Request Parameters

ParameterTypeRequiredDescription
abstractUserIdStringYesUnique identifier for the user
startDateNumberYesStart timestamp for the data export period (Unix timestamp)
endDateNumberYesEnd timestamp for the data export period (Unix timestamp)

Request Body Example

{
"abstractUserId":"281743-2322-34i44sd3-dkfjgdkjf292",
"startDate": 17236322383,
"endDate": 17236342383
}

Response

Success Response (200 OK)

{
"status": 200,
"body": {
"variants": [
{
"variantImageUrl": "https://resources.hellosivi.com/user-data/e5ef6aa0-8d6c-11ec-bd33-8d2f1bec7c21/generated/sg0yMSZzNnU--97026520-1f1b-11f0-ada0-01392001fe46--sh0V7MlzOPm.jpg",
"variantEditLink": "https://instant.sivi.ai/#/variant/sh0V7MlzOPm/independent-design-editor?type=edited",
"variantId": "sh0V7MlzOPm"
}
],
"media": [
{
"url": "https://resources.hellosivi.com/user-data/e5ef6aa0-8d6c-11ec-bd33-8d2f1bec7c21/generated/media-1.jpg",
"type": "photo"
}
],
"content": [
{
"title": "heading",
"subtitle": "subtitle for this snippet",
"bulletlist": ["1", "2"]
}
],
"next": 0
}
}

Response Body Parameters

ParameterTypeDescription
variantsArrayList of design variants created within the date range
mediaArrayList of media assets uploaded/used within the date range
contentArrayList of content snippets created within the date range
nextIntegerIndicates if more data is available (0 = no more data, 1 = more data available)

Variant Object

ParameterTypeDescription
variantImageUrlStringURL to the generated design image
variantEditLinkStringLink to edit the design in Sivi's editor
variantIdStringUnique identifier for the variant

Media Object

ParameterTypeDescription
urlStringURL to the media asset
typeStringType of media (e.g., "photo", "illustration")

Content Object

ParameterTypeDescription
titleStringContent title or heading
subtitleStringContent subtitle
bulletlistArrayArray of bullet points

Error Responses

User Not Found (400 Bad Request)

{
"status": 400,
"body": {
"message": "User does not exist"
}
}

Authentication Error (401 Unauthorized)

{
"status": 401,
"body": {
"message": "Failed to authenticate request. Please add sivi-api-key header in request"
}
}

Invalid Input (422 Unprocessable Entity)

{
"status": 422,
"body": {
"message": "Invalid input"
}
}

Server Error (500 Internal Server Error)

{
"status": 500,
"body": {
"message": "Server internal error"
}
}

Usage Notes

  • The API has the following limits:
    • Variants: Max 300 records
    • Media: Max 300 records
    • Content: Max 100 records
  • Suggested date range is 15-30 days for optimal performance
  • Maximum supported date range is 90 days
  • Historical data up to 1 year is available
  • If you reach the limits, reduce the date range or paginate through results
  • This API is restricted to Enterprise plan customers with administrative access