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

# Listar las sedes de la institución

> Devuelve cada sede de la institución autenticada con su `id` y su `name`, en el orden guardado por la institución. Requiere una clave API institucional; una clave de médico se rechaza con un 403. Incluye las sedes ocultas. Usa el `name` de una sede como `institutionalBranchName` al crear cuentas, o su `id` como `institutionalBranchId` al establecer el contexto de consulta. Paginado.



## OpenAPI

````yaml /es/scribe-api/openapi-institutional.json get /v1/institutional/branches
openapi: 3.1.0
info:
  title: Scribe Public API
  description: >-
    API REST externa para integración con la plataforma Telepatia. Autentíquese
    con claves API, establezca el contexto de consulta y consulte sesiones de
    scribe.
  version: 0.1.0
servers:
  - url: https://scribe-api.telepatia.ai
    description: Production
security:
  - BearerAuth: []
paths:
  /v1/institutional/branches:
    get:
      tags:
        - Institutional
      summary: Listar las sedes de la institución
      description: >-
        Devuelve cada sede de la institución autenticada con su `id` y su
        `name`, en el orden guardado por la institución. Requiere una clave API
        institucional; una clave de médico se rechaza con un 403. Incluye las
        sedes ocultas. Usa el `name` de una sede como `institutionalBranchName`
        al crear cuentas, o su `id` como `institutionalBranchId` al establecer
        el contexto de consulta. Paginado.
      operationId: api_institutional_branches_listed_v1_institutional_branches_get
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Page
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 20
            title: Limit
      responses:
        '200':
          description: Respuesta exitosa
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListBranchesResponse'
              example:
                items:
                  - id: b1f2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d
                    name: Sede Norte
                  - id: c2a3b4c5-6d7e-8f9a-0b1c-2d3e4f5a6b7c
                    name: Sede Sur
                limit: 20
                page: 1
                total: 2
        '400':
          description: >-
            Solicitud incorrecta — parámetros inválidos, fallos de validación o
            campos faltantes.
          content:
            application/json:
              examples:
                parameter_missing:
                  summary: Missing required field
                  value:
                    error:
                      type: invalid_request_error
                      code: parameter_missing
                      message: name is required.
                      param: name
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
                parameter_invalid:
                  summary: Invalid field value
                  value:
                    error:
                      type: invalid_request_error
                      code: parameter_invalid
                      message: >-
                        idCountry must be a valid country name, ISO alpha-2, or
                        ISO alpha-3 code.
                      param: idCountry
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
                account_invalid:
                  summary: Invalid account
                  value:
                    error:
                      type: invalid_request_error
                      code: account_invalid
                      message: Account has no valid authId.
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: No autorizado — clave API faltante o inválida.
          content:
            application/json:
              examples:
                authentication_required:
                  summary: Invalid or missing API key
                  value:
                    error:
                      type: authentication_error
                      code: authentication_required
                      message: Invalid API key.
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Prohibido — la clave API no puede realizar esta operación.
          content:
            application/json:
              examples:
                permission_denied:
                  summary: Caller lacks permission for this resource
                  value:
                    error:
                      type: permission_error
                      code: permission_denied
                      message: You do not have permission to access this resource.
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
                permission_denied_role:
                  summary: API key's account role is not allowed this operation
                  value:
                    error:
                      type: permission_error
                      code: permission_denied
                      message: >-
                        Your API key is not allowed to create accounts. Account
                        creation requires an institutional API key; this key is
                        scoped to a doctor account.
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: No encontrado — el recurso solicitado no existe.
          content:
            application/json:
              examples:
                resource_not_found:
                  summary: Resource not found
                  value:
                    error:
                      type: invalid_request_error
                      code: resource_not_found
                      message: No session scribe found for the given consultation ID.
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Servicio no disponible — una dependencia externa no está disponible.
          content:
            application/json:
              examples:
                service_unavailable:
                  summary: External service unavailable
                  value:
                    error:
                      type: api_error
                      code: service_unavailable
                      message: >-
                        The service is temporarily unavailable. Please try again
                        later.
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    ListBranchesResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/BranchSummary'
          type: array
          title: Items
          description: >-
            Page of the branches you can reference, in the institution's stored
            order. Hidden branches are included; a legacy branch without a name
            is not.
        total:
          type: integer
          title: Total
          description: >-
            Number of branches you can reference. A legacy branch without a name
            is not counted.
        page:
          type: integer
          title: Page
          description: Current page (1-based).
        limit:
          type: integer
          title: Limit
          description: Items per page.
      type: object
      required:
        - items
        - total
        - page
        - limit
      title: ListBranchesResponse
      description: Paginated list of the institution's branches.
      examples:
        - items:
            - id: b1f2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d
              name: Sede Norte
            - id: c2a3b4c5-6d7e-8f9a-0b1c-2d3e4f5a6b7c
              name: Sede Sur
          limit: 20
          page: 1
          total: 2
    ErrorResponse:
      description: Envoltorio estandarizado de respuesta de error.
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetailWithRequestId'
      required:
        - error
      title: ErrorResponse
      type: object
    BranchSummary:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: >-
            Branch identifier. Use it as `institutionalBranchId` when setting
            the consultation context. It does not change when the branch is
            renamed, and it is the `id` that `POST /v1/institutional/branches`
            returns. Null only for a legacy branch created before branch
            identifiers existed — reference that branch by `name`.
          examples:
            - b1f2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d
        name:
          type: string
          title: Name
          description: >-
            Branch name. Use it as `institutionalBranchName` when creating
            accounts.
          examples:
            - Sede Norte
      type: object
      required:
        - id
        - name
      title: BranchSummary
      description: 'One branch in the branch list: its identifier and its name only.'
    ErrorDetailWithRequestId:
      description: >-
        Top-level error object: :class:`ErrorDetail` plus the request
        correlation id.


        Kept as a subclass rather than a field on ``ErrorDetail`` because
        ``ErrorDetail`` is

        also the per-item error shape inside the batch account-creation response

        (``BatchAccountResult.error``), which is serialized with nulls included.
        Adding the

        field there would publish ``"requestId": null`` on an HTTP 200, and
        there is only

        ever one request id per batch anyway -- batch callers read the
        ``X-Request-ID``

        response header.
      properties:
        type:
          description: Broad error category for high-level handling.
          examples:
            - invalid_request_error
          title: Type
          type: string
        code:
          description: Machine-readable error code. Clients should switch on this value.
          examples:
            - parameter_invalid
          title: Code
          type: string
        message:
          description: Human-readable error message ending with a period.
          examples:
            - >-
              idCountry must be a valid country name, ISO alpha-2, or ISO
              alpha-3 code.
          title: Message
          type: string
        param:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The request field that caused the error, if applicable.
          examples:
            - idCountry
          title: Param
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          description: Optional structured, machine-readable context for the error.
          examples:
            - pendingConsultations:
                - sessionId: abc123
                  url: https://...
          title: Details
        requestId:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Unique id for this request, identical to the X-Request-ID response
            header. Quote it when contacting support.
          examples:
            - 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
          title: Requestid
      required:
        - type
        - code
        - message
      title: ErrorDetailWithRequestId
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Clave API enviada como token Bearer

````

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