Cancel Events Import
curl --request POST \
--url https://api-ai.zixflow.com/api/data/events/v1/import/{import_id}/cancel \
--header 'x-api-key: <x-api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api-ai.zixflow.com/api/data/events/v1/import/{import_id}/cancel"
headers = {
"x-api-key": "<x-api-key>",
"x-workspace-id": "<x-workspace-id>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'x-workspace-id': '<x-workspace-id>'}
};
fetch('https://api-ai.zixflow.com/api/data/events/v1/import/{import_id}/cancel', 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-ai.zixflow.com/api/data/events/v1/import/{import_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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-ai.zixflow.com/api/data/events/v1/import/{import_id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
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-ai.zixflow.com/api/data/events/v1/import/{import_id}/cancel")
.header("x-api-key", "<x-api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-ai.zixflow.com/api/data/events/v1/import/{import_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Import cancelled successfully",
"data": {
"import_id": "68f0c1a2b3c4d5e6f7a8b9c1",
"status": "cancelled"
}
}
{
"error": true,
"message": "Unauthorized"
}
{
"success": false,
"message": "import not found"
}
{
"success": false,
"message": "import cannot be cancelled from status in-progress"
}
Events
Cancel Events Import
Cancel a queued events CSV import and refund one daily import slot
POST
/
api
/
data
/
events
/
v1
/
import
/
{import_id}
/
cancel
Cancel Events Import
curl --request POST \
--url https://api-ai.zixflow.com/api/data/events/v1/import/{import_id}/cancel \
--header 'x-api-key: <x-api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api-ai.zixflow.com/api/data/events/v1/import/{import_id}/cancel"
headers = {
"x-api-key": "<x-api-key>",
"x-workspace-id": "<x-workspace-id>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'x-workspace-id': '<x-workspace-id>'}
};
fetch('https://api-ai.zixflow.com/api/data/events/v1/import/{import_id}/cancel', 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-ai.zixflow.com/api/data/events/v1/import/{import_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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-ai.zixflow.com/api/data/events/v1/import/{import_id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
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-ai.zixflow.com/api/data/events/v1/import/{import_id}/cancel")
.header("x-api-key", "<x-api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-ai.zixflow.com/api/data/events/v1/import/{import_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Import cancelled successfully",
"data": {
"import_id": "68f0c1a2b3c4d5e6f7a8b9c1",
"status": "cancelled"
}
}
{
"error": true,
"message": "Unauthorized"
}
{
"success": false,
"message": "import not found"
}
{
"success": false,
"message": "import cannot be cancelled from status in-progress"
}
Description
Cancels an events import only if status isin-queue. Refunds one daily import slot.
Once the job is in-progress, completed, failed, or already cancelled, cancel returns 409.
Headers
string
required
Your API key for authentication. Must have dashboard permission.
string
required
Your workspace ID for authentication. Must own the API key.
Path Parameters
string
required
The import job ID returned when the import was queued.
Response
boolean
Indicates whether the API call was successful.
string
Success or error message from the API.
object
Cancelled import details.
string
Unique import job ID.
string
Set to
cancelled on success.{
"success": true,
"message": "Import cancelled successfully",
"data": {
"import_id": "68f0c1a2b3c4d5e6f7a8b9c1",
"status": "cancelled"
}
}
{
"error": true,
"message": "Unauthorized"
}
{
"success": false,
"message": "import not found"
}
{
"success": false,
"message": "import cannot be cancelled from status in-progress"
}