# Autofill RCS Campaign Information

`POST /campaigns/rcs/autofill`

Generate campaign details based off existing campaign and the brand it's connected to.

## Authentication

Send your API key in the `PINNACLE-API-KEY` header.

## Request body

Required.

Content type: `application/json`.

### Fields

- `additionalInfo` — `string`, optional. Any additional information you want to provide.
- `campaignId` — `string`, optional. Unique identifier for the campaign.
- When autofilling 10DLC campaigns, it must begin with the prefix `dlc_` (e.g., `dlc_1234567890`)
- When autofilling Toll-Free campaigns, it must begin with the prefix `tf_` (e.g., `tf_1234567890`)
- When autofilling RCS campaigns, it must begin with the prefix `rcs_` (e.g., `rcs_1234567890`)

### Example

```json
{
  "additionalInfo": "Please autofill missing campaign fields using my brand profile",
  "campaignId": "dlc_1234567890"
}
```

## Responses

### 200

Returns autofilled RCS information.

Content type: `application/json`. Schema: `object`.

- `brand` — `string`, optional
- `agent` — `object`, optional. Agent configured to the campaign.
- `agent.name` — `string`, optional. Name of the agent.
- `agent.description` — `string`, optional. Description of the agent.
- `agent.color` — `string`, optional. Color of the agent's buttons.
- `agent.emails` — `object[]`, optional. List of emails.
- `agent.emails[].email` — `string`, optional. Email attached to the agent.
- `agent.emails[].label` — `string`, optional. Label for the email.
- `agent.phones` — `object[]`, optional. List of phone numbers.
- `agent.phones[].phone` — `string`, optional. Phone number attached to the agent in E.164 format.
- `agent.phones[].label` — `string`, optional. Label for the phone number.
- `agent.websites` — `object[]`, optional. List of urls.
- `agent.websites[].url` — `string`, optional. Url attached to the agent.
- `agent.websites[].label` — `string`, optional. Label for the url.
- `agent.heroUrl` — `string`, optional. Link to the agent's hero. Hero must be an image file with dimensions 1440x448px.
- `agent.iconUrl` — `string`, optional. Link to the agent's icon. Icon must be an image file with dimensions 224x224px.
- `campaignId` — `string`, optional. Unique identifier for the campaign.
- `expectedAgentResponses` — `string[]`, optional. List of what the agent might say to users. See the Expected Agent Responses section for requirements.
- `links` — `object`, optional. Legal documentation links.
- `links.privacyPolicy` — `string`, optional, format: url. Privacy policy URL.
- `links.termsOfService` — `string`, optional, format: url. Terms of service URL.
- `useCaseDescription` — `string`, optional. Detailed summary of what the brand is and how this agent will be used. See the Use Case Behavior section for requirements.
- `messagingType` — `RcsMessagingTypeEnum`, optional, values: `OTP`, `TRANSACTIONAL`, `PROMOTIONAL`, `MULTI_USE`. Type of message the agent sends.

`OTP`: One time passwords or verification codes.

`TRANSACTIONAL`: Account updates, alerts, or notifications.

`PROMOTIONAL`: Marketing, sales, or offers.

`MULTI_USE`: Mixed message types.
- `ctaMedia` — `string`, optional. URL to the opt-in form or a URL to a screenshot of the opt-in CTA.
- `optInMethod` — `string`, optional. Details on how opt-in is acquired. If it is done through a website or app, provide the link. See the Opt-In Method section for requirements.
- `keywords` — `object`, optional
- `keywords.HELP` — `object`, optional
- `keywords.HELP.message` — `string`, optional. Message sent when a user sends HELP. Must include at least one support contact method (phone, email, or website). See the Keyword Response Messages section for requirements.
- `keywords.HELP.keywords` — `string[]`, optional. Keywords that trigger help response.
- `keywords.OPT_IN` — `object`, optional
- `keywords.OPT_IN.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 Keyword Response Messages section for requirements.
- `keywords.OPT_IN.keywords` — `string[]`, optional. Keywords that trigger opt-in response.
- `keywords.OPT_OUT` — `object`, optional
- `keywords.OPT_OUT.message` — `string`, optional. Message sent when a user opts out. Must include brand name, acknowledge opt-out request and state user will not receive further messages. No marketing or re-engagement attempts. See the Keyword Response Messages section for requirements.
- `keywords.OPT_OUT.keywords` — `string[]`, optional. Keywords that trigger opt-out response.
- `traffic` — `object`, optional
- `traffic.monthlyWebsite` — `integer`, optional. Estimated monthly website visitors.
- `traffic.monthlyRcsEstimate` — `integer`, optional. Estimated monthly RCS messages sent.
- `ctaLanguage` — `string`, optional. Required text that appears next to the opt-in checkbox for your opt-in form. This checkbox has to be unchecked by default. See the CTA Language section for requirements.
- `demoTrigger` — `string`, optional. Instructions on how an external reviewer can trigger messages and an example flow from the agent. This is usually an inbound text message to the agent that will start a flow of messages between the agent and the user. See the Demo Trigger section for requirements.

Example:

```json
{
  "brand": "b_1234567890",
  "campaignId": "rcs_1234567890",
  "agent": {
    "name": "Pinnacle - RCS Demo",
    "description": "Experience the power of RCS messaging with interactive demos. Test rich features like carousels, suggested replies, and media sharing. Get started with our developer-friendly APIs.",
    "color": "#000000",
    "emails": [
      {
        "email": "founders@trypinnacle.app",
        "label": "Email Us"
      }
    ],
    "phones": [
      {
        "phone": "+14154467821",
        "label": "Contact us directly"
      }
    ],
    "websites": [
      {
        "url": "https://www.trypinnacle.app/",
        "label": "Get started with Pinnacle"
      }
    ],
    "heroUrl": "https://pncl.to/D6pDSqGxqgfbCfQmw4gXdnlHu4uSB4",
    "iconUrl": "https://pncl.to/mq_tdIDenRb5eYpJiM8-3THCaUBrZP"
  },
  "expectedAgentResponses": [
    "Here are the things I can help you with.",
    "I can assist you with booking an appointment, or you may choose to book manually.",
    "Here are the available times to connect with a representative tomorrow.",
    "Your appointment has been scheduled."
  ],
  "useCaseDescription": "Pinnacle is a developer-focused RCS assistant that helps teams design, test, and optimize rich messaging experiences across SMS, MMS, and RCS. The agent acts as both an \"onboarding guide\" for new customers and a \"best-practices coach\" for existing teams exploring higher-value RCS workflows like rich cards, carousels, and suggested actions.<br>\n\nThe agent delivers a mix of operational updates and educational content (2–6 messages/month). Content includes important platform notices (e.g., deliverability or throughput changes), implementation tips with sample RCS templates, and personalized recommendations on how to upgrade existing SMS campaigns into richer, higher-converting RCS conversations.\n",
  "messagingType": "MULTI_USE",
  "ctaMedia": "https://www.pinnacle.sh/send",
  "optInMethod": "We ensure consent through an explicit opt-in process that follows 10DLC best practices.Users must agree to receive messages from Pinnacle before the agent sends them any messages.<br>\n\nUsers agree to these messages by signing an opt-in paper form that they can be found online at https://www.pinnacle.sh/opt-in. We only send messages once users have filled out the form and submitted it to us via email or through the dashboard.\n",
  "keywords": {
    "HELP": {
      "message": "Email founders@trypinnacle.app for support.",
      "keywords": [
        "HELP",
        "SUPPORT"
      ]
    },
    "OPT_IN": {
      "message": "Welcome back to Pinnacle!<br>\n🔔 You're now subscribed and will continue receiving important updates and news. Feel free to contact this us at any time for help.<br>\n\nReply STOP to opt out and HELP for support. Message & rates may apply.\n",
      "keywords": [
        "START",
        "SUBSCRIBE"
      ]
    },
    "OPT_OUT": {
      "message": "You've been unsubscribed from Pinnacle - RCS Demo and will no longer receive notifications. If you ever change your mind, reply START or SUBSCRIBE to rejoin anytime.",
      "keywords": [
        "STOP",
        "UNSUBSCRIBE",
        "END"
      ]
    }
  },
  "traffic": {
    "monthlyWebsite": 10000,
    "monthlyRcsEstimate": 10000
  },
  "ctaLanguage": "By checking this box and submitting this form, you consent to receive transactional text messages for support, appointment, and reminder messages from Pinnacle Software Development Inc. Reply STOP to opt out. Reply HELP for help. Standard message and data rates may apply. Message frequency may vary. View our Terms and Conditions at https://www.pinnacle.sh/terms. View our Privacy Policy at https://www.pinnacle.sh/privacy.",
  "demoTrigger": "Text \"START\" to trigger the flow.",
  "links": {
    "privacyPolicy": "https://www.pinnacle.sh/privacy",
    "termsOfService": "https://www.pinnacle.sh/terms"
  }
}
```

### 400

Validation failed. The payload has missing required fields and/or invalid types.

See https://zod.dev/error-formatting for more information.

Content type: `application/json`. Schema: `object`.

- `description` — `string`. Human-readable summary of validation failures.
- `errors` — `object`. 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

Example:

```json
{
  "description": "✖ Invalid input: expected string, received number\n  → at example_field",
  "errors": {
    "errors": [
      "Unrecognized key: 'extraKey'"
    ],
    "properties": {
      "example_field": {
        "errors": [
          "Invalid input: expected string, received NaN"
        ]
      }
    }
  }
}
```

### 401

The request lacks valid authentication credentials or the provided credentials are invalid.

Ensure you're including a valid API key in the request headers and that your account has the necessary permissions to access this endpoint.

Content type: `application/json`. Schema: `object`.

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

Example:

```json
{
  "error": "Invalid API key."
}
```

### 403

Your subscription does not include access to this feature.

This occurs when attempting to use functionality that requires a higher subscription tier.
Please upgrade your subscription to access this feature.

Content type: `application/json`. Schema: `object`.

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

Example:

```json
{
  "error": "Your subscription does not include access to this feature."
}
```

### 500

An unexpected error occurred on Pinnacle's servers while processing your request.

If this error persists, please contact support with the request details.

Content type: `application/json`. Schema: `object`.

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

Example:

```json
{
  "error": "An unexpected error occurred while processing your request."
}
```

## SDK examples

### TypeScript

```typescript
import { PinnacleClient } from "rcs-js";

const client = new PinnacleClient({
  apiKey: process.env.PINNACLE_API_KEY!,
});

await client.campaigns.rcs.autofill({
    additionalInfo: "Please autofill missing campaign fields using my brand profile",
    campaignId: "dlc_1234567890"
});
```

### Python

```python
import os
from rcs import Pinnacle

client = Pinnacle(
    api_key=os.environ["PINNACLE_API_KEY"],
)

client.campaigns.rcs.autofill(
    additional_info="Please autofill missing campaign fields using my brand profile",
    campaign_id="dlc_1234567890",
)
```

### Ruby

```ruby
require "rcs"

client = Pinnacle::Client.new(
  api_key: ENV.fetch("PINNACLE_API_KEY")
)

client.campaigns.rcs.autofill(
  additional_info: "Please autofill missing campaign fields using my brand profile",
  campaign_id: "dlc_1234567890"
)
```

## Machine-readable schema

[OpenAPI 3.1 JSON](https://docs.pinnacle.sh/openapi.json)
