Attrove Query (Metered) API

The Query (Metered) API from Attrove — 1 operation(s) for query (metered).

Operations 1

POST /v1/users/{user_id}/query Query user's unified context with AI #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/attrove-com:attrove-com-query-metered-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

attrove-com-query-metered-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Attrove Query (Metered) API
  description: Attrove public API, partner, and A2A endpoints
  version: v1
servers:
- url: http://0.0.0.0:3000
tags:
- name: Query (Metered)
paths:
  /v1/users/{user_id}/query:
    post:
      summary: Query user's unified context with AI
      tags:
      - Query (Metered)
      description: 'Performs semantic retrieval across the user''s connected messages, meetings, and calendar events, then returns an AI-generated answer.


        **Billing**: This endpoint is metered. Each call consumes AI query credits.


        **Use cases**:

        - "What did Sarah say about the Q4 budget?"

        - "Summarize my meeting with the engineering team last Tuesday"

        - "Find all discussions about the product launch"


        **Parameters**:

        - `query`: The natural language question to answer (max 10,000 characters)

        - `client_timezone`: User''s timezone for date-aware queries

        - `history`: Optional conversation history for follow-up questions (capped at 50 items / 64KB UTF-8; oldest are dropped past the cap with a `history_truncated_for_size_budget` warning, and a single message above the byte cap is rejected with `VALIDATION_OUT_OF_RANGE`)

        - `integration_ids`: Optional filter to specific integrations (opaque IDs like `int_xxx`)

        - `conversation_ids`: Optional filter to specific conversations (opaque IDs, e.g., "conv_xxx")

        - `retrieval_mode`: Optional retrieval strategy — `"fast"` (lowest latency), `"auto"` (adaptive, default), or `"deep"` (full pipeline)

        - `expand`: Optional comma-separated fields to include (e.g., "sources")

        - `instructions`: Optional custom instructions for the AI (controls output format, filtering, conditional behavior — overrides default style, max 20,000 chars)

        - `context`: Optional authoritative reference data the AI treats as ground truth (influences query rewriting but not used for vector search, max 20,000 chars)


        **Response structure**:

        - `answer`: AI-generated answer text

        - `used_message_ids`: Message IDs (`msg_xxx`) used as source context

        - `used_meeting_ids`: Meeting IDs (`mtg_xxx`) used as source context

        - `used_event_ids`: Event IDs (`evt_xxx`) used as source context

        - `used_note_ids`: Note IDs (`note_xxx`) used as source context

        - `sources`: Optional human-readable snippets (only with `expand=sources`)

        - If no relevant context is found, the request still succeeds with a plain-language `answer` and empty source ID arrays.


        **Expand parameter**:

        By default, `sources` (title/snippet pairs) are not included to reduce payload size.

        Use `expand=sources` to include source snippets for display purposes.'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                query:
                  type: string
                  minLength: 1
                  maxLength: 10000
                client_timezone:
                  type: string
                history:
                  type: array
                  items:
                    type: object
                    additionalProperties: false
                    properties:
                      role:
                        type: string
                        enum:
                        - user
                        - assistant
                        - system
                      content:
                        type: string
                    required:
                    - role
                    - content
                integration_ids:
                  type: array
                  items:
                    anyOf:
                    - type: string
                      pattern: ^(int_[A-Za-z0-9]+|\d+)$
                    - type: integer
                      minimum: 1
                  description: Filter to specific integrations by opaque ID (int_xxx). Numeric IDs are accepted for backward compatibility.
                conversation_ids:
                  type: array
                  items:
                    type: string
                  description: Filter to specific conversations by opaque ID (conv_xxx)
                allow_bot_messages:
                  type: boolean
                retrieval_mode:
                  type: string
                  enum:
                  - fast
                  - auto
                  - deep
                  description: Optional retrieval strategy. Defaults to 'auto' for /query requests.
                expand:
                  type: string
                  description: Comma-separated list of fields to include (e.g., 'sources')
                instructions:
                  type: string
                  maxLength: 20000
                  description: Custom instructions for the AI. Controls output format, filtering, and conditional behavior. Takes priority over default style. Max 20,000 chars.
                context:
                  type: string
                  maxLength: 20000
                  description: Authoritative reference data for answer generation. The AI treats this as ground truth. Influences query rewriting but not used for vector search. Max 20,000 chars.
              required:
              - query
        required: true
      parameters:
      - schema:
          type: string
        in: query
        name: expand
        required: false
        description: 'Comma-separated list of fields to include. Valid options: sources'
      - schema:
          type: string
          format: uuid
        in: path
        name: user_id
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  success:
                    type: boolean
                    enum:
                    - true
                  data:
                    type: object
                    additionalProperties: false
                    properties:
                      history:
                        type: array
                        items:
                          type: object
                          additionalProperties: false
                          properties:
                            role:
                              type: string
                              enum:
                              - user
                              - assistant
                              - system
                            content:
                              type: string
                          required:
                          - role
                          - content
                      answer:
                        type: string
                      used_message_ids:
                        type: array
                        items:
                          type: string
                          pattern: ^msg_[A-Za-z0-9]+$
                      used_meeting_ids:
                        type: array
                        items:
                          type: string
                          pattern: ^mtg_(?:[A-Za-z0-9]+|~[A-Za-z0-9]+)$
                      used_event_ids:
                        type: array
                        items:
                          type: string
                          pattern: ^evt_(?:[A-Za-z0-9]+|~[A-Za-z0-9]+)$
                      used_note_ids:
                        type: array
                        items:
                          type: string
                          pattern: ^note_[A-Za-z0-9]+$
                      sources:
                        type: array
                        items:
                          type: object
                          additionalProperties: false
                          properties:
                            title:
                              type: string
                            snippet:
                              type: string
                          required:
                          - title
                          - snippet
                      usage:
                        type: object
                        additionalProperties: false
                        properties:
                          answer_generation:
                            type: object
                            additionalProperties: false
                            description: Synthesis chat-completion tokens only. See parent `usage` schema for full scope-coverage contract.
                            properties:
                              model:
                                type: string
                              prompt_tokens:
                                type: integer
                                minimum: 0
                              completion_tokens:
                                type: integer
                                minimum: 0
                              total_tokens:
                                type: integer
                                minimum: 0
                            required:
                            - model
                            - prompt_tokens
                            - completion_tokens
                            - total_tokens
                        required:
                        - answer_generation
                      no_context:
                        type: boolean
                        enum:
                        - true
                      warnings:
                        type: array
                        items:
                          type: object
                          additionalProperties: false
                          properties:
                            code:
                              type: string
                              enum:
                              - records_truncated_for_token_budget
                              - retrieval_degraded
                              - thread_fetch_failed
                              - meeting_hydration_failed
                              - event_hydration_failed
                              - history_truncated_for_size_budget
                            message:
                              type: string
                            dropped_record_count:
                              type: integer
                            degradations:
                              type: array
                              items:
                                type: string
                            failed_count:
                              type: integer
                            dropped_item_count:
                              type: integer
                            dropped_content_bytes:
                              type: integer
                            max_history_items:
                              type: integer
                            max_history_content_bytes:
                              type: integer
                          required:
                          - code
                          - message
                    required:
                    - history
                    - answer
                    - used_message_ids
                    - used_meeting_ids
                    - used_event_ids
                    - used_note_ids
                required:
                - success
                - data
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  success:
                    type: boolean
                    enum:
                    - false
                  error:
                    type: object
                    additionalProperties: false
                    properties:
                      code:
                        type: string
                        description: Machine-readable error code (e.g., AUTH_INVALID_TOKEN, RESOURCE_NOT_FOUND)
                      message:
                        type: string
                        description: Human-readable error message
                      details:
                        description: Optional additional error context
                    required:
                    - code
                    - message
                required:
                - success
                - error
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  success:
                    type: boolean
                    enum:
                    - false
                  error:
                    type: object
                    additionalProperties: false
                    properties:
                      code:
                        type: string
                        description: Machine-readable error code (e.g., AUTH_INVALID_TOKEN, RESOURCE_NOT_FOUND)
                      message:
                        type: string
                        description: Human-readable error message
                      details:
                        description: Optional additional error context
                    required:
                    - code
                    - message
                required:
                - success
                - error
      operationId: postV1UsersByUserIdQuery
      x-operation-id-source: derived