{"openapi":"3.1.0","info":{"title":"CallTrackingMetrics (BYOK) API","version":"0.1.0","description":"CallTrackingMetrics (BYOK) lets an AI assistant read your own CallTrackingMetrics data through the CallTrackingMetrics API with a key you supply (API access key). Read-only: 10 tools (list_accounts, get_account, list_activities, get_report_series, list_queues, list_receiving_numbers, list_tracking_numbers, list_tracking_sources, list_sms_messages, list_a2p_campaigns). The BYOK key travels with...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-calltrackingmetrics.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-calltrackingmetrics/docs"},"termsOfService":"https://connectorbay.com/byok-calltrackingmetrics/terms"},"servers":[{"url":"https://byok-calltrackingmetrics.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-calltrackingmetrics/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/list_accounts":{"post":{"operationId":"list_accounts","summary":"List the accounts the keys can see (one for an account key, all sub-accounts for an agency key) with status, role and da","description":"List the accounts the keys can see (one for an account key, all sub-accounts for an agency key) with status, role and dates. Use for \"Which CallTrackingMetrics accounts can I access\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"enum":["active","canceled","paused"],"type":"string"},{"type":"null"}],"default":null,"description":"Only accounts in this status: active, canceled or paused.","title":"Status"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"per_page":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Items per page (1 to 50, default 10).","title":"Per Page"}},"title":"list_accountsArguments","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_account":{"post":{"operationId":"get_account","summary":"Get one account's name, status, time zone, creation date, and counts of tracking numbers and user licenses. Use for \"Wha","description":"Get one account's name, status, time zone, creation date, and counts of tracking numbers and user licenses. Use for \"What is the time zone and status of CallTrackingMetrics account 12345\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Numeric id of the CallTrackingMetrics account (from list_accounts).","title":"Account Id","type":"integer"}},"required":["account_id"],"title":"get_accountArguments","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_activities":{"post":{"operationId":"list_activities","summary":"List calls, texts, chats and forms (newest first) with direction, duration, source, tracking number, status and caller l","description":"List calls, texts, chats and forms (newest first) with direction, duration, source, tracking number, status and caller location. Date range YYYY-MM-DD; maximum about 3 months. Page with the after token. Use for \"How many inbound calls did we get on CallTrackingMetrics last week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Numeric id of the CallTrackingMetrics account (from list_accounts).","title":"Account Id","type":"integer"},"start_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"First day to include, YYYY-MM-DD.","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Last day to include, YYYY-MM-DD.","title":"End Date"},"time_duration":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"A named range instead of dates, for example today, yesterday, thisweek, lastweek, last7days or last3months.","title":"Time Duration"},"filter":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Search text, or a rule such as source:\"Google\" or tracking_number:\"14105555555\" or status:answered.","title":"Filter"},"after":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging token taken from the previous answer's next_page link.","title":"After"},"per_page":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Items per page (1 to 50, default 10).","title":"Per Page"}},"required":["account_id"],"title":"list_activitiesArguments","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_report_series":{"post":{"operationId":"get_report_series","summary":"Aggregate activity counts over a date range grouped by one dimension (source, status, tracking_number, agent, day, hour ","description":"Aggregate activity counts over a date range grouped by one dimension (source, status, tracking_number, agent, day, hour and more). Answer returned as CallTrackingMetrics sends it. Use for \"Break down last month's CallTrackingMetrics calls by source\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Numeric id of the CallTrackingMetrics account (from list_accounts).","title":"Account Id","type":"integer"},"start_date":{"description":"First day, YYYY-MM-DD, in the account's time zone.","maxLength":10,"title":"Start Date","type":"string"},"end_date":{"description":"Last day, YYYY-MM-DD.","maxLength":10,"title":"End Date","type":"string"},"by":{"description":"Dimension: source, medium, status, tracking_number, receiving_number, agent, tag, landing_host, device, browser, hour or day.","enum":["source","medium","status","tracking_number","receiving_number","agent","tag","landing_host","device","browser","hour","day"],"title":"By","type":"string"},"with_time":{"anyOf":[{"maximum":1,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Must be 1 (the API requires it).","title":"With Time"},"direction":{"anyOf":[{"enum":["inbound","outbound","msg_inbound","msg_outbound","form"],"type":"string"},{"type":"null"}],"default":null,"description":"Activity type to count.","title":"Direction"}},"required":["account_id","start_date","end_date","by"],"title":"get_report_seriesArguments","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_queues":{"post":{"operationId":"list_queues","summary":"List call queues with default action, schedule, and number of agents and numbers. Use for \"Which call queues exist in Ca","description":"List call queues with default action, schedule, and number of agents and numbers. Use for \"Which call queues exist in CallTrackingMetrics account 12345\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Numeric id of the CallTrackingMetrics account (from list_accounts).","title":"Account Id","type":"integer"},"name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only queues whose name matches this text.","title":"Name"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"per_page":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Items per page (1 to 50, default 10).","title":"Per Page"}},"required":["account_id"],"title":"list_queuesArguments","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_receiving_numbers":{"post":{"operationId":"list_receiving_numbers","summary":"List receiving numbers (where tracked calls are forwarded) with label and number. Use for \"Where do CallTrackingMetrics ","description":"List receiving numbers (where tracked calls are forwarded) with label and number. Use for \"Where do CallTrackingMetrics calls get forwarded to\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Numeric id of the CallTrackingMetrics account (from list_accounts).","title":"Account Id","type":"integer"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"per_page":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Items per page (1 to 50, default 10).","title":"Per Page"}},"required":["account_id"],"title":"list_receiving_numbersArguments","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_tracking_numbers":{"post":{"operationId":"list_tracking_numbers","summary":"List the account's tracking numbers, filterable by number or name. Answer returned as CallTrackingMetrics sends it. Use ","description":"List the account's tracking numbers, filterable by number or name. Answer returned as CallTrackingMetrics sends it. Use for \"Which tracking numbers does my CallTrackingMetrics account own\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Numeric id of the CallTrackingMetrics account (from list_accounts).","title":"Account Id","type":"integer"},"number":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Only this phone number.","title":"Number"},"name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only numbers with this label.","title":"Name"}},"required":["account_id"],"title":"list_tracking_numbersArguments","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_tracking_sources":{"post":{"operationId":"list_tracking_sources","summary":"List tracking sources (the traffic-source rules numbers are swapped for), optionally by name. Answer returned as CallTra","description":"List tracking sources (the traffic-source rules numbers are swapped for), optionally by name. Answer returned as CallTrackingMetrics sends it. Use for \"Which tracking sources are set up in CallTrackingMetrics\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Numeric id of the CallTrackingMetrics account (from list_accounts).","title":"Account Id","type":"integer"},"name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only sources whose name matches this text.","title":"Name"}},"required":["account_id"],"title":"list_tracking_sourcesArguments","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_sms_messages":{"post":{"operationId":"list_sms_messages","summary":"List text messages with optional filter, direction and time range. Answer returned as CallTrackingMetrics sends it. Use ","description":"List text messages with optional filter, direction and time range. Answer returned as CallTrackingMetrics sends it. Use for \"Which text messages did CallTrackingMetrics record today\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Numeric id of the CallTrackingMetrics account (from list_accounts).","title":"Account Id","type":"integer"},"filter":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Search text for caller id, numbers or source name.","title":"Filter"},"direction":{"anyOf":[{"enum":["inbound","outbound"],"type":"string"},{"type":"null"}],"default":null,"description":"Message direction.","title":"Direction"},"start_time":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Start of the search window (date-time).","title":"Start Time"},"end_time":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"End of the search window (date-time).","title":"End Time"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"per_page":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Items per page (1 to 50, default 10).","title":"Per Page"}},"required":["account_id"],"title":"list_sms_messagesArguments","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_a2p_campaigns":{"post":{"operationId":"list_a2p_campaigns","summary":"List A2P 10DLC messaging campaigns registered in the account's Trust Center (add all=1 for the whole agency). Answer ret","description":"List A2P 10DLC messaging campaigns registered in the account's Trust Center (add all=1 for the whole agency). Answer returned as CallTrackingMetrics sends it. Use for \"What A2P campaigns are registered in CallTrackingMetrics\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"Numeric id of the CallTrackingMetrics account (from list_accounts).","title":"Account Id","type":"integer"},"all":{"anyOf":[{"maximum":1,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Set to 1 to list campaigns of the whole agency.","title":"All"}},"required":["account_id"],"title":"list_a2p_campaignsArguments","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}}}}