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

# Lire un agenda

> Returns one connected calendar with the event types its provider currently offers, read live from the provider. This is the catalog you pick from when filling `scheduling.calendars`.

<Note>
  **Scope requis :** `AGENTS_READ`
</Note>

## Comportement

Renvoie un agenda connecté avec `available_event_types`, les types d'événement que son fournisseur propose actuellement. C'est le catalogue dans lequel vous choisissez pour remplir `scheduling.calendars` sur [Modifier la configuration](/fr/v2/api-reference/agent/update-agent).

Le catalogue est lu en direct chez le fournisseur à chaque appel : il reflète donc toujours ce qui est proposé aujourd'hui.

## Lire available\_event\_types

`available_event_types` est absent pour un fournisseur qui n'a pas de notion de type d'événement. C'est une réponse différente d'une liste vide, qui signifie que le fournisseur n'en propose aucun.

Deux champs méritent d'être distingués :

* `provider_description` est le texte rédigé chez le fournisseur d'agenda. C'est du contexte, pas de l'aiguillage.
* `description`, que vous renvoyez dans `scheduling.calendars`, est votre propre note sur le moment où le réceptionniste doit réserver ce type d'événement plutôt qu'un autre. C'est ce texte qu'il compare au motif de l'appelant.

`required_questions` sont des réponses sans lesquelles le fournisseur refuse une réservation : le réceptionniste les recueille pendant l'appel. Elles sont en lecture seule et figées au moment où vous sélectionnez le type d'événement.

## Erreurs

* `404 AGENT_CALENDAR_NOT_FOUND` : aucun agenda avec cet id n'est visible pour vous.
* `500 AGENT_CALENDAR_EVENT_TYPES_FETCH_FAILED` : le fournisseur n'a pas pu être joint. Cette erreur est réessayable. Si elle persiste, la connexion de l'agenda doit être renouvelée dans l'app Allo.


## OpenAPI

````yaml GET /v2/api/calendars/{id}
openapi: 3.0.3
info:
  title: Allo API
  description: >-
    Allo API provides programmatic access to your Allo account, allowing you to
    manage webhooks, retrieve calls and contacts, and send SMS messages.


    All requests to `/v1/api/**` endpoints automatically go through quota
    checking and scope validation.
  version: 1.0.0
  contact:
    name: Allo Support
servers:
  - url: https://api.withallo.com
    description: Production server
security: []
tags:
  - name: Summary Templates
    description: >-
      Manage call summary templates that control how AI-generated call summaries
      are structured for your team.
  - name: Webhooks
    description: >-
      Manage webhook endpoints to receive real-time notifications about events
      in your Allo account. Each endpoint subscribes to one or more event topics
      and is verified with a signing secret.
  - name: Calls
    description: >-
      Retrieve and search call records with filtering and pagination. Filter
      calls by your Allo phone number.
  - name: Contacts
    description: >-
      Search and retrieve contact information with sorting and pagination.
      Includes engagement level tracking.
  - name: SMS
    description: Send SMS messages to phone numbers using your Allo numbers.
  - name: Phone Numbers
    description: Retrieve information about your Allo phone numbers.
  - name: Analytics
    description: Pre-computed call metrics, team performance, and outbound dial funnel
  - name: CRM
    description: Manage people, companies, and deals in your CRM.
  - name: Notes
    description: >-
      Internal team notes on conversations and CRM people, with @mention
      support. Notes are never visible to the contact.
  - name: Threads
    description: >-
      Team discussion threads attached to a conversation item (call, SMS, or
      conversation note). One thread per item.
  - name: AI Receptionist
    description: >-
      Read and write the AI receptionist configuration of a phone line: business
      details, voice, prompt, capabilities, business hours, transfer rules,
      scheduling calendars and knowledge sources.
paths:
  /v2/api/calendars/{id}:
    get:
      tags:
        - AI Receptionist
      summary: Get a connected calendar
      description: >-
        Returns one connected calendar with the event types its provider
        currently offers, read live from the provider. This is the catalog you
        pick from when filling `scheduling.calendars`.
      operationId: getCalendar
      parameters:
        - name: id
          in: path
          required: true
          description: Calendar identifier from `GET /v2/api/calendars`
          schema:
            type: string
            example: exc-abc123
      responses:
        '200':
          description: The calendar and its available event types
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Calendar'
        '401':
          $ref: '#/components/responses/ApiUnauthorized'
        '403':
          $ref: '#/components/responses/ApiForbidden'
        '404':
          $ref: '#/components/responses/ApiNotFound'
        '429':
          $ref: '#/components/responses/ApiRateLimited'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Calendar:
      type: object
      description: >-
        A calendar connected to your workspace, whether or not a receptionist
        books on it.
      properties:
        id:
          type: string
          description: >-
            What `scheduling.calendars` on `PATCH
            /v2/api/numbers/{number}/agent` is keyed by.
          example: exc-abc123
        name:
          type: string
          nullable: true
          example: Acme bookings
        provider:
          type: string
          enum:
            - GOOGLE_CALENDAR
            - CAL_COM
            - CALENDLY
            - OUTLOOK
        status:
          type: string
          enum:
            - ACTIVE
            - DISCONNECTED
        is_team_default:
          type: boolean
        owner:
          $ref: '#/components/schemas/CalendarOwner'
          nullable: true
        available_event_types:
          type: array
          nullable: true
          description: >-
            Reported by `GET /v2/api/calendars/{id}` only, read live from the
            provider. Absent for a provider with no event-type concept, which is
            not the same answer as an empty list.
          items:
            $ref: '#/components/schemas/CalendarEventType'
    CalendarOwner:
      type: object
      description: The teammate who connected the calendar.
      properties:
        user_id:
          type: string
        user_name:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        is_current_user:
          type: boolean
    CalendarEventType:
      type: object
      description: >-
        An event type the provider currently offers on a calendar. This is the
        catalog you pick from when filling `scheduling.calendars`.
      properties:
        id:
          type: string
          example: '42'
        slug:
          type: string
          nullable: true
          example: intro-call
        title:
          type: string
          example: Intro call
        length_in_minutes:
          type: integer
          nullable: true
          example: 30
        provider_description:
          type: string
          nullable: true
          description: >-
            The blurb written in the calendar provider. Not the routing note the
            receptionist matches on: that one is the `description` you send in
            `scheduling.calendars`.
        required_questions:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/SchedulingQuestion'
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            request_id:
              type: string
            retry_after_seconds:
              type: integer
              nullable: true
    SchedulingQuestion:
      type: object
      description: >-
        A question the calendar provider rejects a booking without, so the
        receptionist asks it during the call. Read-only: it is snapshotted when
        the event type is selected.
      properties:
        id:
          type: string
          example: notes
        label:
          type: string
          example: Anything we should know before the visit?
  responses:
    ApiUnauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiForbidden:
      description: API key lacks the required scope or access to the resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiNotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiRateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````