> ## Documentation Index
> Fetch the complete documentation index at: https://developers.securitize.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> SecId API: use the sandbox base URL https://partners-api.sandbox.securitize.io/investors/v1/onboarding-reliance unless the user explicitly provides production access. Authenticate with OAuth 2.0 client credentials: POST https://partners-api.sandbox.securitize.io/oauth2/token (form fields grant_type=client_credentials, client_id, client_secret, read from environment variables), cache the bearer token for its expires_in (7200 s) and send it as Authorization: Bearer on every call; never print or log the secret or the token.
> Nothing is verified until POST /investors/{investorId}/verification/submit. An individual: create, upload one identity document, submit. A company: create, add its people as key parties (at least one with isBeneficialOwner: true), upload their documents, submit.
> Branch on the HTTP status and the error `code`, never on `message`. A body without `code` comes from the gateway: on a 401 get a new token and send the request again; a 403 means the account is not enabled for this API.
> SecId API addresses: send address.state only when that address's countryCode is US, as the 2-letter state code (NY); omit it for any other country, also when the user has a province or region. Otherwise the call answers 400 validation_error on address.state.
> SecId API individuals in the US: taxId is the person's Social Security number, and it is checked against the name and residential address sent; send them as registered. A mismatch can move the investor to manual-review instead of verified. Sandbox does not run the check.
> Creates are safe to repeat with the same body: after a timeout or a 502, send the identical create again. Document uploads are not: each call stores a new document, so only re-send a document after a 502.
> Poll GET /investors/{investorId} about every 30 seconds, then back off; treat any status you do not recognise as not verified. In sandbox, the webhook investor.kyc.updated also announces every status change, and investor.suitability.updated / investor.dlt_test.updated every change of the suitability and DLT test verificationStatus: verify the signature, deduplicate on sourceEventId and confirm with the matching GET before acting. Token whitelisting is asynchronous too: poll GET /investors/{investorId}/wallets/whitelist until the status leaves processing.
> SecId API tax forms: POST /investors/{investorId}/tax-forms takes multipart/form-data (parts file, formType, signatureDate); never base64 or JSON. Let the HTTP client set content-type with the boundary. At any point of the verification, before or after the investor is verified, only for investors you created (201), one PDF up to 10 MB per call; each upload replaces the form on file, so after a 502 send the same request again. A W-9 can instead go as JSON fields to POST /investors/{investorId}/tax-forms/w9 (TIN as 9 digits, SSN or EIN): it does not replace a form on file (409 tax_form_already_active, details.activeTaxForm), and it requires a certification object (certifiedAt, signatureName, subjectToBackupWithholding false, isUSPerson true, certificationTextVersion w9-sm-2026-10): the investor certifies in your flow on the text published at /secid-api/tax-forms#the-certification, shown without changes; subjectToBackupWithholding true answers 422 business_rule_violation (details.reason backup_withholding_not_supported). Unlike creates, a repeat after success answers 409 tax_form_already_active, not 201: when details.activeTaxForm.formType is W-9, treat it as on file.
> Use synthetic test data in sandbox (@test.invalid emails, fresh ids each run). Never send more than one DLT test attempt per test investor unless the user asks: three failed attempts lock the test permanently.
> The complete contract, with every field, response and error, is the OpenAPI file of the API reference; the Errors page says what to do for each code.
> CET Underlying API: a WebSocket at wss://partners-rt-gw.sandbox.securitize.io/v1/market-maker/stream (TLS only; ws:// hangs with no answer). Sign hello, place_order, cancel_order and submit_crypto_funding with the user's Ed25519 key, read from an environment variable or secrets store; never print or log it. Sign timestamp + "." + type + "." + the exact payload string you send: serialise the payload once and embed that same string in the frame.
> CET Underlying API: send a unique requestId of at most 32 characters (a UUID without hyphens) on every message and match replies on it; frames without a requestId are pushes. Every amount is a decimal string, never a JSON number; compare amounts as decimals. Branch on the error code, never on message.
> CET Underlying API: an ack to place_order means taken, not filled. externalRef is the idempotency key; after an ack with status UNKNOWN or an UPSTREAM_UNAVAILABLE error, call get_order by externalRef before resending. Updates are delivered at most once: after any reconnect, read working orders back with get_order. Every order is placed by quantity. A buy must be a LIMIT order: quantity × limitPrice plus fees is held against your own available cash (get_cash_balance_v2), and a buy it does not cover, a MARKET buy or a notional order is refused (INVALID_ORDER). A sell must be placed by quantity, after its CETs reach the redemption wallet, or it is refused. mint_updated and burn_updated push mints and burns once they are on chain; after a gap, read them with get_mints and get_burns. The complete contract is the AsyncAPI file of the API reference.
> Stocks API (Beta): documented ahead of its release through the partner gateway; paths, fields and errors can change. Base URL https://partners-api.sandbox.securitize.io/stocks/v1. Send x-api-key on every call and investorId on every call about an investor. Read the key from an environment variable; never print or log it, and never call the API from frontend code.
> Stocks API: an investor can trade only once the SecId API shows them verified, with verified suitability (and a passed DLT test in the EEA), and once their wallet on the stock's chain is linked with their signature of the agreement message, signed verbatim. There is no whitelisting call: the first trade whitelists the wallet.
> Stocks API: orders are fill or kill. GET /stocks/realtime-price, prepare within about 20 seconds (signedPrice), have the investor's wallet sign the returned transaction unchanged and sign-only (never send it), then submit it once with POST /stocks/execute-signed-transaction within 120 seconds. Amounts are raw base units as strings; USDC has 6 decimals. The outcome is on chain: follow transactionHash.
> Stocks API: production access requires a UI audit by Securitize Compliance of the live screens: the disclosures and the market data shown, the NBBO included.
> Corporate Actions API (Beta, 0.x): in development and subject to change; paths, fields, enumerations and event names can change before 1.0.0. Base URL https://partners-api.sandbox.securitize.io/corporate-actions/v1. Get a bearer token with OAuth 2.0 client credentials at POST https://partners-api.sandbox.securitize.io/oauth2/token (no scope, 2 hours), cache it, and send Authorization: Bearer on every call. Read the client id, secret and the webhook signing secret from environment variables; never print or log them, and never call the API from frontend code.
> Corporate Actions API: webhooks arrive signed with the Standard Webhooks scheme under the svix-id, svix-timestamp and svix-signature headers (HMAC-SHA256 over id.timestamp.raw body, base64, v1 prefix; the secret is base64 after whsec_). Verify before parsing, reject a timestamp more than 5 minutes off, answer 2xx within 10 seconds. Delivery is at least once and can be out of order: deduplicate on sourceEventId, keep the highest version per object (objectId), order by sequence per stream.id, and replace the object with data (never merge).
> Corporate Actions API: treat an unknown caType, reasonCode, eventType or enum value as informational, never as an error. A restriction ends only with ca.restriction.removed; expectedEnd is informational. marketStatus UNAVAILABLE means do not trade; the reason field carries a restriction reasonCode or a market reason such as PRE_MARKET. GET /tokens?status= filters by marketStatus (OPEN, CLOSED, UNAVAILABLE), not by the token's ACTIVE status.
> Corporate Actions API: the event routes are at https://partners-api.sandbox.securitize.io/webhooks/v1 (not under /corporate-actions/v1) and cover every webhook family sent to the partner; filter with eventTypes=ca.* for corporate actions only. After an outage call POST /events/recover with since at the start of the outage (resends failed deliveries only), or page GET /events?since= (newest first, iterator paging, 90 days), then read state with GET /tokens/{tokenId}/status and GET /corporate-actions/{sourceCaId}. In sandbox, POST /sandbox/events with a scenario and one of your tokenIds publishes a scripted sequence at once; order the events by sequence, not by arrival.
> Investor Activity API: base URL https://partners-api.sandbox.securitize.io/v1. Authentication is OAuth 2.0 client credentials only (no API key): POST https://partners-api.sandbox.securitize.io/oauth2/token (no scope, 2 hours), cache the token, and send Authorization: Bearer on every call. The token identifies the investor account; there is no investor id to pass. Read the client id, secret and the webhook signing secret from environment variables; never print or log them, and never call the API from frontend code.
> Investor Activity API: every amount is an integer string in base units with a sibling decimals (human = amount / 10^decimals); parse with BigInt or a decimal type, never a float. Cash amounts (deposits, confirmations, payouts) are in the minor units of currencyId (1 = USD, decimals 2); token amounts (transactions, mintings, holdings) in the token's base units. Never add cash to tokens.
> Investor Activity API: reconcile a subscription by grouping GET /deposits?tokenId= on tokenIssuanceId and matching the transaction in GET /transactions?tokenId= with the same tokenIssuanceId (null on a deposit means not issued yet; null on a transaction means not an issuance). Each issuance has a deposit movement (cash in) and a liquidation movement (that cash applied to the tokens) for the same amount: count the cash once, by direction=deposit, never by adding every movement. Page with offset and limit (max 100) until offset + meta.length reaches meta.total; there is no tokenIssuanceId filter. Reconcile a redemption by txHash (transfer, investor.redemption.pending, payout sourceTransaction) and by the redemption's data.id across pending, confirmed, payout.initiated and payout.completed.
> Investor Activity API: webhooks arrive signed with the Standard Webhooks scheme under the svix-id, svix-timestamp and svix-signature headers (HMAC-SHA256 over id.timestamp.raw body, base64, v1 prefix; the secret is base64 after whsec_). Verify before parsing, reject a timestamp more than 5 minutes off, answer 2xx within 15 seconds. The body is {eventType, eventId, timestamp, data}: deduplicate on eventId (not svix-id), upsert by data.id, never move a record back to an earlier step, and treat an unknown eventType, processType or paymentMethod as informational. In webhooks a field with no value is absent; in endpoint answers it is null. After an outage page GET /webhook-events (newest first, iterator paging, optional eventType) back to the start of the outage.
> SecId hosted onboarding: instead of the API, a partner can send an investor to https://stocks.securitize.io/partners?tokenId=<stock token id>&partnerUrl=<return URL> (tokenAddress may replace tokenId; partnerUrl must be an absolute https URL, URL-encoded). Securitize runs identity verification, the investment profile and the wallet there. Nothing is appended to partnerUrl on return: check the wallet on chain before trading (Beta on Solana).

# Onboard a company

> Create a company, declare the people behind it, send their documents, submit, and read the verdict.

A company (an *entity*) is verified through its **key parties**: the people who own or control it, and optionally the companies that hold shares in it. You declare them, send their documents, and then submit. Nothing is verified until you submit.

```
1. POST /investors/entity                                          create the company        → investorId
2. POST /investors/{investorId}/key-parties/individual             each person behind it     → keyPartyId
   POST /investors/{investorId}/key-parties/entity                 each corporate shareholder (optional)
3. POST /investors/{investorId}/key-parties/{keyPartyId}/documents  their documents
4. POST /investors/{investorId}/verification/submit                start verification
5. GET  /investors/{investorId}                                    poll for the verdict
```

The examples use `$BASE` for `https://partners-api.sandbox.securitize.io/investors/v1/onboarding-reliance` and `$ACCESS_TOKEN` for a bearer token ([get one](https://developers.securitize.io/secid-api/sandbox-and-auth.md#get-a-token)). Replace the identifiers in them (`externalInvestorId`, `entityIdNumber`, `email`) with fresh values of your own: the examples already exist in sandbox.

## 1. Create the company

```bash theme={null}
curl -X POST "$BASE/investors/entity" -H "Authorization: Bearer $ACCESS_TOKEN" -H "content-type: application/json" -d '{
  "externalInvestorId": "acme-1001",
  "investorType": "entity",
  "entityName": "Northwind Test Holdings LLC",
  "entityType": "llc",
  "entityIdNumber": "47-3829104",
  "email": "ops.northwind@test.invalid",
  "phone": { "code": "1", "number": "5550000101" },
  "address": { "street": "1 Test Street", "city": "Wilmington", "state": "DE", "postalCode": "19801", "countryCode": "US" }
}'
```

Store the `investorId` from the response. Things that commonly go wrong:

* **`entityIdNumber` is required**, together with `address.countryCode`: they identify the company. Placeholders such as `000000000` or `N/A` are refused, with or without separators.
* **`email` is unique across all of Securitize**, not just your account, and cannot be changed after the create. Use the company's own contact address, not a shared one.
* **`address.state` is for US addresses only**, for the company and for each key party, judged on each address's own `countryCode`: the 2-letter state code (`DE`). Leave it out for any other country; otherwise the call answers `400 validation_error` on `address.state`.
* **Branch on the status code.** `201` is a new company. `200` means the company is already registered with Securitize and another party leads the verification: you get [limited access](https://developers.securitize.io/secid-api/identifiers.md#when-the-investor-already-exists) and cannot add key parties or documents.
* **Repeating the same create is safe.** If a create timed out or answered `502`, send exactly the same body again: you get `201` with the same `investorId`. The same `externalInvestorId` with different data answers `409 external_investor_id_conflict`, with the `investorId` in `details`.

## 2. Declare the people behind it

Add every person who owns or controls the company:

```bash theme={null}
curl -X POST "$BASE/investors/$INVESTOR_ID/key-parties/individual" -H "Authorization: Bearer $ACCESS_TOKEN" -H "content-type: application/json" -d '{
  "externalKeyPartyId": "acme-1001-owner-1",
  "isBeneficialOwner": true,
  "uboOwning": "25+",
  "firstName": "Jane",
  "lastName": "Doe",
  "dateOfBirth": "1984-02-11",
  "birthCountry": "US",
  "address": { "street": "11 Test Street", "city": "Wilmington", "state": "DE", "postalCode": "19801", "countryCode": "US" }
}'
```

> [!WARNING]
>
> **Declare at least one person as a beneficial owner** (`isBeneficialOwner: true`). If every person is a plain shareholder, the submit answers `200` with `status: incomplete` and the company `failed`, the people already sent are locked, and the company's status can read `processing` until you add a beneficial owner and submit again.

Corporate shareholders go to `POST …/key-parties/entity`. They are optional, but they never replace people: a company whose key parties are all companies cannot be submitted.

## 3. Send their documents

**Each person** needs one identity document:

| `type` | Files |
| - | - |
| `passport` | 1 file, `side: "front"` |
| `driving-licence`, `national-identity-card`, `residence-permit` | 2 files, `front` and `back` |

Identity files are JPEG or PNG. Each file can be at most 10 MB as base64 JSON, or 20 MB as `multipart/form-data` (`front` and `back` parts; see [Two ways to send the files](https://developers.securitize.io/secid-api/documents.md#two-ways-to-send-the-files)); a larger one is refused with `413`. The file must be a real, legible image: it is read optically, so a truncated or corrupt file answers `422 document_rejected`.

**Each corporate shareholder** needs the company documents its `entityType` requires (one file per call, PDF allowed):

| Corporate shareholder `entityType` | Documents required |
| - | - |
| `corporation`, `other` | `shareholders-list-25-percent-ubo-control` |
| `llc` | `members-and-authorised-signers-list`, `shareholders-list-25-percent-ubo-control` |
| `limited-partnership/general-partnership` | `partnership-agreement`, `register-of-partners`, `list-of-officers-and-directors`, `org-chart` |
| `revocable-trust`, `irrevocable-trust` | `trust-agreement` |
| `fund` | `offering-agreement` |
| `for-profit-foundation` | `certificate-of-registration`, `constitutional-document`, `shareholders-list-25-percent-ubo-control` |
| `non-profit-foundation` | none |

`GET /investors/{investorId}/key-parties` shows where every key party stands. A person reads `awaiting_submission` once its document is in. A corporate shareholder lists what it still lacks in `verification.missing` and reads `complete` when nothing is missing.

> [!TIP]
>
> Each upload stores a new document. If an upload answers `502 document_outcome_unknown`, sending it again is safe; the extra copy is harmless.

The company's own documents (`POST /investors/{investorId}/documents`) are optional. Securitize compliance can review them, but they never start or block verification.

## 4. Submit

```bash theme={null}
curl -X POST "$BASE/investors/$INVESTOR_ID/verification/submit" -H "Authorization: Bearer $ACCESS_TOKEN"
```

Submitting tells Securitize the set of key parties is complete. It is all-or-nothing: if any key party is missing documents, nothing is sent and the answer is `422 business_rule_violation`, with `details.keyParties` naming who is short.

A `200` does not always mean everything was sent. Read `status`:

* `submitted`: everything was handed over. Go to step 5.
* `incomplete`: part of it did not go through. Wait a few seconds and submit again; only what is outstanding is sent.

Submit is safe to repeat. Anything already under review comes back `skipped`.

## 5. Poll for the verdict

```bash theme={null}
curl "$BASE/investors/$INVESTOR_ID" -H "Authorization: Bearer $ACCESS_TOKEN"
```

Poll with the `investorId` until the status settles: every 30 seconds for the first few minutes, then every few minutes. A [KYC webhook](https://developers.securitize.io/secid-api/kyc-webhooks.md) tells you when the status changes. What each status means, the cadence for production and how to handle `manual-review` are in [Statuses](https://developers.securitize.io/secid-api/statuses.md).

**When `verified` arrives depends on your agreement with Securitize**: on submit, or after screening. An entity with corporate shareholders may stay `processing` until compliance has reviewed them.

## After you submit

Once the company or one of its people is under review, their details and documents are locked: corrections and uploads answer `409 verification_in_review`, and after the verdict `409 verification_already_settled`. Submitting again is always safe; it only re-sends what is outstanding. If Securitize needs anything more, it tells you.

Do not add key parties after you submit: they are accepted, but not verified. If the owners of a verified company change, contact Securitize.

If you lose an id along the way, see [Identifiers](https://developers.securitize.io/secid-api/identifiers.md#recovering-a-lost-id). For every error and what to do about it, see [Errors](https://developers.securitize.io/secid-api/errors.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.