# Draw up a deal's contract

Moves one deal's CONTRACT track by naming the action: create, review, send, sign, execute, expire, void or cancel. A contract is drawn against an ACCEPTED offer, and every later move must be legal from where the track stands — an illegal one is refused with a sentence naming the state it is in. Answers the track as it now reads. Deals page only.

Access class: `def:read`.

## Endpoint

`POST /v1/definitions/{key}/rows/{rowId}/contract`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| key | path | string | Yes |
| rowId | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "action": "string",
    "amount": 1.5,
    "documentUrl": "string",
    "offerRowId": "",
    "reason": "string",
    "recipientEmail": "string",
    "recipientName": "string",
    "signerEmail": "string",
    "signerName": "string",
    "signers": [
      "string"
    ]
  },
  "params": {
    ":key": "string",
    ":rowId": ""
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "history": [
      {
        "action": "string",
        "actorKind": "string",
        "actorUserId": "",
        "createdAt": "string",
        "detail": "string",
        "entityId": "",
        "entityKind": "string",
        "entityRowId": "",
        "entityUuid": "string",
        "id": "",
        "requestId": ""
      }
    ],
    "status": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
