Cancel an import
curl --request DELETE \
--url https://app.manypi.com/api/integrations/migrations/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.manypi.com/api/integrations/migrations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.manypi.com/api/integrations/migrations/{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://app.manypi.com/api/integrations/migrations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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://app.manypi.com/api/integrations/migrations/{id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://app.manypi.com/api/integrations/migrations/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.manypi.com/api/integrations/migrations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"job": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "<string>",
"account_label": "<string>",
"status": "scanned",
"scan": {
"label": "<string>",
"campaigns": [
{
"id": "<string>",
"name": "<string>",
"status": "<string>",
"emailSteps": 123,
"leads": 123
}
],
"leadsTotal": 123,
"blocklistTotal": 123,
"accounts": [
{
"email": "<string>",
"provider": "google",
"name": "<string>"
}
],
"notes": [
"<string>"
]
},
"options": {
"campaigns": [],
"recreateCampaigns": true,
"importLeads": true,
"doNotContact": true,
"enrollNotContacted": true,
"duplicates": "merge",
"asCustomers": false
},
"progress": {
"phase": "blocklist",
"campaignIndex": 123,
"campaignMap": {},
"counts": {
"suppressed": 123,
"campaigns": 123,
"steps": 123,
"created": 123,
"updated": 123,
"skipped": 123,
"overLimit": 123,
"failed": 123,
"enrolled": 123,
"customFields": 123
},
"warnings": [
"<string>"
],
"skippedSteps": {},
"leadsSeen": 123
},
"result": {},
"error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}Imports
Cancel an import
Stop an import that has not finished and erase its stored key. What already came over stays: leads, draft campaigns and do-not-contact entries are not removed. A cancelled import cannot be resumed; scan again to start a new one. An import that already finished is returned unchanged.
Requires the write permission.
DELETE
/
api
/
integrations
/
migrations
/
{id}
Cancel an import
curl --request DELETE \
--url https://app.manypi.com/api/integrations/migrations/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.manypi.com/api/integrations/migrations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.manypi.com/api/integrations/migrations/{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://app.manypi.com/api/integrations/migrations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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://app.manypi.com/api/integrations/migrations/{id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://app.manypi.com/api/integrations/migrations/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.manypi.com/api/integrations/migrations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"job": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "<string>",
"account_label": "<string>",
"status": "scanned",
"scan": {
"label": "<string>",
"campaigns": [
{
"id": "<string>",
"name": "<string>",
"status": "<string>",
"emailSteps": 123,
"leads": 123
}
],
"leadsTotal": 123,
"blocklistTotal": 123,
"accounts": [
{
"email": "<string>",
"provider": "google",
"name": "<string>"
}
],
"notes": [
"<string>"
]
},
"options": {
"campaigns": [],
"recreateCampaigns": true,
"importLeads": true,
"doNotContact": true,
"enrollNotContacted": true,
"duplicates": "merge",
"asCustomers": false
},
"progress": {
"phase": "blocklist",
"campaignIndex": 123,
"campaignMap": {},
"counts": {
"suppressed": 123,
"campaigns": 123,
"steps": 123,
"created": 123,
"updated": 123,
"skipped": 123,
"overLimit": 123,
"failed": 123,
"enrolled": 123,
"customFields": 123
},
"warnings": [
"<string>"
],
"skippedSteps": {},
"leadsSeen": 123
},
"result": {},
"error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}{
"error": "<string>",
"code": "<string>",
"details": "<unknown>"
}Authorizations
A ManyPI API key (mpi_...) from the profile menu → API Access in the dashboard, or an OAuth 2.1 access token obtained through the MCP consent flow.
Path Parameters
The import id, from POST /api/integrations/migrations.
Response
The import, now cancelled.
Show child attributes
Show child attributes
