Export API

5 min read

The export API provides RAW data available in Salted CX so you can import it into your data storage, analytics solution, business intelligence, or AI tools.

The API is intended for low-frequency batch use, such as daily exports. We might restrict access to the API or rate-limit its use due to excessive usage. The API limit for an exported date range is 24 hours. You have to export data in 24 hours batches.

Authentication

All endpoints require a valid API key in the Authorization header:

Authorization: Bearer <your-api-key>
Ask a Salted CX contact person to share the API Key with you in a secure way.

Workflow

  1. Initiate an export via POST /api/v1/export — returns an exportId and a statusUrl
  1. Poll the status via GET /api/v1/export/{exportId}/status until status is COMPLETED
  1. Download the CSV files using the downloadUrls from the completed status response (URLs are valid for 1 hour)

Endpoints

POST /api/v1/export

Initiates an asynchronous export. The export runs in the background; use the status endpoint to track progress.

Query Parameters

ParameterRequiredDescription
fromYesStart of the date range (ISO 8601), e.g. 2024-01-01T00:00:00Z
toYesEnd of the date range (ISO 8601), e.g. 2024-01-02T00:00:00Z
includeNoComma-separated list of datasets to export. Default: all. Valid values: engagement, customer, turn, review, agent
contactNoEmail or phone number to filter by a specific customer profile

Constraints

  • The date range (to minus from) must not exceed 24 hours
  • from must be before to

Response (200)

{
  "exportId": "a1b2c3d4-...",
  "statusUrl": "api/v1/export/a1b2c3d4-.../status"
}

Errors (400)

CodeDescription
INVALID_DATE_RANGEfrom is not before to, or range exceeds 24 hours
INVALID_INCLUDEUnknown dataset name in include
EMPTY_INCLUDEinclude parameter is present but empty
CONTACT_NOT_FOUNDThe contact value could not be resolved
NO_CUSTOMERS_FOR_CONTACTContact was found but has no associated customer records

GET /api/v1/export/{exportId}/status

Returns the current status of an export job. Once completed, includes presigned download URLs.

Response (200)

{
  "exportId": "a1b2c3d4-...",
  "status": "COMPLETED",
  "downloadUrls": {
    "engagement": "https://s3.eu-..../engagements.csv?...",
    "customer": "https://s3.eu-..../customers.csv?...",
    "turn": "https://s3.eu-..../turns.csv?...",
    "review": "https://s3.eu-..../reviews.csv?...",
    "agent": "https://s3.eu-..../agents.csv?..."
  },
  "error": null
}

Status Values

StatusdownloadUrlsDescription
PROCESSINGempty {}Export is running
COMPLETEDpopulatedFiles are ready to download (URLs valid for 1 hour)
FAILEDempty {}Export failed — see error field

404 — Export not found or does not belong to your account.


GET /api/v1/export/history

Returns the most recent exports for your account (up to 100).

Response (200): Array of status objects (same shape as the status endpoint).


Datasets & CSV Columns

engagement (engagements.csv)

ColumnDescription
pidEngagement ID
external_idExternal system ID
nameEngagement name
linkLink to the engagement
agent_pidAgent ID
agent_nameAgent name
contact_pidCustomer ID
contact_nameCustomer name
conversation_start_timeStart of the conversation
start_timeStart of the engagement
end_timeEnd of the engagement
conversation_idConversation ID
conversation_external_idExternal conversation ID
channel_typeChannel type (CHAT, EMAIL, VOICE...)
directionInbound / Outbound
statusEngagement status
typeEngagement type
outcome_typeOutcome type
service_levelService level
terminated_byWho terminated the engagement
initiated_byWho initiated the engagement
resolutionResolution
channelChannel name
queueQueue name
teamTeam name
departmentDepartment name
outcomeOutcome name
outcome_categoryOutcome category
reasonReason name
reason_categoryReason category
case_nameCase name
platformPlatform name
sourceSource name
languageLanguage
channel_vendorChannel vendor
categoryCategory
campaignCampaign
priorityPriority
menu_pathMenu path
flowFlow name
serviceService name
company_contactCompany contact name
brandBrand
topic_categoryTopic category
topicTopic
attribute_01attribute_04Custom attributes
agent_locationAgent location
agent_roleAgent role
agent_organizationAgent organization
external_agent_nameExternal agent name
costCost
engagement_timeEngagement time (ms)
focus_timeFocus time (ms)
hold_timeHold time (ms)
invitation_timeInvitation time (ms)
menu_timeMenu time (ms)
preparation_timePreparation time (ms)
wait_timeWait time (ms)
wrap_up_timeWrap-up time (ms)
total_timeTotal time (ms)
engagement_fact_01engagement_fact_03Custom facts
wait_for_customer_timeWait for customer time (ms)
order_agent_engagementsOrder of agent engagements in conversation
total_conversation_agent_engagementsTotal agent engagements in conversation
adaptabilityAI-scored adaptability
adherenceAI-scored adherence
clarityAI-scored clarity
completenessAI-scored completeness
customer_satisfactionAI-scored customer satisfaction
empathyAI-scored empathy
expressed_satisfactionAI-scored expressed satisfaction
language_skillsAI-scored language skills
persuasionAI-scored persuasion
severityAI-scored severity
understandingAI-scored understanding

customer (customers.csv)

ColumnDescription
pidCustomer ID
external_idExternal system ID
nameCustomer name
linkLink to the customer
typeCustomer type
categoryCategory
segmentSegment
organizationOrganization
regionRegion
countryCountry
stateState

turn (turns.csv)

ColumnDescription
pidTurn ID
engagement_pidParent engagement ID
turn_timeTimestamp of the turn
turn_time_relative_msTime relative to engagement start (ms)
response_toPID of the turn this responds to
participantAGENT or CUSTOMER
typeTurn type
originOrigin
categoryTurn category
durationDuration (ms)
lengthCharacter length
sentimentSentiment score
confidenceConfidence score
qualityQuality score
external_idExternal ID
contentTurn text content
content_agentAgent-side content
content_customerCustomer-side content
language_agentAgent language
language_customerCustomer language
language_contentContent language

review (reviews.csv)

ColumnDescription
pidReview ID
engagement_pidReviewed engagement ID
turn_pidReviewed turn ID (if applicable)
reviewer_pidReviewer ID
reviewer_nameReviewer name
question_pidQuestion ID
question_nameQuestion text
review_timeTimestamp
review_session_idReview session ID
statusReview status
samplingSampling method
typeReview type
kindReview kind
answer_pidAnswer ID
answer_nameAnswer text
answer_reason_pidAnswer reason ID
answer_reasonAnswer reason text
confidenceConfidence score
scoreScore
answer_scoreAnswer score
worst_scoreWorst possible score
best_scoreBest possible score
commentReviewer comment
comment_translatedTranslated comment
comment_languageComment language
comment_translated_languageTranslated language
verifiedWhether verified
verified_byVerified by
verification_commentVerification comment
answer_typeAnswer type
versionVersion
form_idForm ID
engagement_start_timeEngagement start time
agent_pidAgent ID

agent (agents.csv)

ColumnDescription
pidAgent ID
external_idExternal system ID
nameAgent name
statusAgent status
typeAgent type
hourly_costHourly cost
engagement_costPer-engagement cost
teamTeam
departmentDepartment
locationLocation
organizationOrganization
roleRole
managerManager name

Example

The example below shows how to run the export from your console or terminal.

# 1. Start export
curl -X POST "https://api.eu.salted.cx/api/v1/export?from=2024-01-01T00:00:00Z&to=2024-01-02T00:00:00Z&include=engagement,turn" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Response: {"exportId":"abc-123","statusUrl":"api/v1/export/abc-123/status"}

# 2. Poll status
curl "https://api.eu.salted.cx/api/v1/export/abc-123/status" \
  -H "Authorization: Bearer YOUR_API_KEY"

# 3. When status is COMPLETED, download CSVs from the downloadUrls
curl -o engagements.csv "https://s3.eu-....engagements.csv?X-Amz-..."
curl -o turns.csv "https://s3.eu-....turns.csv?X-Amz-..."
Did this answer your question?