{"id":3643,"date":"2023-08-30T07:14:56","date_gmt":"2023-08-30T06:14:56","guid":{"rendered":"https:\/\/help.expertsender.com\/?post_type=es&#038;p=3643"},"modified":"2024-03-20T09:36:24","modified_gmt":"2024-03-20T08:36:24","slug":"get-segment-size","status":"publish","type":"es","link":"https:\/\/help.expertsender.com\/pl\/emp\/api\/methods\/segments\/get-segment-size\/","title":{"rendered":"Get segment size"},"content":{"rendered":"\n<p>Using this method you can retrieve a size (number of subscribers) of a particular segment. The response contains also a date of last segment recalculation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h.hvaguy3o83zl_l\"><a href=\"https:\/\/sites.google.com\/expertsender.com\/api-documentation-v2\/methods\/subscribers\/get-segment-size?authuser=0#h.hvaguy3o83zl\"><\/a><a href=\"https:\/\/sites.google.com\/expertsender.com\/api-documentation-v2\/methods\/subscribers\/get-segment-size?authuser=0#h.hvaguy3o83zl\"><\/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>id<\/td><td>int<\/td><td>Identifier of segment. Required.<\/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:#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=\"https:\/\/api.esv2.com\/v2\/Api\/GetSegmentSize?apikey=YOUR_API_KEY_HERE&amp;id=SEGMENT_ID\" 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\">https:\/\/api.esv2.com\/v2\/Api\/GetSegmentSize?apikey=YOUR_API_KEY_HERE&amp;id=SEGMENT_ID<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h.nrru2zuvuk9e_l\"><strong>Response<\/strong><\/h3>\n\n\n\n<p>Response Data element:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Element\/attribute<\/th><th>Type<\/th><th>Notes<\/th><\/tr><\/thead><tbody><tr><td>Size<\/td><td>int<\/td><td>Size of segment.<\/td><\/tr><tr><td>CountDate<\/td><td>datetime<\/td><td>Date of last segment size recalculation<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h.bqscgr4dm0bm_l\"><strong>Examples<\/strong><\/h3>\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\/GetSegmentSize?apikey=YOUR_API_KEY_HERE&amp;id=SEGMENT_ID HTTP\/1.1\" 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\/GetSegmentSize?apikey=YOUR_API_KEY_HERE&amp;id=SEGMENT_ID HTTP\/1.1<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>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:#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=\"&lt;ApiResponse xmlns_xsd=&quot;http:\/\/www.w3.org\/2001\/XMLSchema&quot; xmlns_xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot;&gt;\n   &lt;Data&gt;\n      &lt;Size&gt;3384047&lt;\/Size&gt;\n      &lt;CountDate&gt;2016-12-08T12:37:23.0784944Z&lt;\/CountDate&gt;\n   &lt;\/Data&gt;\n&lt;\/ApiResponse&gt;\" 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: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">ApiResponse<\/span><span style=\"color: #89DDFF\"> <\/span><span style=\"color: #C792EA\">xmlns<\/span><span style=\"color: #89DDFF\">:<\/span><span style=\"color: #C792EA\">xsd<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">http:\/\/www.w3.org\/2001\/XMLSchema<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\"> <\/span><span style=\"color: #C792EA\">xmlns<\/span><span style=\"color: #89DDFF\">:<\/span><span style=\"color: #C792EA\">xsi<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">http:\/\/www.w3.org\/2001\/XMLSchema-instance<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">   <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">Data<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">      <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">Size<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #A6ACCD\">3384047<\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">Size<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">      <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">CountDate<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #A6ACCD\">2016-12-08T12:37:23.0784944Z<\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">CountDate<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">   <\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">Data<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">ApiResponse<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span><\/code><\/pre><\/div>\n","protected":false},"author":5,"featured_media":0,"parent":9864,"menu_order":304,"template":"","format":"standard","emp-category":[],"class_list":["post-3643","es","type-es","status-publish","format-standard","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/es\/3643","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":2,"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/es\/3643\/revisions"}],"predecessor-version":[{"id":8809,"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/es\/3643\/revisions\/8809"}],"up":[{"embeddable":true,"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/es\/9864"}],"wp:attachment":[{"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/media?parent=3643"}],"wp:term":[{"taxonomy":"emp-category","embeddable":true,"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/emp-category?post=3643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}