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

# Get inbox suggestions

> Ready-made inbox sources ranked from the caller's recent calls and texts, including phone-menu branches. Each suggestion carries a `source` to put in `sources` as is. Suggestions are for the caller only.

> [!NOTE]
>
> **Required scope:** `INBOXES_READ`

## Behavior

Returns ready-made inbox sources for the caller, best first, ranked from the caller's recent calls and texts. This endpoint takes no `user_id`: suggestions are always the caller's.

Each suggestion carries a `source`. Put it in the `sources` of [Create inbox](https://help.withallo.com/en/v2/api-reference/inboxes/create-inbox.md) as it is:

* A suggestion with `branch: null` covers the whole line, and its `source` has empty `conditions`.
* A suggestion with a `branch` covers one phone-menu path, and its `source` holds a `MENU_BRANCH` condition for that path.

To put several suggestions of the same line in one inbox, merge them into one source: concatenate the `branches` of their `MENU_BRANCH` conditions.

`name` and `description` are suggested labels for menu branches. A whole-line suggestion (`branch: null`) always has `name` and `description` set to `null`, and they can also be `null` for a branch when no label could be generated.


## OpenAPI

````yaml GET /v2/api/inboxes/suggestions
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.
  - name: Inboxes
    description: >-
      Personal inboxes: saved views of one or more lines, optionally narrowed to
      phone-menu options, with their own filters and notification setting.
paths:
  /v2/api/inboxes/suggestions:
    get:
      tags:
        - Inboxes
      summary: Get inbox suggestions
      description: >-
        Ready-made inbox sources ranked from the caller's recent calls and
        texts, including phone-menu branches. Each suggestion carries a `source`
        to put in `sources` as is. Suggestions are for the caller only.
      operationId: getInboxSuggestions
      responses:
        '200':
          description: Suggestions, best first
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/InboxSuggestion'
              example:
                data:
                  - allo_number: '+33612345678'
                    name: Sales
                    description: Website FR, option 2
                    branch:
                      - node_id: node-1
                        digit: '1'
                      - node_id: node-3
                        digit: '2'
                    answered: 42
                    rung: 57
                    texted: 3
                    score: 91
                    source:
                      allo_number: '+33612345678'
                      conditions:
                        - type: MENU_BRANCH
                          branches:
                            - - node_id: node-1
                                digit: '1'
                              - node_id: node-3
                                digit: '2'
                          include_no_choice: false
                  - allo_number: '+14155550100'
                    name: null
                    description: null
                    branch: null
                    answered: 12
                    rung: 20
                    texted: 8
                    score: 40
                    source:
                      allo_number: '+14155550100'
                      conditions: []
        '401':
          $ref: '#/components/responses/ApiUnauthorized'
        '403':
          $ref: '#/components/responses/ApiForbidden'
        '429':
          $ref: '#/components/responses/ApiRateLimited'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    InboxSuggestion:
      type: object
      description: A ready-made source, ranked from the caller's recent activity.
      properties:
        allo_number:
          type: string
          example: '+33612345678'
        name:
          type: string
          nullable: true
          description: >-
            Suggested inbox name. Always `null` for a whole-line suggestion
            (`branch: null`).
          example: Sales
        description:
          type: string
          nullable: true
          example: Website FR, option 2
          description: 'Always `null` for a whole-line suggestion (`branch: null`).'
        branch:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/InboxMenuBranchStep'
          description: Phone-menu path, or null for the whole line.
        answered:
          type: integer
          description: Calls the caller answered from this source recently.
        rung:
          type: integer
          description: Calls that rang the caller from this source recently.
        texted:
          type: integer
          description: Texts the caller exchanged on this source recently.
        score:
          type: integer
          description: Ranking score. Higher first.
        source:
          allOf:
            - $ref: '#/components/schemas/InboxSource'
          description: The suggestion as an inbox source, ready to put in `sources`.
      required:
        - allo_number
        - name
        - description
        - branch
        - answered
        - rung
        - texted
        - score
        - source
    InboxMenuBranchStep:
      type: object
      properties:
        node_id:
          type: string
          description: ID of the phone-menu node in the line's published call flow.
          example: node-3
        digit:
          type: string
          pattern: ^[0-9*#]$
          description: Key pressed at that menu.
          example: '2'
      required:
        - node_id
        - digit
    InboxSource:
      type: object
      properties:
        allo_number:
          type: string
          description: Allo line (E.164).
          example: '+33612345678'
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/InboxCondition'
          description: Empty means every conversation on the line.
          maxItems: 10
      required:
        - allo_number
        - conditions
    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
    InboxCondition:
      description: >-
        Narrows a source to calls that went through part of the line's phone
        menu. A source holds at most 10 conditions, and an inbox at most 60 menu
        steps in all.
      oneOf:
        - $ref: '#/components/schemas/InboxMenuOptionCondition'
        - $ref: '#/components/schemas/InboxMenuBranchCondition'
      discriminator:
        propertyName: type
        mapping:
          MENU_OPTION: '#/components/schemas/InboxMenuOptionCondition'
          MENU_BRANCH: '#/components/schemas/InboxMenuBranchCondition'
    InboxMenuOptionCondition:
      type: object
      description: Matches keys of one phone menu.
      properties:
        type:
          type: string
          enum:
            - MENU_OPTION
        node_id:
          type: string
          description: The menu node.
          example: node-3
        digits:
          type: array
          items:
            type: string
            pattern: ^[0-9]$
          description: >-
            Keys that match, distinct. May be `[]` only when `include_no_choice`
            is `true`, to match calls that reached the menu without pressing a
            key.
          example:
            - '1'
        include_no_choice:
          type: boolean
          description: Also match calls that reached the menu without pressing a key.
          example: false
      required:
        - type
        - node_id
        - digits
        - include_no_choice
    InboxMenuBranchCondition:
      type: object
      description: >-
        Matches any of several paths through the line's phone menus. To combine
        several options of one line, put all their paths in `branches`.
      properties:
        type:
          type: string
          enum:
            - MENU_BRANCH
        branches:
          type: array
          minItems: 1
          maxItems: 20
          description: >-
            Each branch lists the menu choices from the first menu down to the
            option picked.
          items:
            type: array
            minItems: 1
            maxItems: 6
            items:
              $ref: '#/components/schemas/InboxMenuBranchStep'
        include_no_choice:
          type: boolean
          description: Also match calls that reached the menu without pressing a key.
          example: false
      required:
        - type
        - branches
        - include_no_choice
  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'
    ApiRateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````

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