On this pageGet message historyGEThttps://api.courier.com/messages/:message_id/historyFetch the array of events of a message you've previously sent.PATH PARAMSmessage_idstringrequiredA unique identifier associated with the message you wish to retrieve (results from a send).QUERY PARAMStypestringA supported Message History type that will filter the events returned.CLICKEDDELIVEREDOPENEDSENTUNDELIVERABLEENQUEUEDUNMAPPEDFILTEREDMAPPEDPROFILE_LOADEDRENDEREDUNROUTABLEResponses200 OKobject400 Bad Requestobject404 Message Not FoundobjectAUTH TOKENTry ItcURLNode.jsRubyPythonGoPHPcurl --request GET \ --url https://api.courier.com/messages/1-5e2b2615-05efbb3acab9172f88dd3f6f/history?type=DELIVERED \ --header 'Accept: application/json' Copy// Dependencies to install:// $ npm install node-fetch --saveconst fetch = require('node-fetch');const options = { method: 'GET', headers: { Accept: 'application/json' },};fetch('https://api.courier.com/messages/1-5e2b2615-05efbb3acab9172f88dd3f6f/history?type=DELIVERED', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));Copyrequire 'uri'require 'net/http'require 'openssl'url = URI("https://api.courier.com/messages/1-5e2b2615-05efbb3acab9172f88dd3f6f/history?type=DELIVERED")http = Net::HTTP.new(url.host, url.port)http.use_ssl = truerequest = Net::HTTP::Get.new(url)request["Accept"] = 'application/json'response = http.request(request)puts response.read_bodyCopy# Dependencies to install:# $ python -m pip install requestsimport requestsurl = "https://api.courier.com/messages/1-5e2b2615-05efbb3acab9172f88dd3f6f/history?type=DELIVERED"headers = { "Accept": "application/json"}response = requests.request("GET", url, headers=headers)print(response.text)Copypackage mainimport ( "fmt" "net/http" "io/ioutil")func main() { url := "https://api.courier.com/messages/1-5e2b2615-05efbb3acab9172f88dd3f6f/history?type=DELIVERED" req, _ := http.NewRequest("GET", url, payload) req.Header.Add("Accept", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body))}Copy<?php// Dependencies to install:// $ composer require guzzlehttp/guzzlerequire_once('vendor/autoload.php');$client = new \GuzzleHttp\Client();$response = $client->request('GET', 'https://api.courier.com/messages/1-5e2b2615-05efbb3acab9172f88dd3f6f/history?type=DELIVERED', [ 'headers' => [ 'Accept' => 'application/json', ],]);echo $response->getBody();CopyResponse Example200 OK400 Bad Request404 Message Not Found{ "results": [ { "data": { "name": "Courier" }, "event": "<Event | Notification ID>", "recipient": "<Recipient ID>", "ts": 1562611083411, "type": "ENQUEUED" }, { "event_id": "<Event>", "notification_id": "<Notification ID>", "ts": 1562611083411, "type": "MAPPED" }, { "ts": 1562611083411, "type": "PROFILE_LOADED" }, { "channel": { "id": "5e95b992-3505-4f66-8808-f91d5d0fe8c9" }, "integration": { "id": "8431c89d-aff0-484c-914d-36a257ea371f", "provider": "sendgrid" }, "ts": 1562611083411, "type": "RENDERED" }, { "channel": { "id": "ae25b99c-3d05-4f26-8108-f91d5d0fe8c9" }, "integration": { "id": "8431c89d-aff0-484c-914d-36a257ea371f", "provider": "sendgrid" }, "ts": 1562611083411, "type": "SENT" }, { "channel": { "id": "5e95b992-3505-4f66-8808-f91d5d0fe8c9" }, "integration": { "id": "8431c89d-aff0-484c-914d-36a257ea371f", "provider": "sendgrid" }, "ts": 1562611083411, "type": "DELIVERED" }, { "channel": { "id": "ae25b99c-3d05-4f26-8108-f91d5d0fe8c9" }, "integration": { "id": "8431c89d-aff0-484c-914d-36a257ea371f", "provider": "sendgrid" }, "ts": 1562611083411, "type": "UNDELIVERABLE" }, { "channel": { "id": "ae25b99c-3d05-4f26-8108-f91d5d0fe8c9" }, "ts": 1644482783377, "type": "UNROUTABLE" } ]}CopyExampleMethod: GETURL: https://api.courier.com/messages/1-5e2b2615-05efbb3acab9172f88dd3f6f/history