{
  "openapi": "3.1.0",
  "info": {
    "title": "Data Export API",
    "version": "2"
  },
  "servers": [
    {
      "url": "https://example.ada.support/api"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "headers": {
      "X-RateLimit-Limit": {
        "description": "The request cap for the current window. Present on an authenticated successful response.",
        "schema": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        }
      },
      "X-RateLimit-Remaining": {
        "description": "The number of requests left in the current window. Present on an authenticated successful response.",
        "schema": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1000000
        }
      },
      "X-RateLimit-Reset": {
        "description": "Unix timestamp, in seconds, when the current window resets. Present on an authenticated successful response.",
        "schema": {
          "type": "integer",
          "minimum": 0,
          "maximum": 99999999999
        }
      },
      "Retry-After": {
        "description": "The number of seconds to wait before retrying the request. Present when the response is caused by rate limiting.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 86400
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "x-fern-bearer": {
          "name": "apiKey",
          "env": "ADA_API_KEY"
        }
      }
    },
    "schemas": {
      "Conversation": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "Unique ID for the conversation record",
            "examples": [
              "5d8a7d080afd19b55945c8ab"
            ]
          },
          "agent_id": {
            "description": "The list of unique IDs for agents involved in the conversation",
            "examples": [
              [
                "619d95c0c063a5bf2b1efb7c"
              ]
            ],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "agent_handle_time": {
            "type": "number",
            "description": "Time taken for a human agent to handle a conversation in seconds",
            "examples": [
              4
            ]
          },
          "agent_name": {
            "description": "A list of names of the agents involved the conversation, corresponding to the agent IDs",
            "examples": [
              [
                "Ada Lovelace"
              ]
            ],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "automated_resolution_classification": {
            "description": "Classification of Resolved, Not Resolved, or [Excluded](/2026-11-10-updated-automated-resolution-model) for the conversation. Excluded conversations don't count toward the automated resolution rate.",
            "examples": [
              "Resolved"
            ],
            "type": "string"
          },
          "automated_resolution_classification_reason": {
            "description": "Explanation of the reason for the assigned automated_resolution_classification",
            "examples": [
              "The bot provided a detailed step-by-step guide on how to disable auto deposits, both on the mobile app and the web version."
            ],
            "type": "string"
          },
          "bot_handle_time": {
            "type": "number",
            "description": "Time taken for the AI agent to handle a conversation in seconds",
            "examples": [
              4
            ]
          },
          "browser": {
            "description": "The browser used by the chatter",
            "examples": [
              "chrome"
            ],
            "type": "string"
          },
          "browser_version": {
            "description": "The version of the browser used by the chatter",
            "examples": [
              "95.0.4638.69"
            ],
            "type": "string"
          },
          "changeset_id": {
            "description": "The change set the conversation ran against. Returns `baseline` when the conversation ran against the published configuration.",
            "examples": [
              "66f1a0c063a5bf2b1efb7c12"
            ],
            "type": "string"
          },
          "chatter_id": {
            "type": "string",
            "description": "Ada ID of the chatter having this conversation",
            "examples": [
              "5dbaef7283d791f585563d84"
            ]
          },
          "classifications": {
            "type": "array",
            "description": "Topic and Intent classifications for this conversation. `intents` is an empty array when the Topic has no classified Intent. Returns an empty array when the conversation has no classifications.",
            "items": {
              "type": "object",
              "properties": {
                "topic_id": {
                  "type": "string",
                  "description": "Ada ID of the classified Topic"
                },
                "topic_name": {
                  "type": "string",
                  "description": "Name of the classified Topic"
                },
                "intents": {
                  "type": "array",
                  "description": "Intents classified within this Topic. Empty when the Topic has no classified Intent.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "intent_id": {
                        "type": "string",
                        "description": "Ada ID of the classified Intent"
                      },
                      "intent_name": {
                        "type": "string",
                        "description": "Name of the classified Intent"
                      },
                      "status": {
                        "type": "string",
                        "description": "Status of the Intent (for example, active)"
                      }
                    }
                  }
                }
              }
            },
            "examples": [
              [
                {
                  "topic_id": "654952d3e90767ff49713fb1",
                  "topic_name": "Billing",
                  "intents": [
                    {
                      "intent_id": "654952d3e90767ff49713fc2",
                      "intent_name": "Dispute a charge",
                      "status": "active"
                    }
                  ]
                }
              ]
            ]
          },
          "csat": {
            "type": "object",
            "description": "Object of customer satisfaction survey data for this conversation",
            "examples": [
              {
                "comment": null,
                "feedback": null,
                "is_positive": false,
                "resolved": null,
                "score": 3,
                "style": "EMOJI",
                "survey_type": "end_chat",
                "customer_effort_score": 4,
                "ces_max": 5,
                "net_promoter_score": 8
              }
            ]
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time the record was created (UTC)",
            "examples": [
              "2019-10-31T14:28:02"
            ]
          },
          "date_updated": {
            "type": "string",
            "format": "date-time",
            "description": "Last date and time the record was updated (UTC)",
            "examples": [
              "2019-10-31T14:28:02"
            ]
          },
          "device": {
            "description": "The device the chatter used, such as iphone, android, etc.",
            "examples": [
              "macos"
            ],
            "type": "string"
          },
          "end_user_id": {
            "description": "The End User ID used to identify the chatter profile in the conversation",
            "examples": [
              "619d95c0c063a5bf2b1efb64e"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "generated_topic_id": {
            "description": "The unique ID Ada associated with the generated conversation topic",
            "examples": [
              "654952d3e90767ff49713fbf"
            ],
            "type": "string"
          },
          "generated_topic_label": {
            "description": "The title of the generated conversation topic",
            "examples": [
              "Billing Inquiries"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "generated_topic_v2_id": {
            "description": "The unique ID Ada associated with the generated conversation topic using Topics V2",
            "examples": [
              "654952d3e90767ff49713fb1"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "generated_topic_v2_title": {
            "description": "The title of the generated conversation topic using Topics V2",
            "examples": [
              "Password Reset Inquiries"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "generated_topic_v2_desc": {
            "description": "The descrtiption of the generated conversation topic using Topics V2",
            "examples": [
              "All conversations regarding resetting passwords"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "generated_topic_v2_parent_id": {
            "description": "The unique ID Ada associated with the generated conversation topic's parent category topic. Null if topic has no parent category topic.",
            "examples": [
              "654952d3e90767ff49713fb2"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "inquiry_summary": {
            "description": "An automatically generated summary of the customer's inquiry",
            "examples": [
              "The customer wanted to know how to temporarily disable auto deposits."
            ],
            "type": "string"
          },
          "is_engaged": {
            "type": "boolean",
            "description": "Whether the chatter engaged with the bot during this conversation",
            "examples": [
              true
            ]
          },
          "is_escalated": {
            "type": "boolean",
            "description": "Whether the chatter escalated to a live agent during this conversation",
            "examples": [
              false
            ]
          },
          "is_test_user": {
            "description": "Whether the conversation was started by a test user",
            "examples": [
              false
            ],
            "type": "boolean"
          },
          "language": {
            "description": "The language the chatter used",
            "examples": [
              "en"
            ],
            "type": "string"
          },
          "last_agent_id": {
            "description": "The unique ID of the agent who most recently handled the conversation (latest activity timestamp). Null when no agent was assigned. Populated only for clients on the generative export path.",
            "examples": [
              "619d95c0c063a5bf2b1efb7c"
            ],
            "type": "string"
          },
          "last_agent_name": {
            "description": "The name of the agent who most recently handled the conversation, corresponding to last_agent_id. Null when no agent was assigned. Populated only for clients on the generative export path.",
            "examples": [
              "Ada Lovelace"
            ],
            "type": "string"
          },
          "metavariables": {
            "type": "object",
            "description": "Object of metavariables and their values active during this conversations",
            "examples": [
              {
                "browser": "chrome",
                "language": "en"
              }
            ]
          },
          "oauth_channel": {
            "description": "The channel used by Oauth",
            "examples": [
              "sms"
            ],
            "type": "string"
          },
          "platform": {
            "description": "Ada platform through which this conversation occurred",
            "examples": [
              "chat"
            ],
            "type": "string"
          },
          "proactive_ids": {
            "type": "array",
            "description": "The Proactive IDs of the Proactives that opened this conversation, in the order they first opened it. Empty when no Proactive opened the conversation. A Proactive can open a conversation that already exists, so the list can have more than one ID.",
            "items": {
              "type": "string"
            },
            "examples": [
              [
                "60cb3ef9b72ebfacb39408da"
              ]
            ]
          },
          "record_last_updated": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Date and time the record was uploaded to the API",
            "examples": [
              "2019-10-31T14:28:02.865000+00:00"
            ]
          },
          "used_coaching": {
            "type": "array",
            "description": "Coaching events that were applied during the conversation. Each entry includes the coaching applied event id, entity_name, coaching_type, coaching_instructions, and coaching_intent. Returns an empty array when no coaching was applied.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "entity_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "coaching_type": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "coaching_instructions": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "coaching_intent": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "used_articles": {
            "type": "array",
            "description": "Knowledge articles that were referenced during the conversation. Each entry includes the article id, name, url, and source. Returns an empty array when no articles were referenced.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "source": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "handoffs": {
            "type": "array",
            "description": "Handoff attempts the AI Agent made during the conversation, the latest attempt per handoff target, ordered by time. Each entry includes the handoff name, handoff_id, the attempt id, date_created, outcome_status, reason_code and reasoning. An attempt can fail, so an entry does not show that the conversation was escalated; see is_escalated. Most handoffs before 2026-10-07 have a null reason_code. The array includes only the handoffs that the AI Agent starts, so an empty array does not mean the conversation was never handed off. A later export of the same conversation can carry fewer entries. To merge exports, match entries on handoff_id, or on id when handoff_id is null, and keep the entry with the later date_created. If both entries have the same date_created, keep the entry from the later export.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Name of the handoff that was invoked. Null when none was recorded."
                },
                "handoff_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "ID of the handoff that was invoked. Null when none was recorded. Some handoffs carry a generated ID that does not match a configured Handoff."
                },
                "id": {
                  "type": "string",
                  "description": "ID of the handoff attempt. It stays the same when the attempt appears in more than one export."
                },
                "date_created": {
                  "type": "string",
                  "description": "Time the handoff was invoked.",
                  "examples": [
                    "2026-09-24T14:28:02"
                  ]
                },
                "outcome_status": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Final result of the handoff attempt, for example succeeded or failed."
                },
                "reason_code": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "tool_failed",
                    "end_user_requested",
                    "out_of_scope",
                    "tool_unavailable",
                    "knowledge_unavailable",
                    "issue_unresolved",
                    "handoff_configured",
                    "other",
                    "system_failed",
                    "unclassified",
                    null
                  ],
                  "description": "Why the conversation was handed off. One of eight causes: tool_failed, end_user_requested, out_of_scope, tool_unavailable, knowledge_unavailable, issue_unresolved, handoff_configured, other. Or one of two system values: system_failed, unclassified. Null when no reason code was recorded. Null differs from unclassified: unclassified is a recorded value that means the system did not assign one of the eight causes."
                },
                "reasoning": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Evidence for the handoff, based on the conversation, the Tool results or the AI Agent configuration. Null when no text was recorded. Exported with your redaction rules applied."
                }
              }
            }
          },
          "used_playbooks": {
            "type": "array",
            "description": "Playbooks that were invoked during the conversation. Each entry includes the playbook id, name, playbook_execution_id, and outcome_status. Returns an empty array when no Playbooks were invoked.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "playbook_execution_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "outcome_status": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "used_mcp": {
            "type": "array",
            "description": "MCP tools that were invoked during the conversation. Each entry includes the invocation event id, tool_id, connection_id, connection_name, tool_name, and outcome_status. tool_id is null for invocations recorded before that field was captured. Returns an empty array when no MCP tools were invoked.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "tool_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "connection_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "connection_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tool_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "outcome_status": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "variables": {
            "type": "object",
            "description": "Object of autocapture and global variables and their values last active during this conversations",
            "examples": [
              {
                "account_number": "1234"
              }
            ]
          }
        }
      },
      "ConversationsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "description": "Records returned from the query",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Conversation"
            },
            "examples": [
              {
                "_id": "5d8a7d080afd19b55945c8ab",
                "agent_id": [
                  "619d95c0c063a5bf2b1efb7c"
                ],
                "agent_name": [
                  "Ada Lovelace"
                ],
                "agent_handle_time": 4,
                "automated_resolution_classification": "Resolved",
                "automated_resolution_classification_reason": "The bot provided a detailed step-by-step guide on how to disable auto deposits",
                "bot_handle_time": 4,
                "browser": "chrome",
                "browser_version": "95.0.4638.69",
                "changeset_id": "66f1a0c063a5bf2b1efb7c12",
                "chatter_id": "5dbaef7283d791f585563d84",
                "classifications": [
                  {
                    "topic_id": "654952d3e90767ff49713fb1",
                    "topic_name": "Billing",
                    "intents": [
                      {
                        "intent_id": "654952d3e90767ff49713fc2",
                        "intent_name": "Dispute a charge",
                        "status": "active"
                      }
                    ]
                  }
                ],
                "csat": {
                  "comment": null,
                  "feedback": null,
                  "is_positive": false,
                  "resolved": null,
                  "score": 3,
                  "style": "EMOJI",
                  "survey_type": "end_chat",
                  "customer_effort_score": 4,
                  "ces_max": 5,
                  "net_promoter_score": 8
                },
                "date_created": "2019-10-31T14:28:02",
                "date_updated": "2019-10-31T14:29:02",
                "device": "macos",
                "end_user_id": "619d95c0c063a5bf2b1efb64e",
                "generated_topic_id": "654952d3e90767ff49713fbf",
                "generated_topic_label": "Billing Inquiries",
                "generated_topic_v2_id": "654952d3e90767ff49713fb1",
                "generated_topic_v2_title": "Password Reset Inquiries",
                "generated_topic_v2_desc": "All conversations regarding resetting passwords",
                "generated_topic_v2_parent_id": "654952d3e90767ff49713fb2",
                "inquiry_summary": "The customer wanted to know how to temporarily disable auto deposits",
                "is_engaged": true,
                "is_escalated": false,
                "is_test_user": false,
                "language": "en",
                "last_agent_id": "619d95c0c063a5bf2b1efb7c",
                "last_agent_name": "Ada Lovelace",
                "metavariables": {
                  "browser": "chrome",
                  "language": "en"
                },
                "oauth_channel": "sms",
                "platform": "chat",
                "proactive_ids": [
                  "60cb3ef9b72ebfacb39408da"
                ],
                "record_last_updated": null,
                "variables": {
                  "account_number": "1234"
                }
              }
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "next_page_uri": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Link to the next page of results matching the query",
                "examples": [
                  "https://example.ada.support/api/v2/export/conversations?created_since=2023-07-08T06%3A01%3A39%2B00%3A00&created_to=2023-07-22T00%3A00%3A00%2B00%3A00"
                ]
              }
            },
            "examples": [
              {
                "next_page_uri": "https://example.ada.support/api/v2/export/conversations?created_since=2023-07-08T06%3A01%3A39%2B00%3A00&created_to=2023-07-22T00%3A00%3A00%2B00%3A00"
              }
            ]
          }
        }
      },
      "Message": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "Unique ID for the message record",
            "examples": [
              "5d8a7d080afd19b55945c8ab"
            ]
          },
          "answer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Internal ID of the answer (response) that triggered this message. Null if the message was not sent by an Ada bot, and None if it was sent by a generative bot.",
            "examples": [
              "6392e0f865ba38041ddd5966"
            ]
          },
          "answer_title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Title of the answer (response) that triggered this message. Null if the message was not sent by an Ada bot, or if it was sent by a generative bot.",
            "examples": [
              "Greeting"
            ]
          },
          "chatter_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Internal ID of the chatter who sent this message. Corresponds to the `_id` field of Chatter objects.",
            "examples": [
              "6009dd3c81dfae3a4e990acb"
            ]
          },
          "conversation_id": {
            "type": "string",
            "description": "Internal ID of the conversation in which this message was sent. Corresponds to the `_id` field of Conversation objects.",
            "examples": [
              "5dba43ebedb828146bc871b6"
            ]
          },
          "date_created": {
            "type": "string",
            "format": "date-time",
            "description": "Time the record was created (UTC)",
            "examples": [
              "2019-10-31T14:28:02.865000+00:00"
            ]
          },
          "link_was_clicked": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Indicates if the link in the answer (response) was clicked",
            "examples": [
              false
            ]
          },
          "message_data": {
            "type": "object",
            "description": "Data associated with this message",
            "examples": [
              {
                "_type": "greeting",
                "external_chat_id": "<uuid_v4_id>",
                "reviewable_message": false
              }
            ]
          },
          "recipient": {
            "type": "string",
            "description": "Recipient of this message",
            "examples": [
              "ada"
            ]
          },
          "record_last_updated": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time the record was uploaded to the API (UTC)",
            "examples": [
              "2019-10-31T14:28:02.865000+00:00"
            ]
          },
          "review": {
            "type": "integer",
            "format": "int32",
            "description": "Rating given to this answer by the chatter",
            "minimum": 0,
            "maximum": 5,
            "examples": [
              0
            ]
          },
          "sender": {
            "type": "string",
            "description": "Sender of this message",
            "examples": [
              "b9e51eae-5449-4a46-b6ce-aef2dcb4e067"
            ]
          },
          "in_response_to": {
            "description": "Internal ID of the message that this message is in response to. None if the message is not in response to another message.",
            "type": "string",
            "examples": [
              "6392e0f865ba38041ddd5966"
            ]
          }
        }
      },
      "MessagesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "description": "Records returned from the query",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            },
            "examples": [
              {
                "_id": "5d8a7d080afd19b55945c8ab",
                "answer_id": "6392e0f865ba38041ddd5966",
                "answer_title": "Greeting",
                "chatter_id": "6009dd3c81dfae3a4e990acb",
                "conversation_id": "5dba43ebedb828146bc871b6",
                "date_created": "2019-10-31T14:28:02.865000+00:00",
                "link_was_clicked": false,
                "message_data": {
                  "_type": "greeting",
                  "external_chat_id": "<uuid_v4_id>",
                  "reviewable_message": false
                },
                "recipient": "ada",
                "record_last_updated": "2019-10-31T14:28:02.865000+00:00",
                "review": 0,
                "sender": "b9e51eae-5449-4a46-b6ce-aef2dcb4e067",
                "in_response_to": "6392e0f865ba38041ddd5966"
              }
            ]
          },
          "meta": {
            "type": "object",
            "properties": {
              "next_page_uri": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Link to the next page of results matching the query",
                "examples": [
                  "https://example.ada.support/api/v2/export/messages?created_since=2023-07-01T14%3A01%3A16.257000%2B00%3A00&created_to=2023-07-22T00%3A00%3A00%2B00%3A00"
                ]
              }
            },
            "examples": [
              {
                "next_page_uri": "https://example.ada.support/api/v2/export/messages?created_since=2023-07-01T14%3A01%3A16.257000%2B00%3A00&created_to=2023-07-22T00%3A00%3A00%2B00%3A00"
              }
            ]
          }
        }
      },
      "CustomMetricVerdict": {
        "type": "object",
        "required": [
          "conversation_id",
          "metric_id",
          "is_removed",
          "verdict",
          "reasoning",
          "metric_version",
          "judge_version",
          "evaluated_at",
          "scored_at",
          "is_final",
          "record_last_updated"
        ],
        "properties": {
          "conversation_id": {
            "type": "string",
            "description": "The `_id` of the conversation record",
            "examples": [
              "6739a1f2c4e5d60012ab34cd"
            ]
          },
          "metric_id": {
            "type": "string",
            "description": "The `metric_id` of the metric in `/v2/export/custom-metrics`",
            "examples": [
              "671f0c2e9b1d4a0011223344"
            ]
          },
          "is_removed": {
            "type": "boolean",
            "description": "True when Ada no longer returns a verdict for this conversation and metric. Then every field is null except `conversation_id`, `metric_id`, `is_removed` and `record_last_updated`.",
            "examples": [
              false
            ]
          },
          "verdict": {
            "type": [
              "string",
              "null"
            ],
            "description": "One of `pass`, `fail`, `not_applicable`, `undecided` and `unjudged`. New values can be added.",
            "examples": [
              "fail"
            ]
          },
          "reasoning": {
            "type": [
              "string",
              "null"
            ],
            "description": "The reason the judge gave, with private data hidden. Null for `unjudged`.",
            "examples": [
              "The AI Agent asked for the order number again after the end user gave it."
            ]
          },
          "metric_version": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 4294967295,
            "description": "The version of the metric text that gave this verdict",
            "examples": [
              3
            ]
          },
          "judge_version": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 4294967295,
            "description": "The version of Ada's judge",
            "examples": [
              2
            ]
          },
          "evaluated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The time of the conversation snapshot the judge read",
            "examples": [
              "2026-11-17T09:04:00Z"
            ]
          },
          "scored_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the judge wrote this verdict",
            "examples": [
              "2026-11-17T09:14:07Z"
            ]
          },
          "is_final": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True when Ada recorded that the conversation had ended when the judge read it, false when it was open, null when Ada cannot establish it",
            "examples": [
              false
            ]
          },
          "record_last_updated": {
            "type": "string",
            "format": "date-time",
            "description": "When Ada added this state of the conversation and metric to the export. A newer state always has a greater value.",
            "examples": [
              "2026-11-17T09:15:02.118Z"
            ]
          }
        }
      },
      "CustomMetricVerdictsResponse": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomMetricVerdict"
            },
            "examples": [
              [
                {
                  "conversation_id": "6739a1f2c4e5d60012ab34cd",
                  "metric_id": "671f0c2e9b1d4a0011223344",
                  "is_removed": false,
                  "verdict": "fail",
                  "reasoning": "The AI Agent asked for the order number again after the end user gave it.",
                  "metric_version": 3,
                  "judge_version": 2,
                  "evaluated_at": "2026-11-17T09:04:00Z",
                  "scored_at": "2026-11-17T09:14:07Z",
                  "is_final": false,
                  "record_last_updated": "2026-11-17T09:15:02.118Z"
                }
              ]
            ]
          },
          "meta": {
            "type": "object",
            "required": [
              "next_page_uri",
              "updated_to",
              "next_poll_uri"
            ],
            "examples": [
              {
                "next_page_uri": null,
                "updated_to": "2026-11-17T10:58:02.004Z",
                "next_poll_uri": "https://example.ada.support/api/v2/export/custom-metric-verdicts?updated_since=2026-11-17T10%3A58%3A02.004Z"
              }
            ],
            "properties": {
              "next_page_uri": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The next page of this crawl. Only null ends the crawl.",
                "examples": [
                  "https://example.ada.support/api/v2/export/custom-metric-verdicts?cursor=eyJzaW5jZSI6IDE3OTQ5MDYwMDAwMDAsICJ0byI6IDE3OTQ5MTMwODIwMDQsICJyZWNvbmNpbGUiOiBmYWxzZSwgInBhZ2Vfc2l6ZSI6IDEwMDAwLCAicGFnZV9zaXplX3NlbnQiOiBmYWxzZSwgImFmdGVyIjogWzE3OTQ5MDY5MDIxMTgsICI2NzM5YTFmMmM0ZTVkNjAwMTJhYjM0Y2QiLCAiNjcxZjBjMmU5YjFkNGEwMDExMjIzMzQ0Il19"
                ]
              },
              "updated_to": {
                "type": "string",
                "format": "date-time",
                "description": "The end of the window of this crawl",
                "examples": [
                  "2026-11-17T10:58:02.004Z"
                ]
              },
              "next_poll_uri": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The first page of the next crawl. Set on the last page of a crawl without `reconcile`.",
                "examples": [
                  "https://example.ada.support/api/v2/export/custom-metric-verdicts?updated_since=2026-11-17T10%3A58%3A02.004Z"
                ]
              }
            }
          }
        }
      },
      "CustomMetric": {
        "type": "object",
        "required": [
          "metric_id",
          "name",
          "direction",
          "state"
        ],
        "properties": {
          "metric_id": {
            "type": "string",
            "examples": [
              "671f0c2e9b1d4a0011223344"
            ]
          },
          "name": {
            "type": "string",
            "examples": [
              "No repeated questions"
            ]
          },
          "direction": {
            "type": "string",
            "description": "One of `higher_is_better` and `higher_is_worse`",
            "examples": [
              "higher_is_better"
            ]
          },
          "state": {
            "type": "string",
            "description": "One of `active` and `draft`",
            "examples": [
              "active"
            ]
          }
        }
      },
      "CustomMetricsResponse": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomMetric"
            },
            "examples": [
              [
                {
                  "metric_id": "671f0c2e9b1d4a0011223344",
                  "name": "No repeated questions",
                  "direction": "higher_is_better",
                  "state": "active"
                }
              ]
            ]
          },
          "meta": {
            "type": "object",
            "required": [
              "next_page_uri"
            ],
            "examples": [
              {
                "next_page_uri": null
              }
            ],
            "properties": {
              "next_page_uri": {
                "type": "null",
                "examples": [
                  null
                ]
              }
            }
          }
        }
      },
      "CustomMetricVerdictCount": {
        "type": "object",
        "required": [
          "metric_id",
          "is_removed",
          "verdict",
          "count"
        ],
        "properties": {
          "metric_id": {
            "type": "string",
            "examples": [
              "671f0c2e9b1d4a0011223344"
            ]
          },
          "is_removed": {
            "type": "boolean",
            "examples": [
              false
            ]
          },
          "verdict": {
            "type": [
              "string",
              "null"
            ],
            "examples": [
              "pass"
            ]
          },
          "count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9223372036854775807,
            "examples": [
              4120
            ]
          }
        }
      },
      "CustomMetricVerdictCountsResponse": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomMetricVerdictCount"
            },
            "examples": [
              [
                {
                  "metric_id": "671f0c2e9b1d4a0011223344",
                  "is_removed": false,
                  "verdict": "pass",
                  "count": 4120
                },
                {
                  "metric_id": "671f0c2e9b1d4a0011223344",
                  "is_removed": true,
                  "verdict": null,
                  "count": 2
                }
              ]
            ]
          },
          "meta": {
            "type": "object",
            "required": [
              "as_of"
            ],
            "examples": [
              {
                "as_of": "2026-11-17T10:59:12.000Z"
              }
            ],
            "properties": {
              "as_of": {
                "type": "string",
                "format": "date-time",
                "description": "The database time when the counts were read",
                "examples": [
                  "2026-11-17T10:59:12.000Z"
                ]
              }
            }
          }
        }
      },
      "Errors": {
        "type": "object",
        "properties": {
          "errors": {
            "description": "A list of errors",
            "type": [
              "array"
            ],
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "description": "The error type",
                  "type": [
                    "string"
                  ],
                  "examples": [
                    "unauthorized"
                  ]
                },
                "message": {
                  "description": "The error message",
                  "type": [
                    "string"
                  ],
                  "examples": [
                    {
                      "401 Unauthorized": "The server could not verify that you are authorized to access the URL requested"
                    }
                  ]
                },
                "details": {
                  "description": "Extra information about the error",
                  "type": [
                    "string",
                    "null"
                  ],
                  "examples": [
                    "The requested resource with id <id> was not found"
                  ]
                }
              },
              "examples": [
                {
                  "type": "resource_not_found",
                  "message": "The requested resource was not found",
                  "details": "The requested resource with id 123456abcdef was not found"
                }
              ],
              "required": [
                "type",
                "message"
              ]
            },
            "examples": [
              {
                "errors": [
                  {
                    "type": "resource_not_found",
                    "message": "The requested resource was not found",
                    "details": "The requested resource with id 123456abcdef was not found"
                  }
                ]
              }
            ]
          }
        },
        "required": [
          "errors"
        ]
      }
    },
    "examples": {
      "AuthorizationError": {
        "value": {
          "errors": [
            {
              "type": "authorization_error",
              "message": "You are not authorized to access this resource",
              "details": "You are not authorized to access this resource"
            }
          ]
        }
      },
      "BadRequestError": {
        "value": {
          "errors": [
            {
              "type": "bad_request",
              "message": "Invalid request",
              "details": "{'profile': {'system_properties': ['Unknown field.']}}"
            }
          ]
        }
      },
      "DuplicateResourceError": {
        "value": {
          "errors": [
            {
              "type": "duplicate_resource",
              "message": "Duplicate resource",
              "details": "A resource with the same id already exists."
            }
          ]
        }
      },
      "NotFoundError": {
        "value": {
          "errors": [
            {
              "type": "resource_not_found",
              "message": "Resource not found",
              "details": "The requested resource with id 5f7e0e2c1e7c7e000f0f9c3a was not found"
            }
          ]
        }
      },
      "ClientNotFoundError": {
        "value": {
          "errors": [
            {
              "type": "resource_not_found",
              "message": "Sorry, no client 'client_name' exists",
              "details": null
            }
          ]
        }
      },
      "UnauthorizedError": {
        "value": {
          "errors": [
            {
              "type": "unauthorized",
              "message": "You are not authorized to access this resource",
              "details": "You are not authorized to access this resource"
            }
          ]
        }
      },
      "ContentTooLargeError": {
        "value": {
          "errors": [
            {
              "type": "content_too_large",
              "message": "Content too large",
              "details": "Maximum request size of 4.0 MB exceeded. Content length: 5.0 MB"
            }
          ]
        }
      },
      "UnprocessableContentError": {
        "value": {
          "errors": [
            {
              "type": "unprocessable_content",
              "message": "Unprocessable content",
              "details": "The request was well-formed but was unable to be followed due to semantic errors"
            }
          ]
        }
      },
      "TooManyRequestsError": {
        "value": {
          "errors": [
            {
              "type": "rate_limit_exceeded",
              "message": "Rate limit exceeded",
              "details": "10 requests allowed per second"
            }
          ]
        }
      },
      "InternalServerError": {
        "value": {
          "errors": [
            {
              "type": "internal_server_error",
              "message": "An unknown error occurred",
              "details": "An unknown error occurred. error_id: 91d435a7-e0b4-4c56-a097-8907e9ed851e"
            }
          ]
        }
      }
    }
  },
  "paths": {
    "/v2/export/conversations": {
      "get": {
        "operationId": "getConversations",
        "summary": "Return conversations matching the parameters",
        "description": "Returns a list of `conversation` objects along with a `next_page_uri` if applicable",
        "tags": [
          "Conversations"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "created_since",
            "required": false,
            "description": "Return records that were created after this date. If `created_to` is not specified, only records within 7 days of this timestamp are returned. To retrieve data beyond that window, set `created_to` explicitly. Note that `updated_since` and `created_since` are mutually exclusive, so you must only use one in a request. Must be an ISO 8601 UTC timestamp ending with 'Z' (e.g., `2024-07-01T00:00:00Z`); required for valid API requests.",
            "schema": {
              "type": "string",
              "format": "date-time",
              "examples": [
                "2023-07-03T00:00:00Z"
              ]
            }
          },
          {
            "in": "query",
            "name": "updated_since",
            "required": false,
            "description": "Return records that were updated after this date. Note that `updated_since` and `created_since` are mutually exclusive, so you must only use one in a request. Must be an ISO 8601 UTC timestamp ending with 'Z' (e.g., `2024-07-01T00:00:00Z`); required for valid API requests.",
            "schema": {
              "type": "string",
              "format": "date-time",
              "examples": [
                "2023-07-03T00:00:00Z"
              ]
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "description": "Number of records to return in response. The maximum and default is 10000, the minimum is 100.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10000,
              "minimum": 100,
              "maximum": 10000,
              "examples": [
                10000
              ]
            }
          },
          {
            "in": "query",
            "name": "created_to",
            "required": false,
            "description": "Return records that were created earlier than this date. If `created_since` is used and this parameter is not specified, this value defaults to 7 days after `created_since`. Must be an ISO 8601 UTC timestamp ending with 'Z' (e.g., `2024-07-01T00:00:00Z`); required for valid API requests.",
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time",
              "examples": [
                "2023-07-18T00:00:00Z"
              ]
            }
          },
          {
            "in": "query",
            "name": "updated_to",
            "required": false,
            "description": "Return records that were updated earlier than this date. If `updated_since` is used and this parameter is not specified, this value defaults to 7 days after `updated_since`. Must be an ISO 8601 UTC timestamp ending with 'Z' (e.g., `2024-07-01T00:00:00Z`); required for valid API requests.",
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time",
              "examples": [
                "2023-07-18T00:00:00Z"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ada successfully processed the request",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "BadRequestError": {
                    "$ref": "#/components/examples/BadRequestError"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "UnauthorizedError": {
                    "$ref": "#/components/examples/UnauthorizedError"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "BadRequestError": {
                    "$ref": "#/components/examples/ClientNotFoundError"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "TooManyRequestsError": {
                    "$ref": "#/components/examples/TooManyRequestsError"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "InternalServerError": {
                    "$ref": "#/components/examples/InternalServerError"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/export/messages": {
      "get": {
        "operationId": "getMessages",
        "summary": "Return messages matching the parameters",
        "description": "Returns a list of `message` objects along with a `next_page_uri` if applicable",
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "created_since",
            "required": true,
            "description": "Return records that were created after this date. If `created_to` is not specified, only records within 7 days of this timestamp are returned. To retrieve data beyond that window, set `created_to` explicitly. Must be an ISO 8601 UTC timestamp ending with 'Z' (e.g., `2024-07-01T00:00:00Z`); required for valid API requests.",
            "schema": {
              "type": "string",
              "format": "date-time",
              "examples": [
                "2023-07-03T00:00:00Z"
              ]
            }
          },
          {
            "in": "query",
            "name": "conversation_id",
            "required": false,
            "description": "Return records with a `conversation_id` that matches this id",
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "id",
              "examples": [
                "60bd36dc8f17071b5c5bec12"
              ]
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "description": "Number of records to return in response. The maximum and default is 10000, the minimum is 100.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10000,
              "minimum": 100,
              "maximum": 10000,
              "examples": [
                10000
              ]
            }
          },
          {
            "in": "query",
            "name": "created_to",
            "required": false,
            "description": "Return records that were created earlier than this date. If not specified, this value defaults to 7 days after `created_since`. Must be an ISO 8601 UTC timestamp ending with 'Z' (e.g., `2024-07-01T00:00:00Z`); required for valid API requests.",
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time",
              "examples": [
                "2023-07-03T00:00:00Z"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ada successfully processed the request",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessagesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "BadRequestError": {
                    "$ref": "#/components/examples/BadRequestError"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "UnauthorizedError": {
                    "$ref": "#/components/examples/UnauthorizedError"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "BadRequestError": {
                    "$ref": "#/components/examples/ClientNotFoundError"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "TooManyRequestsError": {
                    "$ref": "#/components/examples/TooManyRequestsError"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                },
                "examples": {
                  "InternalServerError": {
                    "$ref": "#/components/examples/InternalServerError"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v2/export/custom-metric-verdicts": {
      "get": {
        "operationId": "getCustomMetricVerdicts",
        "summary": "Return the Custom Metric verdict records added to the export in a window",
        "description": "Without `reconcile`, returns one record for each state of a conversation and metric that Ada added to the export in `[updated_since, updated_to)`. With `reconcile=true`, returns the current record of each conversation and metric that has a record in the window, and its `record_last_updated` can be later than `updated_to`. One conversation and metric can come back on more than one page. A conversation and metric whose verdict Ada took back is absent until Ada adds its removed record. Follow `meta.next_page_uri` until it is null. After a crawl without `reconcile`, save `meta.next_poll_uri` for the next run. A crawl with `reconcile=true` returns no `next_poll_uri`, so keep the one that you saved.",
        "tags": [
          "Custom Metric verdicts"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "updated_since",
            "required": false,
            "description": "Return records with a `record_last_updated` at or after this time. Required unless `cursor` is sent.",
            "schema": {
              "type": "string",
              "format": "date-time",
              "examples": [
                "2026-11-17T09:00:00.000Z"
              ]
            }
          },
          {
            "in": "query",
            "name": "updated_to",
            "required": false,
            "description": "Without `reconcile`, return records with a `record_last_updated` before this time, and lower a later value to the export bound. With `reconcile`, a record can have a later `record_last_updated`, and a value past the export bound gives a 400. The default is the export bound.",
            "schema": {
              "type": "string",
              "format": "date-time",
              "examples": [
                "2026-11-17T10:00:00.000Z"
              ]
            }
          },
          {
            "in": "query",
            "name": "reconcile",
            "required": false,
            "description": "With `true`, return the current record of every conversation and metric that has a record in the window. Needs `updated_to`. The window is at most 24 hours and ends at or before the export bound.",
            "schema": {
              "type": "boolean",
              "default": false,
              "examples": [
                true
              ]
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "required": false,
            "description": "Number of records to return in a page. The maximum and default is 10000, the minimum is 100.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10000,
              "minimum": 100,
              "maximum": 10000,
              "examples": [
                10000
              ]
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "description": "The position of the next page. Only `meta.next_page_uri` sets it. It cannot be used with any other parameter.",
            "schema": {
              "type": "string",
              "examples": [
                "eyJzaW5jZSI6IDE3OTQ5MDYwMDAwMDAsICJ0byI6IDE3OTQ5MTMwODIwMDQsICJyZWNvbmNpbGUiOiBmYWxzZSwgInBhZ2Vfc2l6ZSI6IDEwMDAwLCAicGFnZV9zaXplX3NlbnQiOiBmYWxzZSwgImFmdGVyIjogWzE3OTQ5MDY5MDIxMTgsICI2NzM5YTFmMmM0ZTVkNjAwMTJhYjM0Y2QiLCAiNjcxZjBjMmU5YjFkNGEwMDExMjIzMzQ0Il19"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request was successfully processed",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomMetricVerdictsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "403": {
            "description": "The export of Custom Metric verdicts is not turned on for this AI Agent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "A store that the answer needs could not be read in time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        }
      }
    },
    "/v2/export/custom-metric-verdicts/counts": {
      "get": {
        "operationId": "getCustomMetricVerdictCounts",
        "summary": "Return how many conversations and metrics have their current record in a window",
        "description": "Counts the conversations and metrics whose current record has a `record_last_updated` in `[updated_since, updated_to)`, by `metric_id`, `is_removed` and `verdict`",
        "tags": [
          "Custom Metric verdicts"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "updated_since",
            "required": true,
            "description": "The start of the window, inclusive",
            "schema": {
              "type": "string",
              "format": "date-time",
              "examples": [
                "2026-11-13T00:00:00Z"
              ]
            }
          },
          {
            "in": "query",
            "name": "updated_to",
            "required": true,
            "description": "The end of the window, exclusive. It is at most 24 hours after `updated_since` and at or before the export bound.",
            "schema": {
              "type": "string",
              "format": "date-time",
              "examples": [
                "2026-11-14T00:00:00Z"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request was successfully processed",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomMetricVerdictCountsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "403": {
            "description": "The export of Custom Metric verdicts is not turned on for this AI Agent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "A store that the answer needs could not be read in time, or the window has records of more than 250,000 conversations. For the second cause, every call gives a 503. Count shorter windows that together cover it, and add their counts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        }
      }
    },
    "/v2/export/custom-metrics": {
      "get": {
        "operationId": "getCustomMetrics",
        "summary": "Return every Custom Metric of the AI Agent",
        "description": "Returns the full list of Custom Metrics. A deleted metric is absent. The list is never paged.",
        "tags": [
          "Custom Metric verdicts"
        ],
        "responses": {
          "200": {
            "description": "The request was successfully processed",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomMetricsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "403": {
            "description": "The export of Custom Metric verdicts is not turned on for this AI Agent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          },
          "503": {
            "description": "A store that the answer needs could not be read in time",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Errors"
                }
              }
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "data_export_conversations",
      "description": ""
    },
    {
      "name": "data_export_messages",
      "description": ""
    }
  ]
}
