{"openapi":"3.1.0","info":{"title":"CallRail (BYOK) API","version":"0.1.0","description":"CallRail (BYOK) lets an AI assistant read your own CallRail data through the CallRail API with a key you supply (API key). Read-only: 8 tools (list_accounts, get_account, list_companies, list_calls, get_call, summarize_calls, list_tags, list_trackers). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached; it is only ever sent to...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-callrail.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-callrail/docs"},"termsOfService":"https://connectorbay.com/byok-callrail/terms"},"servers":[{"url":"https://byok-callrail.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-callrail/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 CallRail accounts the key can access: id, name, outbound recording and HIPAA flags. Account ids are needed by e","description":"List the CallRail accounts the key can access: id, name, outbound recording and HIPAA flags. Account ids are needed by every other tool. Use for \"Which CallRail accounts can my key see\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"per_page":{"anyOf":[{"maximum":250,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Items per page (1 to 250, default 100).","title":"Per Page"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"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 CallRail account by id. Use for \"Is my CallRail account a HIPAA account\".","description":"Get one CallRail account by id. Use for \"Is my CallRail account a HIPAA account\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"CallRail account id, starting with ACC (get it from list_accounts).","maxLength":200,"title":"Account Id","type":"string"}},"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_companies":{"post":{"operationId":"list_companies","summary":"List companies in an account with status, time zone, creation date and feature flags (DNI, lead scoring, form capture). ","description":"List companies in an account with status, time zone, creation date and feature flags (DNI, lead scoring, form capture). Use for \"Which companies are active in my CallRail account\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"CallRail account id, starting with ACC (get it from list_accounts).","maxLength":200,"title":"Account Id","type":"string"},"status":{"anyOf":[{"enum":["active","disabled"],"type":"string"},{"type":"null"}],"default":null,"description":"Company status filter.","title":"Status"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Search by company name.","title":"Search"},"per_page":{"anyOf":[{"maximum":250,"minimum":1,"type":"integer"},{"type":"null"}],"default":250,"description":"Items per page (1 to 250, default 250).","title":"Per Page"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["account_id"],"title":"list_companiesArguments","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_calls":{"post":{"operationId":"list_calls","summary":"List calls (default last 7 days) with time, direction, answered and voicemail flags, duration, caller number and locatio","description":"List calls (default last 7 days) with time, direction, answered and voicemail flags, duration, caller number and location, tracking number. Filter by company, tracker, direction, answer status, lead status or dates. Transcripts are not requested. Use for \"How many inbound calls did we miss last week in CallRail\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"CallRail account id, starting with ACC (get it from list_accounts).","maxLength":200,"title":"Account Id","type":"string"},"company_id":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only calls to this company's numbers (id starts with COM).","title":"Company Id"},"tracker_id":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only calls to this tracker (id starts with TRK).","title":"Tracker Id"},"direction":{"anyOf":[{"enum":["inbound","outbound"],"type":"string"},{"type":"null"}],"default":null,"description":"Call direction.","title":"Direction"},"answer_status":{"anyOf":[{"enum":["answered","missed","voicemail"],"type":"string"},{"type":"null"}],"default":null,"description":"Answer status.","title":"Answer Status"},"lead_status":{"anyOf":[{"enum":["good_lead","not_a_lead","not_scored"],"type":"string"},{"type":"null"}],"default":null,"description":"Lead status.","title":"Lead Status"},"device":{"anyOf":[{"enum":["desktop","mobile"],"type":"string"},{"type":"null"}],"default":null,"description":"Device type.","title":"Device"},"date_range":{"anyOf":[{"enum":["recent","today","yesterday","last_7_days","last_30_days","this_month","last_month","this_year","last_year","all_time"],"type":"string"},{"type":"null"}],"default":null,"description":"Standard range: recent (default, last 7 days), today, yesterday, last_7_days, last_30_days, this_month, last_month, this_year, last_year or all_time. Data older than 25 months is not retained.","title":"Date Range"},"start_date":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Start of a custom range, ISO 8601 date or date-time (for example 2026-10-01). Use with end_date instead of date_range.","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"End of a custom range, ISO 8601 date or date-time (inclusive for a plain date).","title":"End Date"},"time_zone":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"IANA time zone used to interpret dates, for example America/New_York.","title":"Time Zone"},"sort":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Field to sort by, for example start_time or duration.","title":"Sort"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort order.","title":"Order"},"per_page":{"anyOf":[{"maximum":250,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Items per page (1 to 250, default 100).","title":"Per Page"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["account_id"],"title":"list_callsArguments","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_call":{"post":{"operationId":"get_call","summary":"Get one call by id with the default call fields (times, duration, numbers, caller location, recording duration). Use for","description":"Get one call by id with the default call fields (times, duration, numbers, caller location, recording duration). Use for \"What were the details of CallRail call CAL8154748ae6bd4e278a7cddd38a662f4f\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"CallRail account id, starting with ACC (get it from list_accounts).","maxLength":200,"title":"Account Id","type":"string"},"call_id":{"description":"Call id, starting with CAL.","maxLength":200,"title":"Call Id","type":"string"}},"required":["account_id","call_id"],"title":"get_callArguments","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/summarize_calls":{"post":{"operationId":"summarize_calls","summary":"Summarize call counts, optionally grouped by source, keywords, campaign, referrer, landing page or company, for a date r","description":"Summarize call counts, optionally grouped by source, keywords, campaign, referrer, landing page or company, for a date range (answered, missed, first-time callers, average duration, leads). Use for \"Which marketing source brought the most CallRail calls this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"CallRail account id, starting with ACC (get it from list_accounts).","maxLength":200,"title":"Account Id","type":"string"},"group_by":{"anyOf":[{"enum":["source","keywords","campaign","referrer","landing_page","company","company_id"],"type":"string"},{"type":"null"}],"default":null,"description":"Group results by this characteristic.","title":"Group By"},"fields":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":"total_calls,missed_calls,answered_calls,first_time_callers,average_duration,leads","description":"Comma-separated measures: total_calls, missed_calls, answered_calls, first_time_callers, average_duration, formatted_average_duration, leads (default total_calls).","title":"Fields"},"company_id":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only this company.","title":"Company Id"},"direction":{"anyOf":[{"enum":["inbound","outbound","all"],"type":"string"},{"type":"null"}],"default":null,"description":"Call direction.","title":"Direction"},"answer_status":{"anyOf":[{"enum":["answered","missed","voicemail","all"],"type":"string"},{"type":"null"}],"default":null,"description":"Answer status.","title":"Answer Status"},"date_range":{"anyOf":[{"enum":["recent","today","yesterday","last_7_days","last_30_days","this_month","last_month","this_year","last_year","all_time"],"type":"string"},{"type":"null"}],"default":null,"description":"Standard range: recent (default, last 7 days), today, yesterday, last_7_days, last_30_days, this_month, last_month, this_year, last_year or all_time. Data older than 25 months is not retained.","title":"Date Range"},"start_date":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Start of a custom range, ISO 8601 date or date-time (for example 2026-10-01). Use with end_date instead of date_range.","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"End of a custom range, ISO 8601 date or date-time (inclusive for a plain date).","title":"End Date"},"time_zone":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"IANA time zone used to interpret dates, for example America/New_York.","title":"Time Zone"}},"required":["account_id"],"title":"summarize_callsArguments","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_tags":{"post":{"operationId":"list_tags","summary":"List call tags with level (company or account), colors, status and creation time. Use for \"What call tags are defined in","description":"List call tags with level (company or account), colors, status and creation time. Use for \"What call tags are defined in CallRail\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"CallRail account id, starting with ACC (get it from list_accounts).","maxLength":200,"title":"Account Id","type":"string"},"company_id":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only tags of this company.","title":"Company Id"},"status":{"anyOf":[{"enum":["enabled","disabled"],"type":"string"},{"type":"null"}],"default":null,"description":"Tag status.","title":"Status"},"tag_level":{"anyOf":[{"enum":["company","account"],"type":"string"},{"type":"null"}],"default":null,"description":"Tag level.","title":"Tag Level"},"per_page":{"anyOf":[{"maximum":250,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Items per page (1 to 250, default 100).","title":"Per Page"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["account_id"],"title":"list_tagsArguments","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_trackers":{"post":{"operationId":"list_trackers","summary":"List tracking numbers (trackers) with type (source or session), status, destination number, tracking numbers, SMS suppor","description":"List tracking numbers (trackers) with type (source or session), status, destination number, tracking numbers, SMS support, owning company and call flow. Use for \"Which CallRail tracking numbers are active and where do they ring\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_id":{"description":"CallRail account id, starting with ACC (get it from list_accounts).","maxLength":200,"title":"Account Id","type":"string"},"company_id":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only trackers of this company.","title":"Company Id"},"type":{"anyOf":[{"enum":["session","source"],"type":"string"},{"type":"null"}],"default":null,"description":"Tracker type.","title":"Type"},"status":{"anyOf":[{"enum":["active","disabled"],"type":"string"},{"type":"null"}],"default":null,"description":"Tracker status.","title":"Status"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Search by tracker name.","title":"Search"},"per_page":{"anyOf":[{"maximum":250,"minimum":1,"type":"integer"},{"type":"null"}],"default":250,"description":"Items per page (1 to 250, default 250).","title":"Per Page"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["account_id"],"title":"list_trackersArguments","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}}}}