# Landing | Signal House API Docs

> Create and manage Signal House landing pages through the API.

Source: https://docs.signalhouse.io/landing

---

## Landing Pages

### GET /landing/public/:landingId

Retrieve a public-facing landing page. Does not require authentication. A Toll-Free page additionally returns registrationType and a tollFree object carrying the consent disclosure and boxes the page renders; usecases and subUsecases are present but empty for those pages.

#### Request Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `landingId` | URL Param | Required | Landing Page ID. |

#### Example Response 200

Response

```json
{
  "landingData": {
    "description": "Sign up to receive updates from Acme Corp",
    "brandName": "Acme Corp",
    "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
    "themeColor": {
      "primaryBackgroundColor": "#FFFFFF",
      "secondaryBackgroundColor": "#F5F5F5",
      "primaryTextColor": "#000000",
      "secondaryTextColor": "#666666"
    },
    "webhookUrl": "https://your-server.com/api/landing-events",
    "usecases": [
      "MARKETING",
      "CUSTOMER_CARE"
    ],
    "subUsecases": [],
    "createdAt": "2024-01-15T12:00:00.000Z",
    "metaData": {
      "state": "MO",
      "email": "support@acme.com",
      "phoneNumber": "5551234567"
    },
    "registrationType": "TOLL_FREE",
    "tollFree": {
      "useCases": [
        "APPOINTMENTS",
        "BILLING"
      ],
      "channels": [
        "SMS",
        "MMS"
      ],
      "consentDisclosure": "Our message frequency may vary. Message & data rates apply. Reply STOP to unsubscribe from further messaging. Reply HELP for more information.",
      "consentBoxes": [
        {
          "useCase": "APPOINTMENTS",
          "channel": "SMS",
          "text": "Consent to receive SMS about Appointments from Acme Corp."
        },
        {
          "useCase": "APPOINTMENTS",
          "channel": "MMS",
          "text": "Consent to receive MMS about Appointments from Acme Corp."
        }
      ]
    }
  }
}
```

### GET /landing/brand/:brandId

Retrieve the landing page associated with a specific brand. Returns an empty array if not found, or a single-element array when found. Toll-Free pages also carry registrationType and the stored tollFree consent object.

**The following roles are required to use this endpoint:** `admin`, `developer`, `api`, `billing`, `user`

#### Request Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `brandId` | URL Param | Required | Brand ID. |

#### Example Response 200

Response

```json
[
  {
    "_id": "60f7b2a1c9e77c001a2b3c57",
    "landingId": "L1234567",
    "groupId": "G1234567",
    "subgroupId": "S1234567",
    "brandId": "B1234567",
    "description": "Sign up to receive updates from Acme Corp",
    "themeColor": {
      "primaryBackgroundColor": "#FFFFFF",
      "secondaryBackgroundColor": "#F5F5F5",
      "primaryTextColor": "#000000",
      "secondaryTextColor": "#666666"
    },
    "status": "ACTIVE",
    "webhookUrl": "https://your-server.com/api/landing-events",
    "usecases": [
      "MARKETING"
    ],
    "subUsecases": [],
    "landingPageUrl": "https://acme-corp.landing.example.com/intake/L1234567",
    "privacyPolicyUrl": "https://acme-corp.landing.example.com/intake/L1234567/privacy-policy",
    "termsAndConditionsUrl": "https://acme-corp.landing.example.com/intake/L1234567/terms-service",
    "optInLinkUrl": "https://acme-corp.landing.example.com/intake/L1234567",
    "createdAt": "2024-01-15T12:00:00.000Z",
    "updatedAt": "2024-01-15T12:00:00.000Z"
  }
]
```

### GET /landing/template/:brandId

Retrieve a Toll-Free brand's landing page template — the reusable presentation (description fragment, colors, logo, webhook) that every page generated for the brand snapshots at creation. Returns an empty array when the brand has no template. Toll-Free only; a 10DLC brand carries these fields on its single landing page instead.

**The following roles are required to use this endpoint:** `admin`, `developer`, `api`, `billing`, `user`

#### Request Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `brandId` | URL Param | Required | Brand ID. |

#### Example Response 200

Response

```json
[
  {
    "_id": "60f7b2a1c9e77c001a2b3c60",
    "brandId": "TFNB7K3M9QXR2V",
    "groupId": "G1234567",
    "subgroupId": "S1234567",
    "userDescription": "healthcare scheduling company",
    "themeColor": {
      "primaryBackgroundColor": "#FFFFFF",
      "secondaryBackgroundColor": "#F5F5F5",
      "primaryTextColor": "#000000",
      "secondaryTextColor": "#666666"
    },
    "webhookUrl": "https://your-server.com/api/landing-events",
    "createdAt": "2024-01-15T12:00:00.000Z",
    "updatedAt": "2024-01-15T12:00:00.000Z"
  }
]
```

### PUT /landing/template/:brandId

Create or replace a Toll-Free brand's landing page template. Sent as multipart/form-data with the logo under the file field. A brand has exactly one template, so this is an upsert. Editing a template never alters a page that already exists — pages snapshot the template at creation, so a URL already given to a carrier keeps rendering what was declared. Any field you omit keeps its stored value, so a colour-only save leaves the logo, the other colours and the webhook untouched. The logo is required only the first time. userDescription is the customer's own sentence about the business, not the finished About paragraph: the services clause naming a campaign's message types is added per page at generation.

**The following roles are required to use this endpoint:** `admin`, `developer`, `api`, `billing`, `user`

#### Request Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `brandId` | URL Param | Required | Brand ID the template belongs to. |
| `userDescription` | String | Required | The customer's own sentence about their business (max 2048 characters). |
| `primaryBackgroundColor` | String | Optional | Hex color; defaults to #FFFFFF. |
| `secondaryBackgroundColor` | String | Optional | Hex color; defaults to #FFFFFF. |
| `primaryTextColor` | String | Optional | Hex color; defaults to #000000. |
| `secondaryTextColor` | String | Optional | Hex color; defaults to #000000. |
| `webhookUrl` | String | Optional | Where generated pages post opt-in submissions. |
| `file` | File | Optional | Logo image (JPEG/PNG, max 3MB). Required when creating the template; omit to keep the stored logo. |

#### Example Response 200

Response

```json
{
  "_id": "60f7b2a1c9e77c001a2b3c60",
  "brandId": "TFNB7K3M9QXR2V",
  "groupId": "G1234567",
  "subgroupId": "S1234567",
  "userDescription": "healthcare scheduling company",
  "themeColor": {
    "primaryBackgroundColor": "#FFFFFF",
    "secondaryBackgroundColor": "#F5F5F5",
    "primaryTextColor": "#000000",
    "secondaryTextColor": "#666666"
  },
  "webhookUrl": "https://your-server.com/api/landing-events",
  "createdAt": "2024-01-15T12:00:00.000Z",
  "updatedAt": "2024-01-15T12:00:00.000Z"
}
```

### GET /landing/:landingId

Retrieve landing page details including dynamic usecases and URL fields. URL fields (landingPageUrl, privacyPolicyUrl, termsAndConditionsUrl, optInLinkUrl) are present only when the associated brand is found. Toll-Free pages also carry registrationType and the stored tollFree consent object.

**The following roles are required to use this endpoint:** `admin`, `developer`, `api`, `billing`, `user`

#### Request Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `landingId` | URL Param | Required | Landing Page ID. |

#### Example Response 200

Response

```json
{
  "_id": "60f7b2a1c9e77c001a2b3c57",
  "landingId": "L1234567",
  "groupId": "G1234567",
  "subgroupId": "S1234567",
  "brandId": "B1234567",
  "description": "Sign up to receive updates from Acme Corp",
  "themeColor": {
    "primaryBackgroundColor": "#FFFFFF",
    "secondaryBackgroundColor": "#F5F5F5",
    "primaryTextColor": "#000000",
    "secondaryTextColor": "#666666"
  },
  "status": "ACTIVE",
  "webhookUrl": "https://your-server.com/api/landing-events",
  "usecases": [
    "MARKETING",
    "CUSTOMER_CARE"
  ],
  "subUsecases": [],
  "landingPageUrl": "https://acme-corp.landing.example.com/intake/L1234567",
  "privacyPolicyUrl": "https://acme-corp.landing.example.com/intake/L1234567/privacy-policy",
  "termsAndConditionsUrl": "https://acme-corp.landing.example.com/intake/L1234567/terms-service",
  "optInLinkUrl": "https://acme-corp.landing.example.com/intake/L1234567",
  "createdAt": "2024-01-15T12:00:00.000Z",
  "updatedAt": "2024-01-15T12:00:00.000Z"
}
```

### POST /landing

Create a new landing page associated with a specific brand. Requires a file upload for the logo, unless useBrandTemplate is set for a Toll-Free page — the brand's template supplies the logo in that case.

**The following roles are required to use this endpoint:** `admin`, `developer`, `api`, `billing`, `user`

#### Request Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `brandId` | String | Optional | Brand ID. If provided, groupId and subgroupId are derived from the brand. If omitted or set to 'pending', subgroupId is required. |
| `subgroupId` | String | Optional | Subgroup ID. Required when brandId is not provided or is 'pending'. |
| `description` | String | Required | Description of the landing page. |
| `primaryBackgroundColor` | String | Optional | Primary background hex color code (e.g., #FFFFFF). Defaults to #FFFFFF. |
| `secondaryBackgroundColor` | String | Optional | Secondary background hex color code. Defaults to #FFFFFF. |
| `primaryTextColor` | String | Optional | Primary text hex color code. Defaults to #000000. |
| `secondaryTextColor` | String | Optional | Secondary text hex color code. Defaults to #000000. |
| `webhookUrl` | String | Optional | Webhook URL for landing page events. |
| `registrationType` | String | Optional | Which page type to build: TEN\_DLC (default) or TOLL\_FREE. A TOLL\_FREE page renders one consent checkbox per use case per channel from the values below instead of deriving them from the brand's campaigns. |
| `tollFree` | Object (JSON) | Optional | Toll-Free consent content. Required when registrationType is TOLL\_FREE. Sent as a JSON string in the multipart body. |
| `tollFree.useCases` | Array<String> | Optional | The campaign's real use cases. At least one required when registrationType is TOLL\_FREE. |
| `tollFree.channels` | Array<String> | Optional | Channels consent covers: SMS, MMS, VOICE. At least one required when registrationType is TOLL\_FREE. |
| `tollFree.consentDisclosure` | String | Optional | Shared disclosure rendered once above the checkboxes (max 1024 chars). Required when registrationType is TOLL\_FREE. |
| `tollFree.consentBoxes` | Array<Object> | Optional | The rendered consent boxes, each { useCase, channel, text } with text at most 512 chars. Max 16 boxes. Required when registrationType is TOLL\_FREE. |
| `useBrandTemplate` | Boolean | Optional | Toll-Free only. Build the page from the brand's landing page template (GET /landing/template/:brandId), taking its colors, logo and webhook URL from there. No logo file is required when set. description is still supplied by the caller, because the About paragraph names the message types this campaign's use cases cover. |
| `file` | File | Optional | The logo image file. Must be uploaded as a multipart/form-data field named 'file'. Max 3 MB. Required unless useBrandTemplate is set. |

#### Example Response 202

Response

```json
{
  "_id": "60f7b2a1c9e77c001a2b3c57",
  "landingId": "L1234567",
  "groupId": "G1234567",
  "subgroupId": "S1234567",
  "brandId": "B1234567",
  "description": "Sign up to receive updates from Acme Corp",
  "themeColor": {
    "primaryBackgroundColor": "#FFFFFF",
    "secondaryBackgroundColor": "#F5F5F5",
    "primaryTextColor": "#000000",
    "secondaryTextColor": "#666666"
  },
  "status": "ACTIVE",
  "landingPageUrl": "https://acme-corp.landing.example.com/intake/L1234567",
  "privacyPolicyUrl": "https://acme-corp.landing.example.com/intake/L1234567/privacy-policy",
  "termsAndConditionsUrl": "https://acme-corp.landing.example.com/intake/L1234567/terms-service",
  "optInLinkUrl": "https://acme-corp.landing.example.com/intake/L1234567",
  "createdAt": "2024-01-15T12:00:00.000Z",
  "updatedAt": "2024-01-15T12:00:00.000Z"
}
```

### PUT /landing/:landingId

Update an existing landing page.

**The following roles are required to use this endpoint:** `admin`, `developer`, `api`, `billing`, `user`

#### Request Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `landingId` | URL Param | Required | Landing Page ID to update. |
| `description` | String | Optional | Description of the landing page. |
| `primaryBackgroundColor` | String | Optional | Primary background hex color code. |
| `secondaryBackgroundColor` | String | Optional | Secondary background hex color code. |
| `primaryTextColor` | String | Optional | Primary text hex color code. |
| `secondaryTextColor` | String | Optional | Secondary text hex color code. |
| `webhookUrl` | String | Optional | Webhook URL for landing page events. |
| `registrationType` | String | Optional | Immutable once the page exists. May be resent with its current value, but a request that changes it is rejected — a page whose URL is already declared to a carrier would otherwise stop rendering the consent boxes that were declared. |
| `tollFree` | Object (JSON) | Optional | Toll-Free consent content. Replaces the whole subdocument when sent. Sent as a JSON string in the multipart body. |
| `tollFree.useCases` | Array<String> | Optional | The campaign's real use cases. At least one required when registrationType is TOLL\_FREE. |
| `tollFree.channels` | Array<String> | Optional | Channels consent covers: SMS, MMS, VOICE. At least one required when registrationType is TOLL\_FREE. |
| `tollFree.consentDisclosure` | String | Optional | Shared disclosure rendered once above the checkboxes (max 1024 chars). Required when registrationType is TOLL\_FREE. |
| `tollFree.consentBoxes` | Array<Object> | Optional | The rendered consent boxes, each { useCase, channel, text } with text at most 512 chars. Max 16 boxes. Required when registrationType is TOLL\_FREE. |
| `useBrandTemplate` | Boolean | Optional | Toll-Free only. Re-copy the brand's landing page template into this page, so a corrected logo or color reaches a page that already exists instead of creating a second one. |
| `file` | File | Optional | Updated logo image file. Must be uploaded as a multipart/form-data field named 'file'. Max 3 MB. |

#### Example Response 202

Response

```json
{
  "_id": "60f7b2a1c9e77c001a2b3c57",
  "landingId": "L1234567",
  "description": "Updated landing page description",
  "themeColor": {
    "primaryBackgroundColor": "#FFFFFF",
    "secondaryBackgroundColor": "#F5F5F5",
    "primaryTextColor": "#000000",
    "secondaryTextColor": "#666666"
  },
  "status": "ACTIVE",
  "updatedAt": "2024-01-16T14:00:00.000Z"
}
```

### DELETE /landing/:landingId

Inactivate a landing page.

**The following roles are required to use this endpoint:** `admin`, `developer`, `api`, `billing`, `user`

#### Request Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `landingId` | URL Param | Required | Landing Page ID to delete. |

#### Example Response 202

Response

```json
{
  "message": "Landing page with ID L1234567 has been deleted"
}
```
