Delete a Pipeline
curl --request POST \
--url https://api.monaco.com/v1/pipelines/{pipeline_id}/delete \
--header 'Content-Type: application/json' \
--data '
{
"destination_pipeline_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage_mapping": [
{
"source_stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destination_stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'import requests
url = "https://api.monaco.com/v1/pipelines/{pipeline_id}/delete"
payload = {
"destination_pipeline_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage_mapping": [
{
"source_stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destination_stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
destination_pipeline_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
stage_mapping: [
{
source_stage_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
destination_stage_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
]
})
};
fetch('https://api.monaco.com/v1/pipelines/{pipeline_id}/delete', 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.monaco.com/v1/pipelines/{pipeline_id}/delete",
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([
'destination_pipeline_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'stage_mapping' => [
[
'source_stage_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'destination_stage_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
CURLOPT_HTTPHEADER => [
"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.monaco.com/v1/pipelines/{pipeline_id}/delete"
payload := strings.NewReader("{\n \"destination_pipeline_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stage_mapping\": [\n {\n \"source_stage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"destination_stage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.monaco.com/v1/pipelines/{pipeline_id}/delete")
.header("Content-Type", "application/json")
.body("{\n \"destination_pipeline_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stage_mapping\": [\n {\n \"source_stage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"destination_stage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.monaco.com/v1/pipelines/{pipeline_id}/delete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"destination_pipeline_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stage_mapping\": [\n {\n \"source_stage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"destination_stage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": "stages_unmapped",
"message": "<string>",
"data": {
"missing_destination_pipeline": true,
"unmapped_stages": [
{
"stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage_key": "<string>",
"stage_name": "<string>",
"opportunity_count": 123,
"agent_trigger_count": 123,
"webhook_trigger_count": 123
}
]
}
}
}{
"error": {
"code": "not_found",
"message": "Resource not found",
"data": {}
}
}Pipelines
Delete a Pipeline
Deletes a non-default pipeline. If it has opportunities or stage triggers, send destination_pipeline_id and a stage_mapping entry for each open stage that has them; omitted closed stages map by outcome. Pipelines with more than 100 opportunities can’t be deleted.
Returns 409 stages_unmapped when a mapping is missing; data.unmapped_stages lists the stages to map. Requires an admin and multiple pipelines enabled.
POST
/
v1
/
pipelines
/
{pipeline_id}
/
delete
Delete a Pipeline
curl --request POST \
--url https://api.monaco.com/v1/pipelines/{pipeline_id}/delete \
--header 'Content-Type: application/json' \
--data '
{
"destination_pipeline_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage_mapping": [
{
"source_stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destination_stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'import requests
url = "https://api.monaco.com/v1/pipelines/{pipeline_id}/delete"
payload = {
"destination_pipeline_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage_mapping": [
{
"source_stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"destination_stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
destination_pipeline_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
stage_mapping: [
{
source_stage_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
destination_stage_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
]
})
};
fetch('https://api.monaco.com/v1/pipelines/{pipeline_id}/delete', 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.monaco.com/v1/pipelines/{pipeline_id}/delete",
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([
'destination_pipeline_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'stage_mapping' => [
[
'source_stage_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'destination_stage_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
CURLOPT_HTTPHEADER => [
"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.monaco.com/v1/pipelines/{pipeline_id}/delete"
payload := strings.NewReader("{\n \"destination_pipeline_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stage_mapping\": [\n {\n \"source_stage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"destination_stage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.monaco.com/v1/pipelines/{pipeline_id}/delete")
.header("Content-Type", "application/json")
.body("{\n \"destination_pipeline_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stage_mapping\": [\n {\n \"source_stage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"destination_stage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.monaco.com/v1/pipelines/{pipeline_id}/delete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"destination_pipeline_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"stage_mapping\": [\n {\n \"source_stage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"destination_stage_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": "stages_unmapped",
"message": "<string>",
"data": {
"missing_destination_pipeline": true,
"unmapped_stages": [
{
"stage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stage_key": "<string>",
"stage_name": "<string>",
"opportunity_count": 123,
"agent_trigger_count": 123,
"webhook_trigger_count": 123
}
]
}
}
}{
"error": {
"code": "not_found",
"message": "Resource not found",
"data": {}
}
}Body
application/json
Where the deleted pipeline's opportunities and stage-based triggers go.
Response
Pipeline deleted