Skip to main content
PATCH
/
funnels
/
{id}
JavaScript
import Moonbase from '@moonbaseai/sdk';

const client = new Moonbase({
  apiKey: process.env['MOONBASE_API_KEY'], // This is the default and can be omitted
});

const funnel = await client.funnels.update('id', { name: 'Revenue Pipeline' });

console.log(funnel.id);
{
  "id": "1CLJt2v5aNd8G5SGzEaeVU",
  "type": "funnel",
  "name": "Revenue 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"
}

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.

Authorizations

Authorization
string
header
required

Your Moonbase API key.

Path Parameters

id
string
required

The ID of the funnel to update.

Body

application/json

The Funnel values to update.

Parameters for updating a funnel.

name
string

The name of the funnel.

steps
FunnelStepUpdateParams · object[]

An ordered list of steps. Providing this replaces all existing steps. Omitting preserves existing steps.

Response

Update succeeded.

A Funnel represents a series of steps used to track progression.

type
string
required

String representing the object’s type. Always funnel for this object.

Allowed value: "funnel"
id
string
required

Unique identifier for the object.

name
string
required

The name of the funnel.

steps
FunnelStep · object[]
required

An ordered list of FunnelStep objects that make up the funnel.

created_at
string<date-time>
required

Time at which the object was created, as an ISO 8601 timestamp in UTC.

updated_at
string<date-time>
required

Time at which the object was last updated, as an ISO 8601 timestamp in UTC.