{"id":3695,"date":"2023-08-31T06:24:58","date_gmt":"2023-08-31T05:24:58","guid":{"rendered":"https:\/\/help.expertsender.com\/?post_type=es&#038;p=3695"},"modified":"2024-06-24T13:59:51","modified_gmt":"2024-06-24T12:59:51","slug":"get-bounces-list","status":"publish","type":"es","link":"https:\/\/help.expertsender.com\/pl\/emp\/api\/methods\/get-bounces-list\/","title":{"rendered":"Get bounces list"},"content":{"rendered":"\n<p>Using this method you can retrieve a CSV with a list of bounces for a particular time period.<\/p>\n\n\n\n<p>The list includes bounce date, bounced email address, and diagnostic codes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h.64uap5ln3b27_l\"><a href=\"https:\/\/sites.google.com\/expertsender.com\/api-documentation-v2\/methods\/get-bounces-list?authuser=0#h.64uap5ln3b27\"><\/a><a href=\"https:\/\/sites.google.com\/expertsender.com\/api-documentation-v2\/methods\/get-bounces-list?authuser=0#h.64uap5ln3b27\"><\/a><strong>Request data format<\/strong><\/h3>\n\n\n\n<p>Request URL parameters:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Parameter<\/th><th>Type<\/th><th>Notes<\/th><\/tr><\/thead><tbody><tr><td>apiKey<\/td><td>string<\/td><td>Your API key, required for authentication. Required.<\/td><\/tr><tr><td>startDate<\/td><td>date<\/td><td>Start date of bounces period. Required.<\/td><\/tr><tr><td>endDate<\/td><td>date<\/td><td>End date of bounces period. Required.<\/td><\/tr><tr><td>channel<\/td><td>string<\/td><td>Limit returned data to selected channel. Optional. Defaults to Email.<br>Valid values are:<br>All<br>Email<br>SmsMms\u00a0<\/td><\/tr><tr><td>bounceReason<\/td><td>int<\/td><td>Limit returned data to selected bounce reason. Optional.<br>Valid values are:<br>1 &#8211; User unknown<br>2 &#8211; Mailbox full<br>3 &#8211; Blocked<br>6 &#8211; Unknown<br>7 &#8211; Other<\/td><\/tr><tr><td>bounceType<\/td><td>int<\/td><td>Bounce type. Optional.<br>Valid values are:<br>1 &#8211; Hard<br>2 &#8211; Soft<br>3 &#8211; Transparent<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Examples:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#babed8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"https:\/\/api.esv2.com\/v2\/Api\/Bounces?apiKey=YOUR_API_KEY_HEREu0026amp;startDate=2010-05-20u0026amp;endDate=2010-05-22nn\nhttps:\/\/api.esv2.com\/v2\/Api\/Bounces?apiKey=YOUR_API_KEY_HEREu0026amp;startDate=2010-05-20u0026amp;endDate=2010-05-22u0026amp;bounceReason=1\nhttps:\/\/api.esv2.com\/v2\/Api\/Bounces?apiKey=YOUR_API_KEY_HERE&amp;startDate=2010-05-20&amp;endDate=2010-05-22&amp;bounceType=2\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-palenight\" style=\"background-color: #292D3E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BABED8\">https:\/\/api.esv2.com\/v2\/Api\/Bounces?apiKey=YOUR_API_KEY_HEREu0026amp;startDate=2010-05-20u0026amp;endDate=2010-05-22nn<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">https:\/\/api.esv2.com\/v2\/Api\/Bounces?apiKey=YOUR_API_KEY_HEREu0026amp;startDate=2010-05-20u0026amp;endDate=2010-05-22u0026amp;bounceReason=1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">https:\/\/api.esv2.com\/v2\/Api\/Bounces?apiKey=YOUR_API_KEY_HERE&amp;startDate=2010-05-20&amp;endDate=2010-05-22&amp;bounceType=2<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h.67rom0yqh1s0_l\"><strong>Response<\/strong><\/h3>\n\n\n\n<p>The response from this method is always data in CSV format, rather than XML, because the amount of data returned can be substantial.<\/p>\n\n\n\n<p>CSV response minimizes overheads and allows for seamless integration with third party code\/systems.<\/p>\n\n\n\n<p>Response content type is &#8220;text\/csv&#8221;. Returned data contains a header with column names in the first row.<\/p>\n\n\n\n<p>CSV output is formatted using following settings:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Field separator: comma (,)<\/li>\n\n\n\n<li>Quoting character: (&#8220;)<\/li>\n\n\n\n<li>Escape character: (&#8220;)<\/li>\n\n\n\n<li>Encoding: UTF-8<\/li>\n<\/ul>\n\n\n\n<p>CSV response columns:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Parameter<\/th><th>Type<\/th><th>Notes<\/th><\/tr><\/thead><tbody><tr><td>Date<\/td><td>datetime<\/td><td>Bounce date. YYYY-MM-DD HH:MM:SS format.<\/td><\/tr><tr><td>Email<\/td><td>string<\/td><td>Bounced email.<\/td><\/tr><tr><td>Phone<\/td><td>string<\/td><td>Bounced phone number.<\/td><\/tr><tr><td>BounceCode<\/td><td>string<\/td><td>Bounce diagnostic code used to recognize bounce type.<\/td><\/tr><tr><td>BounceReason<\/td><td>string<\/td><td>Bounce reason. See below for all possible bounce reason.<\/td><\/tr><tr><td>BounceType<\/td><td>string<\/td><td>Bounce type. See below for all possible bounce types.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>CSV response for channel set to:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>All:\n<ul class=\"wp-block-list\">\n<li>Date<\/li>\n\n\n\n<li>Email*<\/li>\n\n\n\n<li>Phone*<\/li>\n\n\n\n<li>BounceCode<\/li>\n\n\n\n<li>BounceReason<\/li>\n\n\n\n<li>BounceType<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>* In each row either Email or Phone should be filled in, never both.<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>Email:\n<ul class=\"wp-block-list\">\n<li>Date<\/li>\n\n\n\n<li>Email<\/li>\n\n\n\n<li>BounceCode<\/li>\n\n\n\n<li>BounceReason<\/li>\n\n\n\n<li>BounceType<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Phone\n<ul class=\"wp-block-list\">\n<li>Date<\/li>\n\n\n\n<li>Phone<\/li>\n\n\n\n<li>BounceCode<\/li>\n\n\n\n<li>BounceReason<\/li>\n\n\n\n<li>BounceType<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>Bounce types (one of those will be in BounceType column in CSV):<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Name<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>UserUnknown<\/td><td>Email does not exist.<\/td><\/tr><tr><td>MailboxFull<\/td><td>Mailbox is full or otherwise temporary inaccessible.<\/td><\/tr><tr><td>Blocked<\/td><td>Message blocked, usually for spam-related reasons.<\/td><\/tr><tr><td>Unknown<\/td><td>Unknown reason when bounce cannot be classified.<\/td><\/tr><tr><td>Other<\/td><td>Other bounce reason. This category contains transport-related issues, mail server bugs etc.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Bounce type (one of those will be in BounceReason column in CSV):<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Name<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>Hard<\/td><td>Persistent problem with email address.<\/td><\/tr><tr><td>Soft<\/td><td>Temporary problem with email address.<\/td><\/tr><tr><td>Transparent<\/td><td>Temporary problem not counted.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h.8fmsdl8qrxrj_l\"><strong>Examples<\/strong><\/h3>\n\n\n\n<p><strong>Get multiple messages<\/strong><\/p>\n\n\n\n<p>Request:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#A6ACCD;--cbp-line-number-width:8.4375px;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"GET https:\/\/api.esv2.com\/v2\/Api\/Bounces?apiKey=test_api_key1&amp;startDate=2010-10-01&amp;endDate=2010-10-02&amp;channel=Email HTTP\/1.1 \nAccept-Encoding: gzip,deflate \nUser-Agent: Jakarta Commons-HttpClient\/3.1 \nHost: api.esv2.com\" style=\"color:#A6ACCD;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg  style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-palenight\" style=\"background-color: #292D3E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #A6ACCD\">GET https:\/\/api.esv2.com\/v2\/Api\/Bounces?apiKey=test_api_key1&amp;startDate=2010-10-01&amp;endDate=2010-10-02&amp;channel=Email HTTP\/1.1 <\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">Accept-Encoding: gzip,deflate <\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">User-Agent: Jakarta Commons-HttpClient\/3.1 <\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">Host: api.esv2.com<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>OK response:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#babed8;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"HTTP\/1.1 200 OK \nCache-Control: private \nContent-Type: text\/csv; charset=utf-8 \nServer: Microsoft-IIS\/7.5 \nX-AspNetMvc-Version: 2.0 \nX-AspNet-Version: 2.0.50727 \nSet-Cookie: TIMEZONE=Central European Standard Time; path=\/ \nX-Powered-By: ASP.NET \nDate: Thu, 08 Dec 2011 12:02:14 GMT \nContent-Length: 463  \n\nDate,Email,BounceCode,BounceReason, BounceType\n2010-10-01 17:10:00,test1@yahoo.com,some test bounce code, UserUnknown, Hard\n2010-10-01 17:10:00,test2@yahoo.com,some test bounce code, MailboxFull, Soft\n2010-10-01 17:11:00,test3@yahoo.com,some test bounce code, Blocked, Soft\n2010-10-01 17:12:00,test4@yahoo.com,some test bounce code, Unknown, Soft\n2010-10-01 19:20:00,john.doe@gmail.com,some test bounce code, Other, Hard\" style=\"color:#babed8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-palenight\" style=\"background-color: #292D3E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #BABED8\">HTTP\/1.1 200 OK <\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">Cache-Control: private <\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">Content-Type: text\/csv; charset=utf-8 <\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">Server: Microsoft-IIS\/7.5 <\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">X-AspNetMvc-Version: 2.0 <\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">X-AspNet-Version: 2.0.50727 <\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">Set-Cookie: TIMEZONE=Central European Standard Time; path=\/ <\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">X-Powered-By: ASP.NET <\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">Date: Thu, 08 Dec 2011 12:02:14 GMT <\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">Content-Length: 463  <\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">Date,Email,BounceCode,BounceReason, BounceType<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">2010-10-01 17:10:00,test1@yahoo.com,some test bounce code, UserUnknown, Hard<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">2010-10-01 17:10:00,test2@yahoo.com,some test bounce code, MailboxFull, Soft<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">2010-10-01 17:11:00,test3@yahoo.com,some test bounce code, Blocked, Soft<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">2010-10-01 17:12:00,test4@yahoo.com,some test bounce code, Unknown, Soft<\/span><\/span>\n<span class=\"line\"><span style=\"color: #BABED8\">2010-10-01 19:20:00,john.doe@gmail.com,some test bounce code, Other, Hard<\/span><\/span><\/code><\/pre><\/div>\n","protected":false},"author":5,"featured_media":0,"parent":3548,"menu_order":249,"template":"","format":"standard","emp-category":[],"class_list":["post-3695","es","type-es","status-publish","format-standard","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/es\/3695","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/es"}],"about":[{"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/types\/es"}],"author":[{"embeddable":true,"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/users\/5"}],"version-history":[{"count":3,"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/es\/3695\/revisions"}],"predecessor-version":[{"id":10846,"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/es\/3695\/revisions\/10846"}],"up":[{"embeddable":true,"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/es\/3548"}],"wp:attachment":[{"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/media?parent=3695"}],"wp:term":[{"taxonomy":"emp-category","embeddable":true,"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/emp-category?post=3695"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}