> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.pinnacle.sh/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.pinnacle.sh/_mcp/server.

# Create or Update Toll-Free Campaign

POST https://api.pinnacle.sh/campaigns/toll-free
Content-Type: application/json

Create a new toll-free campaign or update an existing one.

**To create a new campaign:** Omit `campaignId` — one will be generated automatically.

**Before you start:** Create a [brand](/api-reference/brands/upsert) first — you'll need its `id` for the [`brand`](#request.body.brand) field.

All fields are **required** unless specified otherwise, and will be validated when [submitted](/api-reference/campaigns/toll-free/submit).

**See the response for example values for each field.**

Reference: https://docs.pinnacle.sh/api-reference/campaigns/toll-free/upsert

## Authentication

- `PINNACLE-API-KEY` header (required) — API Key authentication via header

## Request

### Body (application/json)

This endpoint expects an UpsertTollFreeSchema.

- `brand` (string, optional) — Brand id. This identifier is a string that always begins with the prefix `b_`, for example: `b_1234567890`.
- `campaignId` (string, optional) — Unique identifier for the campaign. This identifier is a string that always begins with the prefix `tf_`, for example: `tf_1234567890`.
- `keywords` (TollFreeCampaignKeywords, optional) — Keyword response configuration.
- `links` (TollFreeCampaignLinks, optional) — Legal documentation links.
- `monthlyVolume` (enum, optional) — Message volume.
  - Allowed values: `10`, `100`, `1,000`, `10,000`, `100,000`, `250,000`, `500,000`, `750,000`, `1,000,000`, `5,000,000`, `10,000,000+`
- `name` (string, optional) — Display name of the campaign. This is not sent to carriers for approval and is only used for your reference on the Pinnacle dashboard.
- `optIn` (TollFreeCampaignOptIn, optional) — Opt-in method and workflow.
- `options` (TollFreeCampaignOptions, optional) — Campaign configuration options.
- `productionMessageContent` (string, optional) — Example message(s) that would be sent in production. Should reflect the actual content users will receive, including HELP/STOP disclosures. See the [Production Message Content](/guides/campaigns/opt-in-compliance#production-message-content) section for requirements.
- `useCase` (TollFreeCampaignUseCase, optional) — Use case classification for the campaign.

## Response

### 200

Successfully created or updated toll-free campaign.

- `brand` (ExtendedBrand, required) — Brand associated with this campaign.
- `status` (enum, required) — Current review status of the brand. `INCOMPLETE`: Has not been submitted. `PENDING`: Currently being reviewed. `VERIFIED`: Verified and good to go. `VETTED`: Brand has been vetted by an external provider and has received vetting scores.
  - Allowed values: `INCOMPLETE`, `IN REVIEW`, `VERIFIED`, `FAILED`
- `campaignId` (string, required) — Unique identifier for the campaign. Begins with the prefix `tf_`.
- `keywords` (TollFreeWithExtendedBrandAndStatusKeywords, optional) — Keyword response configuration.
- `links` (TollFreeWithExtendedBrandAndStatusLinks, optional) — Legal documentation links.
- `monthlyVolume` (enum, optional) — Message volume.
  - Allowed values: `10`, `100`, `1,000`, `10,000`, `100,000`, `250,000`, `500,000`, `750,000`, `1,000,000`, `5,000,000`, `10,000,000+`
- `name` (string, optional) — Display name of the campaign.
- `optIn` (TollFreeWithExtendedBrandAndStatusOptIn, optional) — Opt-in keyword settings.
- `options` (TollFreeWithExtendedBrandAndStatusOptions, optional) — Campaign configuration options.
- `productionMessageContent` (string, optional) — Explain message that would be sent.
- `useCase` (TollFreeWithExtendedBrandAndStatusUseCase, optional) — Use case classification for the campaign.

## Errors

### 400 Bad Request Error

Validation failed. The payload has missing required fields and/or invalid types.&#x20; See [https://zod.dev/error-formatting](https://zod.dev/error-formatting) for more information.

- `description` (string, required) — Human-readable summary of validation failures.
- `errors` (ZodErrorErrors, required) — Structured dictionary of issues containing two main sections: - `errors`: Array of global validation errors not tied to specific fields - `properties`: Object mapping field names to their specific validation errors, where each field contains an `errors` array

### 401 Unauthorized Error

The request lacks valid authentication credentials or the provided credentials are invalid.&#x20; Ensure you're including a valid API key in the request headers and that your account has the necessary permissions to access this endpoint.

- `error` (string, required) — Human-readable description of the error that occurred, corresponding to the HTTP status code.

### 403 Forbidden Error

Your subscription does not include access to this feature.&#x20; This occurs when attempting to use functionality that requires a higher subscription tier. Please upgrade your subscription to access this feature.

- `error` (string, required) — Human-readable description of the error that occurred, corresponding to the HTTP status code.

### 404 Not Found Error

The requested resource could not be found.&#x20; This may occur if the identifier is incorrect, the resource has been deleted, or you don't have permission to access it.

- `error` (string, required) — Human-readable description of the error that occurred, corresponding to the HTTP status code.

### 500 Internal Server Error

An unexpected error occurred on Pinnacle's servers while processing your request.&#x20; If this error persists, please contact support with the request details.

- `error` (string, required) — Human-readable description of the error that occurred, corresponding to the HTTP status code.

## Types

### TollFreeCampaignKeywords

Keyword response configuration.

- `HELP` (TollFreeCampaignHelpKeywords, optional) — Help keyword settings.
- `OPT_IN` (TollFreeCampaignOptInKeywords, optional) — Opt-in keyword settings.

### TollFreeCampaignLinks

Legal documentation links.

- `privacyPolicy` (string, optional) — Privacy policy URL.
- `termsOfService` (string, optional) — Terms of service URL.

### TollFreeCampaignOptIn

Opt-in method and workflow.

- `method` (enum, optional) — Method used to collect opt-in consent from users. See the [Opt-In Methods and Workflow](/guides/campaigns/opt-in-compliance#opt-in-methods-and-workflow) section for detailed requirements. - `DIGITAL`: Web form, app, or online checkout. Requires URL to the form. Checkbox must not be pre-selected. - `PAPER`: Physical paper form (in-store, event, etc.). Requires URL/image of the form with SMS disclosures visible. - `TEXT`: Text-to-join keyword campaign. Users text a keyword to opt in. Requires the keyword and number. - `VERBAL`: In-person or phone consent. Not allowed for marketing campaigns. Requires script and confirmation SMS details.
  - Allowed values: `DIGITAL`, `PAPER`, `TEXT`, `VERBAL`
- `url` (string, optional) — URL where the opt-in form or documentation can be found.
- `workflowDescription` (string, optional) — Describe your opt-in workflow. See the [Opt-In Methods and Workflow](/guides/campaigns/opt-in-compliance#opt-in-methods-and-workflow) section for requirements and examples.

### TollFreeCampaignOptions

Campaign configuration options.

- `ageGated` (boolean, optional, default: false) — Whether the campaign is age-gated.

### TollFreeCampaignUseCase

Use case classification for the campaign.

- `summary` (string, optional) — Detailed summary of the use case explaining what messages will be sent and how users interact with the campaign. See the [Use Case Summary](/guides/campaigns/opt-in-compliance#use-case-summary) section for requirements and examples.
- `value` (enum, optional) — The primary use case classification for this campaign.
  - Allowed values: `APP_NOTIFICATIONS`, `APPOINTMENTS`, `AUCTIONS`, `AUTO_REPAIR_SERVICES`, `BANK_TRANSFERS`, `BILLING`, `BOOKING_CONFIRMATIONS`, `BUSINESS_UPDATES`, `CAREER_TRAINING`, `CHATBOT`, `CONVERSATIONAL_ALERTS`, `COURIER_SERVICES_DELIVERIES`, `COVID_19_ALERTS`, `EMERGENCY_ALERTS`, `EVENTS_PLANNING`, `FINANCIAL_SERVICES`, `FRAUD_ALERTS`, `FUNDRAISING`, `GENERAL_MARKETING`, `GENERAL_SCHOOL_UPDATES`, `HEALTHCARE_ALERTS`, `HOUSING_COMMUNITY_UPDATES`, `HR_STAFFING`, `INSURANCE_SERVICES`, `JOB_DISPATCH`, `LEGAL_SERVICES`, `MIXED`, `MOTIVATIONAL_REMINDERS`, `NOTARY_NOTIFICATIONS`, `ORDER_NOTIFICATIONS`, `POLITICAL`, `PUBLIC_WORKS`, `REAL_ESTATE_SERVICES`, `RELIGIOUS_SERVICES`, `REPAIR_DIAGNOSTICS_ALERTS`, `REWARDS_PROGRAM`, `SURVEYS`, `SYSTEM_ALERTS`, `TWO_FA`, `VOTING_REMINDERS`, `WAITLIST_ALERTS`, `WEBINAR_REMINDERS`, `WORKSHOP_ALERTS`

### ExtendedBrand

- `createdAt` (string, required) — ISO 8601 formatted timestamp of when this brand was added to our system.
- `id` (string, required) — The brand's ID. This identifier is a string that always begins with the prefix `b_`, for example: `b_1234567890`.
- `isArchived` (boolean, required) — Indicates if this brand is archived.
- `status` (enum, required) — Current review status of the brand.&#x20; `INCOMPLETE`: Not submitted.&#x20; `IN REVIEW`: Being reviewed by carriers.&#x20; `VERIFIED`: Approved and ready to send messages.&#x20; `FAILED`: Issues and errors related to the campaign's details.&#x20; `VETTED`: Has undergone additional vetting by a third party service post the brand being verified. Your brand will be assigned a trust score, with higher trust scores having higher message volumes.&#x20; `UNVERIFIED`: Brand details have been updated, and the brand will need to undergo re-verification.
  - Allowed values: `PENDING`, `UNVERIFIED`, `VERIFIED`, `VETTED`, `FAILED`, `INCOMPLETE`
- `updatedAt` (string, required) — ISO 8601 formatted timestamp of when this brand was last updated.
- `address` (string, optional) — Primary brand address where this brand is located.
- `contact` (optionalContactSchema, optional) — Contact information for the primary brand representative.
- `dba` (string, optional, nullable) — "Doing Business As" name - the public name this brand operates under.
- `description` (string, optional) — Brief description of what this brand does.
- `ein` (string, optional) — Employer Identification Number (EIN) assigned by the IRS.
- `email` (string, optional) — Main contact email address for this brand.
- `name` (string, optional) — Legal name of the brand as registered.
- `sector` (enum, optional) — Industry the Brand operates in.
  - Allowed values: `AGRICULTURE`, `COMMUNICATION`, `CONSTRUCTION`, `EDUCATION`, `ENERGY`, `ENTERTAINMENT`, `FINANCIAL`, `GAMBLING`, `GOVERNMENT`, `HEALTHCARE`, `HOSPITALITY`, `INSURANCE`, `MANUFACTURING`, `NGO`, `REAL_ESTATE`, `RETAIL`, `TECHNOLOGY`
- `type` (enum, optional) — Legal structure of the brand.
  - Allowed values: `GOVERNMENT`, `NON_PROFIT`, `PRIVATE_PROFIT`, `PUBLIC_PROFIT`, `SOLE_PROPRIETOR`
- `entityType` (enum, optional) — Legal entity type of the brand.
  - Allowed values: `LLC`, `SOLE_PROPRIETORSHIP`, `PARTNERSHIP`, `CORP`, `S_CORP`
- `website` (string, optional) — Brand website URL.

### TollFreeWithExtendedBrandAndStatusKeywords

Keyword response configuration.

- `HELP` (TollFreeWithExtendedBrandAndStatusKeywordsHelp, optional) — Help keyword settings.
- `OPT_IN` (TollFreeWithExtendedBrandAndStatusKeywordsOptIn, optional) — Opt-in keyword settings.

### TollFreeWithExtendedBrandAndStatusLinks

Legal documentation links.

- `privacyPolicy` (string, optional) — Privacy policy URL.
- `termsOfService` (string, optional) — Terms of service URL.

### TollFreeWithExtendedBrandAndStatusOptIn

Opt-in keyword settings.

- `method` (enum, optional) — Method used to collect opt-in consent from users. See the [Opt-In Methods and Workflow](/guides/campaigns/opt-in-compliance#opt-in-methods-and-workflow) section for detailed requirements. - `DIGITAL`: Web form, app, or online checkout. Requires URL to the form. Checkbox must not be pre-selected. - `PAPER`: Physical paper form (in-store, event, etc.). Requires URL/image of the form with SMS disclosures visible. - `TEXT`: Text-to-join keyword campaign. Users text a keyword to opt in. Requires the keyword and number. - `VERBAL`: In-person or phone consent. Not allowed for marketing campaigns. Requires script and confirmation SMS details.
  - Allowed values: `DIGITAL`, `PAPER`, `TEXT`, `VERBAL`
- `url` (string, optional) — Url to opt in.
- `workflowDescription` (string, optional) — Explain how users find the opt-in.

### TollFreeWithExtendedBrandAndStatusOptions

Campaign configuration options.

- `ageGated` (boolean, optional) — Whether the campaign is age-gated.

### TollFreeWithExtendedBrandAndStatusUseCase

Use case classification for the campaign.

- `summary` (string, optional) — Summary of the use case.
- `value` (enum, optional) — The primary use case classification for this campaign.
  - Allowed values: `APP_NOTIFICATIONS`, `APPOINTMENTS`, `AUCTIONS`, `AUTO_REPAIR_SERVICES`, `BANK_TRANSFERS`, `BILLING`, `BOOKING_CONFIRMATIONS`, `BUSINESS_UPDATES`, `CAREER_TRAINING`, `CHATBOT`, `CONVERSATIONAL_ALERTS`, `COURIER_SERVICES_DELIVERIES`, `COVID_19_ALERTS`, `EMERGENCY_ALERTS`, `EVENTS_PLANNING`, `FINANCIAL_SERVICES`, `FRAUD_ALERTS`, `FUNDRAISING`, `GENERAL_MARKETING`, `GENERAL_SCHOOL_UPDATES`, `HEALTHCARE_ALERTS`, `HOUSING_COMMUNITY_UPDATES`, `HR_STAFFING`, `INSURANCE_SERVICES`, `JOB_DISPATCH`, `LEGAL_SERVICES`, `MIXED`, `MOTIVATIONAL_REMINDERS`, `NOTARY_NOTIFICATIONS`, `ORDER_NOTIFICATIONS`, `POLITICAL`, `PUBLIC_WORKS`, `REAL_ESTATE_SERVICES`, `RELIGIOUS_SERVICES`, `REPAIR_DIAGNOSTICS_ALERTS`, `REWARDS_PROGRAM`, `SURVEYS`, `SYSTEM_ALERTS`, `TWO_FA`, `VOTING_REMINDERS`, `WAITLIST_ALERTS`, `WEBINAR_REMINDERS`, `WORKSHOP_ALERTS`

### ZodErrorErrors

Structured dictionary of issues containing two main sections: - `errors`: Array of global validation errors not tied to specific fields - `properties`: Object mapping field names to their specific validation errors, where each field contains an `errors` array

### TollFreeCampaignHelpKeywords

Help keyword settings.

- `message` (string, optional) — Message sent when a user sends HELP. Must include at least one support contact method (phone, email, or website). See the [Help keyword requirements](/guides/campaigns/opt-in-compliance#keyword-response-messages).

### TollFreeCampaignOptInKeywords

Opt-in keyword settings.

- `message` (string, optional) — Message sent when a user opts in. Must include brand name, confirmation of subscription, and disclosures (STOP and HELP instructions, message and data rates). See the [Opt-In keyword requirements](/guides/campaigns/opt-in-compliance#keyword-response-messages).
- `keywords` (list of string, optional) — Keywords that trigger opt-in response.

### optionalContactSchema

Contact information for the primary brand representative.

- `email` (string, optional) — Email address of the contact person.
- `name` (string, optional) — Full name of the contact person.
- `phone` (string, optional) — Phone number of the contact person in E.164 format.
- `title` (string, optional) — Job title or position oft he contact person.

### TollFreeWithExtendedBrandAndStatusKeywordsHelp

Help keyword settings.

- `message` (string, optional) — Message sent when a user sends HELP. Must include at least one support contact method (phone, email, or website).

### TollFreeWithExtendedBrandAndStatusKeywordsOptIn

Opt-in keyword settings.

- `message` (string, optional) — Message sent when a user opt-in. Must include brand name, confirmation of subscription, and disclosures (STOP and HELP instructions, message and data rates).
- `keywords` (list of string, optional) — Keywords that trigger opt-in response.

## Examples

**Request**

```json
{
  "brand": "b_1234567890",
  "campaignId": "tf_1234567890",
  "keywords": {
    "HELP": {
      "message": "Pinnacle Software Development Inc.: For assistance, visit https://pinnacle.sh/support or email founders@trypinnacle.app. Msg&data rates may apply. Reply STOP to cancel."
    },
    "OPT_IN": {
      "message": "Pinnacle Software Development Inc.: You're enrolled in account & security alerts. Msg&data rates may apply. Message frequency varies. Reply HELP for help, STOP to cancel. Terms: https://pinnacle.sh/terms/ Privacy: https://pinnacle.sh/privacy/",
      "keywords": [
        "START",
        "SUBSCRIBE"
      ]
    }
  },
  "links": {
    "privacyPolicy": "https://www.pinnacle.sh/privacy",
    "termsOfService": "https://www.pinnacle.sh/terms"
  },
  "monthlyVolume": "10,000",
  "name": "Pinnacle",
  "optIn": {
    "method": "PAPER",
    "url": "https://www.pinnacle.sh/opt-in",
    "workflowDescription": "End users opt-in when filling out the in-person intake forms where they will write their phone numbers and check a box indicating that they've opted in to messages. Link to paper form: https://www.pinnacle.sh/opt-in"
  },
  "options": {
    "ageGated": false
  },
  "productionMessageContent": "Hi [First Name], your order #[Order ID] has shipped and will arrive [Date]. Track here: [URL]. Reply HELP for help or STOP to unsubscribe.",
  "useCase": {
    "summary": "Customers who have opted into text messages can interact with our automated SMS chatbot to receive transaction-driven notifications (order status, shipping updates, account alerts), ask support questions, share photos with friends, and manage their account details via simple, conversational text flows. All messages are transactional or interactive flows customers opt into. Users can send images (e.g., receipts) and get guided replies.",
    "value": "CHATBOT"
  }
}
```

**Response**

```json
{
  "brand": {
    "createdAt": "2024-08-17T08:00:30.632",
    "id": "b_1234567890",
    "isArchived": false,
    "status": "VERIFIED",
    "updatedAt": "2024-12-09T10:03:54.934",
    "address": "500 Folsom Street, San Francisco, CA 94105",
    "contact": {
      "email": "janedoe1@pinnacle.example",
      "name": "Jane Doe",
      "phone": "+14155550123",
      "title": "Customer Support Specialist"
    },
    "dba": "Pinnacle RCS",
    "ein": "12-3456789",
    "email": "founders@trypinnacle.app",
    "name": "Pinnacle",
    "sector": "TECHNOLOGY",
    "type": "PRIVATE_PROFIT",
    "website": "https://www.pinnacle.sh/"
  },
  "status": "VERIFIED",
  "campaignId": "tf_1234567890",
  "keywords": {
    "HELP": {
      "message": "Pinnacle Software Development Inc.: For assistance, visit https://pinnacle.sh/support or email founders@trypinnacle.app. Msg&data rates may apply. Reply STOP to cancel."
    },
    "OPT_IN": {
      "message": "Pinnacle Software Development Inc.: You're enrolled in account & security alerts. Msg&data rates may apply. Message frequency varies. Reply HELP for help, STOP to cancel. Terms: https://pinnacle.sh/terms/ Privacy: https://pinnacle.sh/privacy/",
      "keywords": [
        "START",
        "SUBSCRIBE"
      ]
    }
  },
  "links": {
    "privacyPolicy": "https://www.pinnacle.sh/privacy",
    "termsOfService": "https://www.pinnacle.sh/terms"
  },
  "monthlyVolume": "10,000",
  "name": "Pinnacle's Account Notifications",
  "optIn": {
    "method": "PAPER",
    "url": "https://www.pinnacle.sh/opt-in",
    "workflowDescription": "End users opt-in when filling out the in-person intake forms where they will write their phone numbers and check a box indicating that they've opted in to messages. Link to paper form: https://www.pinnacle.sh/opt-in"
  },
  "options": {
    "ageGated": false
  },
  "productionMessageContent": "• Hi [First Name], your order #[Order ID] has shipped and will arrive [Date]. Track here: [URL]. Reply HELP for help or STOP to unsubscribe.\n• Heads up! [Friend Name] shared 3 photos. Reply VIEW to see them. Reply HELP for help or STOP to unsubscribe.\n• Hello [First Name]! I'm Pinnacle's virtual assistant. How can I help you today? Ask about order status, account updates, photo sharing, or more. Reply HELP for assistance or STOP to unsubscribe.",
  "useCase": {
    "summary": "Customers who have opted into text messages can interact with our automated SMS chatbot to receive transaction-driven notifications (order status, shipping updates, account alerts), ask support questions, share photos with friends, and manage their account details via simple, conversational text flows. All messages are transactional or interactive flows customers opt into. Users can send images (e.g., receipts) and get guided replies.",
    "value": "CHATBOT"
  }
}
```

**SDK Code**

```python Upserted Toll-Free Campaign
import requests

url = "https://api.pinnacle.sh/campaigns/toll-free"

payload = {
    "brand": "b_1234567890",
    "campaignId": "tf_1234567890",
    "keywords": {
        "HELP": { "message": "Pinnacle Software Development Inc.: For assistance, visit https://pinnacle.sh/support or email founders@trypinnacle.app. Msg&data rates may apply. Reply STOP to cancel." },
        "OPT_IN": {
            "message": "Pinnacle Software Development Inc.: You're enrolled in account & security alerts. Msg&data rates may apply. Message frequency varies. Reply HELP for help, STOP to cancel. Terms: https://pinnacle.sh/terms/ Privacy: https://pinnacle.sh/privacy/",
            "keywords": ["START", "SUBSCRIBE"]
        }
    },
    "links": {
        "privacyPolicy": "https://www.pinnacle.sh/privacy",
        "termsOfService": "https://www.pinnacle.sh/terms"
    },
    "monthlyVolume": "10,000",
    "name": "Pinnacle",
    "optIn": {
        "method": "PAPER",
        "url": "https://www.pinnacle.sh/opt-in",
        "workflowDescription": "End users opt-in when filling out the in-person intake forms where they will write their phone numbers and check a box indicating that they've opted in to messages. Link to paper form: https://www.pinnacle.sh/opt-in"
    },
    "options": { "ageGated": False },
    "productionMessageContent": "Hi [First Name], your order #[Order ID] has shipped and will arrive [Date]. Track here: [URL]. Reply HELP for help or STOP to unsubscribe.",
    "useCase": {
        "summary": "Customers who have opted into text messages can interact with our automated SMS chatbot to receive transaction-driven notifications (order status, shipping updates, account alerts), ask support questions, share photos with friends, and manage their account details via simple, conversational text flows. All messages are transactional or interactive flows customers opt into. Users can send images (e.g., receipts) and get guided replies.",
        "value": "CHATBOT"
    }
}
headers = {
    "PINNACLE-API-KEY": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Upserted Toll-Free Campaign
const url = 'https://api.pinnacle.sh/campaigns/toll-free';
const options = {
  method: 'POST',
  headers: {'PINNACLE-API-KEY': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"brand":"b_1234567890","campaignId":"tf_1234567890","keywords":{"HELP":{"message":"Pinnacle Software Development Inc.: For assistance, visit https://pinnacle.sh/support or email founders@trypinnacle.app. Msg&data rates may apply. Reply STOP to cancel."},"OPT_IN":{"message":"Pinnacle Software Development Inc.: You\'re enrolled in account & security alerts. Msg&data rates may apply. Message frequency varies. Reply HELP for help, STOP to cancel. Terms: https://pinnacle.sh/terms/ Privacy: https://pinnacle.sh/privacy/","keywords":["START","SUBSCRIBE"]}},"links":{"privacyPolicy":"https://www.pinnacle.sh/privacy","termsOfService":"https://www.pinnacle.sh/terms"},"monthlyVolume":"10,000","name":"Pinnacle","optIn":{"method":"PAPER","url":"https://www.pinnacle.sh/opt-in","workflowDescription":"End users opt-in when filling out the in-person intake forms where they will write their phone numbers and check a box indicating that they\'ve opted in to messages. Link to paper form: https://www.pinnacle.sh/opt-in"},"options":{"ageGated":false},"productionMessageContent":"Hi [First Name], your order #[Order ID] has shipped and will arrive [Date]. Track here: [URL]. Reply HELP for help or STOP to unsubscribe.","useCase":{"summary":"Customers who have opted into text messages can interact with our automated SMS chatbot to receive transaction-driven notifications (order status, shipping updates, account alerts), ask support questions, share photos with friends, and manage their account details via simple, conversational text flows. All messages are transactional or interactive flows customers opt into. Users can send images (e.g., receipts) and get guided replies.","value":"CHATBOT"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Upserted Toll-Free Campaign
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.pinnacle.sh/campaigns/toll-free"

	payload := strings.NewReader("{\n  \"brand\": \"b_1234567890\",\n  \"campaignId\": \"tf_1234567890\",\n  \"keywords\": {\n    \"HELP\": {\n      \"message\": \"Pinnacle Software Development Inc.: For assistance, visit https://pinnacle.sh/support or email founders@trypinnacle.app. Msg&data rates may apply. Reply STOP to cancel.\"\n    },\n    \"OPT_IN\": {\n      \"message\": \"Pinnacle Software Development Inc.: You're enrolled in account & security alerts. Msg&data rates may apply. Message frequency varies. Reply HELP for help, STOP to cancel. Terms: https://pinnacle.sh/terms/ Privacy: https://pinnacle.sh/privacy/\",\n      \"keywords\": [\n        \"START\",\n        \"SUBSCRIBE\"\n      ]\n    }\n  },\n  \"links\": {\n    \"privacyPolicy\": \"https://www.pinnacle.sh/privacy\",\n    \"termsOfService\": \"https://www.pinnacle.sh/terms\"\n  },\n  \"monthlyVolume\": \"10,000\",\n  \"name\": \"Pinnacle\",\n  \"optIn\": {\n    \"method\": \"PAPER\",\n    \"url\": \"https://www.pinnacle.sh/opt-in\",\n    \"workflowDescription\": \"End users opt-in when filling out the in-person intake forms where they will write their phone numbers and check a box indicating that they've opted in to messages. Link to paper form: https://www.pinnacle.sh/opt-in\"\n  },\n  \"options\": {\n    \"ageGated\": false\n  },\n  \"productionMessageContent\": \"Hi [First Name], your order #[Order ID] has shipped and will arrive [Date]. Track here: [URL]. Reply HELP for help or STOP to unsubscribe.\",\n  \"useCase\": {\n    \"summary\": \"Customers who have opted into text messages can interact with our automated SMS chatbot to receive transaction-driven notifications (order status, shipping updates, account alerts), ask support questions, share photos with friends, and manage their account details via simple, conversational text flows. All messages are transactional or interactive flows customers opt into. Users can send images (e.g., receipts) and get guided replies.\",\n    \"value\": \"CHATBOT\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("PINNACLE-API-KEY", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Upserted Toll-Free Campaign
require 'uri'
require 'net/http'

url = URI("https://api.pinnacle.sh/campaigns/toll-free")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["PINNACLE-API-KEY"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"brand\": \"b_1234567890\",\n  \"campaignId\": \"tf_1234567890\",\n  \"keywords\": {\n    \"HELP\": {\n      \"message\": \"Pinnacle Software Development Inc.: For assistance, visit https://pinnacle.sh/support or email founders@trypinnacle.app. Msg&data rates may apply. Reply STOP to cancel.\"\n    },\n    \"OPT_IN\": {\n      \"message\": \"Pinnacle Software Development Inc.: You're enrolled in account & security alerts. Msg&data rates may apply. Message frequency varies. Reply HELP for help, STOP to cancel. Terms: https://pinnacle.sh/terms/ Privacy: https://pinnacle.sh/privacy/\",\n      \"keywords\": [\n        \"START\",\n        \"SUBSCRIBE\"\n      ]\n    }\n  },\n  \"links\": {\n    \"privacyPolicy\": \"https://www.pinnacle.sh/privacy\",\n    \"termsOfService\": \"https://www.pinnacle.sh/terms\"\n  },\n  \"monthlyVolume\": \"10,000\",\n  \"name\": \"Pinnacle\",\n  \"optIn\": {\n    \"method\": \"PAPER\",\n    \"url\": \"https://www.pinnacle.sh/opt-in\",\n    \"workflowDescription\": \"End users opt-in when filling out the in-person intake forms where they will write their phone numbers and check a box indicating that they've opted in to messages. Link to paper form: https://www.pinnacle.sh/opt-in\"\n  },\n  \"options\": {\n    \"ageGated\": false\n  },\n  \"productionMessageContent\": \"Hi [First Name], your order #[Order ID] has shipped and will arrive [Date]. Track here: [URL]. Reply HELP for help or STOP to unsubscribe.\",\n  \"useCase\": {\n    \"summary\": \"Customers who have opted into text messages can interact with our automated SMS chatbot to receive transaction-driven notifications (order status, shipping updates, account alerts), ask support questions, share photos with friends, and manage their account details via simple, conversational text flows. All messages are transactional or interactive flows customers opt into. Users can send images (e.g., receipts) and get guided replies.\",\n    \"value\": \"CHATBOT\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Upserted Toll-Free Campaign
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.pinnacle.sh/campaigns/toll-free")
  .header("PINNACLE-API-KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"brand\": \"b_1234567890\",\n  \"campaignId\": \"tf_1234567890\",\n  \"keywords\": {\n    \"HELP\": {\n      \"message\": \"Pinnacle Software Development Inc.: For assistance, visit https://pinnacle.sh/support or email founders@trypinnacle.app. Msg&data rates may apply. Reply STOP to cancel.\"\n    },\n    \"OPT_IN\": {\n      \"message\": \"Pinnacle Software Development Inc.: You're enrolled in account & security alerts. Msg&data rates may apply. Message frequency varies. Reply HELP for help, STOP to cancel. Terms: https://pinnacle.sh/terms/ Privacy: https://pinnacle.sh/privacy/\",\n      \"keywords\": [\n        \"START\",\n        \"SUBSCRIBE\"\n      ]\n    }\n  },\n  \"links\": {\n    \"privacyPolicy\": \"https://www.pinnacle.sh/privacy\",\n    \"termsOfService\": \"https://www.pinnacle.sh/terms\"\n  },\n  \"monthlyVolume\": \"10,000\",\n  \"name\": \"Pinnacle\",\n  \"optIn\": {\n    \"method\": \"PAPER\",\n    \"url\": \"https://www.pinnacle.sh/opt-in\",\n    \"workflowDescription\": \"End users opt-in when filling out the in-person intake forms where they will write their phone numbers and check a box indicating that they've opted in to messages. Link to paper form: https://www.pinnacle.sh/opt-in\"\n  },\n  \"options\": {\n    \"ageGated\": false\n  },\n  \"productionMessageContent\": \"Hi [First Name], your order #[Order ID] has shipped and will arrive [Date]. Track here: [URL]. Reply HELP for help or STOP to unsubscribe.\",\n  \"useCase\": {\n    \"summary\": \"Customers who have opted into text messages can interact with our automated SMS chatbot to receive transaction-driven notifications (order status, shipping updates, account alerts), ask support questions, share photos with friends, and manage their account details via simple, conversational text flows. All messages are transactional or interactive flows customers opt into. Users can send images (e.g., receipts) and get guided replies.\",\n    \"value\": \"CHATBOT\"\n  }\n}")
  .asString();
```

```php Upserted Toll-Free Campaign
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.pinnacle.sh/campaigns/toll-free', [
  'body' => '{
  "brand": "b_1234567890",
  "campaignId": "tf_1234567890",
  "keywords": {
    "HELP": {
      "message": "Pinnacle Software Development Inc.: For assistance, visit https://pinnacle.sh/support or email founders@trypinnacle.app. Msg&data rates may apply. Reply STOP to cancel."
    },
    "OPT_IN": {
      "message": "Pinnacle Software Development Inc.: You\'re enrolled in account & security alerts. Msg&data rates may apply. Message frequency varies. Reply HELP for help, STOP to cancel. Terms: https://pinnacle.sh/terms/ Privacy: https://pinnacle.sh/privacy/",
      "keywords": [
        "START",
        "SUBSCRIBE"
      ]
    }
  },
  "links": {
    "privacyPolicy": "https://www.pinnacle.sh/privacy",
    "termsOfService": "https://www.pinnacle.sh/terms"
  },
  "monthlyVolume": "10,000",
  "name": "Pinnacle",
  "optIn": {
    "method": "PAPER",
    "url": "https://www.pinnacle.sh/opt-in",
    "workflowDescription": "End users opt-in when filling out the in-person intake forms where they will write their phone numbers and check a box indicating that they\'ve opted in to messages. Link to paper form: https://www.pinnacle.sh/opt-in"
  },
  "options": {
    "ageGated": false
  },
  "productionMessageContent": "Hi [First Name], your order #[Order ID] has shipped and will arrive [Date]. Track here: [URL]. Reply HELP for help or STOP to unsubscribe.",
  "useCase": {
    "summary": "Customers who have opted into text messages can interact with our automated SMS chatbot to receive transaction-driven notifications (order status, shipping updates, account alerts), ask support questions, share photos with friends, and manage their account details via simple, conversational text flows. All messages are transactional or interactive flows customers opt into. Users can send images (e.g., receipts) and get guided replies.",
    "value": "CHATBOT"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'PINNACLE-API-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Upserted Toll-Free Campaign
using RestSharp;

var client = new RestClient("https://api.pinnacle.sh/campaigns/toll-free");
var request = new RestRequest(Method.POST);
request.AddHeader("PINNACLE-API-KEY", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"brand\": \"b_1234567890\",\n  \"campaignId\": \"tf_1234567890\",\n  \"keywords\": {\n    \"HELP\": {\n      \"message\": \"Pinnacle Software Development Inc.: For assistance, visit https://pinnacle.sh/support or email founders@trypinnacle.app. Msg&data rates may apply. Reply STOP to cancel.\"\n    },\n    \"OPT_IN\": {\n      \"message\": \"Pinnacle Software Development Inc.: You're enrolled in account & security alerts. Msg&data rates may apply. Message frequency varies. Reply HELP for help, STOP to cancel. Terms: https://pinnacle.sh/terms/ Privacy: https://pinnacle.sh/privacy/\",\n      \"keywords\": [\n        \"START\",\n        \"SUBSCRIBE\"\n      ]\n    }\n  },\n  \"links\": {\n    \"privacyPolicy\": \"https://www.pinnacle.sh/privacy\",\n    \"termsOfService\": \"https://www.pinnacle.sh/terms\"\n  },\n  \"monthlyVolume\": \"10,000\",\n  \"name\": \"Pinnacle\",\n  \"optIn\": {\n    \"method\": \"PAPER\",\n    \"url\": \"https://www.pinnacle.sh/opt-in\",\n    \"workflowDescription\": \"End users opt-in when filling out the in-person intake forms where they will write their phone numbers and check a box indicating that they've opted in to messages. Link to paper form: https://www.pinnacle.sh/opt-in\"\n  },\n  \"options\": {\n    \"ageGated\": false\n  },\n  \"productionMessageContent\": \"Hi [First Name], your order #[Order ID] has shipped and will arrive [Date]. Track here: [URL]. Reply HELP for help or STOP to unsubscribe.\",\n  \"useCase\": {\n    \"summary\": \"Customers who have opted into text messages can interact with our automated SMS chatbot to receive transaction-driven notifications (order status, shipping updates, account alerts), ask support questions, share photos with friends, and manage their account details via simple, conversational text flows. All messages are transactional or interactive flows customers opt into. Users can send images (e.g., receipts) and get guided replies.\",\n    \"value\": \"CHATBOT\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Upserted Toll-Free Campaign
import Foundation

let headers = [
  "PINNACLE-API-KEY": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "brand": "b_1234567890",
  "campaignId": "tf_1234567890",
  "keywords": [
    "HELP": ["message": "Pinnacle Software Development Inc.: For assistance, visit https://pinnacle.sh/support or email founders@trypinnacle.app. Msg&data rates may apply. Reply STOP to cancel."],
    "OPT_IN": [
      "message": "Pinnacle Software Development Inc.: You're enrolled in account & security alerts. Msg&data rates may apply. Message frequency varies. Reply HELP for help, STOP to cancel. Terms: https://pinnacle.sh/terms/ Privacy: https://pinnacle.sh/privacy/",
      "keywords": ["START", "SUBSCRIBE"]
    ]
  ],
  "links": [
    "privacyPolicy": "https://www.pinnacle.sh/privacy",
    "termsOfService": "https://www.pinnacle.sh/terms"
  ],
  "monthlyVolume": "10,000",
  "name": "Pinnacle",
  "optIn": [
    "method": "PAPER",
    "url": "https://www.pinnacle.sh/opt-in",
    "workflowDescription": "End users opt-in when filling out the in-person intake forms where they will write their phone numbers and check a box indicating that they've opted in to messages. Link to paper form: https://www.pinnacle.sh/opt-in"
  ],
  "options": ["ageGated": false],
  "productionMessageContent": "Hi [First Name], your order #[Order ID] has shipped and will arrive [Date]. Track here: [URL]. Reply HELP for help or STOP to unsubscribe.",
  "useCase": [
    "summary": "Customers who have opted into text messages can interact with our automated SMS chatbot to receive transaction-driven notifications (order status, shipping updates, account alerts), ask support questions, share photos with friends, and manage their account details via simple, conversational text flows. All messages are transactional or interactive flows customers opt into. Users can send images (e.g., receipts) and get guided replies.",
    "value": "CHATBOT"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.pinnacle.sh/campaigns/toll-free")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```