---
title: "Create Brand Button"
description: "How to call Create Brand Button (POST /api/brand-buttons) in the Klaviyo REST API: authentication, parameters, request and response bodies, and an example request."
url: "https://developers.klaviyo.com/en/reference/create_brand_button"
revision: "2026-10-15"
operationId: "create_brand_button"
method: "POST"
endpoint: "https://a.klaviyo.com/api/brand-buttons"
authentication: "privateKey"
scopes: ["brands:write"]
rateLimits: {"burst":"3/s","steady":"60/m"}
revisionHeader: {"name":"revision","required":true}
deprecated: false
openApi: "https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/create_brand_button.json"
jsonApi: {"fields":{"brand-button":["border","border.border_color","border.border_style","border.border_width","border.is_border_active","id","is_primary","name","preview_page_hex","spacing","spacing.padding_bottom","spacing.padding_left","spacing.padding_right","spacing.padding_top","style","style.background_color","style.border_radius","style.box_shadow","style.is_shadow_active","text","text.color","text.font_family","text.font_size","text.font_style","text.font_weight","text.letter_spacing","text.text_decoration"]}}
related: ["https://developers.klaviyo.com/en/reference/brands/llms.txt","https://developers.klaviyo.com/en/reference/get_brand_logos.md","https://developers.klaviyo.com/en/reference/get_brand_logo.md","https://developers.klaviyo.com/en/reference/create_brand_logo.md","https://developers.klaviyo.com/en/reference/update_brand_logo.md","https://developers.klaviyo.com/en/reference/delete_brand_logo.md","https://developers.klaviyo.com/en/reference/get_brand_buttons.md","https://developers.klaviyo.com/en/reference/get_brand_button.md","https://developers.klaviyo.com/en/reference/update_brand_button.md","https://developers.klaviyo.com/en/reference/delete_brand_button.md","https://developers.klaviyo.com/en/reference/get_brand_colors.md","https://developers.klaviyo.com/en/reference/get_brand_color.md","https://developers.klaviyo.com/en/reference/create_brand_color.md","https://developers.klaviyo.com/en/reference/update_brand_color.md","https://developers.klaviyo.com/en/reference/delete_brand_color.md","https://developers.klaviyo.com/en/reference/get_brand_voice.md","https://developers.klaviyo.com/en/reference/update_brand_voice.md","https://developers.klaviyo.com/en/reference/get_brand_social_groups.md","https://developers.klaviyo.com/en/reference/get_brand_social_group.md","https://developers.klaviyo.com/en/reference/create_brand_social_group.md","https://developers.klaviyo.com/en/reference/update_brand_social_group.md","https://developers.klaviyo.com/en/reference/delete_brand_social_group.md","https://developers.klaviyo.com/en/reference/get_brand_email_defaults.md","https://developers.klaviyo.com/en/reference/get_brand_email_default.md","https://developers.klaviyo.com/en/reference/update_brand_email_default.md"]
---

# Create Brand Button

> This is the Markdown version of https://developers.klaviyo.com/en/reference/create_brand_button

```http
POST https://a.klaviyo.com/api/brand-buttons
```

Create a new brand button.

- Revision header: `revision: 2026-10-15` (required)
- Scopes: `brands:write`
- Rate limits: Burst: `3/s`, Steady: `60/m`
- OpenAPI: [Download this endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/create_brand_button.json)

## Example request

### curl

```bash
curl --request POST \
     --url 'https://a.klaviyo.com/api/brand-buttons' \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'revision: 2026-10-15' \
     --header 'content-type: application/vnd.api+json' \
     --data '{
  "data": {
    "type": "brand-button",
    "attributes": {
      "style": {
        "background_color": "string",
        "border_radius": 0,
        "box_shadow": "string"
      },
      "border": {
        "border_color": "string",
        "border_style": "dashed",
        "border_width": 0
      },
      "spacing": {
        "padding_top": 0,
        "padding_right": 0,
        "padding_bottom": 0,
        "padding_left": 0
      },
      "text": {
        "color": "string",
        "font_size": 0,
        "font_style": "italic",
        "font_family": "string",
        "font_weight": 100,
        "letter_spacing": "string",
        "text_decoration": ""
      }
    }
  }
}'
```

### CLI

```bash
klaviyo brands create-brand-button \
  -d '{
  "data": {
    "type": "brand-button",
    "attributes": {
      "style": {
        "background_color": "string",
        "border_radius": 0,
        "box_shadow": "string"
      },
      "border": {
        "border_color": "string",
        "border_style": "dashed",
        "border_width": 0
      },
      "spacing": {
        "padding_top": 0,
        "padding_right": 0,
        "padding_bottom": 0,
        "padding_left": 0
      },
      "text": {
        "color": "string",
        "font_size": 0,
        "font_style": "italic",
        "font_family": "string",
        "font_weight": 100,
        "letter_spacing": "string",
        "text_decoration": ""
      }
    }
  }
}'
```

Sign in first with `klaviyo auth login`. [Install the Klaviyo CLI](https://developers.klaviyo.com/en/docs/klaviyo_cli.md)

### Python

```python
from klaviyo_api import KlaviyoAPI

klaviyo = KlaviyoAPI("your-private-api-key")

response = klaviyo.Brands.create_brand_button(
    {
        "data": {
            "type": "brand-button",
            "attributes": {
                "style": {
                    "background_color": "string",
                    "border_radius": 0,
                    "box_shadow": "string",
                },
                "border": {
                    "border_color": "string",
                    "border_style": "dashed",
                    "border_width": 0,
                },
                "spacing": {
                    "padding_top": 0,
                    "padding_right": 0,
                    "padding_bottom": 0,
                    "padding_left": 0,
                },
                "text": {
                    "color": "string",
                    "font_size": 0,
                    "font_style": "italic",
                    "font_family": "string",
                    "font_weight": 100,
                    "letter_spacing": "string",
                    "text_decoration": "",
                },
            },
        },
    },
)
```

Install it with `pip install klaviyo-api`. [The Python SDK on GitHub](https://github.com/klaviyo/klaviyo-api-python)

### Node.js

```javascript
import { ApiKeySession, BrandsApi } from 'klaviyo-api'

const session = new ApiKeySession('your-private-api-key')
const brandsApi = new BrandsApi(session)

const response = await brandsApi.createBrandButton(
  {
    data: {
      type: 'brand-button',
      attributes: {
        style: {
          backgroundColor: 'string',
          borderRadius: 0,
          boxShadow: 'string',
        },
        border: {
          borderColor: 'string',
          borderStyle: 'dashed',
          borderWidth: 0,
        },
        spacing: {
          paddingTop: 0,
          paddingRight: 0,
          paddingBottom: 0,
          paddingLeft: 0,
        },
        text: {
          color: 'string',
          fontSize: 0,
          fontStyle: 'italic',
          fontFamily: 'string',
          fontWeight: 100,
          letterSpacing: 'string',
          textDecoration: '',
        },
      },
    },
  },
)
```

Install it with `npm install klaviyo-api`. [The Node.js SDK on GitHub](https://github.com/klaviyo/klaviyo-api-node)

### Ruby

```ruby
require 'klaviyo-api-sdk'

KlaviyoAPI.configure do |config|
  config.api_key['Klaviyo-API-Key'] = 'Klaviyo-API-Key your-private-api-key'
end

response = KlaviyoAPI::Brands.create_brand_button(
  {
    data: {
      type: 'brand-button',
      attributes: {
        style: {
          background_color: 'string',
          border_radius: 0,
          box_shadow: 'string',
        },
        border: {
          border_color: 'string',
          border_style: 'dashed',
          border_width: 0,
        },
        spacing: {
          padding_top: 0,
          padding_right: 0,
          padding_bottom: 0,
          padding_left: 0,
        },
        text: {
          color: 'string',
          font_size: 0,
          font_style: 'italic',
          font_family: 'string',
          font_weight: 100,
          letter_spacing: 'string',
          text_decoration: '',
        },
      },
    },
  },
)
```

Install it with `gem install klaviyo-api-sdk`. [The Ruby SDK on GitHub](https://github.com/klaviyo/klaviyo-api-ruby)

### PHP

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

use KlaviyoAPI\KlaviyoAPI;

$klaviyo = new KlaviyoAPI('your-private-api-key');

$response = $klaviyo->Brands->createBrandButton(
    [
        'data' => [
            'type' => 'brand-button',
            'attributes' => [
                'style' => [
                    'background_color' => 'string',
                    'border_radius' => 0,
                    'box_shadow' => 'string',
                ],
                'border' => [
                    'border_color' => 'string',
                    'border_style' => 'dashed',
                    'border_width' => 0,
                ],
                'spacing' => [
                    'padding_top' => 0,
                    'padding_right' => 0,
                    'padding_bottom' => 0,
                    'padding_left' => 0,
                ],
                'text' => [
                    'color' => 'string',
                    'font_size' => 0,
                    'font_style' => 'italic',
                    'font_family' => 'string',
                    'font_weight' => 100,
                    'letter_spacing' => 'string',
                    'text_decoration' => '',
                ],
            ],
        ],
    ],
);
```

Install it with `composer require klaviyo/api`. [The PHP SDK on GitHub](https://github.com/klaviyo/klaviyo-api-php)

## Query parameters

- `fields[brand-button]` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/reference.md) Allowed values: `border`, `border.border_color`, `border.border_style`, `border.border_width`, `border.is_border_active`, `id`, `is_primary`, `name`, `preview_page_hex`, `spacing`, `spacing.padding_bottom`, `spacing.padding_left`, `spacing.padding_right`, `spacing.padding_top`, `style`, `style.background_color`, `style.border_radius`, `style.box_shadow`, `style.is_shadow_active`, `text`, `text.color`, `text.font_family`, `text.font_size`, `text.font_style`, `text.font_weight`, `text.letter_spacing`, `text.text_decoration`

## Headers

- `revision` (string, required): API endpoint revision (format: YYYY-MM-DD[.suffix]) Default: `2026-10-15`

## Request body

Content type: `application/vnd.api+json` (required)

- `data` (object, required)
  - `type` (string, required): Allowed values: `brand-button`
  - `attributes` (object, required)
    - `style` (object, required)
      - `background_color` (string, required)
      - `border_radius` (integer, required)
      - `box_shadow` (string, required)
      - `is_shadow_active` (boolean): Default: `false`
    - `border` (object, required)
      - `border_color` (string, required)
      - `border_style` (string, required): Border style. Allowed values: `dashed`, `dotted`, `solid`
      - `border_width` (integer, required)
      - `is_border_active` (boolean): Default: `false`
    - `spacing` (object, required)
      - `padding_top` (integer, required)
      - `padding_right` (integer, required)
      - `padding_bottom` (integer, required)
      - `padding_left` (integer, required)
    - `text` (object, required)
      - `color` (string, required)
      - `font_size` (integer, required)
      - `font_style` (string, required): Font style. Allowed values: `italic`, `normal`
      - `font_family` (string, required)
      - `font_weight` (integer, required): Font weight. Allowed values: `100`, `200`, `300`, `400`, `500`, `600`, `700`, `800`, `900`
      - `letter_spacing` (string | integer, required)
      - `text_decoration` (string, required): Text decoration. Allowed values: ``, `line-through`, `line-through underline`, `none`, `underline`, `underline line-through`
    - `name` (string, nullable): Human-readable name for this button.
    - `is_primary` (boolean, nullable): Whether this button is the account's primary brand button. Setting to `true` demotes any existing primary.
    - `preview_page_hex` (string, nullable): Optional hex color for the preview-page background.

### Example request body

```json
{
  "data": {
    "type": "brand-button",
    "attributes": {
      "style": {
        "background_color": "string",
        "border_radius": 0,
        "box_shadow": "string"
      },
      "border": {
        "border_color": "string",
        "border_style": "dashed",
        "border_width": 0
      },
      "spacing": {
        "padding_top": 0,
        "padding_right": 0,
        "padding_bottom": 0,
        "padding_left": 0
      },
      "text": {
        "color": "string",
        "font_size": 0,
        "font_style": "italic",
        "font_family": "string",
        "font_weight": 100,
        "letter_spacing": "string",
        "text_decoration": ""
      }
    }
  }
}
```

## Responses

### 201: Success

Content type: `application/vnd.api+json`

- `data` (object, required)
  - `type` (string, required): Allowed values: `brand-button`
  - `id` (string, required): The ID of the brand button. Example: `42`
  - `attributes` (object, required)
    - `name` (string, nullable): Human-readable name for this button. Example: `Primary CTA`
    - `is_primary` (boolean, nullable): Whether this button is the account's primary brand button. Only one button per account can be primary at a time — promoting another button automatically demotes the previous primary. Example: `true`
    - `style` (object): Same fields as BrandLibraryButtonStyles in the request body above.
    - `border` (object): Same fields as BorderStyles in the request body above.
    - `spacing` (object): Same fields as SpacingStyles in the request body above.
    - `text` (object): Same fields as BrandLibraryTextStyles in the request body above.
    - `preview_page_hex` (string, nullable): Optional hex color for the preview-page background. Example: `#ffffff`
  - `links` (object, required)
    - `self` (string<uri>, required)
- `links` (ObjectLinks): Same fields as the first ObjectLinks above.
- `meta` (object): Response-level metadata
  - `agent_hints` (object): Optional hints emitted by the API for agent callers
    - `next_steps` (string[]): Suggested follow-up actions for agents to take after this response

#### Example response body

```json
{
  "data": {
    "type": "brand-button",
    "id": "42",
    "attributes": {
      "name": "Primary CTA",
      "is_primary": true,
      "style": {
        "background_color": "string",
        "border_radius": 0,
        "box_shadow": "string",
        "is_shadow_active": false
      },
      "border": {
        "border_color": "string",
        "border_style": "dashed",
        "border_width": 0,
        "is_border_active": false
      },
      "spacing": {
        "padding_top": 0,
        "padding_right": 0,
        "padding_bottom": 0,
        "padding_left": 0
      },
      "text": {
        "color": "string",
        "font_size": 0,
        "font_style": "italic",
        "font_family": "string",
        "font_weight": 100,
        "letter_spacing": "string",
        "text_decoration": ""
      },
      "preview_page_hex": "#ffffff"
    },
    "links": {
      "self": "https://www.example.com"
    }
  },
  "links": {
    "self": "https://www.example.com"
  },
  "meta": {
    "agent_hints": {
      "next_steps": [
        "string"
      ]
    }
  }
}
```

### 4XX: Client Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```

### 5XX: Server Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```
