Replay a failed delivery
POST
/
v1
/
api
/
webhooks
/
{id}
/
replay
Replay a failed delivery
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({delivery_id: '<string>'})
};
fetch('https://api.9squid.com/v1/api/webhooks/{id}/replay', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.9squid.com/v1/api/webhooks/{id}/replay"
payload = { "delivery_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.9squid.com/v1/api/webhooks/{id}/replay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"delivery_id": "<string>"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.9squid.com/v1/api/webhooks/{id}/replay"
payload := strings.NewReader("{\n \"delivery_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.9squid.com/v1/api/webhooks/{id}/replay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'delivery_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.9squid.com/v1/api/webhooks/{id}/replay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"delivery_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyusing RestSharp;
var options = new RestClientOptions("https://api.9squid.com/v1/api/webhooks/{id}/replay");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"delivery_id\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
import Foundation
let parameters = ["delivery_id": "<string>"] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api.9squid.com/v1/api/webhooks/{id}/replay")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"delivery_id\": \"<string>\"\n}")
val request = Request.Builder()
.url("https://api.9squid.com/v1/api/webhooks/{id}/replay")
.post(body)
.addHeader("Authorization", "Bearer <token>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()⌘I
Replay a failed delivery
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({delivery_id: '<string>'})
};
fetch('https://api.9squid.com/v1/api/webhooks/{id}/replay', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.9squid.com/v1/api/webhooks/{id}/replay"
payload = { "delivery_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.9squid.com/v1/api/webhooks/{id}/replay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"delivery_id": "<string>"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.9squid.com/v1/api/webhooks/{id}/replay"
payload := strings.NewReader("{\n \"delivery_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.9squid.com/v1/api/webhooks/{id}/replay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'delivery_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.9squid.com/v1/api/webhooks/{id}/replay")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"delivery_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyusing RestSharp;
var options = new RestClientOptions("https://api.9squid.com/v1/api/webhooks/{id}/replay");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"delivery_id\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
import Foundation
let parameters = ["delivery_id": "<string>"] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api.9squid.com/v1/api/webhooks/{id}/replay")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"delivery_id\": \"<string>\"\n}")
val request = Request.Builder()
.url("https://api.9squid.com/v1/api/webhooks/{id}/replay")
.post(body)
.addHeader("Authorization", "Bearer <token>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()