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

# Get the calling installation

> Returns the installation the token belongs to: its organization, its status, the app it is an installation of, and the scopes the token was granted. Requires no scope.



## OpenAPI

````yaml /openapi/integration-v1.json get /v1/integration/me
openapi: 3.1.2
info:
  title: Gridbeds Integration API
  version: 2.0.0
  description: >-
    The Gridbeds public integration API. Authenticate with a scoped Bearer token
    issued to your installed app; every request is isolated to that app's
    organization.
  termsOfService: https://gridbeds.com/en/terms/
  contact:
    name: Gridbeds support
    email: support@gridbeds.com
  license:
    name: Proprietary
    url: https://gridbeds.com/en/terms/
servers:
  - url: https://api.gridbeds.com/api
    description: Production
  - url: https://staging-api.gridbeds.com/api
    description: Sandbox
security:
  - bearerAuth: []
tags:
  - name: Identity
    description: >-
      Who the token belongs to: the installation, its organization and the
      scopes it was granted.
  - name: Reservations
    description: The organization's reservations.
  - name: Guests
    description: The organization's guest profiles, which a reservation is made for.
paths:
  /v1/integration/me:
    get:
      tags:
        - Identity
      summary: Get the calling installation
      description: >-
        Returns the installation the token belongs to: its organization, its
        status, the app it is an installation of, and the scopes the token was
        granted. Requires no scope.
      operationId: getInstallation
      responses:
        '200':
          description: The installation the token belongs to.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Installation'
                required:
                  - data
        '401':
          description: >-
            Unauthenticated: the token is missing, unknown or revoked. A user's
            own sign-in token is refused the same way.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden. The token's installation is disabled or in error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Too many requests: an installation may make 120 per minute. Wait
            `Retry-After` seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
          headers:
            Retry-After:
              description: Seconds until the next request is counted afresh.
              schema:
                type: integer
            X-RateLimit-Limit:
              description: Requests allowed in the window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: 'Requests left in the window: 0 here.'
              schema:
                type: integer
            X-RateLimit-Reset:
              description: When the window ends, as a Unix timestamp.
              schema:
                type: integer
components:
  schemas:
    Installation:
      type: object
      properties:
        installation_id:
          type: string
          format: uuid
          description: The installation's id.
        organization_id:
          type: string
          format: uuid
          description: >-
            The organization the record belongs to: always the one that
            installed the app.
        status:
          type: string
          description: >-
            Where the installation stands. Only `installed` and `enabled` ever
            answer here:

            a disabled installation, or one in error, is refused with 403 before
            this is built.
          enum:
            - installed
            - enabled
        app:
          type: object
          description: The app this is an installation of.
          properties:
            slug:
              type: string
            name:
              type: string
          required:
            - slug
            - name
        abilities:
          type: array
          description: The scopes the token was granted, such as `reservations.read`.
          items:
            type: string
      required:
        - installation_id
        - organization_id
        - status
        - app
        - abilities
      title: Installation
    Error:
      type: object
      description: The body of a refused request.
      properties:
        message:
          type: string
          description: >-
            What went wrong, in a sentence for a person. Do not match on it: the
            wording can change and follows the request's language.
        code:
          type: string
          description: >-
            A stable identifier of the refusal, present when it has one, such as
            `idempotency_key_reused`. Match on this.
        errors:
          type: object
          description: >-
            Present on a validation failure: the messages for each field that
            failed, keyed by field name.
          additionalProperties:
            type: array
            items:
              type: string
      required:
        - message
      title: Error
    RateLimitError:
      type: object
      description: The body of a request refused for exceeding the installation's quota.
      properties:
        error:
          type: string
          description: Always `Too Many Requests`.
        message:
          type: string
          description: What happened, in a sentence for a person.
        retry_after:
          type: integer
          description: Seconds to wait before the next request.
      required:
        - error
        - message
        - retry_after
      title: RateLimitError
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        An integration token, sent as `Authorization: Bearer <token>`.


        A token belongs to one installation of an app. Someone at the property
        who may manage its integrations installs the app in Gridbeds, under
        Settings → Integrations, and issues the token there, granting the scopes
        the app requested or a subset of them. The token is shown once; issuing
        a new one revokes the previous one.


        Every request reads and writes the data of the organization that
        installed the app, and nothing else. Each operation names the scope it
        requires. A token without that scope, and the token of an installation
        that is disabled or in error, are refused with 403; a token that is
        missing, unknown or revoked, and a user's own sign-in token, are refused
        with 401.
      scheme: bearer

````

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