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

# Create Push Registration

> This endpoint creates or updates a push registration record for a user's device.

<Note>
  Please review proper request headers [here](/consumer/usage/headers).
</Note>

### Parameters

<ParamField body="device_type" type="enum" required>
  The type of device: (`ios`, `android`)
</ParamField>

<ParamField body="token" type="string" required>
  The token returned by the local push notification library
</ParamField>

### Response

<ResponseField name="device_type" type="enum" required>
  The type of device: (`ios`, `android`)
</ResponseField>

<ResponseField name="token" type="string" required>
  The token returned by the local push notification library
</ResponseField>

<RequestExample>
  ```bash theme={null}
  curl https://api.thanxsandbox.com/push_registrations \
    -X PUT \
    -H "Content-Type: application/json"  \
    -H "Accept-Version: v4.0" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer ${token}" \
    -H "X-ClientId: ${client_id}" 
    -d '{
      "push_registration": {
        "device_type": "ios",
        "token": "wourdweroi238432423425fsgd"
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "push_registration": {
      "token": "wourdweroi238432423425fsgd",
      "device_type": "ios"
    }
  }
  ```
</ResponseExample>
