> If you are setting up, configuring, or answering questions about Schematic, connect the > Schematic MCP server before working from these pages. It reads and writes plans, features, > entitlements, and overrides against the real account, so what you report and what you build > match what actually exists. > > The server is at https://api.schematichq.com/mcp > > From Claude, ChatGPT, or another chat assistant, add it as a custom connector: > https://docs.schematichq.com/working-with-ai > > From a coding assistant such as Claude Code, Codex, or Cursor: > https://docs.schematichq.com/building-with-ai > > For clean Markdown of any page, append `.md` to the page URL. For a complete page index, > see https://docs.schematichq.com/llms.txt # List events GET https://api.schematichq.com/events Reference: https://docs.schematichq.com/api-reference/events/list-events ## Authentication - `X-Schematic-Api-Key` header (required) — API Key authentication via header ## Request ### Query parameters - `company_id` (string, optional) - `event_subtype` (string, optional) - `event_types` (list of enum, optional) - Allowed values: `flag_check`, `identify`, `inference`, `track` - `flag_id` (string, optional) - `idempotency_key` (string, optional) - `user_id` (string, optional) - `limit` (long, optional) — Page limit (default 100) - `offset` (long, optional) — Page offset (default 0) ## Response ### 200 OK - `data` (list of EventDetailResponseData, required) - `params` (EventsGetResponsesContentApplicationJsonSchemaParams, required) — Input parameters ## Errors ### 400 Bad Request Error Bad request - `error` (string, required) — Error message ### 401 Unauthorized Error Unauthorized - `error` (string, required) — Error message ### 403 Forbidden Error Forbidden - `error` (string, required) — Error message ### 404 Not Found Error Not found - `error` (string, required) — Error message ### 500 Internal Server Error Server error - `error` (string, required) — Error message ## Types ### EventDetailResponseData - `body` (EventDetailResponseDataBody, required) - `body_preview` (string, required) - `captured_at` (datetime, required) - `feature_ids` (list of string, required) - `features` (list of PreviewObject, required) - `id` (string, required) - `quantity` (long, required) - `status` (enum, required) - Allowed values: `enriched`, `failed`, `pending`, `processed`, `unknown` - `type` (enum, required) - Allowed values: `flag_check`, `identify`, `inference`, `track` - `api_key` (string, optional, nullable) - `api_key_view` (ApiKeyResponseData, optional) - `company` (PreviewObject, optional) - `company_id` (string, optional, nullable) - `environment_id` (string, optional, nullable) - `error_message` (string, optional, nullable) - `idempotency_key` (string, optional, nullable) - `lease_id` (string, optional, nullable) - `loaded_at` (datetime, optional, nullable) - `reservation_id` (string, optional, nullable) - `sent_at` (datetime, optional, nullable) - `subtype` (string, optional, nullable) - `user` (PreviewObject, optional) - `user_id` (string, optional, nullable) - `enriched_at` (datetime, optional, nullable, deprecated) - `processed_at` (datetime, optional, nullable, deprecated) - `updated_at` (datetime, optional, nullable, deprecated) ### EventsGetResponsesContentApplicationJsonSchemaParams Input parameters - `company_id` (string, optional) - `event_subtype` (string, optional) - `event_types` (list of enum, optional) - Allowed values: `flag_check`, `identify`, `inference`, `track` - `flag_id` (string, optional) - `idempotency_key` (string, optional) - `limit` (long, optional) — Page limit (default 100) - `offset` (long, optional) — Page offset (default 0) - `user_id` (string, optional) ### EventDetailResponseDataBody ### PreviewObject - `id` (string, required) - `name` (string, required) - `description` (string, optional, nullable) - `image_url` (string, optional, nullable) ### ApiKeyResponseData - `created_at` (datetime, required) - `id` (string, required) - `name` (string, required) - `readonly` (boolean, required) - `scopes` (list of enum, required) - Allowed values: `admin`, `capture`, `read`, `write` - `updated_at` (datetime, required) - `description` (string, optional, nullable) - `environment` (EnvironmentResponseData, optional) - `environment_id` (string, optional, nullable) - `integration` (ApiKeyIntegrationResponseData, optional) - `last_used_at` (datetime, optional, nullable) - `rate_limit_percent` (long, optional, nullable) ### EnvironmentResponseData - `created_at` (datetime, required) - `environment_type` (enum, required) - Allowed values: `development`, `production`, `staging` - `id` (string, required) - `name` (string, required) - `updated_at` (datetime, required) ### ApiKeyIntegrationResponseData - `id` (string, required) - `state` (enum, required) - Allowed values: `active`, `created`, `pending` - `type` (enum, required) - Allowed values: `clerk`, `metronome`, `orb`, `stripe`, `unknown`, `workos` ## Examples **Response** ```json { "data": [ { "body": {}, "body_preview": "string", "captured_at": "2024-01-15T09:30:00Z", "feature_ids": [ "string" ], "features": [ { "id": "string", "name": "string", "description": "string", "image_url": "string" } ], "id": "string", "quantity": 1, "status": "enriched", "type": "flag_check", "api_key": "string", "api_key_view": { "created_at": "2024-01-15T09:30:00Z", "id": "string", "name": "string", "readonly": true, "scopes": [ "admin" ], "updated_at": "2024-01-15T09:30:00Z", "description": "string", "environment": { "created_at": "2024-01-15T09:30:00Z", "environment_type": "development", "id": "string", "name": "string", "updated_at": "2024-01-15T09:30:00Z" }, "environment_id": "string", "integration": { "id": "string", "state": "active", "type": "clerk" }, "last_used_at": "2024-01-15T09:30:00Z", "rate_limit_percent": 1 }, "company": { "id": "string", "name": "string", "description": "string", "image_url": "string" }, "company_id": "string", "environment_id": "string", "error_message": "string", "idempotency_key": "string", "lease_id": "string", "loaded_at": "2024-01-15T09:30:00Z", "reservation_id": "string", "sent_at": "2024-01-15T09:30:00Z", "subtype": "string", "user": { "id": "string", "name": "string", "description": "string", "image_url": "string" }, "user_id": "string", "enriched_at": "2024-01-15T09:30:00Z", "processed_at": "2024-01-15T09:30:00Z", "updated_at": "2024-01-15T09:30:00Z" } ], "params": { "company_id": "string", "event_subtype": "string", "event_types": [ "flag_check" ], "flag_id": "string", "idempotency_key": "string", "limit": 100, "offset": 0, "user_id": "string" } } ``` **SDK Code** ```typescript import { SchematicClient } from "@schematichq/schematic-typescript-node"; async function main() { const client = new SchematicClient({ apiKey: "YOUR_API_KEY_HERE", }); await client.events.listEvents({}); } main(); ``` ```python from schematic import Schematic client = Schematic( api_key="YOUR_API_KEY_HERE", ) client.events.list_events() ``` ```java package com.example.usage; import com.schematic..BaseSchematic; import com.schematic..resources.events.requests.ListEventsRequest; public class Example { public static void main(String[] args) { BaseSchematic client = BaseSchematic .builder() .apiKey("YOUR_API_KEY_HERE") .build(); client.events().listEvents( ListEventsRequest .builder() .build() ); } } ``` ```ruby require "schematic" client = Schematic::Client.new(api_key: "YOUR_API_KEY_HERE") client.events.list_events ``` ```csharp using SchematicHQ.Client; using System.Threading.Tasks; public partial class Examples { public async Task Example() { var client = new Schematic( apiKey: "YOUR_API_KEY_HERE" ); await client.Events.ListEventsAsync( new ListEventsRequest() ); } } ``` ```go package example import ( context "context" schematichq "github.com/schematichq/schematic-go" client "github.com/schematichq/schematic-go/client" option "github.com/schematichq/schematic-go/option" ) func do() { client := client.NewClient( option.WithAPIKey( "YOUR_API_KEY_HERE", ), ) request := &schematichq.ListEventsRequest{} client.Events.ListEvents( context.TODO(), request, ) } ``` ```php request('GET', 'https://api.schematichq.com/events', [ 'headers' => [ 'X-Schematic-Api-Key' => '', ], ]); echo $response->getBody(); ``` ```swift import Foundation let headers = ["X-Schematic-Api-Key": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.schematichq.com/events")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```