# Submit one deal to many lenders

Writes one submission record and one cross-tenant share per named lender in a single transaction, then queues the workspace submission template with reviewed deal notes and documents by name. The subject and body come from the standard template; each share preserves its prepared message. Answers a line per lender: the records made, or why that lender was refused.

Access class: `def:read`.

## Endpoint

`POST /v1/definitions/{key}/rows/{rowId}/submissions/prepare-send`

## Parameters

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

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "body": "string",
    "documentIds": [
      "string"
    ],
    "dryRun": true,
    "lenders": [
      {
        "lenderId": "",
        "note": "string",
        "submissionRowId": ""
      }
    ],
    "merchantKey": "string",
    "merchantState": "string",
    "subject": "string",
    "templateId": 1
  },
  "params": {
    ":key": "string",
    ":rowId": ""
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "dealRowId": "",
    "documents": [
      "string"
    ],
    "dryRun": true,
    "prepared": 1,
    "refused": 1,
    "requested": 1,
    "results": [
      {
        "body": "string",
        "conversationId": "",
        "error": "string",
        "lenderId": "",
        "lenderName": "string",
        "messageId": "",
        "ok": "string",
        "shareId": "",
        "subject": "string",
        "submissionRowId": ""
      }
    ]
  }
}
```

### 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"
}
```
