---
title: "Create a deal"
method: POST
path: "/crm/deals"
tags: ["CRM"]
---

# Create a deal

`POST /crm/deals`

## Request

- Base URL: `https://developer.solofire.com/v1`
- URL: `https://developer.solofire.com/v1/crm/deals`
- Auth: HTTP bearer

Requires the `crm.write` scope.

## Query parameters

- `pipeline_id` string
- `stage_id` string
- `status` string
- `account_id` string
- `contact_id` string
- `owner_user_id` string
- `q` string
- `limit` integer
- `cursor` string
- `updated_since` string

## Request body

- object
  - `name` string, required: Deal name.
  - `amount` number: Deal value.
  - `currency` string: ISO 4217 code. Defaults to USD.
  - `status` string: open, won or lost. Derived from the stage when stage_id is given.
  - `close_date` string: Expected or actual close date, YYYY-MM-DD.
  - `close_reason` string: Why it was won or lost.
  - `next_step` string: The next action.
  - `notes` string: Free-form notes.
  - `pipeline_id` string: Pipeline. Defaults to the company default pipeline.
  - `stage_id` string: Stage within the pipeline. Moving stage journals history; a won/lost stage sets status.
  - `account_id` string: Linked account.
  - `contact_ids` unknown[]: Contacts on the deal (replaces the current set).
    - unknown
  - `owner_user_id` string: Owning member.
  - `custom_fields` object: Arbitrary key/value metadata.

## Response `201`

Created

- object

## Other responses

- `401`: `unauthorized` No credential was presented. `invalid_token` The API key is unknown, revoked or malformed. `token_expired` The API key has passed its expiry.
- `403`: `insufficient_scope` The credential does not carry the required scope. `forbidden` The member this credential acts as lacks the permission. `feature_not_enabled` API access is not enabled for this company.
- `405`: `method_not_allowed` The path exists but not for this method.
- `413`: `payload_too_large` The request body is too large.
- `422`: `validation_failed` A parameter or body field is invalid.
- `429`: `rate_limited` The credential is over its request budget.
- `500`: `internal_error` Something went wrong on our side.

---

[API](https://skmtc.dev/solofire/apis/solofire-api.md) · [All operations](https://skmtc.dev/solofire/apis/solofire-api/llms.txt) · [OpenAPI document](https://skmtc.dev/solofire/apis/solofire-api/revisions/23e387532175?raw)
