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

# The key you are calling with

> What Housera knows about the key on the request: its name, its rights, when it was created and when it expires, the firm it is bound to and the account's role in that firm. The role decides what the key can see (see Which listings each key sees), so you can check it before your first call. For a connection with an integrator you also get `connection_id` and the application's name. Any valid key can call this, with no particular right. The account's email and phone are not included.



## OpenAPI

````yaml en/openapi.json GET /account/key
openapi: 3.1.2
info:
  title: Housera API
  version: 1.0.0
  description: >-
    Publish and manage real estate listings on Housera from your CRM or your own
    application, under the same rules as the form on the Housera portal.
servers:
  - url: https://staging.housera.ro/api/v1
    description: 'Sandbox (staging): test data, same rules as production.'
  - url: https://housera.ro/api/v1
    description: 'Production: the real listings on housera.ro.'
security:
  - bearer: []
tags:
  - name: Your listings
  - name: Photos
  - name: Events
  - name: Vocabulary
  - name: Connect with Housera
  - name: Client requests
  - name: The company and its team
  - name: Marketing mandates
  - name: Viewings
  - name: Projects
  - name: Partnerships
  - name: API key
  - name: Statistics
paths:
  /account/key:
    get:
      tags:
        - API key
      summary: The key you are calling with
      description: >-
        What Housera knows about the key on the request: its name, its rights,
        when it was created and when it expires, the firm it is bound to and the
        account's role in that firm. The role decides what the key can see (see
        Which listings each key sees), so you can check it before your first
        call. For a connection with an integrator you also get `connection_id`
        and the application's name. Any valid key can call this, with no
        particular right. The account's email and phone are not included.
      operationId: v1.account.key
      parameters:
        - name: locale
          in: query
          required: false
          schema:
            type: string
            enum:
              - ro
              - en
            default: en
          example: en
          description: >-
            The response language, `ro` or `en`. It changes error messages
            (`title`, `detail`), labels and, when the listing has an approved
            translation in that language, its title and description. Codes are
            the same in every language. It takes precedence over
            `Accept-Language` and over the account's language.
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ApiKeyApiResource'
                    description: The result of the request.
                required:
                  - data
          description: The request succeeded.
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The key is missing, revoked or expired (`unauthenticated`).
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            The key lacks the required permission (`missing_ability`) or access
            is denied (`forbidden`).
        '429':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: >-
            Too many requests. Try again after the number of seconds in
            `Retry-After`.
components:
  schemas:
    ApiKeyApiResource:
      type: object
      properties:
        name:
          type: string
          description: >-
            The key's name, chosen when it was created. For a connection, the
            application's name.
        abilities:
          type: array
          items: {}
          description: The key's rights, for example `listings:read` (see Authentication).
        created_at:
          type:
            - string
            - 'null'
          description: When the key was created.
        expires_at:
          type:
            - string
            - 'null'
          description: When the key expires. After that, requests made with it get `401`.
        connection_id:
          type:
            - integer
            - 'null'
          description: >-
            For a connection with an integrator, the connection's id: the same
            `connection_id` as in the code exchange and the same as the
            `connection` field on webhook deliveries. `null` for a key the
            account created in Settings → API.
        client:
          type:
            - object
            - 'null'
          properties:
            name:
              type: string
              description: The application's name.
          required:
            - name
          description: >-
            The integrator's application, for a connection. `null` for a key the
            account created.
        account:
          type: object
          properties:
            name:
              type: string
              description: The account's name.
          required:
            - name
          description: The account the key works for.
        firm:
          type:
            - object
            - 'null'
          properties:
            name:
              type: string
              description: The firm's name.
            kind:
              type: string
              enum:
                - agency
                - developer
              description: '`agency` (an agency) or `developer` (a developer).'
          required:
            - name
            - kind
          description: >-
            The firm the key is bound to: the one it was created in or consented
            for. It stays the same if the person moves to another firm. `null`
            for a key with no firm.
        role:
          type:
            - string
            - 'null'
          description: >-
            The account's role in the key's firm: `owner`, `admin`, `manager` or
            `agent`. The owner and admins see the whole firm, a manager their
            branch, an agent what is theirs. `null` for a key with no firm.
      required:
        - name
        - abilities
        - created_at
        - expires_at
        - connection_id
        - client
        - account
        - firm
        - role
      title: ApiKeyApiResource
    Problem:
      type: object
      title: Problem
      properties:
        type:
          type: string
          format: uri
          description: The URL of the problem type (RFC 9457).
        title:
          type: string
          description: A short summary of the problem, in the request's language.
        status:
          type: integer
          description: The HTTP status code.
        code:
          type: string
          description: >-
            The stable code of the refusal, the one to handle the error by (the
            list is on the Errors page).
        detail:
          type: string
          description: The explanation, in the request's language.
        existing:
          type: object
          properties:
            code:
              type: string
              description: The existing listing's public code.
            external_ref:
              type:
                - string
                - 'null'
              description: >-
                Your ID for the existing listing, if you set it with `PUT
                /listings/ref/{ref}`. Otherwise `null`.
          required:
            - code
            - external_ref
          description: >-
            Only on `409 duplicate_listing`: the listing you already have for
            the same property.
      required:
        - type
        - title
        - status
        - code
        - detail
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: 'Authorization: Bearer <key>'

````

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