Get all campaigns
curl --request GET \
--url https://api.external.hirednow.ai/v1/campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.external.hirednow.ai/v1/campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.external.hirednow.ai/v1/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.external.hirednow.ai/v1/campaigns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.external.hirednow.ai/v1/campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.external.hirednow.ai/v1/campaigns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.external.hirednow.ai/v1/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3f7a9c2e-5d8b-4e1a-9c6f-8b2d4e7a1c9f",
"name": "summer-sales-2024",
"created_at": "2024-06-09T01:17:24.137Z",
"display_name": "Summer Sales Campaign 2024",
"type": "SESSION_COMPLETION"
},
{
"id": "8e4b1f7c-3a9d-4c2e-8f5b-1d7a9c4e6b8f",
"name": "holiday-promotion-2024",
"created_at": "2024-06-09T01:17:21.088Z",
"display_name": "Holiday Promotion 2024",
"type": "ROLE_SUBMISSION"
}
]
}{
"error": {
"message": "Unauthorized",
"status_code": 401,
"request_id": "3a6e9741-268b-41a7-b924-5fa7019e6f26"
}
}Campaigns
List
Returns all campaigns from the system that the user has access to
GET
/
v1
/
campaigns
Get all campaigns
curl --request GET \
--url https://api.external.hirednow.ai/v1/campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.external.hirednow.ai/v1/campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.external.hirednow.ai/v1/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.external.hirednow.ai/v1/campaigns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.external.hirednow.ai/v1/campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.external.hirednow.ai/v1/campaigns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.external.hirednow.ai/v1/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3f7a9c2e-5d8b-4e1a-9c6f-8b2d4e7a1c9f",
"name": "summer-sales-2024",
"created_at": "2024-06-09T01:17:24.137Z",
"display_name": "Summer Sales Campaign 2024",
"type": "SESSION_COMPLETION"
},
{
"id": "8e4b1f7c-3a9d-4c2e-8f5b-1d7a9c4e6b8f",
"name": "holiday-promotion-2024",
"created_at": "2024-06-09T01:17:21.088Z",
"display_name": "Holiday Promotion 2024",
"type": "ROLE_SUBMISSION"
}
]
}{
"error": {
"message": "Unauthorized",
"status_code": 401,
"request_id": "3a6e9741-268b-41a7-b924-5fa7019e6f26"
}
}The
type parameter returned for each campaign determines which results
endpoint to use.If type is SESSION_COMPLETION, use the Session Evaluation Results endpoint.If type is ROLE_SUBMISSION, use the Role Evaluation Results endpoint.⌘I

