---
search:
  tags:
    - Objects and records
    - POST
seo:
  description: >-
    Writes the lead into an account, a… Reference for the POST
    /api/v1/objects/{objectId}/records/{recordId}/actions/convert endpoint in
    the Taylorz CRM API.
sidebar:
  label: Convert a lead
  badge: POST
title: Convert a lead
type: openapi-operation
---
Writes the lead into an account, a contact and an opportunity in one step. Needs all three objects available, and refuses a caller whose field access is narrowed anywhere.

`POST /api/v1/objects/{objectId}/records/{recordId}/actions/convert`

**Request body** (`application/json`, required)

- `account` (object, required)
- `acknowledgedMatches` (boolean)
- `contact` (object, required)
- `opportunity` (object, required)

Request body example:

```json
{
  "account": {
    "id": "string",
    "mode": "new",
    "name": "string"
  },
  "acknowledgedMatches": false,
  "contact": {
    "firstName": "string",
    "id": "string",
    "lastName": "string",
    "mode": "new"
  },
  "opportunity": {
    "amount": "string",
    "closeDate": "2019-08-24",
    "create": false,
    "name": "string",
    "stage": "01-商談見極め"
  }
}
```

**Responses**

- `201` — The records the conversion wrote
- `400` — The request body, query or parameters were refused
- `401` — The access token is missing, invalid or revoked
- `403` — The tenant's module is off, or the token's scope or the member's role does not permit the action
- `404` — No such record, or none the caller may read
- `409` — The operation conflicts with the current state
- `413` — The request exceeds the route's body limit
- `500` — An unexpected failure

Response example, 201:

```json
{
  "accountId": "string",
  "contactId": "string",
  "opportunityId": "string",
  "unmapped": [
    "string"
  ]
}
```
