> ## Documentation Index
> Fetch the complete documentation index at: https://pleo-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a client installation

> Send a request to this endpoint if you want to modify the installation status or the metadata.



## OpenAPI

````yaml put /v1/installations/me
openapi: 3.0.1
info:
  title: App Marketplace API
  description: API for Pleo App Marketplace
  termsOfService: https://pleo.io/terms/
  contact:
    email: partner-ecosystem-team@pleo.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 38.0.0
servers:
  - url: https://external.pleo.io
    description: Production server
  - url: https://external.staging.pleo.io
    description: Staging server
security:
  - bearerAuth: []
tags:
  - name: Applications
    description: >-
      Applications that are available in the Pleo App Marketplace. Applications
      connect Pleo with target systems and to make the user experience better,
      the application are typically named after the target system they are
      integrating with. <br> The main use case for these APIs is to list and
      manage the applications that are available in the Pleo App Marketplace.
      <br> You can also use this API to find out which applications are
      installed for a specific resource.
    externalDocs:
      description: Read more about applications
      url: >-
        https://www.notion.so/pleo/Application-41194c1252fa42f5946e3c3d0f028b96?pvs=4
  - name: Installations
    description: >-
      Installations of applications. An installation is a representation of an
      application being installed for a resource. Currently we support companies
      and organizations, future support might include users or teams. <br>
      Installations are created automatically after a successful OAuth flow.
      <br> The main use case for these APIs is to enable third party apps to
      manage their own installations and to get information about the
      installations that exist for a specific resource.
    externalDocs:
      description: Read more about installations
      url: >-
        https://www.notion.so/pleo/Installation-dbf7ce32f2e84848b8a36a5ebeaeb8f0?pvs=4
  - name: Authentication
    description: >-
      Authentication is done using a JWT token. The token should be passed in
      the Authorization header as a Bearer token. If the token is not present an
      HTTP 401 Unauthorized response will be returned.
  - name: health
paths:
  /v1/installations/me:
    put:
      tags:
        - Installations
      summary: Update a client installation
      description: >-
        Send a request to this endpoint if you want to modify the installation
        status or the metadata.
      operationId: updateClientInstallation
      requestBody:
        description: Installation request
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: '#/components/schemas/UpdateInstallationRequest'
        required: true
      responses:
        '200':
          description: Installation updated.
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/InstallationResponse'
        '400':
          description: Bad request
          content:
            application/json;charset=UTF-8:
              example: Bad request
        '500':
          description: Cannot update installation due to infrastructure issue
          content:
            application/json;charset=UTF-8:
              example: Cannot update installation due to infrastructure issue
components:
  schemas:
    UpdateInstallationRequest:
      required:
        - status
      type: object
      properties:
        metadata:
          type: object
          additionalProperties:
            type: object
            description: >-
              A means to store any metadata about the installation. Could for
              example be settings for the application
            example:
              externalApplicationId: '123456789'
          description: >-
            A means to store any metadata about the installation. Could for
            example be settings for the application
          example:
            externalApplicationId: '123456789'
        status:
          type: string
          description: This can be one of InstallationStatus values
          example: ACTIVATED
    InstallationResponse:
      required:
        - applicationId
        - createdAt
        - id
        - metadata
        - resource
        - status
        - updatedAt
      type: object
      properties:
        applicationId:
          type: string
          description: The unique identifier of the application this installation is for.
          format: uuid
          readOnly: true
          example: 123e4567-e89b-12d3-a456-426614174000
        createdAt:
          type: string
          description: The date and time when the installation was created.
          format: date-time
          readOnly: true
          example: '2021-01-01T00:00:00Z'
        errorCode:
          type: string
          description: >-
            Explains the error that inactivated the installation. This appear if
            the installation status is inactive.
          readOnly: true
          example: NOT_ENTITLED
        id:
          type: string
          description: The unique identifier of the installation.
          format: uuid
          readOnly: true
          example: 123e4567-e89b-12d3-a456-426614174000
        metadata:
          type: object
          additionalProperties:
            type: object
            description: Additional information about the installation.
            example:
              key: value
          description: Additional information about the installation.
          example:
            key: value
        resource:
          type: string
          description: The resource that the installation is for.
          readOnly: true
          example: urn:pleo:company:123e4567-e89b-12d3-a456-426614174000
        status:
          $ref: '#/components/schemas/InstallationStatus'
        updatedAt:
          type: string
          description: The date and time when the installation was last updated.
          format: date-time
          readOnly: true
          example: '2021-01-01T00:00:00Z'
    InstallationStatus:
      type: string
      x-enumDescriptions:
        ACTIVATED: The installation is active and operational.
        INACTIVE: The MIME type of the file is unknown.
        AUTHORIZED: >-
          The Pleo authorisation server has authorised the user, but the
          installation is not yet active or ready for use.
        PENDING_INTEGRATION: >-
          The integration is synchronising or performing other background tasks.
          When an installation is in progress, the integration synchronises the
          user's Pleo account with the target application, so that tax codes,
          tags, and vendors are all similar in both Pleo and the third-party
          application.
      enum:
        - ACTIVATED
        - INACTIVE
        - AUTHORIZED
        - PENDING_INTEGRATION
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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