---
title: "Register push token"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sureshake.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sureshake API › notifications

`POST /v2/notifications/push-tokens`

## Request body

_Required._

- `expoPushToken` (`notification-register-push-token.expoPushToken`; string, required)
  - minLength 1
- `platform` (`notification-register-push-token.platform`; string, optional)
  - one of `"ios"`, `"android"`, `"web"`, `"unknown"`; default `"unknown"`
- `deviceId` (`notification-register-push-token.deviceId`; string, optional, nullable)
  - maxLength 255
- `appId` (`notification-register-push-token.appId`; string, optional, nullable)
  - maxLength 255

## Example request

```json
{
  "expoPushToken": "string",
  "platform": "ios",
  "deviceId": "string",
  "appId": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.sureshake.com/v2/notifications/push-tokens \
  --header 'Content-Type: application/json' \
  --data '
{
  "expoPushToken": "string",
  "platform": "ios",
  "deviceId": "string",
  "appId": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sureshake.com/v2/notifications/push-tokens';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({expoPushToken: 'string', platform: 'ios', deviceId: 'string', appId: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sureshake.com/v2/notifications/push-tokens"

payload = {
    "expoPushToken": "string",
    "platform": "ios",
    "deviceId": "string",
    "appId": "string"
}
headers = {"Content-Type": "application/json"}

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

print(response.text)
```

## Responses

### 200

Default Response

#### Example

```json
{
  "success": true
}
```

- `success` (`notification-register-push-token.response.200.success`; boolean, required)

### 400

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`notification-register-push-token.response.400.error`; object, required)
  - `code` (`notification-register-push-token.response.400.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`notification-register-push-token.response.400.error.message`; string, required) — Human-readable error message
  - `details` (`notification-register-push-token.response.400.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`notification-register-push-token.response.400.error.traceId`; string, optional) — Unique ID for log correlation

### 401

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`notification-register-push-token.response.401.error`; object, required)
  - `code` (`notification-register-push-token.response.401.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`notification-register-push-token.response.401.error.message`; string, required) — Human-readable error message
  - `details` (`notification-register-push-token.response.401.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`notification-register-push-token.response.401.error.traceId`; string, optional) — Unique ID for log correlation

### 500

Default Response

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null,
    "traceId": "string"
  }
}
```

- `error` (`notification-register-push-token.response.500.error`; object, required)
  - `code` (`notification-register-push-token.response.500.error.code`; string, required) — Machine-readable error code (e.g., NOT_FOUND)
  - `message` (`notification-register-push-token.response.500.error.message`; string, required) — Human-readable error message
  - `details` (`notification-register-push-token.response.500.error.details`; unknown, optional) — Optional structured error details
  - `traceId` (`notification-register-push-token.response.500.error.traceId`; string, optional) — Unique ID for log correlation


Source: https://docs.sureshake.com/reference/notification-register-push-token/index.md
