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

# Register a push token

> Store a device's APNs token so we can send to it.

The SDK does this automatically. Call it yourself only if you
[integrate manually](https://docs.pushnotif.ai/sdk/push-handling.md#manual-integration) without the SDK.

## Body

**device** `object` *required*

The [device](https://docs.pushnotif.ai/api/overview.md#the-device-object) the token belongs to.

**token** `string` *required*

The APNs device token as hexadecimal.

**topic** `string` *required*

Your app's bundle id.

**environment** `string` *required*

`sandbox` for development-signed builds (Xcode, the simulator), `production`
for TestFlight and the App Store. A token only works in the environment that
issued it.

## Response

**device\_id** `string`

Our id for this device.

```bash cURL theme={null}
curl https://api.pushnotif.ai/v1/devices/token \
  -H "Authorization: Bearer pna_..." \
  -H "Content-Type: application/json" \
  -d '{
    "device": { "install_id": "6f1c..." },
    "token": "a1b2c3...",
    "topic": "com.acme.app",
    "environment": "production"
  }'
```

```json 200 theme={null}
{ "device_id": "41c7..." }
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.