/** * A single submission against a form. */ export interface FormSubmission { /** Submission id (starts with `fsub_`). */ id: string; /** Public submission URL (`https://forms.pinnacle.sh/{submission_id}`) — the unguessable credential used by the recipient to fill out the form. */ url: string; /** Id of the form this submission belongs to (starts with `form_`). */ form_id: string; /** Sender identifier — E.164 phone number or RCS agent id. Null if the sender could no longer be resolved (e.g. the phone number or agent was deleted after the submission). */ from: string | null; /** Recipient phone number (E.164). Null for URL-only sends (`to` was omitted at send time). */ to: string | null; /** * Submitted answers keyed by field `key`. Null if the submission has not been completed yet. * * Each value's shape depends on the field type: * - `text`, `email`, `phone`, `url`, `textarea`, `select`, `radio` → string * - `number` → number * - `checkbox` (single) → boolean * - `checkbox` (multi), `multiselect` → array of strings * - Skipped optional field → null */ data: Record | null; /** IP address the submission was POSTed from. Null for pending submissions. */ ip_address: string | null; /** User-Agent header of the browser that submitted the form. Null for pending submissions. */ user_agent: string | null; /** Timestamp of completion. Null for pending submissions; updated on each edit of a `can_update=true` submission. */ submitted_at: string | null; /** Timestamp of when the submission URL was minted. */ created_at: string; }