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

# Update an installation

> Updates the user association or permission state for an existing installation.



## OpenAPI

````yaml /openapi.yaml patch /api/v1/installations/{installationId}
openapi: 3.0.3
info:
  title: Pushctl API
  version: 1.0.0
  description: >-
    Application-scoped APIs for registering installations, sending push
    notifications, and tracking delivery events.
  license:
    name: Proprietary
servers:
  - url: https://pushctl.com
security:
  - bearerAuth: []
tags:
  - name: Installations
    description: Register and maintain mobile app installations.
  - name: Notifications
    description: Create notifications and inspect their delivery lifecycle.
  - name: Delivery events
    description: Report lifecycle events emitted by a client installation.
paths:
  /api/v1/installations/{installationId}:
    parameters:
      - $ref: '#/components/parameters/InstallationId'
    patch:
      tags:
        - Installations
      summary: Update an installation
      description: >-
        Updates the user association or permission state for an existing
        installation.
      operationId: updateAnInstallation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstallationUpdate'
      responses:
        '200':
          description: Installation updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InstallationResponse'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  parameters:
    InstallationId:
      in: path
      name: installationId
      required: true
      description: Stable client-generated installation identifier. Maximum 255 characters.
      schema:
        type: string
        maxLength: 255
      example: 69f24c1b-8f87-42aa-b8a3-4e16f95a4fd1
  schemas:
    InstallationUpdate:
      type: object
      description: Include at least one property.
      properties:
        user_id:
          type: string
          maxLength: 255
          nullable: true
          example: user-123
        permission:
          $ref: '#/components/schemas/Permission'
    InstallationResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Installation'
    Permission:
      type: string
      enum:
        - unknown
        - not_determined
        - authorized
        - provisional
        - ephemeral
        - denied
    Installation:
      type: object
      required:
        - id
        - installation_id
        - platform
        - provider_identifier_type
        - status
        - permission
        - device
        - registered_at
        - last_seen_at
        - identifier_updated_at
      properties:
        id:
          type: string
        installation_id:
          type: string
        user_id:
          type: string
          nullable: true
        platform:
          type: string
          enum:
            - ios
            - android
        provider_identifier_type:
          type: string
          enum:
            - apns_token
            - fcm_fid
            - fcm_token
        status:
          $ref: '#/components/schemas/InstallationStatus'
        permission:
          $ref: '#/components/schemas/Permission'
        device:
          type: object
          properties:
            app_version:
              type: string
              nullable: true
            os_version:
              type: string
              nullable: true
            model:
              type: string
              nullable: true
            locale:
              type: string
              nullable: true
            timezone:
              type: string
              nullable: true
        registered_at:
          type: string
          format: date-time
        last_seen_at:
          type: string
          format: date-time
        identifier_updated_at:
          type: string
          format: date-time
        permission_updated_at:
          type: string
          format: date-time
          nullable: true
        invalidated_at:
          type: string
          format: date-time
          nullable: true
        invalid_reason:
          type: string
          nullable: true
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    InstallationStatus:
      type: string
      enum:
        - active
        - stale
        - invalid
  responses:
    Unauthenticated:
      description: Token is missing, invalid, or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Unauthenticated.
    Forbidden:
      description: The token lacks the required ability.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: This action is unauthorized.
    NotFound:
      description: Resource was not found for this application.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Not Found
    ValidationError:
      description: Request validation failed.
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: application token
      description: >-
        Use an application-scoped token with the ability required by the
        endpoint.

````