{"openapi":"3.1.0","info":{"title":"Trengo (BYOK) API","version":"0.1.0","description":"Trengo (BYOK) lets an AI assistant read your own Trengo data through the Trengo API with a key you supply (Trengo personal access token). Read-only: 8 tools (list_tickets, list_ticket_messages, list_contacts, get_contact, list_whatsapp_templates, list_agents_for_reporting, get_ticket_details_report, get_agent_performance_report). The BYOK key travels with each request, is used for that one call...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-trengo.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-trengo/docs"},"termsOfService":"https://connectorbay.com/byok-trengo/terms"},"servers":[{"url":"https://byok-trengo.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-trengo/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_tickets":{"post":{"operationId":"list_tickets","summary":"List Trengo tickets (conversations) the key's user may see, newest first, with status, subject, channel and latest messa","description":"List Trengo tickets (conversations) the key's user may see, newest first, with status, subject, channel and latest message. 120 requests per minute. Use for \"Which Trengo tickets are still open\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"enum":["OPEN","ASSIGNED","CLOSED","INVALID"],"type":"string"},{"type":"null"}],"default":null,"description":"Ticket status: OPEN, ASSIGNED, CLOSED or INVALID.","title":"Status"},"contact_id":{"anyOf":[{"maximum":2147483647,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only tickets of this contact id.","title":"Contact Id"},"last_message_type":{"anyOf":[{"enum":["INBOUND","OUTBOUND"],"type":"string"},{"type":"null"}],"default":null,"description":"Only tickets whose last message is INBOUND or OUTBOUND.","title":"Last Message Type"},"sort":{"anyOf":[{"enum":["-date","date"],"type":"string"},{"type":"null"}],"default":"-date","description":"Order by last message time: -date (newest first, default) or date (oldest first).","title":"Sort"},"updated_at_gt":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only tickets updated after this ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Updated At Gt"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"list_ticketsArguments","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_ticket_messages":{"post":{"operationId":"list_ticket_messages","summary":"List the messages of one Trengo ticket (20 per page) with direction, type, text, sender contact and time. Internal notes","description":"List the messages of one Trengo ticket (20 per page) with direction, type, text, sender contact and time. Internal notes are included. Use for \"What was said in Trengo ticket 2501567\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"ticket_id":{"description":"Ticket id from the ticket list.","maximum":2147483647,"minimum":1,"title":"Ticket Id","type":"integer"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["ticket_id"],"title":"list_ticket_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_contacts":{"post":{"operationId":"list_contacts","summary":"List or search Trengo contacts (customers) by name, email or phone number. Shows the fields the account stores. Use for ","description":"List or search Trengo contacts (customers) by name, email or phone number. Shows the fields the account stores. Use for \"Find the Trengo contact with email jane@example.com\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"term":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Search text matched against name, email address and phone number.","title":"Term"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"list_contactsArguments","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_contact":{"post":{"operationId":"get_contact","summary":"Get one Trengo contact: name, email, phone, custom field values and dates. Use for \"Show Trengo contact 1\".","description":"Get one Trengo contact: name, email, phone, custom field values and dates. Use for \"Show Trengo contact 1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"contact_id":{"description":"Contact id from the contact list.","maximum":2147483647,"minimum":1,"title":"Contact Id","type":"integer"}},"required":["contact_id"],"title":"get_contactArguments","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_whatsapp_templates":{"post":{"operationId":"list_whatsapp_templates","summary":"List the WhatsApp message templates of the account with title, body text, language, category, approval status and button","description":"List the WhatsApp message templates of the account with title, body text, language, category, approval status and buttons. Read only; nothing is sent. Use for \"Which of my Trengo WhatsApp templates are approved\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"enum":["ACCEPTED","PENDING","UNDER_REVIEW","DECLINED"],"type":"string"},{"type":"null"}],"default":null,"description":"Only templates with this approval status.","title":"Status"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Matches the template title or body text.","title":"Search"},"language":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only templates in this language code as stored, for example en or nl.","title":"Language"},"limit":{"anyOf":[{"maximum":2000,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Templates per page, 1 to 2000.","title":"Limit"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"list_whatsapp_templatesArguments","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_agents_for_reporting":{"post":{"operationId":"list_agents_for_reporting","summary":"List Trengo agents with chat and voice status and whether each is online (up to 25 per request). Use for \"Which Trengo a","description":"List Trengo agents with chat and voice status and whether each is online (up to 25 per request). Use for \"Which Trengo agents are online right now\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"is_online":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to return only online agents.","title":"Is Online"},"take":{"anyOf":[{"maximum":25,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many agents to return (1 to 25).","title":"Take"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"title":"list_agents_for_reportingArguments","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_ticket_details_report":{"post":{"operationId":"get_ticket_details_report","summary":"Report on tickets created in a period: status, first reply and resolution times (with and without business hours), chann","description":"Report on tickets created in a period: status, first reply and resolution times (with and without business hours), channel, labels and messages sent. 25 per page. Use for \"How fast were Trengo tickets resolved in January 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"created_start_date":{"description":"Only tickets created after this ISO 8601 time, for example 2026-01-01T00:00:00+00:00.","maxLength":200,"title":"Created Start Date","type":"string"},"created_end_date":{"description":"Only tickets created before this ISO 8601 time.","maxLength":200,"title":"Created End Date","type":"string"},"direction":{"anyOf":[{"enum":["INBOUND","OUTBOUND"],"type":"string"},{"type":"null"}],"default":null,"description":"Filter by first message direction.","title":"Direction"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["created_start_date","created_end_date"],"title":"get_ticket_details_reportArguments","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_agent_performance_report":{"post":{"operationId":"get_agent_performance_report","summary":"Report per agent for a period: messages sent, notes, assigned tickets and average response and resolution times. Use for","description":"Report per agent for a period: messages sent, notes, assigned tickets and average response and resolution times. Use for \"How did each Trengo agent perform last month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start_date":{"description":"Start of the period, ISO 8601 with offset, for example 2026-01-01T00:00:00+00:00.","maxLength":200,"title":"Start Date","type":"string"},"end_date":{"description":"End of the period, ISO 8601 with offset, for example 2026-01-31T00:00:00+00:00.","maxLength":200,"title":"End Date","type":"string"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["start_date","end_date"],"title":"get_agent_performance_reportArguments","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}}}}