---
title: "Convert a deal"
method: POST
path: "/v2/deals/{deal_key}/convert"
tags: ["Deals"]
---

# Convert a deal

`POST /v2/deals/{deal_key}/convert`

Converts a deal to a customer

## Path parameters

- `deal_key` string, required

## Request body

- object
  - `customer_key` string — Unique identifier to be used for customer. If no value is passed email of deal being converted will be used as `customer_key`.
  - `email` string, email, required — The customers email, must be a valid email.

## Response `200`

Converts a deal to a customer

- object
  - `data` object, required — **Customers** represent the users who have been referred by a **Partner**. **Customers** are linked to the **Partner** that referred them through a **partner_key** which must be provided on the Create Customer endpoint. The **partner_key** is retrievable from `growsumo.data.partner_key`, which is created by the `PartnerStackJS` snippet.
    - `created_at` integer — Immutable Unix timestamp in milliseconds taken at time of creation
    - `key` string — A unique identifier used to reference the object
    - `updated_at` integer — Unix timestamp in milliseconds taken at time of last update
    - `customer_key` string, nullable — External customer key that can be configured on creation.
    - `email` string, nullable — The customers email, must be a valid email
    - `field_data` object, nullable
    - `fields` object[]
      - `api_name` string — API name of this field to be used on create / update / serialization. Created at time of field creation but can be edited
      - `description` string, nullable — Description of the field to be displayed to the partner
      - `external_type` string, nullable — Name that can be used for external systems
      - `field_key` string — Key of field that is presented
      - `help_text` string, nullable — The help text that is provided for this field
      - `hidden` boolean — Whether or not this field is displayed when filling out its attached form
      - `internal_name` string — Internal name of this field. Created by PartnerStack at time of field creation. Used when referencing field in created objects. Cannot be edited.
      - `name` string — Name of field that is presented
      - `options` object — Options to select from if this field is a picklist/checkbox
      - `placeholder_text` string, nullable — The text of the placeholder that is provided for this field
      - `position` integer — The position that this field will be displayed in relation to others on the same form (index starts at 0)
      - `read_only` boolean — Whether or not this field is read only
      - `required` boolean — Whether or not this field will be required when filling out its attached form
      - `type` string — The type of field that will be presented (input, picklist, number ect.)
      - `value` unknown
    - `mdata` object, nullable — Additional custom fields for the customer that is configured in your PartnerStack dashboard.
    - `meta` object — Additional custom fields for the customer that is configured in your PartnerStack dashboard.
    - `name` string, nullable — Should be either the customer's name, or the company name
    - `partner_key` string — The key of the partner that is responsible for the customer
    - `partnership_key` string, nullable — Unique key of this partnership.
    - `provider_key` string, nullable — A unique identifier given by a payment provider (Stripe, Recurly, Chargebee etc)
    - `shared_id` string, nullable — The shared id of the customer
    - `source_key` string, nullable — The key of the source at which the customer was created through
    - `source_type` string, nullable — The source at which the customer was created through
    - `submitted_by` string, nullable — Name of partner team member this customer is assigned to.
    - `submitted_by_email` string, nullable — Email of partner team member this customer is assigned to.
    - `submitted_by_photo_url` string, nullable — The signed photo url for partner team member this customer is assigned to.
    - `team` object, nullable — Details of partner team this customer is associated with.
      - `color` string, nullable — Logo color for the patner team.
      - `logo` string, nullable — Logo file key for partner team.
      - `member_count` integer, nullable — The team size of this partner team
      - `name` string, nullable — Name of of partner team.
    - `test` boolean — True if created by a test partner
  - `message` string, required
  - `status` integer, required

## Other responses

- `400` — Bad Request Error
- `401` — Unauthorized Error
- `403` — Forbidden Error
- `404` — Not Found Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/partnerstack/apis/partnerstack-api.md) · [All operations](https://skmtc.net/partnerstack/apis/partnerstack-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/partnerstack/partnerstack-api/versions/0f35aebe53a9/schema)
