Pipelines
Create a pipeline
Creates a pipeline. Supply stages to define your own; omit it and the standard set is seeded, which you can then edit. At least one stage must have type won.
Requires opportunities.managePipelines — pipeline shape affects everyone’s board, not just your own deals.
POST
/
pipelines
Create a pipeline
curl --request POST \
--url https://backend.leadey.ai/v1/pipelines \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"stages": [
{
"label": "<string>",
"defaultProbability": 123,
"sortOrder": 123,
"color": "<string>"
}
]
}
'import requests
url = "https://backend.leadey.ai/v1/pipelines"
payload = {
"name": "<string>",
"description": "<string>",
"stages": [
{
"label": "<string>",
"defaultProbability": 123,
"sortOrder": 123,
"color": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
stages: [
{label: '<string>', defaultProbability: 123, sortOrder: 123, color: '<string>'}
]
})
};
fetch('https://backend.leadey.ai/v1/pipelines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"name": "<string>",
"stages": [
{
"id": "<string>",
"label": "<string>",
"sortOrder": 123,
"slug": "<string>",
"type": "open",
"defaultProbability": 40
}
],
"description": "<string>",
"isDefault": true,
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "One of email, phone or linkedinUrl is required",
"details": null
}
}{
"error": {
"message": "Invalid or revoked API key.",
"details": null
}
}{
"error": {
"message": "This API key is read-only. Create a key with write access in Settings → API Keys.",
"details": null
}
}{
"error": {
"message": "Lead not found",
"details": null
}
}Authorizations
Your API key, created in the Leadey dashboard under Settings → API Keys. Send it as Authorization: Bearer leadey_sk_live_….
Response
Success
Show child attributes
Show child attributes
⌘I
Create a pipeline
curl --request POST \
--url https://backend.leadey.ai/v1/pipelines \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"stages": [
{
"label": "<string>",
"defaultProbability": 123,
"sortOrder": 123,
"color": "<string>"
}
]
}
'import requests
url = "https://backend.leadey.ai/v1/pipelines"
payload = {
"name": "<string>",
"description": "<string>",
"stages": [
{
"label": "<string>",
"defaultProbability": 123,
"sortOrder": 123,
"color": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
stages: [
{label: '<string>', defaultProbability: 123, sortOrder: 123, color: '<string>'}
]
})
};
fetch('https://backend.leadey.ai/v1/pipelines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "<string>",
"name": "<string>",
"stages": [
{
"id": "<string>",
"label": "<string>",
"sortOrder": 123,
"slug": "<string>",
"type": "open",
"defaultProbability": 40
}
],
"description": "<string>",
"isDefault": true,
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "One of email, phone or linkedinUrl is required",
"details": null
}
}{
"error": {
"message": "Invalid or revoked API key.",
"details": null
}
}{
"error": {
"message": "This API key is read-only. Create a key with write access in Settings → API Keys.",
"details": null
}
}{
"error": {
"message": "Lead not found",
"details": null
}
}