# Create a credit memo

Opens a credit memo as a draft — the underwriting write-up on a deal. Body: `title` (required; the ledger refuses a blank one), `memoType` (`initial`, `renewal`, `modification`, `exception`), `facilityId`, `riskProfileId`, `previousMemoId` (the memo this one supersedes), the nine narrative panes as top-level fields (`executiveSummary`, `businessOverview`, `financialAnalysis`, `industryAnalysis`, `riskAssessment`, `collateralAnalysis`, `ownershipAnalysis`, `strengthsWeaknesses`, `recommendation`), `currency`, `requestedAmountMinor`, `recommendedAmountMinor`, `recommendedRate`, `recommendedTermMonths`, `recommendedProduct`, `recommendedDecision`, `recommendedConditions`, `attachmentIds`, `expiresAt`, `aiGenerated` and `generationModel`. It lands as a draft; sending it up for a decision is `post_credit-memos_id_submit`.

Access class: `workspace`.

## Endpoint

`POST /v1/credit-memos`

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "aiGenerated": true,
    "attachmentIds": [
      1
    ],
    "businessOverview": "string",
    "collateralAnalysis": "string",
    "currency": "string",
    "executiveSummary": "string",
    "expiresAt": "string",
    "facilityId": 1,
    "financialAnalysis": "string",
    "generationModel": "string",
    "industryAnalysis": "string",
    "memoType": "string",
    "ownershipAnalysis": "string",
    "previousMemoId": 1,
    "recommendation": "string",
    "recommendedAmountMinor": 1,
    "recommendedConditions": [
      "string"
    ],
    "recommendedDecision": "string",
    "recommendedProduct": "string",
    "recommendedRate": "string",
    "recommendedTermMonths": 1,
    "requestedAmountMinor": 1,
    "riskAssessment": "string",
    "riskProfileId": 1,
    "strengthsWeaknesses": "string",
    "title": "string"
  },
  "params": {},
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "aiGenerated": true,
    "approvalNotes": "string",
    "approvedAt": "string",
    "approverUserId": 1,
    "attachmentIds": [
      1
    ],
    "authorUserId": 1,
    "businessOverview": "string",
    "collateralAnalysis": "string",
    "createdAt": "string",
    "currency": "string",
    "dealRowId": "",
    "definitionId": "",
    "detail": {},
    "executiveSummary": "string",
    "expiresAt": "string",
    "facilityId": 1,
    "financialAnalysis": "string",
    "generationModel": "string",
    "id": 1,
    "industryAnalysis": "string",
    "memoType": "string",
    "ownershipAnalysis": "string",
    "previousMemoId": 1,
    "recommendation": "string",
    "recommendedAmountMinor": 1,
    "recommendedConditions": [
      "string"
    ],
    "recommendedDecision": "string",
    "recommendedProduct": "string",
    "recommendedRate": "string",
    "recommendedTermMonths": 1,
    "rejectionReason": "string",
    "requestedAmountMinor": 1,
    "reviewNotes": "string",
    "reviewedAt": "string",
    "reviewerUserId": 1,
    "riskAssessment": "string",
    "riskProfileId": 1,
    "status": "string",
    "strengthsWeaknesses": "string",
    "title": "string",
    "updatedAt": "string",
    "version": 1
  }
}
```

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