# Autofill Brand Information

`POST /brands/autofill`

Automatically populate brand information based on partial input data you provide.

## Authentication

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

## Request body

This endpoint expects an object.

Either 'name' or 'website' must be provided.

Required.

Content type: `application/json`.

### Fields

- `additional_info` — `string`, optional. Any extra details about the brand to help improve data accuracy.
- `name` — `string`, optional. Name of the brand.
- `options` — `AutofillBrandOptions`, optional
- `options.forceReload` — `boolean`, optional, default: false. Set to true to bypass cached data and fetch fresh information.
- `website` — `string`, optional, format: url. Brand's website URL.

### Example

```json
{
  "additional_info": "A developer-friendly, compliant API for SMS, MMS, and RCS, built to scale real conversations.",
  "name": "Pinnacle",
  "options": {
    "forceReload": true
  },
  "website": "https://www.pinnacle.sh"
}
```

## Responses

### 200

Returns enriched brand information retrieved from the autofill service.

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

- `address` — `string`, optional. Primary brand address where this brand is located.
- `contact` — `OptionalContacts`, optional. Contact information for the primary brand representative.
- `contact.email` — `string`, optional. Email address of the contact person.
- `contact.name` — `string`, optional. Full name of the contact person.
- `contact.phone` — `string`, optional. Phone number of the contact person in E.164 format.
- `contact.title` — `string`, optional. Job title or position oft he contact person.
- `dba` — `string`, optional. "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` — `CompanySectorEnum`, optional, values: `AGRICULTURE`, `COMMUNICATION`, `CONSTRUCTION`, `EDUCATION`, `ENERGY`, `ENTERTAINMENT`, `FINANCIAL`, `GAMBLING`, `GOVERNMENT`, `HEALTHCARE`, `HOSPITALITY`, `INSURANCE`, `MANUFACTURING`, `NGO`, `REAL_ESTATE`, `RETAIL`, `TECHNOLOGY`. Industry the Brand operates in.
- `type` — `CompanyTypeEnum`, optional, values: `GOVERNMENT`, `NON_PROFIT`, `PRIVATE_PROFIT`, `PUBLIC_PROFIT`, `SOLE_PROPRIETOR`. Legal structure of the brand.
- `entityType` — `CompanyEntityTypeEnum`, optional, values: `LLC`, `SOLE_PROPRIETORSHIP`, `PARTNERSHIP`, `CORP`, `S_CORP`. Legal entity type of the brand.
- `website` — `string`, optional. Brand website URL.

Example:

```json
{
  "name": "Pinnacle",
  "dba": "Pinnacle Messaging",
  "address": "500 Folsom St, San Francisco, CA 94105",
  "email": "founders@trypinnacle.app",
  "website": "https://www.pinnacle.sh",
  "type": "PRIVATE_PROFIT",
  "sector": "TECHNOLOGY",
  "ein": "88-1234567",
  "contact": {
    "name": "Michael Chen",
    "email": "michael.chen@trypinnacle.app",
    "phone": "+14155551234",
    "title": "Customer Support Representative"
  },
  "entityType": "LLC"
}
```

### 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.brands.autofill({
    additional_info: "A developer-friendly, compliant API for SMS, MMS, and RCS, built to scale real conversations.",
    name: "Pinnacle",
    options: {
        forceReload: true
    },
    website: "https://www.pinnacle.sh"
});
```

### Python

```python
import os
from rcs import Pinnacle
from rcs.brands import AutofillBrandOptions

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

client.brands.autofill(
    additional_info="A developer-friendly, compliant API for SMS, MMS, and RCS, built to scale real conversations.",
    name="Pinnacle",
    options=AutofillBrandOptions(
        force_reload=True,
    ),
    website="https://www.pinnacle.sh",
)
```

### Ruby

```ruby
require "rcs"

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

client.brands.autofill(
  additional_info: "A developer-friendly, compliant API for SMS, MMS, and RCS, built to scale real conversations.",
  name: "Pinnacle",
  options: {
    force_reload: true
  },
  website: "https://www.pinnacle.sh"
)
```

## Machine-readable schema

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