Create pipeline
Add a pipeline with its stages.
Scope: crm:write.
POST
/
pipelines
Create pipeline
curl --request POST \
--url https://app.telaven.com/api/v1/pipelines \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Partnerships",
"stages": [
{
"id": "intro",
"name": "Intro",
"order": 0,
"probability": 10
},
{
"id": "signed",
"name": "Signed",
"order": 1,
"probability": 100
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Partnerships',
stages: [
{id: 'intro', name: 'Intro', order: 0, probability: 10},
{id: 'signed', name: 'Signed', order: 1, probability: 100}
]
})
};
fetch('https://app.telaven.com/api/v1/pipelines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.telaven.com/api/v1/pipelines"
payload = {
"name": "Partnerships",
"stages": [
{
"id": "intro",
"name": "Intro",
"order": 0,
"probability": 10
},
{
"id": "signed",
"name": "Signed",
"order": 1,
"probability": 100
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.telaven.com/api/v1/pipelines",
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([
'name' => 'Partnerships',
'stages' => [
[
'id' => 'intro',
'name' => 'Intro',
'order' => 0,
'probability' => 10
],
[
'id' => 'signed',
'name' => 'Signed',
'order' => 1,
'probability' => 100
]
]
]),
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;
}using RestSharp;
var options = new RestClientOptions("https://app.telaven.com/api/v1/pipelines");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"name\": \"Partnerships\",\n \"stages\": [\n {\n \"id\": \"intro\",\n \"name\": \"Intro\",\n \"order\": 0,\n \"probability\": 10\n },\n {\n \"id\": \"signed\",\n \"name\": \"Signed\",\n \"order\": 1,\n \"probability\": 100\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"success": true,
"data": {
"id": "p2…",
"name": "Partnerships"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Headers
Body
application/json
Response
Success
⌘I
Create pipeline
curl --request POST \
--url https://app.telaven.com/api/v1/pipelines \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Partnerships",
"stages": [
{
"id": "intro",
"name": "Intro",
"order": 0,
"probability": 10
},
{
"id": "signed",
"name": "Signed",
"order": 1,
"probability": 100
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Partnerships',
stages: [
{id: 'intro', name: 'Intro', order: 0, probability: 10},
{id: 'signed', name: 'Signed', order: 1, probability: 100}
]
})
};
fetch('https://app.telaven.com/api/v1/pipelines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.telaven.com/api/v1/pipelines"
payload = {
"name": "Partnerships",
"stages": [
{
"id": "intro",
"name": "Intro",
"order": 0,
"probability": 10
},
{
"id": "signed",
"name": "Signed",
"order": 1,
"probability": 100
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.telaven.com/api/v1/pipelines",
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([
'name' => 'Partnerships',
'stages' => [
[
'id' => 'intro',
'name' => 'Intro',
'order' => 0,
'probability' => 10
],
[
'id' => 'signed',
'name' => 'Signed',
'order' => 1,
'probability' => 100
]
]
]),
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;
}using RestSharp;
var options = new RestClientOptions("https://app.telaven.com/api/v1/pipelines");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"name\": \"Partnerships\",\n \"stages\": [\n {\n \"id\": \"intro\",\n \"name\": \"Intro\",\n \"order\": 0,\n \"probability\": 10\n },\n {\n \"id\": \"signed\",\n \"name\": \"Signed\",\n \"order\": 1,\n \"probability\": 100\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"success": true,
"data": {
"id": "p2…",
"name": "Partnerships"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}