> ## 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.

# Apollo: Update Deal

> Update an Apollo deal's name, amount, stage, owner, close date, or status. Includes SDK V2 examples, input constraints, response fields, and Deepline cost.

Update an Apollo deal's name, amount, stage, owner, close date, or status.

> [!NOTE]
>
> Tool ID: `apollo_update_deal`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'apollo_update_deal',
  {
    "opportunity_id": "opportunity_123"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute apollo_update_deal --input '{
  "opportunity_id": "opportunity_123"
}' --json
```

## Example response

The static output schema lacks the details for a reliable example. Use `deepline describe apollo_update_deal --json` for the complete live contract.

## Input reference

Update an existing deal (opportunity) in Apollo CRM. At least one mutable field must be provided. Requires master API key.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.opportunity_id` | `string` | Yes | — | The Apollo opportunity (deal) ID to update. |
| `payload.name` | `string` | No | — | Updated name of the deal. |
| `payload.amount` | `number` | No | — | Updated monetary value of the deal. |
| `payload.opportunity_stage_id` | `string` | No | — | Updated deal stage ID. Retrieve stage IDs with apollo\_list\_deal\_stages. |
| `payload.account_id` | `string` | No | — | Updated Apollo account (company) ID. |
| `payload.owner_id` | `string` | No | — | Updated Apollo user ID who owns this deal. |
| `payload.close_date` | `string` | No | — | Updated close date (ISO 8601 date string). |
| `payload.source` | `string` | No | — | Updated source of the deal. |
| `payload.status` | `string` | No | — | Updated status of the deal. |
| `payload.priority` | `string` | No | — | Updated priority level of the deal. |
| `payload.notes` | `string` | No | — | Updated notes about the deal. |
| `payload.custom_fields` | `record` | No | — | Updated custom field key-value pairs. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Update an existing deal (opportunity) in Apollo CRM. At least one mutable field must be provided. Requires master API key.",
    "properties": {
      "opportunity_id": {
        "type": "string",
        "description": "The Apollo opportunity (deal) ID to update."
      },
      "name": {
        "type": "string",
        "description": "Updated name of the deal."
      },
      "amount": {
        "type": "number",
        "description": "Updated monetary value of the deal."
      },
      "opportunity_stage_id": {
        "type": "string",
        "description": "Updated deal stage ID. Retrieve stage IDs with apollo_list_deal_stages."
      },
      "account_id": {
        "type": "string",
        "description": "Updated Apollo account (company) ID."
      },
      "owner_id": {
        "type": "string",
        "description": "Updated Apollo user ID who owns this deal."
      },
      "close_date": {
        "type": "string",
        "description": "Updated close date (ISO 8601 date string)."
      },
      "source": {
        "type": "string",
        "description": "Updated source of the deal."
      },
      "status": {
        "type": "string",
        "description": "Updated status of the deal."
      },
      "priority": {
        "type": "string",
        "description": "Updated priority level of the deal."
      },
      "notes": {
        "type": "string",
        "description": "Updated notes about the deal."
      },
      "custom_fields": {
        "type": "object",
        "description": "Updated custom field key-value pairs.",
        "additionalProperties": {}
      }
    },
    "required": [
      "opportunity_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Apollo update deal result.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `record` | Yes | — | Payload with the updated `opportunity` object. |
| `result.meta` | `record` | No | — | Additional response metadata (status, paging). |

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

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Apollo update deal result.",
    "properties": {
      "data": {
        "type": [
          "object",
          "null"
        ],
        "description": "Payload with the updated `opportunity` object.",
        "additionalProperties": {}
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": {}
      }
    },
    "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

* [Apollo provider guide](https://deepline.com/docs/providers/apollo/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.