Shares
Shares are publicly accessible pages — either a video share page with an optional call-to-action, or a contact form that collects contact information. Shares track views and type-specific metrics (ctaClicks for video, submissions for contact forms).
All endpoints require authentication via the X-API-Key header. See Authentication.
Share types
Shares use a discriminated union on the type field:
video— Displays a video with an optional CTA (call-to-action) button linking to a URL. Requires amediaIdreferencing a video media item.contact-form— Collects contact information via a public form. Automatically generates a QR code image stored as media. Can optionally auto-create contacts from submissions.
Create a share
POST /shares
The request body differs by share type.
Video share fields
| Field | Type | Required | Notes |
|---|---|---|---|
type | string | Yes | Must be "video". |
title | string | Yes | |
description | string | No | |
active | boolean | Yes | Whether the share page is live. |
mediaId | string | Yes | Reference to a video media item. |
ctaEnabled | boolean | Yes | Whether to show a CTA button. |
ctaTitle | string | Conditional | Required if ctaEnabled is true. |
ctaUrl | string | Conditional | Required if ctaEnabled is true. |
Contact form share fields
| Field | Type | Required | Notes |
|---|---|---|---|
type | string | Yes | Must be "contact-form". |
title | string | Yes | |
description | string | No | |
active | boolean | Yes | Whether the share page is live. |
autoCreateContact | boolean | Yes | Automatically create contacts from submissions. |
existingContactUpdate | string | No | What a submission does to a contact that already exists: "overwrite" (default) replaces its values with every answer given, "fill-empty" only sets the fields it has no value for. |
contactInformation | object | Yes | See structure below. |
customFields | array | No | Custom contact fields shown on the public form. See structure below. |
autoResponse | object | No | Automatic text sent after a successful submission. See structure below. |
Contact information structure
Each field has required (boolean) and visible (boolean) properties controlling the form behavior. organization is optional; leaving it out hides the field.
Custom fields structure
Each entry references one of the organization's custom contact fields by id. Array order is display order; a field is visible on the public form by being present in the array. Rules enforced on save:
- Every
idmust belong to a custom field of the organization. - Duplicate ids are rejected.
user-type custom fields are rejected — they reference org members and cannot be filled by an anonymous submitter.
Submitted values are validated per field type (option labels resolve to option ids for select/multi-select; dates normalize to UTC-midnight epoch milliseconds) and stored on the created or matched contact's fields.
Auto-response structure
When enabled, submitters who opt in and provide a phone number receive an automatic text after their contact is created — at most once per contact per form. senderUserId must be an org member with a texting number; the text is sent from their number as a system message. contactCardMediaId is optional and must reference a vCard (text/vcard) media item of the organization, attached to the text as MMS so the recipient can save the sender's number. Opt-out suppression and the org's first-message disclosure are applied at send time. A disabled config ("enabled": false) is stored without these checks.
Example request (video)
Example request (contact form)
Response (video)
Response (contact form)
Contact form creation automatically generates a QR code image stored as media. The mediaId in the response points to this QR code.
List shares
GET /shares
Returns shares with their associated media populated.
Query parameters
| Parameter | Type | Default | Notes |
|---|---|---|---|
type | string | — | video or contact-form. |
page | number | 0 | 0-indexed. |
perPage | number | 50 | Items per page. |
Example request
Response
Get a share
GET /shares/:id
Returns a single share with its associated media populated.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Share ID. |
Example request
Response
Errors
| Status | Message | Cause |
|---|---|---|
| 400 | share/invalid-id | Invalid ObjectId format. |
Update a share
PUT /shares/:id
All fields are optional. Accepted fields depend on the share type.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Share ID. |
Common fields
| Field | Type | Required | Notes |
|---|---|---|---|
title | string | No | |
description | string | No | |
active | boolean | No | |
disableAds | boolean | No |
Video-specific fields
| Field | Type | Required | Notes |
|---|---|---|---|
ctaEnabled | boolean | No | |
ctaTitle | string | No | |
ctaUrl | string | No |
Contact form-specific fields
| Field | Type | Required | Notes |
|---|---|---|---|
autoCreateContact | boolean | No | |
existingContactUpdate | string | No | "overwrite" or "fill-empty", as on create. |
contactInformation | object | No | Same structure as create. |
customFields | array | No | Same structure and rules as create. Replaces the whole array. |
autoResponse | object | No | Same structure and rules as create. Replaces the whole object. |
Example request
Response
Delete a share
DELETE /shares/:id
Deletes a share using a transaction — removes the share document and unsets shareId from all related media documents.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Share ID. |
Example request
Response
Errors
| Status | Message | Cause |
|---|---|---|
| 400 | share/invalid-id | Invalid ObjectId format. |
Response envelope
All endpoints use the standard envelope:
Error responses:
data is null for a general failure, such as a database error or an upstream timeout. When the request is rejected because of a specific field, data carries the field(s) at fault instead:
Each issue carries a path (the dotted path into the request body) and a message. A label is added when the path is not self-describing, which today means custom fields only, for example "path": "fields.68b0a1f39c2e4d0012ab77e5", "label": "Class Year". issues is an array, but treat it as holding at most one entry: validation stops at the first failure.