---
title: "Create a deal"
method: POST
path: "/api/v1/deals"
tags: ["Deals"]
---

# Create a deal

`POST /api/v1/deals`

## Request

- Base URL: `https://mailinapp.com`
- URL: `https://mailinapp.com/api/v1/deals`
- Auth: HTTP bearer

A deal on one of the account's contacts. Name the contact by `email` (the most recently updated list that has it, unless `listId` is given) or by `listId` + `rowId`. Without `pipelineId`/`stageId` the deal goes to the default pipeline's first open stage. Fires the `deal.created` webhook event and any deal-stage journey.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `email` string, email
  - `listId` string
  - `rowId` string
  - `title` string, required
  - `value` union: Decimal amount, rounded to cents. Default 0.
    - number
    - string
  - `currency` string: Default USD.
  - `pipelineId` string
  - `stageId` string

## Response `200`

Already created under this Idempotency-Key

- DealCreateResult
  - `deal` Deal, required
    - `id` string, required
    - `title` string, required
    - `value` number, required
    - `currency` string, required
    - `pipelineId` string, required
    - `stageId` string, required
    - `stage` string, nullable, required: The stage's name.
    - `status` 'open' | 'won' | 'lost', required
    - `source` 'manual' | 'journey' | 'booking' | 'checkout' | 'proposal' | 'api', required
    - `listId` string, required
    - `rowId` string, required
    - `email` string, email, required
  - `created` boolean, required

## Other responses

- `201`: Created
- `400`: Invalid request
- `401`: Missing or invalid API key
- `404`: Not found, or not this account's
- `429`: Too many requests for this key

---

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