Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.commenda.io/llms.txt

Use this file to discover all available pages before exploring further.

This guide shows the recommended implementation sequence for a customer incorporation flow. Use Core concepts for the object model and the endpoint reference pages for exact request and response schemas.

Minimum happy path

  1. Create or find the customer record and save customerId.
  2. Read the jurisdiction catalog, choose country plus countryOptions, and fetch the requirements schema.
  3. Create the incorporation and save incorporation.id.
  4. Create or reuse required Commenda OS records, such as people, business entities, locations, and documents.
  5. Register participants and upsert required participant documents.
  6. Submit incorporation-level intake fields, then read validation until incorporationValidation.isComplete is true.
  7. Submit for review, then track status and active issues.

Detailed implementation sequence

PhaseDeveloper questionWhat to do
SetupWhat record owns the work?Create a customer and save customerId.
Jurisdiction catalogWhat can I incorporate?Read the jurisdiction catalog and choose country plus countryOptions.
RequirementsWhat data do I need?Fetch the requirements schema for the selected jurisdiction/type.
Progress setupHow will progress display?Fetch the status workflow for the selected incorporation type.
IncorporationHow do I start the incorporation?Create the incorporation and save incorporation.id.
Add customer recordsWhat reusable records must exist?Create or reuse Commenda OS people, business entities, and locations.
ParticipantsWho is involved?Register reusable people/entities as directors and shareholders.
DocumentsHow do I attach files?Follow Upload files for incorporation: upload customer files with multipart form data to obtain fileId, then upsert each file as a typed participant document.
IntakeWhat non-participant fields are needed?Submit partial or complete intake updates.
Submit for reviewHow do I hand it to Commenda?Read validation, call the submit endpoint when incorporationValidation.isComplete is true, then track GET /partner/incorporation/{incorporationId}/status.
IssuesWhat if Commenda needs corrections?Read active/resolved issues, update the underlying intake/participants/documents, and optionally receive issue webhooks. Active issues set top-level status to BLOCKED.

IDs you’ll save

IDReturned byUsed inNotes
customerIdPOST /partner/customers as customer.idCreate incorporation; Commenda OS customer-scoped endpointsNumeric customer id.
incorporation.idCreate/list/get incorporationParticipants, documents, intake, direct read routeUse this as {incorporationId}.
businessEntityIdCreate/list/get incorporationCommenda OS business-entity endpoints for the entity being incorporatedTarget business entity id for the entity being incorporated. For new Partner API incorporations, this is returned on create. It is different from corporate shareholder businessEntity.id values.
Person idPOST /partner/commenda-os/customers/{customerId}/personsParticipant resource.resourceIdSend as a number, for example 12.
Business entity idPOST /partner/commenda-os/customers/{customerId}/business-entitiesCorporate participant resource.resourceIdSend as a number, for example 44.
Participant idRegister participantUpdate participant roles; upsert participant documentsIncorporation-scoped participant id.
fileIdPOST /partner/commenda-os/customers/{customerId}/filesUpsert participant documentCustomer-scoped file id returned after multipart upload.
documentIdUpsert participant documentRead/list participant stateIncorporation-scoped typed document link.
statusWorkflow.stages[].idStatus workflow or incorporation statusProgress UI and issue-stage correlationStage ids come from the active workflow definition.
issue.idList issues or issue webhook payloadDedupe issue webhooks; correlate correction requestsOne issue row represents one remediation episode.
webhookSubscription.idCreate/list webhook subscriptionsRead or delete webhook subscriptionPartner-level subscription, not scoped to one customer.

Happy path: Singapore private limited company

This example uses one individual as both director and shareholder.
customerId = 77
personId = 12
incorporationId = 0f9a8f5e-7f7c-4c1b-a60a-b1022f9d8c91
participantId = participant_123
passportFileId = 456
utilityBillFileId = 789

1. Create the customer

curl --request POST \
  --url 'https://api.prod.commenda.io/api/v1/partner/customers' \
  --header 'content-type: application/json' \
  --header 'x-api-key: <partner_api_key>' \
  --data '{
    "email": "owner@example.com",
    "name": "Acme Singapore"
  }'
Save the returned customerId.

2. Choose jurisdiction and fetch requirements

curl --request GET \
  --url 'https://api.prod.commenda.io/api/v1/partner/incorporation/jurisdiction-catalog' \
  --header 'x-api-key: <partner_api_key>'
For Singapore private limited company requirements:
curl --request GET \
  --url 'https://api.prod.commenda.io/api/v1/partner/incorporation/requirements?country=SG&countryOptions[corporationType]=PRIVATE_LIMITED_COMPANY' \
  --header 'x-api-key: <partner_api_key>'
For the public progress stages:
curl --request GET \
  --url 'https://api.prod.commenda.io/api/v1/partner/incorporation/status-workflow?country=SG&countryOptions[corporationType]=PRIVATE_LIMITED_COMPANY' \
  --header 'x-api-key: <partner_api_key>'
Render your UI from the returned requirements schema, but treat the server response as informational. Commenda validates every intake update against the current server-side requirements.

3. Create the incorporation

curl --request POST \
  --url 'https://api.prod.commenda.io/api/v1/partner/incorporation/customers/77/incorporations' \
  --header 'content-type: application/json' \
  --header 'x-api-key: <partner_api_key>' \
  --data '{
    "country": "SG",
    "countryOptions": {
      "corporationType": "PRIVATE_LIMITED_COMPANY"
    }
  }'
Save incorporation.id. The initial incorporationStatus is usually AWAITING_CUSTOMER_INPUT.

4. Create or reuse a person

If the director/shareholder does not already exist in Commenda OS, create a reusable person:
curl --request POST \
  --url 'https://api.prod.commenda.io/api/v1/partner/commenda-os/customers/77/persons' \
  --header 'content-type: application/json' \
  --header 'x-api-key: <partner_api_key>' \
  --data '{
    "firstName": "Jane",
    "lastName": "Founder",
    "email": "jane@example.com",
    "dateOfBirth": "1990-04-18",
    "countryOfCitizenship": "SG"
  }'
Save the returned person id. When you register the participant, send it as a number in resource.resourceId.

5. Register participants and roles

For Singapore private limited companies, use this role/type matrix:
Participant scenarioparticipantTyperesource.resourceTypeSupported role payload
Individual directorINDIVIDUALKEY_PERSON{ "role": "DIRECTOR" }
Individual shareholderINDIVIDUALKEY_PERSON{ "role": "SHAREHOLDER", "ownershipPercentage": number }
Corporate shareholderCORPORATEBUSINESS_ENTITY{ "role": "SHAREHOLDER", "ownershipPercentage": number }
Corporate directorCORPORATEBUSINESS_ENTITYNot supported.
curl --request POST \
  --url 'https://api.prod.commenda.io/api/v1/partner/incorporation/0f9a8f5e-7f7c-4c1b-a60a-b1022f9d8c91/participants' \
  --header 'content-type: application/json' \
  --header 'x-api-key: <partner_api_key>' \
  --data '{
    "participantType": "INDIVIDUAL",
    "resource": {
      "resourceType": "KEY_PERSON",
      "resourceId": 12
    },
    "roles": [
      { "role": "DIRECTOR" },
      {
        "role": "SHAREHOLDER",
        "ownershipPercentage": 40
      }
    ]
  }'
For Singapore private limited companies, registered shareholder participant ownershipPercentage values must total 100. Participant writes that would make shareholder ownership exceed 100 are rejected; totals below 100 are accepted while the customer is still entering shareholders, but validation remains incomplete until the total equals 100. If the shareholder is a company, create or reuse a Commenda OS business entity first:
curl --request POST \
  --url 'https://api.prod.commenda.io/api/v1/partner/commenda-os/customers/77/business-entities' \
  --header 'content-type: application/json' \
  --header 'x-api-key: <partner_api_key>' \
  --data '{
    "incorporationCountry": "SG",
    "legalName": "Acme Holdings Pte. Ltd.",
    "jurisdiction": "JUR_SG__GENERAL",
    "corporationType": "PteLtd"
  }'
Then register it as a corporate shareholder:
curl --request POST \
  --url 'https://api.prod.commenda.io/api/v1/partner/incorporation/0f9a8f5e-7f7c-4c1b-a60a-b1022f9d8c91/participants' \
  --header 'content-type: application/json' \
  --header 'x-api-key: <partner_api_key>' \
  --data '{
    "participantType": "CORPORATE",
    "resource": {
      "resourceType": "BUSINESS_ENTITY",
      "resourceId": 44
    },
    "roles": [
      {
        "role": "SHAREHOLDER",
        "ownershipPercentage": 60
      }
    ]
  }'
To correct roles or ownership after registration, send the full desired roles array for that participant:
curl --request PATCH \
  --url 'https://api.prod.commenda.io/api/v1/partner/incorporation/0f9a8f5e-7f7c-4c1b-a60a-b1022f9d8c91/participants/participant_123' \
  --header 'content-type: application/json' \
  --header 'x-api-key: <partner_api_key>' \
  --data '{
    "roles": [
      { "role": "DIRECTOR" },
      {
        "role": "SHAREHOLDER",
        "ownershipPercentage": 40
      }
    ]
  }'

6. Upload and upsert documents

Upload each source document as multipart form data to create a reusable customer file. Upserting the participant document assigns that file to the participant document slot without changing the reusable file.
The multipart upload endpoint lives in the Commenda OS Partner API because files are reusable customer resources. For a shorter file-upload walkthrough, see Upload files for incorporation.
curl --request POST \
  --url 'https://api.prod.commenda.io/api/v1/partner/commenda-os/customers/77/files' \
  --header 'x-api-key: <partner_api_key>' \
  --form 'file=@./passport.pdf;type=application/pdf'

curl --request POST \
  --url 'https://api.prod.commenda.io/api/v1/partner/commenda-os/customers/77/files' \
  --header 'x-api-key: <partner_api_key>' \
  --form 'file=@./utility-bill.pdf;type=application/pdf'
Then upsert each file as a typed participant document:
curl --request PUT \
  --url 'https://api.prod.commenda.io/api/v1/partner/incorporation/0f9a8f5e-7f7c-4c1b-a60a-b1022f9d8c91/participants/participant_123/documents/PASSPORT_SCAN' \
  --header 'content-type: application/json' \
  --header 'x-api-key: <partner_api_key>' \
  --data '{
    "fileId": 456
  }'

curl --request PUT \
  --url 'https://api.prod.commenda.io/api/v1/partner/incorporation/0f9a8f5e-7f7c-4c1b-a60a-b1022f9d8c91/participants/participant_123/documents/UTILITY_BILL' \
  --header 'content-type: application/json' \
  --header 'x-api-key: <partner_api_key>' \
  --data '{
    "fileId": 789
  }'
For Singapore private limited companies, every individual director and individual shareholder needs both PASSPORT_SCAN and UTILITY_BILL.

7. Submit intake data

Intake updates are merge-based and may be partial. Use this endpoint for incorporation details such as company name options and registered office address choice.
curl --request PATCH \
  --url 'https://api.prod.commenda.io/api/v1/partner/incorporation/0f9a8f5e-7f7c-4c1b-a60a-b1022f9d8c91/intake' \
  --header 'content-type: application/json' \
  --header 'x-api-key: <partner_api_key>' \
  --data '{
    "requirements": {
      "companyNameOptions": [
        { "name": "Acme SG Pte. Ltd." },
        { "name": "Acme Asia Pte. Ltd." },
        { "name": "Acme Global Pte. Ltd." }
      ],
      "registeredOfficeAddressSource": "commendaService"
    }
  }'

8. Check readiness to submit

curl --request GET \
  --url 'https://api.prod.commenda.io/api/v1/partner/incorporation/0f9a8f5e-7f7c-4c1b-a60a-b1022f9d8c91/validation' \
  --header 'x-api-key: <partner_api_key>'
Check incorporationValidation.isComplete. When it is true, the incorporation is eligible to submit for Commenda review.

9. Submit for review

curl --request POST \
  --url 'https://api.prod.commenda.io/api/v1/partner/incorporation/0f9a8f5e-7f7c-4c1b-a60a-b1022f9d8c91/submit' \
  --header 'x-api-key: <partner_api_key>'
The submit endpoint refreshes validation before accepting the handoff. If the incorporation is incomplete, it returns 400 with validation details. If it succeeds, Commenda begins review. The response usually returns incorporationStatus: "IN_PROGRESS" once review starts.

10. Track status

curl --request GET \
  --url 'https://api.prod.commenda.io/api/v1/partner/incorporation/0f9a8f5e-7f7c-4c1b-a60a-b1022f9d8c91/status' \
  --header 'x-api-key: <partner_api_key>'
Use this response for customer-facing progress. It includes the top-level incorporationStatus, ordered stages, and active blockingIssueIds.

Requirements guide

Requirements areaWhat it meansHow to use it
blocksUI-friendly groups of fieldsRender fields by block if you want a guided UI.
fieldsIncorporation-level data, such as company names or registered office address choiceSubmit these keys under requirements in the intake endpoint.
required.when / appliesWhenRules that make a field required or applicable only when another field has a valueRe-evaluate the UI when the controlling field changes. Non-applicable fields are ignored by validation.
participantRequirementsRequired roles such as director or shareholderSatisfy these by registering participants, not by sending arrays in intake.
resourceFieldsByParticipantTypeRequired fields on a participant’s referenced Commenda OS resourceComplete these fields on the person or business entity before submitting.
documentRequirementsRequired typed documents for a participant role/typeSatisfy these by upserting customer files as participant documents.
Version fieldsRequirements version metadataStore these in logs for debugging. Do not send them back or gate UI behavior on exact values.
Validation issues use paths that point to the missing or invalid requirement.
Example pathMeaningFix
companyNames.companyNameOptionsCompany name options are missing or invalidSubmit valid names through the intake endpoint as requirements.companyNameOptions.
registeredOfficeAddress.registeredOfficeAddressLocationA partner-provided registered office address location is requiredSubmit a Commenda OS location reference as requirements.registeredOfficeAddressLocation or choose commendaService, which means Commenda should provide the registered office address service.
registeredOfficeAddress.registeredOfficeAddressLocation.resourceIdThe referenced registered office address location is missing or inaccessibleUse a Commenda OS location for the same customer record as the incorporation, create or update the location through the Commenda OS Partner API, or choose commendaService.
participants.directorsA required director participant is missingRegister a person or business entity as a director.
participants.participant_123.resource.lastNameA referenced participant resource is missing a required fieldUpdate the reusable Commenda OS person or business entity, then reread the incorporation validation.
participants.participant_123.resource.residentialAddressA Singapore individual director or shareholder is missing a residential addressUpdate the Commenda OS person with residentialAddress: { ... }.
participants.participant_123.documents.PASSPORT_SCANA participant is missing a passport scanUpload a customer file, then upsert it as PASSPORT_SCAN for that participant.
Fetch requirements after the user chooses a jurisdiction and corporation type. Render your UI from the requirements response, but decide readiness from validation returned by write/read calls because Commenda may update requirements over time.

Completion semantics

incorporationValidation.isComplete means the current data satisfies the incorporation requirements and is eligible to submit. It does not by itself hand the incorporation to Commenda.
AWAITING_CUSTOMER_INPUT
  -> SUBMITTED    after POST /partner/incorporation/{incorporationId}/submit succeeds and before Commenda review work starts
  -> IN_PROGRESS  when Commenda review is in progress
  -> BLOCKED      when there are active partner-visible issues or review start/runtime failures
  -> COMPLETED    when the incorporation is complete
Correction requests are represented by read-only issues and surface as BLOCKED while active.

Issues and correction requests

Commenda can create partner-visible issues when an incorporation needs correction or additional information.
curl --request GET \
  --url 'https://api.prod.commenda.io/api/v1/partner/incorporation/0f9a8f5e-7f7c-4c1b-a60a-b1022f9d8c91/issues?status=ACTIVE' \
  --header 'x-api-key: <partner_api_key>'
Issues are read-only over the Partner API. To resolve them, fix the underlying data through the normal endpoints: update intake fields, register or update participants, upload and upsert replacement documents, or otherwise provide the requested information. Commenda resolves the issue after review. Each issue row represents one remediation episode. Resolved incorporation issues are not reopened; if the same kind of correction is needed again later, Commenda creates a new issue with a new issue.id. Active issues are also returned by the status endpoint as blockingIssueIds. If an issue scope includes stageId, that issue is attached to the matching stage’s blockedByIssueIds; otherwise it blocks the first non-completed stage. Issue codes include MISSING_INFORMATION, INVALID_INFORMATION, DOCUMENT_REQUIRED, DOCUMENT_INVALID, COMPANY_NAME_REJECTED, and OTHER. Commenda may add additional issue codes in future API updates.

Issue webhooks

Subscribe to issue events if your integration should react without polling:
curl --request POST \
  --url 'https://api.prod.commenda.io/api/v1/partner/webhook-subscriptions' \
  --header 'content-type: application/json' \
  --header 'x-api-key: <partner_api_key>' \
  --data '{
    "url": "https://partner.example.com/commenda/webhooks",
    "eventTypes": [
      "INCORPORATION_ISSUE_CREATED",
      "INCORPORATION_ISSUE_RESOLVED"
    ]
  }'
The create response includes the full signing secret once. Later reads return only secretPreview. Webhook delivery is asynchronous and retried. Your endpoint should respond within 10 seconds and dedupe deliveries by eventId.

Common errors and fixes

SymptomLikely causeFix
400 on create incorporationUnsupported countryOptions or missing countryOptions[corporationType]Fetch the jurisdiction catalog and use an advertised option value.
403 on customer-scoped callThe customer is not accessible to the partner API keyCheck the customerId and API key.
404 when registering participantThe referenced person or business entity is not visible to the customerCreate or fetch the resource through Commenda OS first.
400 when registering or updating participantShareholder role is missing ownershipPercentage, role/resource type is unsupported, or ownership would exceed 100Follow the selected incorporation requirements and adjust existing shareholder roles before adding more ownership.
Incomplete validation for shareholdersOwnership percentages do not total 100Update shareholder participant roles so totals equal 100.
400 when uploading customer fileMissing file part, unsupported MIME type, or file too largeSend exactly one binary file part and a supported file type.
404 when upserting documentThe participant or file cannot be foundRegister the participant and upload the customer file first.
400 when upserting documentFile type is incompatible or the document kind is not required for this participantUse a required documentKind from the requirements response and a compatible customer file.
400 for intakeField value does not match the current incorporation requirementsRead invalidRequirements and update the field.
400 on submitThe current state is incompleteRead the returned validation details or call GET /partner/incorporation/{incorporationId}, then fix missing/invalid requirements before retrying submit.