From e343df36b18c7f41f7c50e23a1b3aff734fb9c3c Mon Sep 17 00:00:00 2001 From: Maciej Walusiak Date: Thu, 18 Jun 2026 12:28:41 +0200 Subject: [PATCH 1/2] MT-22147: Document search param on GET /api/contacts/lists Add the optional `search` query param (case-insensitive partial name match) to the Get all Contact Lists operation, mirroring the search parameter convention used elsewhere, plus a ?search= cURL example. Note: this path still documents a 500 response, which violates the api-creator "no 500" rule. Left as-is to keep this PR focused; flagged as a follow-up cleanup. --- specs/contacts.openapi.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/specs/contacts.openapi.yml b/specs/contacts.openapi.yml index 7ccfacf..a155f2a 100644 --- a/specs/contacts.openapi.yml +++ b/specs/contacts.openapi.yml @@ -1230,12 +1230,24 @@ paths: summary: Get all Contact Lists tags: - Contact Lists + parameters: + - schema: + type: string + example: news + in: query + name: search + required: false + description: Filter contact lists by name (case-insensitive partial match). x-codeSamples: - lang: shell label: 'cURL' source: | curl -X GET https://mailtrap.io/api/contacts/lists \ -H 'Authorization: Bearer YOUR_API_TOKEN' + + # Filter lists by name (case-insensitive partial match) + curl -X GET 'https://mailtrap.io/api/contacts/lists?search=news' \ + -H 'Authorization: Bearer YOUR_API_TOKEN' - lang: javascript label: Node.js source: | From 46e4a34020cf443aec5a9894a76158f101ad3e55 Mon Sep 17 00:00:00 2001 From: Maciej Walusiak Date: Fri, 19 Jun 2026 08:30:09 +0200 Subject: [PATCH 2/2] MT-22147: Switch contact list search docs to prefix match --- specs/contacts.openapi.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/contacts.openapi.yml b/specs/contacts.openapi.yml index a155f2a..00ece4b 100644 --- a/specs/contacts.openapi.yml +++ b/specs/contacts.openapi.yml @@ -1237,7 +1237,7 @@ paths: in: query name: search required: false - description: Filter contact lists by name (case-insensitive partial match). + description: Filter contact lists by name (case-insensitive prefix match). x-codeSamples: - lang: shell label: 'cURL' @@ -1245,7 +1245,7 @@ paths: curl -X GET https://mailtrap.io/api/contacts/lists \ -H 'Authorization: Bearer YOUR_API_TOKEN' - # Filter lists by name (case-insensitive partial match) + # Filter lists by name (case-insensitive prefix match) curl -X GET 'https://mailtrap.io/api/contacts/lists?search=news' \ -H 'Authorization: Bearer YOUR_API_TOKEN' - lang: javascript