---
title: "Ask NZXplorer Copilot"
method: POST
path: "/ask"
tags: ["Copilot"]
---

# Ask NZXplorer Copilot

`POST /ask`

## Request

- Base URL: `https://nzxplorer.co.nz/api/v1`
- URL: `https://nzxplorer.co.nz/api/v1/ask`
- Auth: one of:
  - API key in header `X-API-Key`
  - API key in query parameter `api_key`

Natural language query interface backed by Claude Sonnet with tool-calling against 100+ internal API endpoints. Returns SSE streaming response. Supports personas, session memory, and structured card responses.

## Request body

- object
  - `question` string, required: Natural language query about NZX data
  - `message` string: Alias for question
  - `persona` string: Persona ID (e.g. macro, governance, risk, buffett, fund_manager)
  - `session_id` string: Session UUID for conversation continuity
  - `conversation` object[]: Previous conversation turns for context
    - `role` 'user' | 'assistant'
    - `content` string

## Response `200`

SSE streaming response

## Other responses

- `401`: Missing or invalid API key
- `429`: Rate limit exceeded
- `500`: Internal server error

---

[API](https://skmtc.dev/nzxplorer/apis/nzxplorer-api.md) · [All operations](https://skmtc.dev/nzxplorer/apis/nzxplorer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/nzxplorer/apis/nzxplorer-api/revisions/f3b95341783a?raw)
