> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Pipedrive: Add Stage

> Add a new stage. Pipedrive Add Stage reference includes SDK V2 and CLI requests, input constraints, response fields, and Deepline cost.

Add a new stage.

<Info>
  Tool ID: `pipedrive_add_stage`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'pipedrive_add_stage',
  {
    "name": "Example",
    "pipeline_id": 123
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute pipedrive_add_stage --input '{
  "name": "Example",
  "pipeline_id": 123
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "success": true,
    "data": {
      "id": 123,
      "order_nr": 123,
      "name": "Example"
    }
  }
}
```

Use `deepline tools get pipedrive_add_stage --json` for the latest machine-readable contract.

## Input reference

Adds a new stage, returns the ID upon success.

| Name                          | Type      | Required | Default | Details                                                                                                                       |
| ----------------------------- | --------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `payload.name`                | `string`  | Yes      | —       | The name of the stage                                                                                                         |
| `payload.pipeline_id`         | `integer` | Yes      | —       | The ID of the pipeline to add stage to                                                                                        |
| `payload.deal_probability`    | `integer` | No       | —       | The success probability percentage of the deal. Used/shown when deal weighted values are used.                                |
| `payload.is_deal_rot_enabled` | `boolean` | No       | —       | Whether deals in this stage can become rotten                                                                                 |
| `payload.days_to_rotten`      | `integer` | No       | —       | The number of days the deals not updated in this stage would become rotten. Applies only if the `is_deal_rot_enabled` is set. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Adds a new stage, returns the ID upon success.",
    "properties": {
      "name": {
        "type": "string",
        "description": "The name of the stage"
      },
      "pipeline_id": {
        "type": "integer",
        "description": "The ID of the pipeline to add stage to"
      },
      "deal_probability": {
        "type": "integer",
        "description": "The success probability percentage of the deal. Used/shown when deal weighted values are used."
      },
      "is_deal_rot_enabled": {
        "type": "boolean",
        "description": "Whether deals in this stage can become rotten"
      },
      "days_to_rotten": {
        "type": "integer",
        "description": "The number of days the deals not updated in this stage would become rotten. Applies only if the `is_deal_rot_enabled` is set."
      }
    },
    "required": [
      "name",
      "pipeline_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name                                   | Type              | Required | Default | Details                                                                                                                       |
| -------------------------------------- | ----------------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `result.data`                          | `object`          | Yes      | —       | Provider response payload.                                                                                                    |
| `result.data.success`                  | `boolean`         | No       | —       | If the response is successful or not                                                                                          |
| `result.data.data`                     | `object`          | No       | —       | The stage object                                                                                                              |
| `result.data.data.id`                  | `integer`         | No       | —       | The ID of the stage                                                                                                           |
| `result.data.data.order_nr`            | `integer`         | No       | —       | Defines the order of the stage                                                                                                |
| `result.data.data.name`                | `string`          | No       | —       | The name of the stage                                                                                                         |
| `result.data.data.is_deleted`          | `boolean`         | No       | —       | Whether the stage is marked as deleted or not                                                                                 |
| `result.data.data.deal_probability`    | `integer`         | No       | —       | The success probability percentage of the deal. Used/shown when the deal weighted values are used.                            |
| `result.data.data.pipeline_id`         | `integer`         | No       | —       | The ID of the pipeline to add the stage to                                                                                    |
| `result.data.data.is_deal_rot_enabled` | `boolean`         | No       | —       | Whether deals in this stage can become rotten                                                                                 |
| `result.data.data.days_to_rotten`      | `integer \| null` | No       | —       | The number of days the deals not updated in this stage would become rotten. Applies only if the `is_deal_rot_enabled` is set. |
| `result.data.data.add_time`            | `string`          | No       | —       | The stage creation time                                                                                                       |
| `result.data.data.update_time`         | `string`          | No       | —       | The stage update time                                                                                                         |
| `result.meta`                          | `object`          | No       | —       | Additional response metadata (status, paging).                                                                                |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "If the response is successful or not"
          },
          "data": {
            "type": "object",
            "description": "The stage object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The ID of the stage"
              },
              "order_nr": {
                "type": "integer",
                "description": "Defines the order of the stage"
              },
              "name": {
                "type": "string",
                "description": "The name of the stage"
              },
              "is_deleted": {
                "type": "boolean",
                "description": "Whether the stage is marked as deleted or not"
              },
              "deal_probability": {
                "type": "integer",
                "description": "The success probability percentage of the deal. Used/shown when the deal weighted values are used."
              },
              "pipeline_id": {
                "type": "integer",
                "description": "The ID of the pipeline to add the stage to"
              },
              "is_deal_rot_enabled": {
                "type": "boolean",
                "description": "Whether deals in this stage can become rotten"
              },
              "days_to_rotten": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "The number of days the deals not updated in this stage would become rotten. Applies only if the `is_deal_rot_enabled` is set."
              },
              "add_time": {
                "type": "string",
                "description": "The stage creation time"
              },
              "update_time": {
                "type": "string",
                "description": "The stage update time"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Pipedrive provider guide](/docs/providers/pipedrive/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
