---
title: "Create or Update Push Token"
description: "How to call Create or Update Push Token (POST /api/push-tokens) in the Klaviyo REST API: authentication, parameters, request and response bodies, and an example request."
url: "https://developers.klaviyo.com/en/reference/create_push_token"
revision: "2026-10-15"
operationId: "create_push_token"
method: "POST"
endpoint: "https://a.klaviyo.com/api/push-tokens"
authentication: "privateKey"
scopes: ["profiles:write","push-tokens:write"]
rateLimits: {"burst":"75/s","steady":"750/m"}
revisionHeader: {"name":"revision","required":true}
deprecated: false
openApi: "https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/create_push_token.json"
related: ["https://developers.klaviyo.com/en/reference/profiles/llms.txt","https://developers.klaviyo.com/en/reference/get_push_tokens.md","https://developers.klaviyo.com/en/reference/get_push_token.md","https://developers.klaviyo.com/en/reference/delete_push_token.md","https://developers.klaviyo.com/en/reference/get_profile_for_push_token.md","https://developers.klaviyo.com/en/reference/get_profile_id_for_push_token.md"]
---

# Create or Update Push Token

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

```http
POST https://a.klaviyo.com/api/push-tokens
```

Create or update a push token.

This endpoint can be used to migrate push tokens from another platform to Klaviyo. Please use our mobile SDKs ([iOS](https://github.com/klaviyo/klaviyo-swift-sdk) and [Android](https://github.com/klaviyo/klaviyo-android-sdk)) to create push tokens from users' devices.

The maximum allowed payload size is 100KB.

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

## Example request

### curl

```bash
curl --request POST \
     --url 'https://a.klaviyo.com/api/push-tokens' \
     --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": "push-token",
    "attributes": {
      "token": "1234567890",
      "platform": "android",
      "enablement_status": "AUTHORIZED",
      "vendor": "apns",
      "background": "AVAILABLE",
      "profile": {
        "data": {
          "type": "profile",
          "attributes": {
            "phone_number": "+15005550006",
            "first_name": "Sarah",
            "last_name": "Mason",
            "organization": "Example Corporation",
            "locale": "en-US",
            "title": "Regional Manager",
            "image": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg",
            "properties": {
              "pseudonym": "Dr. Octopus"
            },
            "email": "sarah.mason@klaviyo-demo.com"
          }
        }
      }
    }
  }
}'
```

### CLI

```bash
klaviyo profiles create-push-token \
  -d '{
  "data": {
    "type": "push-token",
    "attributes": {
      "token": "1234567890",
      "platform": "android",
      "enablement_status": "AUTHORIZED",
      "vendor": "apns",
      "background": "AVAILABLE",
      "profile": {
        "data": {
          "type": "profile",
          "attributes": {
            "phone_number": "+15005550006",
            "first_name": "Sarah",
            "last_name": "Mason",
            "organization": "Example Corporation",
            "locale": "en-US",
            "title": "Regional Manager",
            "image": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg",
            "properties": {
              "pseudonym": "Dr. Octopus"
            },
            "email": "sarah.mason@klaviyo-demo.com"
          }
        }
      }
    }
  }
}'
```

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.Profiles.create_push_token(
    {
        "data": {
            "type": "push-token",
            "attributes": {
                "token": "1234567890",
                "platform": "android",
                "enablement_status": "AUTHORIZED",
                "vendor": "apns",
                "background": "AVAILABLE",
                "profile": {
                    "data": {
                        "type": "profile",
                        "attributes": {
                            "phone_number": "+15005550006",
                            "first_name": "Sarah",
                            "last_name": "Mason",
                            "organization": "Example Corporation",
                            "locale": "en-US",
                            "title": "Regional Manager",
                            "image": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg",
                            "properties": {
                                "pseudonym": "Dr. Octopus",
                            },
                            "email": "sarah.mason@klaviyo-demo.com",
                        },
                    },
                },
            },
        },
    },
)
```

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

### Node.js

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

const session = new ApiKeySession('your-private-api-key')
const profilesApi = new ProfilesApi(session)

const response = await profilesApi.createPushToken(
  {
    data: {
      type: 'push-token',
      attributes: {
        token: '1234567890',
        platform: 'android',
        enablementStatus: 'AUTHORIZED',
        vendor: 'apns',
        background: 'AVAILABLE',
        profile: {
          data: {
            type: 'profile',
            attributes: {
              phoneNumber: '+15005550006',
              firstName: 'Sarah',
              lastName: 'Mason',
              organization: 'Example Corporation',
              locale: 'en-US',
              title: 'Regional Manager',
              image: 'https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg',
              properties: {
                pseudonym: 'Dr. Octopus',
              },
              email: 'sarah.mason@klaviyo-demo.com',
            },
          },
        },
      },
    },
  },
)
```

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::Profiles.create_push_token(
  {
    data: {
      type: 'push-token',
      attributes: {
        token: '1234567890',
        platform: 'android',
        enablement_status: 'AUTHORIZED',
        vendor: 'apns',
        background: 'AVAILABLE',
        profile: {
          data: {
            type: 'profile',
            attributes: {
              phone_number: '+15005550006',
              first_name: 'Sarah',
              last_name: 'Mason',
              organization: 'Example Corporation',
              locale: 'en-US',
              title: 'Regional Manager',
              image: 'https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg',
              properties: {
                pseudonym: 'Dr. Octopus',
              },
              email: 'sarah.mason@klaviyo-demo.com',
            },
          },
        },
      },
    },
  },
)
```

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->Profiles->createPushToken(
    [
        'data' => [
            'type' => 'push-token',
            'attributes' => [
                'token' => '1234567890',
                'platform' => 'android',
                'enablement_status' => 'AUTHORIZED',
                'vendor' => 'apns',
                'background' => 'AVAILABLE',
                'profile' => [
                    'data' => [
                        'type' => 'profile',
                        'attributes' => [
                            'phone_number' => '+15005550006',
                            'first_name' => 'Sarah',
                            'last_name' => 'Mason',
                            'organization' => 'Example Corporation',
                            'locale' => 'en-US',
                            'title' => 'Regional Manager',
                            'image' => 'https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg',
                            'properties' => [
                                'pseudonym' => 'Dr. Octopus',
                            ],
                            'email' => 'sarah.mason@klaviyo-demo.com',
                        ],
                    ],
                ],
            ],
        ],
    ],
);
```

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

## 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: `push-token`
  - `attributes` (object, required)
    - `token` (string, required): A push token from APNS or FCM. Example: `1234567890`
    - `platform` (string, required): The platform on which the push token was created. Allowed values: `android`, `ios`
    - `enablement_status` (string, nullable): This is the enablement status for the individual push token. Allowed values: `AUTHORIZED`, `DENIED`, `NOT_DETERMINED`, `PROVISIONAL`, `UNAUTHORIZED` Default: `AUTHORIZED` Example: `AUTHORIZED`
    - `vendor` (string, required): The vendor of the push token. Allowed values: `apns`, `fcm` Example: `apns`
    - `background` (string, nullable): The background state of the push token. Allowed values: `AVAILABLE`, `DENIED`, `RESTRICTED` Default: `AVAILABLE` Example: `AVAILABLE`
    - `device_metadata` (object)
      - `device_id` (string, nullable): Relatively stable ID for the device. Will update on app uninstall and reinstall Example: `1234567890`
      - `klaviyo_sdk` (string, nullable): The name of the SDK used to create the push token. Allowed values: `android`, `flutter`, `flutter_community`, `react_native`, `swift` Example: `swift`
      - `sdk_version` (string, nullable): The version of the SDK used to create the push token Example: `1.0.0`
      - `device_model` (string, nullable): The model of the device Example: `iPhone12,1`
      - `os_name` (string, nullable): The name of the operating system on the device. Allowed values: `android`, `ios`, `ipados`, `macos`, `tvos` Example: `ios`
      - `os_version` (string, nullable): The version of the operating system on the device Example: `14.0`
      - `manufacturer` (string, nullable): The manufacturer of the device Example: `Apple`
      - `app_name` (string, nullable): The name of the app that created the push token Example: `Klaviyo`
      - `app_version` (string, nullable): The version of the app that created the push token Example: `1.0.0`
      - `app_build` (string, nullable): The build of the app that created the push token Example: `1`
      - `app_id` (string, nullable): The ID of the app that created the push token Example: `com.klaviyo.app`
      - `environment` (string, nullable): The environment in which the push token was created Allowed values: `debug`, `release` Example: `release`
    - `profile` (object, required): The profile associated with the push token to create/update
      - `data` (object, required): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/create_push_token.json).

### Example request body

```json
{
  "data": {
    "type": "push-token",
    "attributes": {
      "token": "1234567890",
      "platform": "android",
      "enablement_status": "AUTHORIZED",
      "vendor": "apns",
      "background": "AVAILABLE",
      "profile": {
        "data": {
          "type": "profile",
          "attributes": {
            "phone_number": "+15005550006",
            "first_name": "Sarah",
            "last_name": "Mason",
            "organization": "Example Corporation",
            "locale": "en-US",
            "title": "Regional Manager",
            "image": "https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg",
            "properties": {
              "pseudonym": "Dr. Octopus"
            },
            "email": "sarah.mason@klaviyo-demo.com"
          }
        }
      }
    }
  }
}
```

## Responses

### 202: Success

This response has no body.

### 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"
      }
    }
  ]
}
```
