Overview

Nightly Data Exports give you a complete, up-to-date snapshot of your Prompt data delivered automatically each night. Every morning you'll have fresh CSV files covering your contacts, messages, broadcasts, opt-ins, opt-outs, and more, ready to load into your data warehouse, or any downstream system. (See attached export_schema.xlsx)


Delivery & File Format

Files are delivered as gzipped CSVs (.csv.gz). Each file corresponds to one data table and contains all records for your organization up to the time of export.

File Naming & Directory Structure

Files follow this naming convention:

tableName_orgId_YYYY-MM-DDTHH-MM-SS-TZZ.csv.gz 

For example, the message table for org 1044 on February 4th, 2026 would be:

message_1044_2026-02-04T00-00-00-0800Z.csv.gz 

Each org's files are placed in a subdirectory named after their org ID (e.g., 1044/).

The org table is an exception — it contains a list of all orgs included in the export subscription, so it does not contain an org ID in the filename and is placed in the root directory:

org_2026-02-04T00-00-00-0800Z.csv.gz 

Export Timing

The export runs around 1am PT each night. The timestamp in each filename corresponds to the midnight prior to the export run.

Note on contact data: The contact, contact_tag, and contact_data exports may include records updated after midnight (up to the time the export runs). This is intentional — it prevents confusion when a record was edited the day before and then again in the early hours before the export completes.


Data Schema

The export contains the following eight tables. Foreign key relationships are noted where applicable.

org

A list of the organizations included in your export subscription.

Field

Description

id

Unique ID of the org

created_timestamp

Timestamp of when the org was created

subdomain

Org's subdomain

name

Org's name


contact

All contacts in your org, including their current opt-out status and geographic metadata derived from their phone number.

Field

Description

id

Primary key for the contact table

created_timestamp

Time the contact was created

updated_timestamp

Time the contact was last updated (either a name change or opt-out status change)

is_opted_out

true if the contact has opted out

opt_out_timestamp

Time the contact opted out, if is_opted_out is true

phone

Phone number of the contact

display_name

Name of the contact

country_code

Numeric country code of the contact's phone number (e.g., 1 for US or Canada, 44 for UK)

area_code

Area code of the contact's phone number (e.g., 555 for +15551234567)

country_postal_code

2-letter country code of the contact's phone number (e.g., US, CA)

region

2-letter abbreviation of the US state or Canadian province/territory

timezone

Timezone corresponding to the contact's phone number region


contact_data

Custom data fields associated with each contact — both org-managed fields and system-managed fields.

Field

Description

id

Primary key for the contact_data table. Note: id + managed together form the unique key, as managed and non-managed records can share the same id

managed

true if this is a system-managed field that cannot be edited by your org (e.g., pio_lastBulkActionData)

created_timestamp

Time the data field was created

updated_timestamp

Time the data field was last updated

contact_id

ID of the contact this data belongs to (foreign key → contact.id)

key

Key (name) of the data field

value

Value of the data field. Blank if the field has been deleted


contact_tag

Tags applied to contacts. Deleted tags remain in the export with a deleted_timestamp.

Field

Description

id

Primary key for the contact_tag table

created_timestamp

Time the tag was added to the contact

updated_timestamp

Time the tag was last updated

contact_id

ID of the contact this tag belongs to (foreign key → contact.id)

name

Name of the tag

deleted_timestamp

If the tag was deleted, the time it was deleted. Blank if the tag is still active


opt_out

A record for every opt-out event, including whether it was contact-initiated (STOP keyword) or managed (via API or automation).

Field

Description

id

Primary key for the opt_out table

created_timestamp

Time the opt-out occurred

contact_id

ID of the contact that opted out (foreign key → contact.id)

org_phone

If the contact opted out by texting a STOP keyword, this is the org phone number they sent the opt-out to

type

CONTACT if the contact texted a STOP keyword; MANAGED if the opt-out was triggered via API, a library, smart link action, instant app action, or similar


opt_in

Same structure as opt_out, but records opt-in events.

Field

Description

id

Primary key for the opt_in table

created_timestamp

Time the opt-in occurred

contact_id

ID of the contact that opted in (foreign key → contact.id)

org_phone

The org phone number associated with the opt-in, if applicable

type

CONTACT if contact-initiated; MANAGED if triggered via API or automation


message

Every inbound and outbound message, including delivery status, billing flags, and broadcast attribution.

Field

Description

id

Primary key for the message table

created_timestamp

For an inbound message: the time it was received. For an outbound message: the time it was created and queued

sent_timestamp

For an outbound message: the time it was dequeued and sent to the upstream provider. Blank for inbound messages

content

The message body for an SMS, or the text portion of an MMS. Blank for MMS messages with no text content

is_mms

true if the message is MMS; false if SMS

is_outgoing

true if the message was sent from Prompt to the contact

is_broadcast

true if the message was sent as part of a broadcast. See broadcast_id for which broadcast

is_successful

true if the message reached a SENT or DELIVERED state. Note: in rare cases a SENT message could transition to UNDELIVERED after the export; subsequent exports will not reflect this change in this release

is_billable

true if the message will be charged (reached at least SENT state). Note: UNDELIVERED is a failed status but is still billable

error_code

Error code if the message was not successful

error_message

Error description if the message was not successful

is_whisper

true if this is an internal whisper message not delivered to the contact

segments

Number of segments for an SMS message. Always 1 for MMS

contact_phone

Phone number of the contact the message was sent to or received from

contact_id

ID of the contact the message was sent to or received from (foreign key → contact.id)

org_phone

The org's phone number (the "From" number for outbound, or "To" number for inbound)

broadcast_id

For broadcast messages: the ID of the broadcast. For inbound messages: the ID of a recent broadcast this reply can be attributed to, if applicable (foreign key → broadcast.id)

team_member_id

ID of the team member who sent the message, for outbound messages sent by a person. Blank for inbound, system-generated, or API-sent messages


broadcast

Summary-level data for each broadcast, including targeting configuration, timing, and engagement metrics.

Field

Description

id

Primary key for the broadcast table

created_timestamp

Time the broadcast was created

description

Description of the broadcast

is_p2p

true if this is a P2P (person-to-person) broadcast; false for A2P (application-to-person)

is_scrub

true if list scrubbing was enabled when the broadcast was initialized

is_advanced_targeting

true if the broadcast used advanced contact selection (contact queries, data fields, tags, prior broadcast membership, exclusions, etc.). If false, targeting was based solely on one or more contact lists specified in contact_list_ids

start_timestamp

Time the broadcast started sending. May differ from created_timestamp if the broadcast was scheduled

finish_timestamp

Time the broadcast finished sending

num_contacts

Total number of contacts targeted

num_sent

Number of contacts that messages were successfully sent to

num_errors

Number of messages that errored

num_opt_outs

Number of contacts who opted out following this broadcast

num_responded

Number of contacts who replied (not including contacts who received a follow-up reply from an agent, which are counted separately in num_replied_to_reply)

num_replied_to_reply

Number of contacts who replied and then received a follow-up reply from an agent

num_skipped

Number of contacts skipped by a team member during a P2P broadcast

num_canceled

Number of contacts whose messages were canceled before sending, due to an aborted broadcast

contact_list_ids

Comma-separated list of contact list IDs targeted by this broadcast. Relevant when is_advanced_targeting is false

export_schema.xlsx
9.9 KB