GET /automations/runs/:run_id
URL: https://api.courier.com/automations/runs/:run_id
Method: GET
Path Parameters
run_idstringrequired
A unique identifier associated with the automation run you wish to retrieve.
Response
status: 200 OK
automationobject
+ Show Properties
brandstring
A unique identifier that represents the brand that should be used for rendering the notification.
templatestring
A unique identifier that can be mapped to an individual Notification. This could be the "Notification ID” on Notification detail pages (see the Notifications page in the Courier app) or a custom string mapped to the event in settings.
recipientstring
A unique identifier associated with the recipient of the delivered message.
datajson
An object that includes any data you want to pass to a message template. The data will populate the corresponding template variables.
profilejson
An object that includes any key-value pairs required by your chosen Integrations (see our Provider Documentation for the requirements for each Integration.) If profile information is included in the request and that information already exists in the profile for the recipientId, that information will be merged.
Request Example
- cURL
- Node.js
- Ruby
- Python
- Go
- PHP
curl --request GET \
--url https://api.courier.com/automations/runs/1-5e2b2615-05efbb3acab9172f88dd3f6f \
--header 'Accept: application/json'
// Dependencies to install:
// $ npm install node-fetch --save
const fetch = require('node-fetch');
const options = {
method: 'GET',
headers: {
Accept: 'application/json'
},
};
fetch('https://api.courier.com/automations/runs/1-5e2b2615-05efbb3acab9172f88dd3f6f', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.courier.com/automations/runs/1-5e2b2615-05efbb3acab9172f88dd3f6f")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
response = http.request(request)
puts response.read_body
# Dependencies to install:
# $ python -m pip install requests
import requests
url = "https://api.courier.com/automations/runs/1-5e2b2615-05efbb3acab9172f88dd3f6f"
headers = {
"Accept": "application/json"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.courier.com/automations/runs/1-5e2b2615-05efbb3acab9172f88dd3f6f"
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))
}
<?php
// Dependencies to install:
// $ composer require guzzlehttp/guzzle
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://api.courier.com/automations/runs/1-5e2b2615-05efbb3acab9172f88dd3f6f', [
'headers' => [
'Accept' => 'application/json',
],
]);
echo $response->getBody();
Responses Example
{
"automation": {
"steps": [
{
"action": "cancel"
},
{
"action": "delay"
},
{
"action": "send"
},
{
"action": "send-list"
},
{
"action": "update-profile"
},
{
"action": "invoke"
}
]
},
"brand": "W50NC77P524K14M5300PGPEK4JMJ",
"template": "EXAMPLE_NOTIFICATION",
"recipient": "8ec8c99a-c5f7-455b-9f60-8222b8a27056",
"data": {
"name": "Jane Doe",
"age": 27
},
"profile": {
"phone_number": "2025550125",
"email": "hello@example.com"
}
}