import Moonbase from '@moonbaseai/sdk';
const client = new Moonbase({
apiKey: process.env['MOONBASE_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const funnel of client.funnels.list()) {
console.log(funnel.id);
}{
"type": "list",
"data": [
{
"id": "1CLJt2v74fpqiNNRA14BC8",
"type": "funnel",
"name": "Onboarding",
"steps": [
{
"id": "1CLJt2v7K42Td5rmrJ8mJu",
"type": "funnel_step",
"step_type": "active",
"name": "Step 1",
"color": "red"
},
{
"id": "1CLJt2v7ZSE5XoM8YbDMRg",
"type": "funnel_step",
"step_type": "active",
"name": "Step 2",
"color": "red"
},
{
"id": "1CLJt2v7opRhSWqVEtHwYT",
"type": "funnel_step",
"step_type": "active",
"name": "Step 3",
"color": "red"
},
{
"id": "1CLJt2v84CdKMEKqwBNXfE",
"type": "funnel_step",
"step_type": "success",
"name": "Step 4",
"color": "red"
},
{
"id": "1CLJt2v8JapwFwpCdUT7n1",
"type": "funnel_step",
"step_type": "failure",
"name": "Step 5",
"color": "red"
}
],
"created_at": "2025-02-17T16:00:00.000Z",
"updated_at": "2025-02-17T16:00:00.000Z"
},
{
"id": "1CLJt2v5aNd8G5SGzEaeVU",
"type": "funnel",
"name": "Sales Pipeline",
"steps": [
{
"id": "1CLJt2v5pkpkAnvdgXfEcF",
"type": "funnel_step",
"step_type": "active",
"name": "Step 1",
"color": "red"
},
{
"id": "1CLJt2v6592N5WQzNpjpj2",
"type": "funnel_step",
"step_type": "active",
"name": "Step 2",
"color": "red"
},
{
"id": "1CLJt2v6KXDyzDuM57pQqo",
"type": "funnel_step",
"step_type": "active",
"name": "Step 3",
"color": "red"
},
{
"id": "1CLJt2v6ZuRbtwPhmQtzxa",
"type": "funnel_step",
"step_type": "success",
"name": "Step 4",
"color": "red"
},
{
"id": "1CLJt2v6pHdDoet4Thyb5M",
"type": "funnel_step",
"step_type": "failure",
"name": "Step 5",
"color": "red"
}
],
"created_at": "2025-02-17T16:00:00.000Z",
"updated_at": "2025-02-17T16:00:00.000Z"
},
{
"id": "1CLJt2uZa4PDHXH6vc1UMb",
"type": "funnel",
"name": "Deals",
"steps": [
{
"id": "1CLJt2uZpSaqCEmTcu64UN",
"type": "funnel_step",
"step_type": "active",
"name": "Lead",
"color": "blue"
},
{
"id": "1CLJt2ua4pnT6xFpKCAeb9",
"type": "funnel_step",
"step_type": "active",
"name": "Qualification",
"color": "cyan"
},
{
"id": "1CLJt2uaKCz51fkB1VFEhv",
"type": "funnel_step",
"step_type": "active",
"name": "Demo",
"color": "orange"
},
{
"id": "1CLJt2uaZbBgvPEXhnKpph",
"type": "funnel_step",
"step_type": "active",
"name": "Proposal",
"color": "yellow"
},
{
"id": "1CLJt2uaoyPJq6itQ5QQwU",
"type": "funnel_step",
"step_type": "active",
"name": "Negotiation",
"color": "pink"
},
{
"id": "1CLJt2ub4MavjpDF6NV14F",
"type": "funnel_step",
"step_type": "success",
"name": "Closed Won",
"color": "emerald"
},
{
"id": "1CLJt2ubJjnYeXhbnfZbB2",
"type": "funnel_step",
"step_type": "failure",
"name": "Closed Lost",
"color": "rose"
}
],
"created_at": "2025-02-17T16:00:00.000Z",
"updated_at": "2025-02-17T16:00:00.000Z"
}
],
"meta": {
"cursors": {}
}
}Returns a list of funnels.
import Moonbase from '@moonbaseai/sdk';
const client = new Moonbase({
apiKey: process.env['MOONBASE_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const funnel of client.funnels.list()) {
console.log(funnel.id);
}{
"type": "list",
"data": [
{
"id": "1CLJt2v74fpqiNNRA14BC8",
"type": "funnel",
"name": "Onboarding",
"steps": [
{
"id": "1CLJt2v7K42Td5rmrJ8mJu",
"type": "funnel_step",
"step_type": "active",
"name": "Step 1",
"color": "red"
},
{
"id": "1CLJt2v7ZSE5XoM8YbDMRg",
"type": "funnel_step",
"step_type": "active",
"name": "Step 2",
"color": "red"
},
{
"id": "1CLJt2v7opRhSWqVEtHwYT",
"type": "funnel_step",
"step_type": "active",
"name": "Step 3",
"color": "red"
},
{
"id": "1CLJt2v84CdKMEKqwBNXfE",
"type": "funnel_step",
"step_type": "success",
"name": "Step 4",
"color": "red"
},
{
"id": "1CLJt2v8JapwFwpCdUT7n1",
"type": "funnel_step",
"step_type": "failure",
"name": "Step 5",
"color": "red"
}
],
"created_at": "2025-02-17T16:00:00.000Z",
"updated_at": "2025-02-17T16:00:00.000Z"
},
{
"id": "1CLJt2v5aNd8G5SGzEaeVU",
"type": "funnel",
"name": "Sales Pipeline",
"steps": [
{
"id": "1CLJt2v5pkpkAnvdgXfEcF",
"type": "funnel_step",
"step_type": "active",
"name": "Step 1",
"color": "red"
},
{
"id": "1CLJt2v6592N5WQzNpjpj2",
"type": "funnel_step",
"step_type": "active",
"name": "Step 2",
"color": "red"
},
{
"id": "1CLJt2v6KXDyzDuM57pQqo",
"type": "funnel_step",
"step_type": "active",
"name": "Step 3",
"color": "red"
},
{
"id": "1CLJt2v6ZuRbtwPhmQtzxa",
"type": "funnel_step",
"step_type": "success",
"name": "Step 4",
"color": "red"
},
{
"id": "1CLJt2v6pHdDoet4Thyb5M",
"type": "funnel_step",
"step_type": "failure",
"name": "Step 5",
"color": "red"
}
],
"created_at": "2025-02-17T16:00:00.000Z",
"updated_at": "2025-02-17T16:00:00.000Z"
},
{
"id": "1CLJt2uZa4PDHXH6vc1UMb",
"type": "funnel",
"name": "Deals",
"steps": [
{
"id": "1CLJt2uZpSaqCEmTcu64UN",
"type": "funnel_step",
"step_type": "active",
"name": "Lead",
"color": "blue"
},
{
"id": "1CLJt2ua4pnT6xFpKCAeb9",
"type": "funnel_step",
"step_type": "active",
"name": "Qualification",
"color": "cyan"
},
{
"id": "1CLJt2uaKCz51fkB1VFEhv",
"type": "funnel_step",
"step_type": "active",
"name": "Demo",
"color": "orange"
},
{
"id": "1CLJt2uaZbBgvPEXhnKpph",
"type": "funnel_step",
"step_type": "active",
"name": "Proposal",
"color": "yellow"
},
{
"id": "1CLJt2uaoyPJq6itQ5QQwU",
"type": "funnel_step",
"step_type": "active",
"name": "Negotiation",
"color": "pink"
},
{
"id": "1CLJt2ub4MavjpDF6NV14F",
"type": "funnel_step",
"step_type": "success",
"name": "Closed Won",
"color": "emerald"
},
{
"id": "1CLJt2ubJjnYeXhbnfZbB2",
"type": "funnel_step",
"step_type": "failure",
"name": "Closed Lost",
"color": "rose"
}
],
"created_at": "2025-02-17T16:00:00.000Z",
"updated_at": "2025-02-17T16:00:00.000Z"
}
],
"meta": {
"cursors": {}
}
}Documentation Index
Fetch the complete documentation index at: https://docs.moonbase.ai/llms.txt
Use this file to discover all available pages before exploring further.
Your Moonbase API key.
When specified, returns results starting immediately before the item identified by this cursor. Use the cursor value from the response's metadata to fetch the previous page of results.
When specified, returns results starting immediately after the item identified by this cursor. Use the cursor value from the previous response's metadata to fetch the next page of results.
Maximum number of items to return per page. Must be between 1 and 100. Defaults to 20 if not specified.
1 <= x <= 100Successful response.