Update, resume or rotate a subscription
curl --request PATCH \
--url https://api.quiva.ai/accounts/integrations/{id}/subscriptions/{sid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"spaces": [
"<string>"
],
"event_kinds": [],
"paused": false,
"rotate_secret": true
}
'import requests
url = "https://api.quiva.ai/accounts/integrations/{id}/subscriptions/{sid}"
payload = {
"url": "<string>",
"spaces": ["<string>"],
"event_kinds": [],
"paused": False,
"rotate_secret": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
spaces: ['<string>'],
event_kinds: [],
paused: false,
rotate_secret: true
})
};
fetch('https://api.quiva.ai/accounts/integrations/{id}/subscriptions/{sid}', 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.quiva.ai/accounts/integrations/{id}/subscriptions/{sid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'spaces' => [
'<string>'
],
'event_kinds' => [
],
'paused' => false,
'rotate_secret' => true
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.quiva.ai/accounts/integrations/{id}/subscriptions/{sid}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"spaces\": [\n \"<string>\"\n ],\n \"event_kinds\": [],\n \"paused\": false,\n \"rotate_secret\": true\n}")
req, _ := http.NewRequest("PATCH", 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))
}HttpResponse<String> response = Unirest.patch("https://api.quiva.ai/accounts/integrations/{id}/subscriptions/{sid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"spaces\": [\n \"<string>\"\n ],\n \"event_kinds\": [],\n \"paused\": false,\n \"rotate_secret\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quiva.ai/accounts/integrations/{id}/subscriptions/{sid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"spaces\": [\n \"<string>\"\n ],\n \"event_kinds\": [],\n \"paused\": false,\n \"rotate_secret\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"subscription": {
"id": "<string>",
"account_id": "<string>",
"integration_id": "<string>",
"spaces": [
"<string>"
],
"event_kinds": [
"task-created"
],
"url": "<string>",
"paused": true,
"previous_secret_until": "2023-11-07T05:31:56Z",
"environment": "<string>",
"paused_reason": "",
"paused_at": "<string>",
"consecutive_failures": 123,
"failing_since": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"secret": "<string>"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Task Subscriptions
Update, resume or rotate a subscription
paused: false resumes and answers 409 integration_disabled while the integration is disabled.
PATCH
/
accounts
/
integrations
/
{id}
/
subscriptions
/
{sid}
Update, resume or rotate a subscription
curl --request PATCH \
--url https://api.quiva.ai/accounts/integrations/{id}/subscriptions/{sid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"spaces": [
"<string>"
],
"event_kinds": [],
"paused": false,
"rotate_secret": true
}
'import requests
url = "https://api.quiva.ai/accounts/integrations/{id}/subscriptions/{sid}"
payload = {
"url": "<string>",
"spaces": ["<string>"],
"event_kinds": [],
"paused": False,
"rotate_secret": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
spaces: ['<string>'],
event_kinds: [],
paused: false,
rotate_secret: true
})
};
fetch('https://api.quiva.ai/accounts/integrations/{id}/subscriptions/{sid}', 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.quiva.ai/accounts/integrations/{id}/subscriptions/{sid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'spaces' => [
'<string>'
],
'event_kinds' => [
],
'paused' => false,
'rotate_secret' => true
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.quiva.ai/accounts/integrations/{id}/subscriptions/{sid}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"spaces\": [\n \"<string>\"\n ],\n \"event_kinds\": [],\n \"paused\": false,\n \"rotate_secret\": true\n}")
req, _ := http.NewRequest("PATCH", 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))
}HttpResponse<String> response = Unirest.patch("https://api.quiva.ai/accounts/integrations/{id}/subscriptions/{sid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"spaces\": [\n \"<string>\"\n ],\n \"event_kinds\": [],\n \"paused\": false,\n \"rotate_secret\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quiva.ai/accounts/integrations/{id}/subscriptions/{sid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"spaces\": [\n \"<string>\"\n ],\n \"event_kinds\": [],\n \"paused\": false,\n \"rotate_secret\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"subscription": {
"id": "<string>",
"account_id": "<string>",
"integration_id": "<string>",
"spaces": [
"<string>"
],
"event_kinds": [
"task-created"
],
"url": "<string>",
"paused": true,
"previous_secret_until": "2023-11-07T05:31:56Z",
"environment": "<string>",
"paused_reason": "",
"paused_at": "<string>",
"consecutive_failures": 123,
"failing_since": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"secret": "<string>"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
bearerAuthapiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
https only. Private, loopback and link-local hosts are refused.
Maximum string length:
2048Each space needs tasks:read on the integration.
Minimum array length:
1Available options:
task-created, task-updated, task-status-changed, task-moved, task-deleted, task-action-added, task-action-completed, task-action-deleted, comment-created, comment-updated, comment-deleted Only false is accepted: it resumes and clears the failure counters. The delivery worker does the pausing.
Available options:
false Issues a new secret, returned once. The previous secret keeps signing for 24 hours.
Response
Updated.
Show child attributes
Show child attributes