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

# Register an Expo push token for the current user

> Registers the device's Expo push token for the caller, bound to the session that registers it, so pushes reach the device until it unregisters or the session ends.

Use this tool when you need to:
- Turn on push notifications for the mobile app on this device after sign-in
- Move a device's pushes to the account now signed in on it

Examples:
- POST /user/push-tokens {"token": "ExponentPushToken[xL3q9a1Bc7DeFgHiJkLmNo]", "platform": "ios"}

Hints:
- token and platform are required. token is an Expo push token, ExponentPushToken[...] or ExpoPushToken[...], trimmed; anything else is refused with 400. platform is ios or android; another value is refused with 422 by the schema.
- The token is the device's identity: registering it again rebinds it to the registering session and its account, so a device now signed in to another account moves there. It answers 201 with the token as registered: its platform, created_at and last_registered_at.
- Use unregisterPushToken instead to stop pushes to the device on sign-out; use updateNotificationPreferences instead to choose which kinds are pushed.
- Only a session may register one: an API key is refused with 403 credential_kind_not_admitted, and a JWT without a session with 403 forbidden.



## OpenAPI

````yaml api-reference/openapi.json POST /user/push-tokens
openapi: 3.1.0
info:
  title: Aether API
  version: 0.1.0
servers:
  - url: https://api.runaether.dev
security:
  - bearerAuth: []
paths:
  /user/push-tokens:
    post:
      tags:
        - push-tokens
      summary: Register an Expo push token for the current user
      description: >-
        Registers the device's Expo push token for the caller, bound to the
        session that registers it, so pushes reach the device until it
        unregisters or the session ends.


        Use this tool when you need to:

        - Turn on push notifications for the mobile app on this device after
        sign-in

        - Move a device's pushes to the account now signed in on it


        Examples:

        - POST /user/push-tokens {"token":
        "ExponentPushToken[xL3q9a1Bc7DeFgHiJkLmNo]", "platform": "ios"}


        Hints:

        - token and platform are required. token is an Expo push token,
        ExponentPushToken[...] or ExpoPushToken[...], trimmed; anything else is
        refused with 400. platform is ios or android; another value is refused
        with 422 by the schema.

        - The token is the device's identity: registering it again rebinds it to
        the registering session and its account, so a device now signed in to
        another account moves there. It answers 201 with the token as
        registered: its platform, created_at and last_registered_at.

        - Use unregisterPushToken instead to stop pushes to the device on
        sign-out; use updateNotificationPreferences instead to choose which
        kinds are pushed.

        - Only a session may register one: an API key is refused with 403
        credential_kind_not_admitted, and a JWT without a session with 403
        forbidden.
      operationId: registerPushToken
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterPushTokenRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PushToken'
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PushTokensErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PushTokensErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/PushTokensErrorResponse'
                  - $ref: '#/components/schemas/OrgAuthorizationErrorResponse'
          description: Forbidden
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PushTokensErrorResponse'
          description: Gone
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PushTokensErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PushTokensErrorResponse'
          description: Internal Server Error
components:
  schemas:
    RegisterPushTokenRequest:
      additionalProperties: false
      properties:
        platform:
          enum:
            - ios
            - android
          type: string
        token:
          minLength: 1
          type: string
      required:
        - token
        - platform
      type: object
    PushToken:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          type: string
        last_registered_at:
          format: date-time
          type: string
        platform:
          enum:
            - ios
            - android
          type: string
        token:
          minLength: 1
          type: string
      required:
        - token
        - platform
        - created_at
        - last_registered_at
      type: object
    PushTokensErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - bad_gateway
            - bad_request
            - cli_upgrade_required
            - client_outdated
            - conflict
            - forbidden
            - gateway_timeout
            - gone
            - internal_error
            - method_not_allowed
            - not_acceptable
            - not_found
            - not_implemented
            - payment_required
            - precondition_failed
            - rate_limited
            - request_canceled
            - request_timeout
            - request_too_large
            - service_unavailable
            - unauthenticated
            - unsupported_media_type
            - validation_failed
          minLength: 1
          type: string
        error:
          minLength: 1
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
      required:
        - error
        - code
      type: object
    OrgAuthorizationErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - org_membership_required
            - org_role_insufficient
            - org_suspended
            - account_deleting
            - agent_host_route_not_allowed
            - credential_kind_not_admitted
            - grant_scope_insufficient
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

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