Import SAFE
cap_table_import_safeImports a SAFE from an uploaded SAFE PDF and stores the document in S3. USE THIS (not RecordCapTableInvestment) whenever the user provides or uploads a SAFE PDF file. Flow: (1) call GetOcrUploadUrl with kind=SAFE and mime_type=application/pdf to get a presigned PUT URL + source_s3_uri, (2) upload the PDF bytes to that PUT URL, (3) call ImportSAFE with that source_s3_uri. This runs OCR to extract the terms; pass valuation_cap / investment_amount / discount_rate only to CORRECT a value the user says the OCR misread, and leave them empty to keep what the document says. Call ExtractSafeTerms first and get the user's confirmation before importing. effective_date is required — never import a SAFE without a date. If the company named on the document differs from this company, say both names and get the user's confirmation before importing. It copies the PDF to the canonical cap-table SAFE location, links it to a SAFE agreement, resolves the investor by name (matching an existing stakeholder or creating a new one), and creates the security. The security is marked signed only if the document is actually signed; an unsigned SAFE PDF is still stored and left committed. Whenever the user has the PDF — including when they attached it to this conversation — upload it and pass source_s3_uri so the document itself is stored; a SAFE created from typed terms alone has nothing on record proving its date or signature, and the cap table flags it as missing its document. Use RecordCapTableInvestment only for a SAFE the user genuinely has no document for. The response carries the cap table before this call, what it added, and the cap table after — report an import in exactly that order (current table, new additions, final table) and take the totals from the response rather than reading the cap table again. For several SAFEs at once, list every one you are about to add and get a yes before the first call, not after the last.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| preview | No | ||
| roundId | No | UUID value wrapper. | |
| companyId | Yes | UUID value wrapper. | |
| postMoney | No | ||
| documentId | No | UUID value wrapper. | |
| sourceS3Uri | No | ||
| discountRate | No | ||
| valuationCap | No | ||
| effectiveDate | No | ||
| stakeholderId | No | UUID value wrapper. | |
| consentToAiRead | No | ||
| investmentAmount | No | ||
| newStakeholderName | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| change | No | ||
| status | No | ||
| created | No | ||
| preview | No | ||
| securityId | No | UUID value wrapper. | |
| agreementId | No | UUID value wrapper. | |
| stakeholderId | No | UUID value wrapper. | |
| consentVersion | No | ||
| consentBodyMarkdown | No |