{"__v":3,"_id":"58b516b74d67aa37003c7460","category":{"project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","_id":"57a9cf4e944ea60e00dc3f74","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-08-09T12:40:46.182Z","from_sync":false,"order":6,"slug":"email-messages","title":"Email messages"},"parentDoc":null,"project":"54eb50e5615ffc1900305a16","user":"58402330c0507319000634d5","version":{"__v":21,"_id":"54eb63b859b1172100334fae","forked_from":"54eb63a1867e1917009b711d","project":"54eb50e5615ffc1900305a16","createdAt":"2015-02-23T17:30:32.501Z","releaseDate":"2015-02-23T17:30:32.501Z","categories":["54eb63b959b1172100334faf","54eb63b959b1172100334fb0","54eb63b959b1172100334fb1","54eb63b959b1172100334fb2","54ed8dd4ab373e2300f50eae","54ed99b2ab373e2300f50ede","55153a6de68daa2f00cff838","551546edbc466623002afe72","5515472ac28d6125001b8884","55154749c28d6125001b8885","555d9b4106dfec0d00d38ea7","5613e06e433e5735007c7708","5624bbb785a31117001c5403","56669e857cc81e0d00253f8e","568b8d837a42220d00498311","56a632277ef6620d00e2f18a","56d8147c3eb4dd0b00201aac","57a9ce2fac6db30e000d7efd","57a9cf4e944ea60e00dc3f74","58172386715dce0f00da4aa0","582dc59ee1b8692300c0dd03","589b19b4fec2730f0082e040","58b04a023529383900a759b5","58b92d1598157a0f004869bf"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-02-28T06:20:39.317Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"GET /email/1/reports HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json","language":"http","name":"JSON"}]},"method":"get","results":{"codes":[{"status":200,"language":"json","code":"{\n  \"results\": [\n    {\n      \"messageId\": \"bbcc6960-1fcb-497c-b7ea-83ccba41492e\",\n      \"to\": \"recipient:::at:::infobip.com\",\n      \"sentAt\": \"2016-08-31T13:25:18.477+0000\",\n      \"doneAt\": \"2016-08-31T13:25:50.893+0000\",\n      \"messageCount\": 1,\n      \"price\": {\n        \"pricePerMessage\": 0,\n        \"currency\": \"UNKNOWN\"\n      },\n      \"status\": {\n        \"groupId\": 3,\n        \"groupName\": \"DELIVERED\",\n        \"id\": 5,\n        \"name\": \"DELIVERED_TO_HANDSET\",\n        \"description\": \"Message delivered to handset\"\n      },\n      \"error\": {\n        \"groupId\": 0,\n        \"groupName\": \"OK\",\n        \"id\": 0,\n        \"name\": \"NO_ERROR\",\n        \"description\": \"No Error\",\n        \"permanent\": false\n      },\n      \"channel\": \"EMAIL\"\n    }\n  ]\n}","name":""}]},"settings":"","auth":"required","params":[{"_id":"58c153fc3384df0f0000f470","ref":"","in":"query","required":false,"desc":"The ID uniquely identifies a group of Email requests. This filter will enable you to query delivery reports for all the messages with the same bulk id using just one request.","default":"","type":"string","name":"bulkId"},{"_id":"58c154583384df0f0000f472","ref":"","in":"query","required":false,"desc":"Message ID for which report is requested","default":"","type":"string","name":"messageId"},{"_id":"58c154583384df0f0000f471","ref":"","in":"query","required":false,"desc":"Maximum number of reports","default":"","type":"int","name":"limit"}],"url":"/email/:version/reports"},"isReference":true,"order":5,"body":"# Response format\n\nOn success, response header HTTP status code will be `200 OK` and delivery reports will be returned in the response body.\n\nIf you try to send a message without authorization, you will get a response with HTTP status code `401 Unauthorized`.\n\n|Parameter|Type|Description|\n|-|-|-|\n|*results*|[SentEmailReport[]](#section-sentemailreport)|Collection of reports, one per e-mail.|\n\n### SentEmailReport\n|Parameter|Type|Description|\n|-|-|-|\n|*messageId*|String|Message ID.|\n|*to*|String|Destination address.|\n|*sentAt*|Date|Tells when the e-mail was sent. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.|\n|*doneAt*|Date|Tells when the e-mail was finished processing by Infobip (ie. delivered to destination)|\n|*messageCount*|int|How many parts the message was split into. Always will be 1 for e-mail.|\n|*price*|[Price](#section-price)|Sent e-mail price.|\n|*status*|[Status](#section-status)|Indicates whether the message is successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status.|\n|*error*|[Error](#section-error)|Indicates whether any error occurred during query execution.|\n\n#### Price\n\n|Parameter|Type|Description|\n|-|-|-|\n|*pricePerMessage*|BigDecimal|Price per one Email.|\n|*currency*|String|The currency in which the price is expressed.|\n\n#### Status\n\n|Parameter|Type|Description|\n|-|-|-|\n|*groupId*|int|Status group ID|\n|*groupName*|String|Status [group name](/docs/response-codes).|\n|*id*|int|Status ID|\n|*name*|String|Status [name](/docs/response-codes).|\n|*description*|String|Human readable description of the status.|\n|*action*|String|Action that should be taken to eliminate the error.|\n\n#### Error\n\n|Parameter|Type|Description|\n|-|-|-|\n|*groupId*|int|Error group ID|\n|*groupName*|String|Error [group name](/docs/response-codes#error-object-example)|\n|*id*|int|Error ID|\n|*name*|String|Error [name](/docs/response-codes#error-object-example)|\n|*description*|String|Human readable description of the error.|\n|*permanent*|boolean|Tells if the error is permanent|\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Delivery report will be returned only once!\",\n  \"body\": \"Delivery reports are returned **only once**. Additional delivery report request will return empty collection.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Additional examples\"\n}\n[/block]\n# Get reports by message id\n\n**Request:**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /email/1/reports?messageId=bbcc6960-1fcb-497c-b7ea-83ccba41492e HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"http\",\n      \"name\": \"JSON\"\n    },\n    {\n      \"code\": \"GET /email/1/reports HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/xml\",\n      \"language\": \"http\",\n      \"name\": \"XML\"\n    },\n    {\n      \"code\": \"curl -X GET \\\\\\n-H 'Accept: application/json' \\\\\\n-H \\\"Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\" \\\\\\nhttps://api.infobip.com/email/1/reports\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"<?php\\n\\n$request = new HttpRequest();\\n$request->setUrl('https://api.infobip.com/email/1/reports');\\n$request->setMethod(HTTP_METH_GET);\\n\\n$request->setHeaders(array(\\n  'accept' => 'application/json',\\n  'authorization' => 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\\n));\\n\\ntry {\\n  $response = $request->send();\\n\\n  echo $response->getBody();\\n} catch (HttpException $ex) {\\n  echo $ex;\\n}\",\n      \"language\": \"php\"\n    },\n    {\n      \"code\": \"require 'uri'\\nrequire 'net/http'\\n\\nurl = URI(\\\"https://api.infobip.com/email/1/reports\\\")\\n\\nhttp = Net::HTTP.new(url.host, url.port)\\nhttp.use_ssl = true\\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\\n\\nrequest = Net::HTTP::Get.new(url)\\nrequest[\\\"authorization\\\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\\nrequest[\\\"accept\\\"] = 'application/json'\\n\\nresponse = http.request(request)\\nputs response.read_body\",\n      \"language\": \"ruby\"\n    },\n    {\n      \"code\": \"import http.client\\n\\nconn = http.client.HTTPSConnection(\\\"api.infobip.com\\\")\\n\\nheaders = {\\n    'authorization': \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\",\\n    'accept': \\\"application/json\\\"\\n    }\\n\\nconn.request(\\\"GET\\\", \\\"/email/1/reports\\\", headers=headers)\\n\\nres = conn.getresponse()\\ndata = res.read()\\n\\nprint(data.decode(\\\"utf-8\\\"))\",\n      \"language\": \"python\"\n    },\n    {\n      \"code\": \"HttpResponse<String> response = Unirest.get(\\\"https://api.infobip.com/email/1/reports\\\")\\n  .header(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\")\\n  .header(\\\"accept\\\", \\\"application/json\\\")\\n  .asString();\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"var client = new RestClient(\\\"https://api.infobip.com/email/1/reports\\\");\\n\\nvar request = new RestRequest(Method.GET);\\nrequest.AddHeader(\\\"accept\\\", \\\"application/json\\\");\\nrequest.AddHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\n\\nIRestResponse response = client.Execute(request);\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"var data = null;\\n\\nvar xhr = new XMLHttpRequest();\\nxhr.withCredentials = true;\\n\\nxhr.addEventListener(\\\"readystatechange\\\", function () {\\n  if (this.readyState === this.DONE) {\\n    console.log(this.responseText);\\n  }\\n});\\n\\nxhr.open(\\\"GET\\\", \\\"https://api.infobip.com/email/1/reports\\\");\\nxhr.setRequestHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\nxhr.setRequestHeader(\\\"accept\\\", \\\"application/json\\\");\\n\\nxhr.send(data);\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n**Response:**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/json\\n\\n{\\n  \\\"results\\\": [\\n    {\\n      \\\"messageId\\\": \\\"bbcc6960-1fcb-497c-b7ea-83ccba41492e\\\",\\n      \\\"to\\\": \\\"recipient@infobip.com\\\",\\n      \\\"sentAt\\\": \\\"2016-08-31T13:25:18.477+0000\\\",\\n      \\\"doneAt\\\": \\\"2016-08-31T13:25:50.893+0000\\\",\\n      \\\"messageCount\\\": 1,\\n      \\\"price\\\": {\\n        \\\"pricePerMessage\\\": 0,\\n        \\\"currency\\\": \\\"UNKNOWN\\\"\\n      },\\n      \\\"status\\\": {\\n        \\\"groupId\\\": 3,\\n        \\\"groupName\\\": \\\"DELIVERED\\\",\\n        \\\"id\\\": 5,\\n        \\\"name\\\": \\\"DELIVERED_TO_HANDSET\\\",\\n        \\\"description\\\": \\\"Message delivered to handset\\\"\\n      },\\n      \\\"error\\\": {\\n        \\\"groupId\\\": 0,\\n        \\\"groupName\\\": \\\"OK\\\",\\n        \\\"id\\\": 0,\\n        \\\"name\\\": \\\"NO_ERROR\\\",\\n        \\\"description\\\": \\\"No Error\\\",\\n        \\\"permanent\\\": false\\n      },\\n      \\\"channel\\\": \\\"EMAIL\\\"\\n    }\\n\\t]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/json\\n\\n<?xml version='1.0' encoding='UTF-8'?>\\n<ReportsResponse>\\n    <results>\\n        <result>\\n            <messageId>bbcc6960-1fcb-497c-b7ea-83ccba41492e</messageId>\\n            <to>recipient@infobip.com</to>\\n            <sentAt>2016-08-31T13:25:18.477+0000</sentAt>\\n            <doneAt>2016-08-31T13:25:50.893+0000</doneAt>\\n            <messageCount>1</messageCount>\\n            <price>\\n                <pricePerMessage>0</pricePerMessage>\\n                <currency>UNKNOWN</currency>\\n            </price>\\n            <status>\\n                <groupId>3</groupId>\\n                <groupName>DELIVERED</groupName>\\n                <id>5</id>\\n                <name>DELIVERED_TO_HANDSET</name>\\n                <description>Message delivered to handset</description>\\n            </status>\\n            <error>\\n                <groupId>0</groupId>\\n                <groupName>OK</groupName>\\n                <id>0</id>\\n                <name>NO_ERROR</name>\\n                <description>No Error</description>\\n                <permanent>false</permanent>\\n            </error>\\n            <channel>EMAIL</channel>\\n        </result>\\n    </results>\\n</ReportsResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n# Get initial two delivery reports\n\n**Request:**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /email/1/reports?limit=2 HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"http\",\n      \"name\": \"JSON\"\n    },\n    {\n      \"code\": \"GET /email/1/reports?limit=2 HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/xml\",\n      \"language\": \"http\",\n      \"name\": \"XML\"\n    },\n    {\n      \"code\": \"curl -X GET \\\\\\n-H 'Accept: application/json' \\\\\\n-H \\\"Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\" \\\\\\nhttps://api.infobip.com/email/1/reports?limit=2\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"<?php\\n\\n$request = new HttpRequest();\\n$request->setUrl('https://api.infobip.com/email/1/reports');\\n$request->setMethod(HTTP_METH_GET);\\n\\n$request->setQueryData(array(\\n  'limit' => '2'\\n));\\n\\n$request->setHeaders(array(\\n  'accept' => 'application/json',\\n  'authorization' => 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\\n));\\n\\ntry {\\n  $response = $request->send();\\n\\n  echo $response->getBody();\\n} catch (HttpException $ex) {\\n  echo $ex;\\n}\",\n      \"language\": \"php\"\n    },\n    {\n      \"code\": \"require 'uri'\\nrequire 'net/http'\\n\\nurl = URI(\\\"https://api.infobip.com/email/1/reports?limit=2\\\")\\n\\nhttp = Net::HTTP.new(url.host, url.port)\\nhttp.use_ssl = true\\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\\n\\nrequest = Net::HTTP::Get.new(url)\\nrequest[\\\"authorization\\\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\\nrequest[\\\"accept\\\"] = 'application/json'\\n\\nresponse = http.request(request)\\nputs response.read_body\",\n      \"language\": \"ruby\"\n    },\n    {\n      \"code\": \"import http.client\\n\\nconn = http.client.HTTPSConnection(\\\"api.infobip.com\\\")\\n\\nheaders = {\\n    'authorization': \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\",\\n    'accept': \\\"application/json\\\"\\n    }\\n\\nconn.request(\\\"GET\\\", \\\"/email/1/reports?limit=2\\\", headers=headers)\\n\\nres = conn.getresponse()\\ndata = res.read()\\n\\nprint(data.decode(\\\"utf-8\\\"))\",\n      \"language\": \"python\"\n    },\n    {\n      \"code\": \"HttpResponse<String> response = Unirest.get(\\\"https://api.infobip.com/email/1/reports?limit=2\\\")\\n  .header(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\")\\n  .header(\\\"accept\\\", \\\"application/json\\\")\\n  .asString();\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"var client = new RestClient(\\\"https://api.infobip.com/email/1/reports?limit=2\\\");\\n\\nvar request = new RestRequest(Method.GET);\\nrequest.AddHeader(\\\"accept\\\", \\\"application/json\\\");\\nrequest.AddHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\n\\nIRestResponse response = client.Execute(request);\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"var data = null;\\n\\nvar xhr = new XMLHttpRequest();\\nxhr.withCredentials = true;\\n\\nxhr.addEventListener(\\\"readystatechange\\\", function () {\\n  if (this.readyState === this.DONE) {\\n    console.log(this.responseText);\\n  }\\n});\\n\\nxhr.open(\\\"GET\\\", \\\"https://api.infobip.com/email/1/reports?limit=2\\\");\\nxhr.setRequestHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\nxhr.setRequestHeader(\\\"accept\\\", \\\"application/json\\\");\\n\\nxhr.send(data);\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n**Response:**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/json\\n\\n{\\n  \\\"results\\\": [\\n    {\\n      \\\"messageId\\\": \\\"bbcc6960-1fcb-497c-b7ea-83ccba41492e\\\",\\n      \\\"to\\\": \\\"recipient@infobip.com\\\",\\n      \\\"sentAt\\\": \\\"2016-08-31T13:25:18.477+0000\\\",\\n      \\\"doneAt\\\": \\\"2016-08-31T13:25:50.893+0000\\\",\\n      \\\"messageCount\\\": 1,\\n      \\\"price\\\": {\\n        \\\"pricePerMessage\\\": 0,\\n        \\\"currency\\\": \\\"UNKNOWN\\\"\\n      },\\n      \\\"status\\\": {\\n        \\\"groupId\\\": 3,\\n        \\\"groupName\\\": \\\"DELIVERED\\\",\\n        \\\"id\\\": 5,\\n        \\\"name\\\": \\\"DELIVERED_TO_HANDSET\\\",\\n        \\\"description\\\": \\\"Message delivered to handset\\\"\\n      },\\n      \\\"error\\\": {\\n        \\\"groupId\\\": 0,\\n        \\\"groupName\\\": \\\"OK\\\",\\n        \\\"id\\\": 0,\\n        \\\"name\\\": \\\"NO_ERROR\\\",\\n        \\\"description\\\": \\\"No Error\\\",\\n        \\\"permanent\\\": false\\n      },\\n      \\\"channel\\\": \\\"EMAIL\\\"\\n    },\\n    {\\n      \\\"messageId\\\": \\\"a3ee6933-1fcb-497c-b7ea-83cdda55543f\\\",\\n      \\\"to\\\": \\\"recipient2@infobip.com\\\",\\n      \\\"sentAt\\\": \\\"2016-08-31T13:25:19.455+0000\\\",\\n      \\\"doneAt\\\": \\\"2016-08-31T13:25:51.233+0000\\\",\\n      \\\"messageCount\\\": 1,\\n      \\\"price\\\": {\\n        \\\"pricePerMessage\\\": 0,\\n        \\\"currency\\\": \\\"UNKNOWN\\\"\\n      },\\n      \\\"status\\\": {\\n        \\\"groupId\\\": 3,\\n        \\\"groupName\\\": \\\"DELIVERED\\\",\\n        \\\"id\\\": 5,\\n        \\\"name\\\": \\\"DELIVERED_TO_HANDSET\\\",\\n        \\\"description\\\": \\\"Message delivered to handset\\\"\\n      },\\n      \\\"error\\\": {\\n        \\\"groupId\\\": 0,\\n        \\\"groupName\\\": \\\"OK\\\",\\n        \\\"id\\\": 0,\\n        \\\"name\\\": \\\"NO_ERROR\\\",\\n        \\\"description\\\": \\\"No Error\\\",\\n        \\\"permanent\\\": false\\n      },\\n      \\\"channel\\\": \\\"EMAIL\\\"\\n    }\\n\\t]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/json\\n\\n<?xml version='1.0' encoding='UTF-8'?>\\n<ReportsResponse>\\n    <results>\\n        <result>\\n            <messageId>bbcc6960-1fcb-497c-b7ea-83ccba41492e</messageId>\\n            <to>recipient@infobip.com</to>\\n            <sentAt>2016-08-31T13:25:18.477+0000</sentAt>\\n            <doneAt>2016-08-31T13:25:50.893+0000</doneAt>\\n            <messageCount>1</messageCount>\\n            <price>\\n                <pricePerMessage>0</pricePerMessage>\\n                <currency>UNKNOWN</currency>\\n            </price>\\n            <status>\\n                <groupId>3</groupId>\\n                <groupName>DELIVERED</groupName>\\n                <id>5</id>\\n                <name>DELIVERED_TO_HANDSET</name>\\n                <description>Message delivered to handset</description>\\n            </status>\\n            <error>\\n                <groupId>0</groupId>\\n                <groupName>OK</groupName>\\n                <id>0</id>\\n                <name>NO_ERROR</name>\\n                <description>No Error</description>\\n                <permanent>false</permanent>\\n            </error>\\n            <channel>EMAIL</channel>\\n        </result>\\n      \\t<result>\\n            <messageId>a3ee6933-1fcb-497c-b7ea-83cdda55543f</messageId>\\n            <to>recipient2@infobip.com</to>\\n            <sentAt>2016-08-31T13:25:19.455+0000</sentAt>\\n            <doneAt>2016-08-31T13:25:51.233+0000</doneAt>\\n            <messageCount>1</messageCount>\\n            <price>\\n                <pricePerMessage>0</pricePerMessage>\\n                <currency>UNKNOWN</currency>\\n            </price>\\n            <status>\\n                <groupId>3</groupId>\\n                <groupName>DELIVERED</groupName>\\n                <id>5</id>\\n                <name>DELIVERED_TO_HANDSET</name>\\n                <description>Message delivered to handset</description>\\n            </status>\\n            <error>\\n                <groupId>0</groupId>\\n                <groupName>OK</groupName>\\n                <id>0</id>\\n                <name>NO_ERROR</name>\\n                <description>No Error</description>\\n                <permanent>false</permanent>\\n            </error>\\n            <channel>EMAIL</channel>\\n        </result>\\n    </results>\\n</ReportsResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n# Get reports by bulkId\n\n**Request:**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /email/1/reports?bulkId=lrzkq6gatdkxouhrkgni HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/json\",\n      \"language\": \"http\",\n      \"name\": \"JSON\"\n    },\n    {\n      \"code\": \"GET /email/1/reports?bulkId=lrzkq6gatdkxouhrkgni HTTP/1.1\\nHost: api.infobip.com\\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\nAccept: application/xml\",\n      \"language\": \"http\",\n      \"name\": \"XML\"\n    },\n    {\n      \"code\": \"curl -X GET \\\\\\n-H 'Accept: application/json' \\\\\\n-H \\\"Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\" \\\\\\nhttps://api.infobip.com/email/1/reports?bulkId=lrzkq6gatdkxouhrkgni\",\n      \"language\": \"curl\"\n    },\n    {\n      \"code\": \"<?php\\n\\n$request = new HttpRequest();\\n$request->setUrl('https://api.infobip.com/email/1/reports');\\n$request->setMethod(HTTP_METH_GET);\\n\\n$request->setQueryData(array(\\n  'bulkId' => 'lrzkq6gatdkxouhrkgni'\\n));\\n\\n$request->setHeaders(array(\\n  'accept' => 'application/json',\\n  'authorization' => 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\\n));\\n\\ntry {\\n  $response = $request->send();\\n\\n  echo $response->getBody();\\n} catch (HttpException $ex) {\\n  echo $ex;\\n}\",\n      \"language\": \"php\"\n    },\n    {\n      \"code\": \"require 'uri'\\nrequire 'net/http'\\n\\nurl = URI(\\\"https://api.infobip.com/email/1/reports?bulkId=lrzkq6gatdkxouhrkgni\\\")\\n\\nhttp = Net::HTTP.new(url.host, url.port)\\nhttp.use_ssl = true\\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\\n\\nrequest = Net::HTTP::Get.new(url)\\nrequest[\\\"authorization\\\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\\nrequest[\\\"accept\\\"] = 'application/json'\\n\\nresponse = http.request(request)\\nputs response.read_body\",\n      \"language\": \"ruby\"\n    },\n    {\n      \"code\": \"import http.client\\n\\nconn = http.client.HTTPSConnection(\\\"api.infobip.com\\\")\\n\\nheaders = {\\n    'authorization': \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\",\\n    'accept': \\\"application/json\\\"\\n    }\\n\\nconn.request(\\\"GET\\\", \\\"/email/1/reports?bulkId=lrzkq6gatdkxouhrkgni\\\", headers=headers)\\n\\nres = conn.getresponse()\\ndata = res.read()\\n\\nprint(data.decode(\\\"utf-8\\\"))\",\n      \"language\": \"python\"\n    },\n    {\n      \"code\": \"HttpResponse<String> response = Unirest.get(\\\"https://api.infobip.com/email/1/reports?bulkId=lrzkq6gatdkxouhrkgni\\\")\\n  .header(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\")\\n  .header(\\\"accept\\\", \\\"application/json\\\")\\n  .asString();\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"var client = new RestClient(\\\"https://api.infobip.com/email/1/reports?bulkId=lrzkq6gatdkxouhrkgni\\\");\\n\\nvar request = new RestRequest(Method.GET);\\nrequest.AddHeader(\\\"accept\\\", \\\"application/json\\\");\\nrequest.AddHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\n\\nIRestResponse response = client.Execute(request);\",\n      \"language\": \"csharp\"\n    },\n    {\n      \"code\": \"var data = null;\\n\\nvar xhr = new XMLHttpRequest();\\nxhr.withCredentials = true;\\n\\nxhr.addEventListener(\\\"readystatechange\\\", function () {\\n  if (this.readyState === this.DONE) {\\n    console.log(this.responseText);\\n  }\\n});\\n\\nxhr.open(\\\"GET\\\", \\\"https://api.infobip.com/email/1/reports?bulkId=lrzkq6gatdkxouhrkgni\\\");\\nxhr.setRequestHeader(\\\"authorization\\\", \\\"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\\\");\\nxhr.setRequestHeader(\\\"accept\\\", \\\"application/json\\\");\\n\\nxhr.send(data);\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n**Response:**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/json\\n\\n{\\n  \\\"results\\\": [\\n    {\\n      \\\"bulkId\\\": \\\"lrzkq6gatdkxouhrkgni\\\",\\n      \\\"messageId\\\": \\\"bbcc6960-1fcb-497c-b7ea-83ccba41492e\\\",\\n      \\\"to\\\": \\\"recipient@infobip.com\\\",\\n      \\\"sentAt\\\": \\\"2016-08-31T13:25:18.477+0000\\\",\\n      \\\"doneAt\\\": \\\"2016-08-31T13:25:50.893+0000\\\",\\n      \\\"messageCount\\\": 1,\\n      \\\"price\\\": {\\n        \\\"pricePerMessage\\\": 0,\\n        \\\"currency\\\": \\\"UNKNOWN\\\"\\n      },\\n      \\\"status\\\": {\\n        \\\"groupId\\\": 3,\\n        \\\"groupName\\\": \\\"DELIVERED\\\",\\n        \\\"id\\\": 5,\\n        \\\"name\\\": \\\"DELIVERED_TO_HANDSET\\\",\\n        \\\"description\\\": \\\"Message delivered to handset\\\"\\n      },\\n      \\\"error\\\": {\\n        \\\"groupId\\\": 0,\\n        \\\"groupName\\\": \\\"OK\\\",\\n        \\\"id\\\": 0,\\n        \\\"name\\\": \\\"NO_ERROR\\\",\\n        \\\"description\\\": \\\"No Error\\\",\\n        \\\"permanent\\\": false\\n      },\\n      \\\"channel\\\": \\\"EMAIL\\\"\\n    },\\n    {\\n      \\\"bulkId\\\": \\\"lrzkq6gatdkxouhrkgni\\\",\\n      \\\"messageId\\\": \\\"a3ee6933-1fcb-497c-b7ea-83cdda55543f\\\",\\n      \\\"to\\\": \\\"recipient2@infobip.com\\\",\\n      \\\"sentAt\\\": \\\"2016-08-31T13:25:19.455+0000\\\",\\n      \\\"doneAt\\\": \\\"2016-08-31T13:25:51.233+0000\\\",\\n      \\\"messageCount\\\": 1,\\n      \\\"price\\\": {\\n        \\\"pricePerMessage\\\": 0,\\n        \\\"currency\\\": \\\"UNKNOWN\\\"\\n      },\\n      \\\"status\\\": {\\n        \\\"groupId\\\": 3,\\n        \\\"groupName\\\": \\\"DELIVERED\\\",\\n        \\\"id\\\": 5,\\n        \\\"name\\\": \\\"DELIVERED_TO_HANDSET\\\",\\n        \\\"description\\\": \\\"Message delivered to handset\\\"\\n      },\\n      \\\"error\\\": {\\n        \\\"groupId\\\": 0,\\n        \\\"groupName\\\": \\\"OK\\\",\\n        \\\"id\\\": 0,\\n        \\\"name\\\": \\\"NO_ERROR\\\",\\n        \\\"description\\\": \\\"No Error\\\",\\n        \\\"permanent\\\": false\\n      },\\n      \\\"channel\\\": \\\"EMAIL\\\"\\n    }\\n\\t]\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/json\\n\\n<?xml version='1.0' encoding='UTF-8'?>\\n<ReportsResponse>\\n    <results>\\n        <result>\\n            <bulkId>lrzkq6gatdkxouhrkgni</bulkId>\\n            <messageId>bbcc6960-1fcb-497c-b7ea-83ccba41492e</messageId>\\n            <to>recipient@infobip.com</to>\\n            <sentAt>2016-08-31T13:25:18.477+0000</sentAt>\\n            <doneAt>2016-08-31T13:25:50.893+0000</doneAt>\\n            <messageCount>1</messageCount>\\n            <price>\\n                <pricePerMessage>0</pricePerMessage>\\n                <currency>UNKNOWN</currency>\\n            </price>\\n            <status>\\n                <groupId>3</groupId>\\n                <groupName>DELIVERED</groupName>\\n                <id>5</id>\\n                <name>DELIVERED_TO_HANDSET</name>\\n                <description>Message delivered to handset</description>\\n            </status>\\n            <error>\\n                <groupId>0</groupId>\\n                <groupName>OK</groupName>\\n                <id>0</id>\\n                <name>NO_ERROR</name>\\n                <description>No Error</description>\\n                <permanent>false</permanent>\\n            </error>\\n            <channel>EMAIL</channel>\\n        </result>\\n      \\t<result>\\n            <bulkId>lrzkq6gatdkxouhrkgni</bulkId>\\n            <messageId>a3ee6933-1fcb-497c-b7ea-83cdda55543f</messageId>\\n            <to>recipient2@infobip.com</to>\\n            <sentAt>2016-08-31T13:25:19.455+0000</sentAt>\\n            <doneAt>2016-08-31T13:25:51.233+0000</doneAt>\\n            <messageCount>1</messageCount>\\n            <price>\\n                <pricePerMessage>0</pricePerMessage>\\n                <currency>UNKNOWN</currency>\\n            </price>\\n            <status>\\n                <groupId>3</groupId>\\n                <groupName>DELIVERED</groupName>\\n                <id>5</id>\\n                <name>DELIVERED_TO_HANDSET</name>\\n                <description>Message delivered to handset</description>\\n            </status>\\n            <error>\\n                <groupId>0</groupId>\\n                <groupName>OK</groupName>\\n                <id>0</id>\\n                <name>NO_ERROR</name>\\n                <description>No Error</description>\\n                <permanent>false</permanent>\\n            </error>\\n            <channel>EMAIL</channel>\\n        </result>\\n    </results>\\n</ReportsResponse>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]","excerpt":"This method allows you to get one time delivery reports for sent e-mails.","slug":"email-delivery-report","type":"endpoint","title":"Email delivery reports"}

getEmail delivery reports

This method allows you to get one time delivery reports for sent e-mails.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

bulkId:
string
The ID uniquely identifies a group of Email requests. This filter will enable you to query delivery reports for all the messages with the same bulk id using just one request.
messageId:
string
Message ID for which report is requested
limit:
integer
Maximum number of reports

Examples


Result Format


Documentation

# Response format On success, response header HTTP status code will be `200 OK` and delivery reports will be returned in the response body. If you try to send a message without authorization, you will get a response with HTTP status code `401 Unauthorized`. |Parameter|Type|Description| |-|-|-| |*results*|[SentEmailReport[]](#section-sentemailreport)|Collection of reports, one per e-mail.| ### SentEmailReport |Parameter|Type|Description| |-|-|-| |*messageId*|String|Message ID.| |*to*|String|Destination address.| |*sentAt*|Date|Tells when the e-mail was sent. Has the following format: `yyyy-MM-dd'T'HH:mm:ss.SSSZ`.| |*doneAt*|Date|Tells when the e-mail was finished processing by Infobip (ie. delivered to destination)| |*messageCount*|int|How many parts the message was split into. Always will be 1 for e-mail.| |*price*|[Price](#section-price)|Sent e-mail price.| |*status*|[Status](#section-status)|Indicates whether the message is successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status.| |*error*|[Error](#section-error)|Indicates whether any error occurred during query execution.| #### Price |Parameter|Type|Description| |-|-|-| |*pricePerMessage*|BigDecimal|Price per one Email.| |*currency*|String|The currency in which the price is expressed.| #### Status |Parameter|Type|Description| |-|-|-| |*groupId*|int|Status group ID| |*groupName*|String|Status [group name](/docs/response-codes).| |*id*|int|Status ID| |*name*|String|Status [name](/docs/response-codes).| |*description*|String|Human readable description of the status.| |*action*|String|Action that should be taken to eliminate the error.| #### Error |Parameter|Type|Description| |-|-|-| |*groupId*|int|Error group ID| |*groupName*|String|Error [group name](/docs/response-codes#error-object-example)| |*id*|int|Error ID| |*name*|String|Error [name](/docs/response-codes#error-object-example)| |*description*|String|Human readable description of the error.| |*permanent*|boolean|Tells if the error is permanent| [block:callout] { "type": "warning", "title": "Delivery report will be returned only once!", "body": "Delivery reports are returned **only once**. Additional delivery report request will return empty collection." } [/block] [block:api-header] { "type": "basic", "title": "Additional examples" } [/block] # Get reports by message id **Request:** [block:code] { "codes": [ { "code": "GET /email/1/reports?messageId=bbcc6960-1fcb-497c-b7ea-83ccba41492e HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "http", "name": "JSON" }, { "code": "GET /email/1/reports HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/xml", "language": "http", "name": "XML" }, { "code": "curl -X GET \\\n-H 'Accept: application/json' \\\n-H \"Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\" \\\nhttps://api.infobip.com/email/1/reports", "language": "curl" }, { "code": "<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.infobip.com/email/1/reports');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setHeaders(array(\n 'accept' => 'application/json',\n 'authorization' => 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\n));\n\ntry {\n $response = $request->send();\n\n echo $response->getBody();\n} catch (HttpException $ex) {\n echo $ex;\n}", "language": "php" }, { "code": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.infobip.com/email/1/reports\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\nrequest[\"accept\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body", "language": "ruby" }, { "code": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.infobip.com\")\n\nheaders = {\n 'authorization': \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\",\n 'accept': \"application/json\"\n }\n\nconn.request(\"GET\", \"/email/1/reports\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))", "language": "python" }, { "code": "HttpResponse<String> response = Unirest.get(\"https://api.infobip.com/email/1/reports\")\n .header(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\")\n .header(\"accept\", \"application/json\")\n .asString();", "language": "java" }, { "code": "var client = new RestClient(\"https://api.infobip.com/email/1/reports\");\n\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\n\nIRestResponse response = client.Execute(request);", "language": "csharp" }, { "code": "var data = null;\n\nvar xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n if (this.readyState === this.DONE) {\n console.log(this.responseText);\n }\n});\n\nxhr.open(\"GET\", \"https://api.infobip.com/email/1/reports\");\nxhr.setRequestHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nxhr.setRequestHeader(\"accept\", \"application/json\");\n\nxhr.send(data);", "language": "javascript" } ] } [/block] **Response:** [block:code] { "codes": [ { "code": "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"results\": [\n {\n \"messageId\": \"bbcc6960-1fcb-497c-b7ea-83ccba41492e\",\n \"to\": \"recipient@infobip.com\",\n \"sentAt\": \"2016-08-31T13:25:18.477+0000\",\n \"doneAt\": \"2016-08-31T13:25:50.893+0000\",\n \"messageCount\": 1,\n \"price\": {\n \"pricePerMessage\": 0,\n \"currency\": \"UNKNOWN\"\n },\n \"status\": {\n \"groupId\": 3,\n \"groupName\": \"DELIVERED\",\n \"id\": 5,\n \"name\": \"DELIVERED_TO_HANDSET\",\n \"description\": \"Message delivered to handset\"\n },\n \"error\": {\n \"groupId\": 0,\n \"groupName\": \"OK\",\n \"id\": 0,\n \"name\": \"NO_ERROR\",\n \"description\": \"No Error\",\n \"permanent\": false\n },\n \"channel\": \"EMAIL\"\n }\n\t]\n}", "language": "json" }, { "code": "HTTP/1.1 200 OK\nContent-Type: application/json\n\n<?xml version='1.0' encoding='UTF-8'?>\n<ReportsResponse>\n <results>\n <result>\n <messageId>bbcc6960-1fcb-497c-b7ea-83ccba41492e</messageId>\n <to>recipient@infobip.com</to>\n <sentAt>2016-08-31T13:25:18.477+0000</sentAt>\n <doneAt>2016-08-31T13:25:50.893+0000</doneAt>\n <messageCount>1</messageCount>\n <price>\n <pricePerMessage>0</pricePerMessage>\n <currency>UNKNOWN</currency>\n </price>\n <status>\n <groupId>3</groupId>\n <groupName>DELIVERED</groupName>\n <id>5</id>\n <name>DELIVERED_TO_HANDSET</name>\n <description>Message delivered to handset</description>\n </status>\n <error>\n <groupId>0</groupId>\n <groupName>OK</groupName>\n <id>0</id>\n <name>NO_ERROR</name>\n <description>No Error</description>\n <permanent>false</permanent>\n </error>\n <channel>EMAIL</channel>\n </result>\n </results>\n</ReportsResponse>", "language": "xml" } ] } [/block] # Get initial two delivery reports **Request:** [block:code] { "codes": [ { "code": "GET /email/1/reports?limit=2 HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "http", "name": "JSON" }, { "code": "GET /email/1/reports?limit=2 HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/xml", "language": "http", "name": "XML" }, { "code": "curl -X GET \\\n-H 'Accept: application/json' \\\n-H \"Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\" \\\nhttps://api.infobip.com/email/1/reports?limit=2", "language": "curl" }, { "code": "<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.infobip.com/email/1/reports');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData(array(\n 'limit' => '2'\n));\n\n$request->setHeaders(array(\n 'accept' => 'application/json',\n 'authorization' => 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\n));\n\ntry {\n $response = $request->send();\n\n echo $response->getBody();\n} catch (HttpException $ex) {\n echo $ex;\n}", "language": "php" }, { "code": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.infobip.com/email/1/reports?limit=2\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\nrequest[\"accept\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body", "language": "ruby" }, { "code": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.infobip.com\")\n\nheaders = {\n 'authorization': \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\",\n 'accept': \"application/json\"\n }\n\nconn.request(\"GET\", \"/email/1/reports?limit=2\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))", "language": "python" }, { "code": "HttpResponse<String> response = Unirest.get(\"https://api.infobip.com/email/1/reports?limit=2\")\n .header(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\")\n .header(\"accept\", \"application/json\")\n .asString();", "language": "java" }, { "code": "var client = new RestClient(\"https://api.infobip.com/email/1/reports?limit=2\");\n\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\n\nIRestResponse response = client.Execute(request);", "language": "csharp" }, { "code": "var data = null;\n\nvar xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n if (this.readyState === this.DONE) {\n console.log(this.responseText);\n }\n});\n\nxhr.open(\"GET\", \"https://api.infobip.com/email/1/reports?limit=2\");\nxhr.setRequestHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nxhr.setRequestHeader(\"accept\", \"application/json\");\n\nxhr.send(data);", "language": "javascript" } ] } [/block] **Response:** [block:code] { "codes": [ { "code": "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"results\": [\n {\n \"messageId\": \"bbcc6960-1fcb-497c-b7ea-83ccba41492e\",\n \"to\": \"recipient@infobip.com\",\n \"sentAt\": \"2016-08-31T13:25:18.477+0000\",\n \"doneAt\": \"2016-08-31T13:25:50.893+0000\",\n \"messageCount\": 1,\n \"price\": {\n \"pricePerMessage\": 0,\n \"currency\": \"UNKNOWN\"\n },\n \"status\": {\n \"groupId\": 3,\n \"groupName\": \"DELIVERED\",\n \"id\": 5,\n \"name\": \"DELIVERED_TO_HANDSET\",\n \"description\": \"Message delivered to handset\"\n },\n \"error\": {\n \"groupId\": 0,\n \"groupName\": \"OK\",\n \"id\": 0,\n \"name\": \"NO_ERROR\",\n \"description\": \"No Error\",\n \"permanent\": false\n },\n \"channel\": \"EMAIL\"\n },\n {\n \"messageId\": \"a3ee6933-1fcb-497c-b7ea-83cdda55543f\",\n \"to\": \"recipient2@infobip.com\",\n \"sentAt\": \"2016-08-31T13:25:19.455+0000\",\n \"doneAt\": \"2016-08-31T13:25:51.233+0000\",\n \"messageCount\": 1,\n \"price\": {\n \"pricePerMessage\": 0,\n \"currency\": \"UNKNOWN\"\n },\n \"status\": {\n \"groupId\": 3,\n \"groupName\": \"DELIVERED\",\n \"id\": 5,\n \"name\": \"DELIVERED_TO_HANDSET\",\n \"description\": \"Message delivered to handset\"\n },\n \"error\": {\n \"groupId\": 0,\n \"groupName\": \"OK\",\n \"id\": 0,\n \"name\": \"NO_ERROR\",\n \"description\": \"No Error\",\n \"permanent\": false\n },\n \"channel\": \"EMAIL\"\n }\n\t]\n}", "language": "json" }, { "code": "HTTP/1.1 200 OK\nContent-Type: application/json\n\n<?xml version='1.0' encoding='UTF-8'?>\n<ReportsResponse>\n <results>\n <result>\n <messageId>bbcc6960-1fcb-497c-b7ea-83ccba41492e</messageId>\n <to>recipient@infobip.com</to>\n <sentAt>2016-08-31T13:25:18.477+0000</sentAt>\n <doneAt>2016-08-31T13:25:50.893+0000</doneAt>\n <messageCount>1</messageCount>\n <price>\n <pricePerMessage>0</pricePerMessage>\n <currency>UNKNOWN</currency>\n </price>\n <status>\n <groupId>3</groupId>\n <groupName>DELIVERED</groupName>\n <id>5</id>\n <name>DELIVERED_TO_HANDSET</name>\n <description>Message delivered to handset</description>\n </status>\n <error>\n <groupId>0</groupId>\n <groupName>OK</groupName>\n <id>0</id>\n <name>NO_ERROR</name>\n <description>No Error</description>\n <permanent>false</permanent>\n </error>\n <channel>EMAIL</channel>\n </result>\n \t<result>\n <messageId>a3ee6933-1fcb-497c-b7ea-83cdda55543f</messageId>\n <to>recipient2@infobip.com</to>\n <sentAt>2016-08-31T13:25:19.455+0000</sentAt>\n <doneAt>2016-08-31T13:25:51.233+0000</doneAt>\n <messageCount>1</messageCount>\n <price>\n <pricePerMessage>0</pricePerMessage>\n <currency>UNKNOWN</currency>\n </price>\n <status>\n <groupId>3</groupId>\n <groupName>DELIVERED</groupName>\n <id>5</id>\n <name>DELIVERED_TO_HANDSET</name>\n <description>Message delivered to handset</description>\n </status>\n <error>\n <groupId>0</groupId>\n <groupName>OK</groupName>\n <id>0</id>\n <name>NO_ERROR</name>\n <description>No Error</description>\n <permanent>false</permanent>\n </error>\n <channel>EMAIL</channel>\n </result>\n </results>\n</ReportsResponse>", "language": "xml" } ] } [/block] # Get reports by bulkId **Request:** [block:code] { "codes": [ { "code": "GET /email/1/reports?bulkId=lrzkq6gatdkxouhrkgni HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/json", "language": "http", "name": "JSON" }, { "code": "GET /email/1/reports?bulkId=lrzkq6gatdkxouhrkgni HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nAccept: application/xml", "language": "http", "name": "XML" }, { "code": "curl -X GET \\\n-H 'Accept: application/json' \\\n-H \"Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\" \\\nhttps://api.infobip.com/email/1/reports?bulkId=lrzkq6gatdkxouhrkgni", "language": "curl" }, { "code": "<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://api.infobip.com/email/1/reports');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData(array(\n 'bulkId' => 'lrzkq6gatdkxouhrkgni'\n));\n\n$request->setHeaders(array(\n 'accept' => 'application/json',\n 'authorization' => 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\n));\n\ntry {\n $response = $request->send();\n\n echo $response->getBody();\n} catch (HttpException $ex) {\n echo $ex;\n}", "language": "php" }, { "code": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.infobip.com/email/1/reports?bulkId=lrzkq6gatdkxouhrkgni\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"authorization\"] = 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=='\nrequest[\"accept\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body", "language": "ruby" }, { "code": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.infobip.com\")\n\nheaders = {\n 'authorization': \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\",\n 'accept': \"application/json\"\n }\n\nconn.request(\"GET\", \"/email/1/reports?bulkId=lrzkq6gatdkxouhrkgni\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))", "language": "python" }, { "code": "HttpResponse<String> response = Unirest.get(\"https://api.infobip.com/email/1/reports?bulkId=lrzkq6gatdkxouhrkgni\")\n .header(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\")\n .header(\"accept\", \"application/json\")\n .asString();", "language": "java" }, { "code": "var client = new RestClient(\"https://api.infobip.com/email/1/reports?bulkId=lrzkq6gatdkxouhrkgni\");\n\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\n\nIRestResponse response = client.Execute(request);", "language": "csharp" }, { "code": "var data = null;\n\nvar xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n if (this.readyState === this.DONE) {\n console.log(this.responseText);\n }\n});\n\nxhr.open(\"GET\", \"https://api.infobip.com/email/1/reports?bulkId=lrzkq6gatdkxouhrkgni\");\nxhr.setRequestHeader(\"authorization\", \"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\");\nxhr.setRequestHeader(\"accept\", \"application/json\");\n\nxhr.send(data);", "language": "javascript" } ] } [/block] **Response:** [block:code] { "codes": [ { "code": "HTTP/1.1 200 OK\nContent-Type: application/json\n\n{\n \"results\": [\n {\n \"bulkId\": \"lrzkq6gatdkxouhrkgni\",\n \"messageId\": \"bbcc6960-1fcb-497c-b7ea-83ccba41492e\",\n \"to\": \"recipient@infobip.com\",\n \"sentAt\": \"2016-08-31T13:25:18.477+0000\",\n \"doneAt\": \"2016-08-31T13:25:50.893+0000\",\n \"messageCount\": 1,\n \"price\": {\n \"pricePerMessage\": 0,\n \"currency\": \"UNKNOWN\"\n },\n \"status\": {\n \"groupId\": 3,\n \"groupName\": \"DELIVERED\",\n \"id\": 5,\n \"name\": \"DELIVERED_TO_HANDSET\",\n \"description\": \"Message delivered to handset\"\n },\n \"error\": {\n \"groupId\": 0,\n \"groupName\": \"OK\",\n \"id\": 0,\n \"name\": \"NO_ERROR\",\n \"description\": \"No Error\",\n \"permanent\": false\n },\n \"channel\": \"EMAIL\"\n },\n {\n \"bulkId\": \"lrzkq6gatdkxouhrkgni\",\n \"messageId\": \"a3ee6933-1fcb-497c-b7ea-83cdda55543f\",\n \"to\": \"recipient2@infobip.com\",\n \"sentAt\": \"2016-08-31T13:25:19.455+0000\",\n \"doneAt\": \"2016-08-31T13:25:51.233+0000\",\n \"messageCount\": 1,\n \"price\": {\n \"pricePerMessage\": 0,\n \"currency\": \"UNKNOWN\"\n },\n \"status\": {\n \"groupId\": 3,\n \"groupName\": \"DELIVERED\",\n \"id\": 5,\n \"name\": \"DELIVERED_TO_HANDSET\",\n \"description\": \"Message delivered to handset\"\n },\n \"error\": {\n \"groupId\": 0,\n \"groupName\": \"OK\",\n \"id\": 0,\n \"name\": \"NO_ERROR\",\n \"description\": \"No Error\",\n \"permanent\": false\n },\n \"channel\": \"EMAIL\"\n }\n\t]\n}", "language": "json" }, { "code": "HTTP/1.1 200 OK\nContent-Type: application/json\n\n<?xml version='1.0' encoding='UTF-8'?>\n<ReportsResponse>\n <results>\n <result>\n <bulkId>lrzkq6gatdkxouhrkgni</bulkId>\n <messageId>bbcc6960-1fcb-497c-b7ea-83ccba41492e</messageId>\n <to>recipient@infobip.com</to>\n <sentAt>2016-08-31T13:25:18.477+0000</sentAt>\n <doneAt>2016-08-31T13:25:50.893+0000</doneAt>\n <messageCount>1</messageCount>\n <price>\n <pricePerMessage>0</pricePerMessage>\n <currency>UNKNOWN</currency>\n </price>\n <status>\n <groupId>3</groupId>\n <groupName>DELIVERED</groupName>\n <id>5</id>\n <name>DELIVERED_TO_HANDSET</name>\n <description>Message delivered to handset</description>\n </status>\n <error>\n <groupId>0</groupId>\n <groupName>OK</groupName>\n <id>0</id>\n <name>NO_ERROR</name>\n <description>No Error</description>\n <permanent>false</permanent>\n </error>\n <channel>EMAIL</channel>\n </result>\n \t<result>\n <bulkId>lrzkq6gatdkxouhrkgni</bulkId>\n <messageId>a3ee6933-1fcb-497c-b7ea-83cdda55543f</messageId>\n <to>recipient2@infobip.com</to>\n <sentAt>2016-08-31T13:25:19.455+0000</sentAt>\n <doneAt>2016-08-31T13:25:51.233+0000</doneAt>\n <messageCount>1</messageCount>\n <price>\n <pricePerMessage>0</pricePerMessage>\n <currency>UNKNOWN</currency>\n </price>\n <status>\n <groupId>3</groupId>\n <groupName>DELIVERED</groupName>\n <id>5</id>\n <name>DELIVERED_TO_HANDSET</name>\n <description>Message delivered to handset</description>\n </status>\n <error>\n <groupId>0</groupId>\n <groupName>OK</groupName>\n <id>0</id>\n <name>NO_ERROR</name>\n <description>No Error</description>\n <permanent>false</permanent>\n </error>\n <channel>EMAIL</channel>\n </result>\n </results>\n</ReportsResponse>", "language": "xml" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}