> ## 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.

# End the connection with an account

> The integrator ends a connection with an account itself, as described in RFC 7009. Send the connection's key in `token` and authenticate with `client_id` and `client_secret`, as for the code exchange. From then on the key gets `401` and your webhook stops receiving the account's events. The account gets an email and a notification saying your application disconnected. If the key does not exist, was already revoked or is not yours, you still get `200`: the answer tells you nothing about other people's keys.



## OpenAPI

````yaml en/openapi.json POST /oauth/revoke
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:
  /oauth/revoke:
    post:
      tags:
        - Connect with Housera
      summary: End the connection with an account
      description: >-
        The integrator ends a connection with an account itself, as described in
        RFC 7009. Send the connection's key in `token` and authenticate with
        `client_id` and `client_secret`, as for the code exchange. From then on
        the key gets `401` and your webhook stops receiving the account's
        events. The account gets an email and a notification saying your
        application disconnected. If the key does not exist, was already revoked
        or is not yours, you still get `200`: the answer tells you nothing about
        other people's keys.
      operationId: v1.oauth.revoke
      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.
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/OAuthRevokeRequest'
      responses:
        '200':
          description: >-
            The connection is closed, or the key was no longer valid. The
            response has no body.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthError'
          description: '`token` is missing or empty (`invalid_request`).'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthError'
          description: >-
            Wrong `client_id` or `client_secret`, or the integrator is
            deactivated (`invalid_client`).
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthError'
          description: >-
            More than 30 requests a minute from the same IP address
            (`too_many_requests`). Retry after the number of seconds in
            `Retry-After`.
      security: []
components:
  schemas:
    OAuthRevokeRequest:
      type: object
      title: OAuthRevokeRequest
      properties:
        token:
          type: string
          description: The connection's key, as you received it in `access_token`.
        token_type_hint:
          type: string
          enum:
            - access_token
          description: Optional, per RFC 7009. The only value is `access_token`.
        client_id:
          type: string
          description: >-
            The integrator's public identifier (`hsrc_…`). Can also be sent with
            HTTP Basic.
        client_secret:
          type: string
          description: >-
            The integrator's secret (`hsrs_…`), only from your server. Can also
            be sent with HTTP Basic.
      required:
        - token
        - client_id
        - client_secret
    OAuthError:
      type: object
      title: OAuthError
      properties:
        error:
          type: string
          enum:
            - invalid_request
            - invalid_client
            - invalid_grant
            - unsupported_grant_type
            - too_many_requests
          description: The error code, as defined by RFC 6749.
        error_description:
          type: string
          description: The explanation, in the request's language.
      required:
        - error
        - error_description
  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.