{"openapi":"3.1.0","info":{"title":"Amplitude (BYOK) API","version":"0.1.0","description":"Amplitude (BYOK) lets an AI assistant read your own Amplitude data through the Amplitude API with a key you supply (project API key). Read-only: 7 tools (get_active_new_users, get_average_session_length, get_sessions_per_user, get_user_composition, list_events, get_event_segmentation, get_realtime_active_users). The BYOK key travels with each request, is used for that one call only and is never...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-amplitude.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-amplitude/docs"},"termsOfService":"https://connectorbay.com/byok-amplitude/terms"},"servers":[{"url":"https://byok-amplitude.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-amplitude/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_active_new_users":{"post":{"operationId":"get_active_new_users","summary":"Get the number of active or new users per day, week or month for a date range, optionally segmented or grouped by a prop","description":"Get the number of active or new users per day, week or month for a date range, optionally segmented or grouped by a property. Dashboard REST API limits apply (5 concurrent requests, hourly cost budget). Use for \"How many active users did my Amplitude project have each day last week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start":{"description":"First day of the range as YYYYMMDD, for example 20261001.","maxLength":8,"title":"Start","type":"string"},"end":{"description":"Last day of the range as YYYYMMDD, for example 20261007.","maxLength":8,"title":"End","type":"string"},"metric":{"anyOf":[{"enum":["new","active"],"type":"string"},{"type":"null"}],"default":null,"description":"new for new users or active for active users (Amplitude's default is active).","title":"Metric"},"interval":{"anyOf":[{"enum":["1","7","30"],"type":"string"},{"type":"null"}],"default":null,"description":"1 for daily, 7 for weekly or 30 for monthly counts (default 1).","title":"Interval"},"segment":{"anyOf":[{"maxLength":1000,"type":"string"},{"type":"null"}],"default":null,"description":"Optional segment definition as a JSON array of filter conditions (see Amplitude's Dashboard REST API 'segment definition').","title":"Segment"},"group_by":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Optional property to group by, for example 'country' or 'gp:plan' for a custom user property.","title":"Group By"}},"required":["start","end"],"title":"get_active_new_usersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_average_session_length":{"post":{"operationId":"get_average_session_length","summary":"Get the average session length in seconds for each day of a date range. Use for \"What is the average session length in A","description":"Get the average session length in seconds for each day of a date range. Use for \"What is the average session length in Amplitude this week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start":{"description":"First day of the range as YYYYMMDD, for example 20261001.","maxLength":8,"title":"Start","type":"string"},"end":{"description":"Last day of the range as YYYYMMDD, for example 20261007.","maxLength":8,"title":"End","type":"string"}},"required":["start","end"],"title":"get_average_session_lengthArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_sessions_per_user":{"post":{"operationId":"get_sessions_per_user","summary":"Get the average number of sessions per user for each day of a date range. Use for \"How many sessions per user do I get p","description":"Get the average number of sessions per user for each day of a date range. Use for \"How many sessions per user do I get per day in Amplitude\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start":{"description":"First day of the range as YYYYMMDD, for example 20261001.","maxLength":8,"title":"Start","type":"string"},"end":{"description":"Last day of the range as YYYYMMDD, for example 20261007.","maxLength":8,"title":"End","type":"string"}},"required":["start","end"],"title":"get_sessions_per_userArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_user_composition":{"post":{"operationId":"get_user_composition","summary":"Get how users are distributed across the values of one user property (for example country or platform) in a date range. ","description":"Get how users are distributed across the values of one user property (for example country or platform) in a date range. Use for \"Which countries are my Amplitude users in\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start":{"description":"First day of the range as YYYYMMDD, for example 20261001.","maxLength":8,"title":"Start","type":"string"},"end":{"description":"Last day of the range as YYYYMMDD, for example 20261007.","maxLength":8,"title":"End","type":"string"},"property":{"description":"Property to break users down by: version, country, city, region, DMA, language, platform, os, device, start_version, paying, or gp:name for a custom user property.","maxLength":100,"title":"Property","type":"string"}},"required":["start","end","property"],"title":"get_user_compositionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_events":{"post":{"operationId":"list_events","summary":"List the visible event types with this week's totals, display names and hidden, deleted and inactive flags. Use for \"Whi","description":"List the visible event types with this week's totals, display names and hidden, deleted and inactive flags. Use for \"Which events are tracked in my Amplitude project\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_eventsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_event_segmentation":{"post":{"operationId":"get_event_segmentation","summary":"Get metrics for one event over a date range: uniques, totals, share of daily active users or average, per day, week or m","description":"Get metrics for one event over a date range: uniques, totals, share of daily active users or average, per day, week or month, optionally grouped by a property. Use for \"How many times was the watch_tutorial event triggered per day in Amplitude last week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"event":{"description":"The event as a JSON object, for example {\"event_type\":\"watch_tutorial\"}. Custom events use the ce: prefix; _active is any active event, _all is any event.","maxLength":1000,"title":"Event","type":"string"},"start":{"description":"First day of the range as YYYYMMDD, for example 20261001.","maxLength":8,"title":"Start","type":"string"},"end":{"description":"Last day of the range as YYYYMMDD, for example 20261007.","maxLength":8,"title":"End","type":"string"},"metric":{"anyOf":[{"enum":["uniques","totals","pct_dau","average"],"type":"string"},{"type":"null"}],"default":null,"description":"uniques (default), totals, pct_dau or average.","title":"Metric"},"interval":{"anyOf":[{"enum":["1","7","30"],"type":"string"},{"type":"null"}],"default":null,"description":"1 for daily, 7 for weekly or 30 for monthly (default 1).","title":"Interval"},"user_type":{"anyOf":[{"enum":["any","active"],"type":"string"},{"type":"null"}],"default":null,"description":"any or active users.","title":"User Type"},"segment":{"anyOf":[{"maxLength":1000,"type":"string"},{"type":"null"}],"default":null,"description":"Optional segment definition as a JSON array of filter conditions (see Amplitude's Dashboard REST API 'segment definition').","title":"Segment"},"group_by":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Optional property to group by, for example 'country' or 'gp:plan' for a custom user property.","title":"Group By"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"How many group-by values to return (1 to 1000, default 100).","title":"Limit"}},"required":["event","start","end"],"title":"get_event_segmentationArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_realtime_active_users":{"post":{"operationId":"get_realtime_active_users","summary":"Get active user counts in 5-minute steps for the last two days, today against yesterday. Use for \"How many users are act","description":"Get active user counts in 5-minute steps for the last two days, today against yesterday. Use for \"How many users are active in Amplitude right now\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_realtime_active_usersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}