Pause a run
curl --request POST \
--url https://api.instaview.sk/runs/{id}/pause \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.instaview.sk/runs/{id}/pause"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.instaview.sk/runs/{id}/pause', 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.instaview.sk/runs/{id}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.instaview.sk/runs/{id}/pause"
req, _ := http.NewRequest("POST", 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.post("https://api.instaview.sk/runs/{id}/pause")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instaview.sk/runs/{id}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "RUNNING",
"affectedCalls": 42
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}Runs
Pause Run
Stops the run dialling. Calls already queued are withdrawn, and anything the dispatcher had already picked up is refused before it is placed. The work is held rather than discarded: resume puts back exactly what pause held, and a contact already reached is not called again.
POST
/
runs
/
{id}
/
pause
Pause a run
curl --request POST \
--url https://api.instaview.sk/runs/{id}/pause \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.instaview.sk/runs/{id}/pause"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.instaview.sk/runs/{id}/pause', 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.instaview.sk/runs/{id}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.instaview.sk/runs/{id}/pause"
req, _ := http.NewRequest("POST", 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.post("https://api.instaview.sk/runs/{id}/pause")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.instaview.sk/runs/{id}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "RUNNING",
"affectedCalls": 42
}{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request"
}Stops a running run from dialling, reversibly.
Pause is a real stop
- Nothing further is dialled, including calls already queued when you paused. They are withdrawn from the dispatch queue, and anything the dispatcher had already picked up is refused at the call itself.
- The work is held, not discarded. The conversations stay in place. Resume puts back exactly what pause held.
- A contact already reached is not called again. Resume restores only the conversations that were never dialled.
- A contact attached while paused is not called either. They join the held work and go out on resume.
{ "status": "PAUSED", "affectedCalls": 30 }
affectedCalls is how many queued calls were withdrawn.
Only from RUNNING
Pausing a draft, a completed run or a cancelled one is a422. A draft has nothing queued to stop.
Error Scenarios
- 404 Not Found: the run does not exist, or belongs to another company
- 422 Unprocessable Entity: the run is not running
- 403 Forbidden: the API key does not hold
write:runs
Related Resources
Resume Run
Put the held calls back
Cancel Run
Stop it for good instead
Authorizations
API key for authentication using Bearer scheme
Path Parameters
Query Parameters
Required for ATS API keys to specify which company to access. Ignored for standard company API keys.
Response
Transition applied
The run's status after the transition
Available options:
DRAFT, SCHEDULED, RUNNING, PAUSED, COMPLETED, CANCELLED Example:
"RUNNING"
How many of the run's calls this request moved: queued by a launch, withdrawn by a pause, restored by a resume, closed out by a cancel. Not calls placed - a 2xx means queued, not dialled.
Example:
42