Data Exports
Update Data Export
Change datasets, schedule, location or credentials
PATCH
/
api
/
v1
/
data-exports
/
{id}
Update Data Export
curl --request PATCH \
--url https://api.sequenzy.com/api/v1/data-exports/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"bucket": "<string>",
"region": {},
"endpoint": {},
"pathPrefix": {},
"accessKeyId": "<string>",
"secretAccessKey": "<string>",
"datasets": [
"<string>"
],
"frequency": "<string>",
"isEnabled": true
}
'import requests
url = "https://api.sequenzy.com/api/v1/data-exports/{id}"
payload = {
"name": "<string>",
"bucket": "<string>",
"region": {},
"endpoint": {},
"pathPrefix": {},
"accessKeyId": "<string>",
"secretAccessKey": "<string>",
"datasets": ["<string>"],
"frequency": "<string>",
"isEnabled": 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({
name: '<string>',
bucket: '<string>',
region: {},
endpoint: {},
pathPrefix: {},
accessKeyId: '<string>',
secretAccessKey: '<string>',
datasets: ['<string>'],
frequency: '<string>',
isEnabled: true
})
};
fetch('https://api.sequenzy.com/api/v1/data-exports/{id}', 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.sequenzy.com/api/v1/data-exports/{id}",
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([
'name' => '<string>',
'bucket' => '<string>',
'region' => [
],
'endpoint' => [
],
'pathPrefix' => [
],
'accessKeyId' => '<string>',
'secretAccessKey' => '<string>',
'datasets' => [
'<string>'
],
'frequency' => '<string>',
'isEnabled' => 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.sequenzy.com/api/v1/data-exports/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"bucket\": \"<string>\",\n \"region\": {},\n \"endpoint\": {},\n \"pathPrefix\": {},\n \"accessKeyId\": \"<string>\",\n \"secretAccessKey\": \"<string>\",\n \"datasets\": [\n \"<string>\"\n ],\n \"frequency\": \"<string>\",\n \"isEnabled\": 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.sequenzy.com/api/v1/data-exports/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"bucket\": \"<string>\",\n \"region\": {},\n \"endpoint\": {},\n \"pathPrefix\": {},\n \"accessKeyId\": \"<string>\",\n \"secretAccessKey\": \"<string>\",\n \"datasets\": [\n \"<string>\"\n ],\n \"frequency\": \"<string>\",\n \"isEnabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/data-exports/{id}")
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 \"name\": \"<string>\",\n \"bucket\": \"<string>\",\n \"region\": {},\n \"endpoint\": {},\n \"pathPrefix\": {},\n \"accessKeyId\": \"<string>\",\n \"secretAccessKey\": \"<string>\",\n \"datasets\": [\n \"<string>\"\n ],\n \"frequency\": \"<string>\",\n \"isEnabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"dataExport": {
"id": "exp_abc123",
"frequency": "hourly",
"datasets": ["email_events", "sms_events"]
}
}
{
"success": false,
"code": "invalid_input",
"error": "Provide accessKeyId and secretAccessKey together when rotating credentials."
}
{
"success": false,
"code": "not_found",
"error": "Data export destination not found."
}
Updates a data export. Send only the fields you want to change. Requires
data_exports:write, subscribers:read and analytics:read.
- Changing
bucket,region,endpoint,pathPrefixor credentials writes a test file first. If it fails, nothing changes. Exports continue from their current progress in the new location. - Datasets you add start from the time of the change. Datasets you remove stop immediately.
- Resuming a paused export (
isEnabled: true) runs it at the next scheduler tick.
string
required
Data export ID.
string
string
string | null
string | null
Send
null or "" to clear a custom endpoint.string | null
string
Must be sent together with
secretAccessKey.string
Must be sent together with
accessKeyId.string[]
string
boolean
false pauses the export, true resumes it.curl -X PATCH "https://api.sequenzy.com/api/v1/data-exports/exp_abc123" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "frequency": "hourly", "datasets": ["email_events", "sms_events"] }'
{
"success": true,
"dataExport": {
"id": "exp_abc123",
"frequency": "hourly",
"datasets": ["email_events", "sms_events"]
}
}
{
"success": false,
"code": "invalid_input",
"error": "Provide accessKeyId and secretAccessKey together when rotating credentials."
}
{
"success": false,
"code": "not_found",
"error": "Data export destination not found."
}
⌘I
Update Data Export
curl --request PATCH \
--url https://api.sequenzy.com/api/v1/data-exports/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"bucket": "<string>",
"region": {},
"endpoint": {},
"pathPrefix": {},
"accessKeyId": "<string>",
"secretAccessKey": "<string>",
"datasets": [
"<string>"
],
"frequency": "<string>",
"isEnabled": true
}
'import requests
url = "https://api.sequenzy.com/api/v1/data-exports/{id}"
payload = {
"name": "<string>",
"bucket": "<string>",
"region": {},
"endpoint": {},
"pathPrefix": {},
"accessKeyId": "<string>",
"secretAccessKey": "<string>",
"datasets": ["<string>"],
"frequency": "<string>",
"isEnabled": 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({
name: '<string>',
bucket: '<string>',
region: {},
endpoint: {},
pathPrefix: {},
accessKeyId: '<string>',
secretAccessKey: '<string>',
datasets: ['<string>'],
frequency: '<string>',
isEnabled: true
})
};
fetch('https://api.sequenzy.com/api/v1/data-exports/{id}', 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.sequenzy.com/api/v1/data-exports/{id}",
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([
'name' => '<string>',
'bucket' => '<string>',
'region' => [
],
'endpoint' => [
],
'pathPrefix' => [
],
'accessKeyId' => '<string>',
'secretAccessKey' => '<string>',
'datasets' => [
'<string>'
],
'frequency' => '<string>',
'isEnabled' => 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.sequenzy.com/api/v1/data-exports/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"bucket\": \"<string>\",\n \"region\": {},\n \"endpoint\": {},\n \"pathPrefix\": {},\n \"accessKeyId\": \"<string>\",\n \"secretAccessKey\": \"<string>\",\n \"datasets\": [\n \"<string>\"\n ],\n \"frequency\": \"<string>\",\n \"isEnabled\": 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.sequenzy.com/api/v1/data-exports/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"bucket\": \"<string>\",\n \"region\": {},\n \"endpoint\": {},\n \"pathPrefix\": {},\n \"accessKeyId\": \"<string>\",\n \"secretAccessKey\": \"<string>\",\n \"datasets\": [\n \"<string>\"\n ],\n \"frequency\": \"<string>\",\n \"isEnabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/data-exports/{id}")
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 \"name\": \"<string>\",\n \"bucket\": \"<string>\",\n \"region\": {},\n \"endpoint\": {},\n \"pathPrefix\": {},\n \"accessKeyId\": \"<string>\",\n \"secretAccessKey\": \"<string>\",\n \"datasets\": [\n \"<string>\"\n ],\n \"frequency\": \"<string>\",\n \"isEnabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"dataExport": {
"id": "exp_abc123",
"frequency": "hourly",
"datasets": ["email_events", "sms_events"]
}
}
{
"success": false,
"code": "invalid_input",
"error": "Provide accessKeyId and secretAccessKey together when rotating credentials."
}
{
"success": false,
"code": "not_found",
"error": "Data export destination not found."
}