{
  "openapi" : "3.1.0",
  "info" : {
    "title" : "doola Partner API",
    "description" : "REST API for doola partners to create and manage customers and companies, retrieve formation documents, and look up reference data.\n\nAuthenticate every request with a partner API key in the `Authorization` header. Generate keys and manage webhooks and event subscriptions in the doola Partner Portal.",
    "contact" : {
      "name" : "doola",
      "url" : "https://www.doola.com"
    },
    "version" : "v1"
  },
  "servers" : [ {
    "url" : "https://api.test.doola.com",
    "description" : "Sandbox — use test keys (dk_test_…)"
  }, {
    "url" : "https://api.doola.com",
    "description" : "Production — use live keys (dk_live_…)"
  } ],
  "security" : [ {
    "PartnerApiKey" : [ ]
  } ],
  "tags" : [ {
    "name" : "Playground (sandbox only)",
    "description" : "Sandbox-only helpers to drive a test company through the Formation and EinCreation milestones end to end."
  }, {
    "name" : "Required Actions",
    "description" : "Actions doola needs you to take on a company, such as supplying new name options after a state rejection."
  }, {
    "name" : "Customers",
    "description" : "Create and look up customers under your partner tenant."
  }, {
    "name" : "Documents",
    "description" : "List and download a company's formation documents."
  }, {
    "name" : "Compliance",
    "description" : "Track a company's compliance obligations and their due dates."
  }, {
    "name" : "Signatures",
    "description" : "Request embedded signing sessions for pending company documents."
  }, {
    "name" : "Companies",
    "description" : "Create companies for your customers, then track formation status."
  }, {
    "name" : "Reference data",
    "description" : "Static lookups for building company-creation requests: NAICS codes, states, countries, and state filing fees."
  } ],
  "paths" : {
    "/v1/partner/playground/companies/{companyId}/formation/complete" : {
      "post" : {
        "tags" : [ "Playground (sandbox only)" ],
        "summary" : "Complete Formation (sandbox)",
        "description" : "Simulates the State confirming formation: records the filing date, adds a test admin note, and uploads the Articles of Organization. Fires `company_formation_completed` and `document_aoo_uploaded`, and advances the Formation service to Completed. Processing the Articles also generates the entity type's governance document shortly after — Corporate Bylaws for a CCorp (firing `document_corporatebylaws_uploaded`) or the Operating Agreement for an LLC (firing `document_operatingagreement_uploaded`) — as in production. Sandbox only.",
        "operationId" : "completeFormation",
        "parameters" : [ {
          "name" : "companyId",
          "in" : "path",
          "description" : "doola company ID (KSUID).",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Milestone completed. The listed webhook events fire asynchronously through the normal delivery pipeline.",
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PlaygroundActionResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "E_COMPANY_NOT_FOUND: no company with this ID for the authenticated partner."
          }
        }
      }
    },
    "/v1/partner/playground/companies/{companyId}/eincreation/complete" : {
      "post" : {
        "tags" : [ "Playground (sandbox only)" ],
        "summary" : "Complete EIN creation (sandbox)",
        "description" : "Simulates the IRS issuing the EIN: sets the company's EIN and uploads the EIN letter. Fires `company_ein_issued` (first issuance only) and `document_einletter_uploaded`, and advances the EinCreation service to Completed. `triggeredEvents` reflects what this call actually fired, so a repeat call lists only `document_einletter_uploaded`. Sandbox only.",
        "operationId" : "completeEinCreation",
        "parameters" : [ {
          "name" : "companyId",
          "in" : "path",
          "description" : "doola company ID (KSUID).",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Milestone completed. The listed webhook events fire asynchronously through the normal delivery pipeline.",
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PlaygroundActionResponse"
                }
              }
            }
          },
          "404" : {
            "description" : "E_COMPANY_NOT_FOUND: no company with this ID for the authenticated partner."
          }
        }
      }
    },
    "/v1/partner/customers" : {
      "get" : {
        "tags" : [ "Customers" ],
        "summary" : "List customers",
        "description" : "Lists customers for the authenticated partner tenant. Supports free-text search and pagination (page size capped at 100).",
        "operationId" : "listCustomers",
        "parameters" : [ {
          "name" : "q",
          "in" : "query",
          "description" : "Free-text search over name and email.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "page",
          "in" : "query",
          "description" : "Zero-based page index.",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 0,
            "minimum" : 0
          }
        }, {
          "name" : "size",
          "in" : "query",
          "description" : "Page size (max 100).",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 20,
            "minimum" : 1
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PartnerSearchPagePartnerCustomerListItemDto"
                }
              }
            }
          }
        }
      },
      "post" : {
        "tags" : [ "Customers" ],
        "summary" : "Create a customer",
        "description" : "Creates a customer under the authenticated partner tenant. Returns `201 Created` for a new customer, or `200 OK` when a customer with the same email already exists and is returned instead of duplicated (`created: false`). Idempotent on the `Idempotency-Key` header: replaying the same key returns the original result — the same response and status as the first call — never a duplicate. If a create fails before it commits, the key is released; fix the request and retry with the same key.",
        "operationId" : "createCustomer",
        "parameters" : [ {
          "name" : "Idempotency-Key",
          "in" : "header",
          "description" : "Unique key that makes the create safe to retry. Reuse the same value to retry; if the create fails before committing, the key is released, so retry with the same value.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateCustomerRequestDto"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PartnerCustomerResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/companies" : {
      "get" : {
        "tags" : [ "Companies" ],
        "summary" : "List companies",
        "description" : "Lists companies for the authenticated partner tenant. Supports free-text search, filtering by customer, and pagination (page size capped at 100).",
        "operationId" : "listCompanies",
        "parameters" : [ {
          "name" : "q",
          "in" : "query",
          "description" : "Free-text search over company name.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "customerId",
          "in" : "query",
          "description" : "Filter to companies owned by this doola customer ID.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "page",
          "in" : "query",
          "description" : "Zero-based page index.",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 0,
            "minimum" : 0
          }
        }, {
          "name" : "size",
          "in" : "query",
          "description" : "Page size (max 100).",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 20,
            "minimum" : 1
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PartnerSearchPagePartnerCompanyListItemDto"
                }
              }
            }
          }
        }
      },
      "post" : {
        "tags" : [ "Companies" ],
        "summary" : "Create a company",
        "description" : "Starts a company formation for one of your customers. Set `entityType` to `LLC` (the default) or `CCorp`: an LLC takes `members`, while a CCorp takes `executiveMembers` and `ccorpValuation`. Idempotent on the `Idempotency-Key` header: a successful create is replayed for the same key, so retries never start a duplicate formation. If a create fails before it commits, the key is released — fix the request and retry with the same key.",
        "operationId" : "createCompany",
        "parameters" : [ {
          "name" : "Idempotency-Key",
          "in" : "header",
          "description" : "Unique key that makes the create safe to retry. Reuse the same value to retry; if the create fails before committing, the key is released, so retry with the same value.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateCompanyRequest"
              },
              "examples" : {
                "LLC formation" : {
                  "description" : "LLC formation",
                  "value" : {
                    "doolaCustomerId" : "3GS8Guk4H6BiP8tgfNVIQDFvKQ9",
                    "entityType" : "LLC",
                    "state" : "WY",
                    "nameOptions" : [ {
                      "name" : "Acme Labs",
                      "entityTypeEnding" : "LLC"
                    } ],
                    "industry" : "Custom Computer Programming Services",
                    "description" : "Custom software development for small businesses.",
                    "responsibleParty" : {
                      "legalFirstName" : "Ada",
                      "legalLastName" : "Lovelace",
                      "email" : "ada@example.com",
                      "ssn" : "123-45-6789",
                      "address" : {
                        "line1" : "251 W 30th St",
                        "line2" : "Ste 12E",
                        "city" : "New York",
                        "state" : "NY",
                        "postalCode" : "10001",
                        "country" : "USA",
                        "phone" : "+12125550100"
                      }
                    },
                    "addresses" : [ {
                      "provider" : "customer",
                      "type" : "mailing",
                      "address" : {
                        "line1" : "251 W 30th St",
                        "city" : "New York",
                        "state" : "NY",
                        "postalCode" : "10001",
                        "country" : "USA"
                      }
                    }, {
                      "provider" : "registeredAgent",
                      "type" : "business"
                    } ],
                    "members" : [ {
                      "isNaturalPerson" : true,
                      "legalFirstName" : "Ada",
                      "legalLastName" : "Lovelace",
                      "ownershipPercent" : 100,
                      "address" : {
                        "line1" : "251 W 30th St",
                        "city" : "New York",
                        "state" : "NY",
                        "postalCode" : "10001",
                        "country" : "USA",
                        "phone" : "+12125550100"
                      }
                    } ]
                  }
                },
                "CCorp formation" : {
                  "description" : "CCorp formation",
                  "value" : {
                    "doolaCustomerId" : "3GS9gyeBDENq7kvAv818oPITfyh",
                    "entityType" : "CCorp",
                    "state" : "DE",
                    "nameOptions" : [ {
                      "name" : "Acme Robotics",
                      "entityTypeEnding" : "Inc."
                    } ],
                    "industry" : "Custom Computer Programming Services",
                    "description" : "Robotics hardware and software.",
                    "responsibleParty" : {
                      "legalFirstName" : "Ada",
                      "legalLastName" : "Lovelace",
                      "email" : "ada@example.com",
                      "ssn" : "123-45-6789",
                      "address" : {
                        "line1" : "251 W 30th St",
                        "line2" : "Ste 12E",
                        "city" : "New York",
                        "state" : "NY",
                        "postalCode" : "10001",
                        "country" : "USA",
                        "phone" : "+12125550100"
                      }
                    },
                    "addresses" : [ {
                      "provider" : "customer",
                      "type" : "mailing",
                      "address" : {
                        "line1" : "251 W 30th St",
                        "city" : "New York",
                        "state" : "NY",
                        "postalCode" : "10001",
                        "country" : "USA"
                      }
                    }, {
                      "provider" : "customer",
                      "type" : "business",
                      "address" : {
                        "line1" : "251 W 30th St",
                        "city" : "New York",
                        "state" : "NY",
                        "postalCode" : "10001",
                        "country" : "USA"
                      }
                    } ],
                    "executiveMembers" : [ {
                      "type" : "President",
                      "legalFirstName" : "Ada",
                      "legalLastName" : "Lovelace",
                      "address" : {
                        "line1" : "251 W 30th St",
                        "city" : "New York",
                        "state" : "NY",
                        "postalCode" : "10001",
                        "country" : "USA",
                        "phone" : "+12125550100"
                      }
                    }, {
                      "type" : "Secretary",
                      "legalFirstName" : "Alan",
                      "legalLastName" : "Turing",
                      "address" : {
                        "line1" : "251 W 30th St",
                        "city" : "New York",
                        "state" : "NY",
                        "postalCode" : "10001",
                        "country" : "USA",
                        "phone" : "+12125550101"
                      }
                    }, {
                      "type" : "Treasurer",
                      "legalFirstName" : "Grace",
                      "legalLastName" : "Hopper",
                      "address" : {
                        "line1" : "251 W 30th St",
                        "city" : "New York",
                        "state" : "NY",
                        "postalCode" : "10001",
                        "country" : "USA",
                        "phone" : "+12125550102"
                      }
                    }, {
                      "type" : "Director",
                      "legalFirstName" : "Katherine",
                      "legalLastName" : "Johnson",
                      "address" : {
                        "line1" : "251 W 30th St",
                        "city" : "New York",
                        "state" : "NY",
                        "postalCode" : "10001",
                        "country" : "USA",
                        "phone" : "+12125550103"
                      }
                    } ],
                    "ccorpValuation" : {
                      "noOfShares" : 10000000,
                      "shareValue" : 1.0E-4
                    }
                  }
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "description" : "Created",
            "content" : {
              "application/json" : {
                "examples" : {
                  "LLC formation" : {
                    "description" : "LLC formation",
                    "value" : {
                      "doolaCompanyId" : "3GS9gsGmVOomgWbdvdkYe5S1We6",
                      "doolaCustomerId" : "3GS8Guk4H6BiP8tgfNVIQDFvKQ9",
                      "entityType" : "LLC",
                      "state" : "WY",
                      "nameOptions" : [ {
                        "id" : "3GS9gy7p6XeGwLNzpBfrywhHV8I",
                        "name" : "Acme Labs",
                        "entityTypeEnding" : "LLC",
                        "position" : 0
                      } ],
                      "naicsCode" : "541511",
                      "industry" : "Custom Computer Programming Services",
                      "description" : "Custom software development for small businesses.",
                      "responsibleParty" : {
                        "id" : "3GS9gz0xoo4muvao4StueQho0bz",
                        "legalFirstName" : "Ada",
                        "legalLastName" : "Lovelace",
                        "ssn" : "****-**-6789",
                        "email" : "ada@example.com",
                        "address" : {
                          "line1" : "251 W 30th St",
                          "line2" : "Ste 12E",
                          "city" : "New York",
                          "state" : "NY",
                          "postalCode" : "10001",
                          "country" : "USA",
                          "phone" : "+12125550100"
                        }
                      },
                      "addresses" : [ {
                        "provider" : "customer",
                        "type" : "mailing",
                        "address" : {
                          "line1" : "251 W 30th St",
                          "city" : "New York",
                          "state" : "NY",
                          "postalCode" : "10001",
                          "country" : "USA"
                        }
                      }, {
                        "provider" : "registeredAgent",
                        "type" : "business",
                        "address" : {
                          "line1" : "30 N Gould St STE R",
                          "city" : "Sheridan",
                          "state" : "WYOMING",
                          "postalCode" : "82801",
                          "country" : "USA"
                        }
                      } ],
                      "members" : [ {
                        "id" : "3GS9gudNgT6hrvovLep2tSO8PKR",
                        "legalFirstName" : "Ada",
                        "legalLastName" : "Lovelace",
                        "isNaturalPerson" : true,
                        "address" : {
                          "line1" : "251 W 30th St",
                          "city" : "New York",
                          "state" : "NY",
                          "postalCode" : "10001",
                          "country" : "USA",
                          "phone" : "+12125550100"
                        },
                        "ownershipPercent" : 100
                      } ],
                      "adminNotes" : [ ],
                      "formationSubmissionStatus" : "PENDING",
                      "services" : [ {
                        "name" : "Formation",
                        "variant" : "NONE",
                        "status" : "InProgress",
                        "subStatus" : "WaitingForRaToSucceed"
                      }, {
                        "name" : "EinCreation",
                        "variant" : "NONE",
                        "status" : "NotStarted",
                        "subStatus" : "WaitingForFilingServiceToComplete"
                      }, {
                        "name" : "RegisteredAgent",
                        "variant" : "NONE",
                        "status" : "NotStarted",
                        "subStatus" : "WaitingForFormation"
                      }, {
                        "name" : "AiCofounder",
                        "variant" : "NONE",
                        "status" : "Active"
                      } ],
                      "signatureRequirements" : [ ]
                    }
                  },
                  "CCorp formation" : {
                    "description" : "CCorp formation",
                    "value" : {
                      "doolaCompanyId" : "3GS9gtHAgQZSvCOGtOhPSgKEODv",
                      "doolaCustomerId" : "3GS9gyeBDENq7kvAv818oPITfyh",
                      "entityType" : "CCorp",
                      "state" : "DE",
                      "nameOptions" : [ {
                        "id" : "3GS9gsXtZ4eHUq6e8vmHwuPB7Uu",
                        "name" : "Acme Robotics",
                        "entityTypeEnding" : "Inc.",
                        "position" : 0
                      } ],
                      "naicsCode" : "541511",
                      "industry" : "Custom Computer Programming Services",
                      "description" : "Robotics hardware and software.",
                      "responsibleParty" : {
                        "id" : "3GS9iVV1n7PAXWH4zwbngRLAer3",
                        "legalFirstName" : "Ada",
                        "legalLastName" : "Lovelace",
                        "ssn" : "****-**-6789",
                        "email" : "ada@example.com",
                        "address" : {
                          "line1" : "251 W 30th St",
                          "line2" : "Ste 12E",
                          "city" : "New York",
                          "state" : "NY",
                          "postalCode" : "10001",
                          "country" : "USA",
                          "phone" : "+12125550100"
                        }
                      },
                      "addresses" : [ {
                        "provider" : "customer",
                        "type" : "mailing",
                        "address" : {
                          "line1" : "251 W 30th St",
                          "city" : "New York",
                          "state" : "NY",
                          "postalCode" : "10001",
                          "country" : "USA"
                        }
                      }, {
                        "provider" : "customer",
                        "type" : "business",
                        "address" : {
                          "line1" : "251 W 30th St",
                          "city" : "New York",
                          "state" : "NY",
                          "postalCode" : "10001",
                          "country" : "USA"
                        }
                      } ],
                      "adminNotes" : [ ],
                      "formationSubmissionStatus" : "PENDING",
                      "services" : [ {
                        "name" : "Formation",
                        "variant" : "NONE",
                        "status" : "InProgress",
                        "subStatus" : "WaitingForRaToSucceed"
                      }, {
                        "name" : "EinCreation",
                        "variant" : "NONE",
                        "status" : "NotStarted",
                        "subStatus" : "WaitingForFilingServiceToComplete"
                      }, {
                        "name" : "RegisteredAgent",
                        "variant" : "NONE",
                        "status" : "NotStarted",
                        "subStatus" : "WaitingForFormation"
                      }, {
                        "name" : "AiCofounder",
                        "variant" : "NONE",
                        "status" : "Active"
                      } ],
                      "executiveMembers" : [ {
                        "id" : "3GS9iW3OSCpInXx8cZSvzpJFqrL",
                        "type" : "President",
                        "legalFirstName" : "Ada",
                        "legalLastName" : "Lovelace",
                        "address" : {
                          "line1" : "251 W 30th St",
                          "city" : "New York",
                          "state" : "NY",
                          "postalCode" : "10001",
                          "country" : "USA",
                          "phone" : "+12125550100"
                        }
                      }, {
                        "id" : "3GS9iWDB03XVCuNQGKo9bBwYNZv",
                        "type" : "Secretary",
                        "legalFirstName" : "Alan",
                        "legalLastName" : "Turing",
                        "address" : {
                          "line1" : "251 W 30th St",
                          "city" : "New York",
                          "state" : "NY",
                          "postalCode" : "10001",
                          "country" : "USA",
                          "phone" : "+12125550101"
                        }
                      }, {
                        "id" : "3GS9iZBZXYwWEn93ACgEQmZ97VW",
                        "type" : "Treasurer",
                        "legalFirstName" : "Grace",
                        "legalLastName" : "Hopper",
                        "address" : {
                          "line1" : "251 W 30th St",
                          "city" : "New York",
                          "state" : "NY",
                          "postalCode" : "10001",
                          "country" : "USA",
                          "phone" : "+12125550102"
                        }
                      }, {
                        "id" : "3GS9iYoS7VuRpE3GHcdUTyvg3PV",
                        "type" : "Director",
                        "legalFirstName" : "Katherine",
                        "legalLastName" : "Johnson",
                        "address" : {
                          "line1" : "251 W 30th St",
                          "city" : "New York",
                          "state" : "NY",
                          "postalCode" : "10001",
                          "country" : "USA",
                          "phone" : "+12125550103"
                        }
                      } ],
                      "ccorpValuation" : {
                        "noOfShares" : 10000000,
                        "shareValue" : 1.0E-4
                      },
                      "signatureRequirements" : [ ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/companies/{companyId}/signatures" : {
      "post" : {
        "tags" : [ "Signatures" ],
        "summary" : "Create a signature session",
        "description" : "Generates an embedded signing URL for the specified document type. Always mints a fresh URL — prior unsigned sessions for the same document are voided afterwards on a best-effort basis. Returns 409 if the document has already been signed, or 422 if the company is not eligible (e.g., a member has an SSN or ITIN on file).",
        "operationId" : "createSignatureSession",
        "parameters" : [ {
          "name" : "companyId",
          "in" : "path",
          "description" : "doola company ID (KSUID).",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateSignatureSessionRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "description" : "Signature session created. Returns a fresh, whitelabeled signing URL that expires two hours after issuance.",
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/SignatureSessionDto"
                }
              }
            }
          },
          "400" : {
            "description" : "E_DOCUMENT_TYPE_NOT_SUPPORTED: the document type cannot be signed via this endpoint. Malformed bodies return E_VALIDATION_FAILED."
          },
          "404" : {
            "description" : "E_NOT_FOUND: no company with this ID for the authenticated partner."
          },
          "409" : {
            "description" : "E_DOCUMENT_ALREADY_SIGNED: the document has already been signed."
          },
          "422" : {
            "description" : "E_FORMATION_NOT_ELIGIBLE: the company is US-based (a member, executive member, or responsible party has an SSN or ITIN) and needs no SS-4 signature."
          }
        }
      }
    },
    "/v1/partner/companies/{companyId}/required-actions/{requiredActionId}/resolution" : {
      "post" : {
        "tags" : [ "Required Actions" ],
        "summary" : "Resolve a required action",
        "description" : "Submit what doola asked for. The action moves to `submitted` and doola takes it from there; you will receive further webhooks if anything else is needed. Actions resolved by another flow, such as an SS4 re-signature, are not accepted here.",
        "operationId" : "submitRequiredActionResolution",
        "parameters" : [ {
          "name" : "companyId",
          "in" : "path",
          "description" : "doola company ID (KSUID).",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "requiredActionId",
          "in" : "path",
          "description" : "Required action ID (KSUID).",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/SubmitRequiredActionResolutionRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PartnerRequiredActionDto"
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/required-actions" : {
      "get" : {
        "tags" : [ "Required Actions" ],
        "summary" : "List open required actions across your companies",
        "description" : "Every open required action across all of your companies, most recently changed first. Closed actions are excluded — use the per-company listing to reconcile those. `total` carries the tenant-wide open count whatever the page size. Histories are omitted; read a single action for those.",
        "operationId" : "listOpenRequiredActions",
        "parameters" : [ {
          "name" : "page",
          "in" : "query",
          "description" : "Zero-based page index.",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 0,
            "minimum" : 0
          }
        }, {
          "name" : "size",
          "in" : "query",
          "description" : "Page size (max 100).",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32",
            "default" : 20,
            "minimum" : 1
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PartnerSearchPagePartnerRequiredActionDto"
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/references/states" : {
      "get" : {
        "tags" : [ "Reference data" ],
        "summary" : "List states",
        "description" : "Returns supported US states with abbreviations.",
        "operationId" : "states",
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/StateCode"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/references/state-fees" : {
      "get" : {
        "tags" : [ "Reference data" ],
        "summary" : "List state filing fees",
        "description" : "Returns the formation filing fee per state, in cents, for the requested entity type (LLC or CCorp). Defaults to LLC when omitted.",
        "operationId" : "stateFees",
        "parameters" : [ {
          "name" : "entityType",
          "in" : "query",
          "description" : "Entity type to price filing fees for. One of LLC or CCorp; defaults to LLC when omitted.",
          "required" : false,
          "schema" : {
            "type" : "string",
            "default" : "LLC"
          },
          "example" : "LLC"
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/StateFee"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/references/naics-codes" : {
      "get" : {
        "tags" : [ "Reference data" ],
        "summary" : "List NAICS codes",
        "description" : "Returns the NAICS industry codes accepted by the create-company endpoint.",
        "operationId" : "naicsCodes",
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/NaicsCode"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/references/countries" : {
      "get" : {
        "tags" : [ "Reference data" ],
        "summary" : "List countries",
        "description" : "Returns supported countries with ISO codes.",
        "operationId" : "countries",
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/Country"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/customers/{customerId}" : {
      "get" : {
        "tags" : [ "Customers" ],
        "summary" : "Get a customer",
        "description" : "Returns a single customer by doola customer ID, including the companies that customer owns.",
        "operationId" : "getCustomerById",
        "parameters" : [ {
          "name" : "customerId",
          "in" : "path",
          "description" : "doola customer ID (KSUID).",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PartnerCustomerResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/companies/{doolaCompanyId}/documents" : {
      "get" : {
        "tags" : [ "Documents" ],
        "summary" : "List company documents",
        "description" : "Returns the documents available for a company (metadata only).",
        "operationId" : "listDocuments",
        "parameters" : [ {
          "name" : "doolaCompanyId",
          "in" : "path",
          "description" : "doola company ID (KSUID).",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/DocumentDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/companies/{doolaCompanyId}/documents/{documentId}" : {
      "get" : {
        "tags" : [ "Documents" ],
        "summary" : "Get a document download URL",
        "description" : "Returns document metadata plus a short-lived, pre-signed `downloadUrl` for the file.",
        "operationId" : "getDocument",
        "parameters" : [ {
          "name" : "doolaCompanyId",
          "in" : "path",
          "description" : "doola company ID (KSUID).",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "documentId",
          "in" : "path",
          "description" : "Document ID returned by the list endpoint.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DocumentDownloadUrlDto"
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/companies/{companyId}" : {
      "get" : {
        "tags" : [ "Companies" ],
        "summary" : "Get a company",
        "description" : "Returns a single company by doola company ID, including formation status, EIN (once issued), members, addresses, and services.",
        "operationId" : "getCompanyById",
        "parameters" : [ {
          "name" : "companyId",
          "in" : "path",
          "description" : "doola company ID (KSUID).",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PartnerCompanyResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/companies/{companyId}/required-actions" : {
      "get" : {
        "tags" : [ "Required Actions" ],
        "summary" : "List a company's required actions",
        "description" : "Every required action for the company, most recently changed first, including ones already resolved or rejected. Use this to reconcile after missing webhooks. Histories are omitted here; read a single action for those.",
        "operationId" : "listRequiredActions",
        "parameters" : [ {
          "name" : "companyId",
          "in" : "path",
          "description" : "doola company ID (KSUID).",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/PartnerRequiredActionDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/companies/{companyId}/required-actions/{requiredActionId}" : {
      "get" : {
        "tags" : [ "Required Actions" ],
        "summary" : "Retrieve a required action",
        "description" : "One required action with its full history, so you can see when it was raised, whether doola reached your endpoint, and how many rounds it has taken.",
        "operationId" : "getRequiredAction",
        "parameters" : [ {
          "name" : "companyId",
          "in" : "path",
          "description" : "doola company ID (KSUID).",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "requiredActionId",
          "in" : "path",
          "description" : "Required action ID (KSUID).",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PartnerRequiredActionDto"
                }
              }
            }
          }
        }
      }
    },
    "/v1/partner/companies/{companyId}/compliance/calendar" : {
      "get" : {
        "tags" : [ "Compliance" ],
        "summary" : "Get a company's compliance calendar",
        "description" : "Returns the company's compliance obligations. Today this is the single annual report, with its next due date and a derived status (UPCOMING, OVERDUE, NOT_YET_DUE, or UNSUPPORTED_STATE). Read-only — never triggers filing or recomputation. Returns 404 when the company does not exist or is not owned by the calling partner.",
        "operationId" : "getComplianceCalendar",
        "parameters" : [ {
          "name" : "companyId",
          "in" : "path",
          "description" : "doola company ID (KSUID).",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PartnerComplianceCalendarResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components" : {
    "schemas" : {
      "PlaygroundActionResponse" : {
        "type" : "object",
        "description" : "Acknowledges a playground milestone. Webhook delivery is asynchronous: triggeredEvents lists the events this call caused to fire, not a delivery confirmation.",
        "properties" : {
          "doolaCompanyId" : {
            "type" : "string",
            "description" : "doola company ID (KSUID)."
          },
          "service" : {
            "type" : "string",
            "description" : "The company service the milestone advanced.",
            "enum" : [ "Formation", "EinCreation" ],
            "example" : "Formation"
          },
          "triggeredEvents" : {
            "type" : "array",
            "description" : "Webhook events this call triggered. First-issuance-only events (company_ein_issued) appear only when they actually fired, so repeat calls omit them.",
            "example" : [ "company_formation_completed", "document_aoo_uploaded" ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "CreateCustomerRequestDto" : {
        "type" : "object",
        "description" : "Request body to create a customer under your partner tenant.",
        "properties" : {
          "email" : {
            "type" : "string",
            "description" : "Customer email address.",
            "example" : "founder@example.com",
            "minLength" : 1
          },
          "firstName" : {
            "type" : "string",
            "description" : "Customer legal first name.",
            "example" : "Ada",
            "minLength" : 1
          },
          "lastName" : {
            "type" : "string",
            "description" : "Customer legal last name.",
            "example" : "Lovelace",
            "minLength" : 1
          },
          "countryOfResidence" : {
            "type" : "string",
            "description" : "ISO 3166-1 alpha-3 country of residence (e.g. USA).",
            "example" : "USA",
            "minLength" : 1
          },
          "phoneNumber" : {
            "type" : "string",
            "description" : "Customer phone number in E.164 format. Optional.",
            "example" : "+12125550100"
          }
        },
        "required" : [ "countryOfResidence", "email", "firstName", "lastName" ]
      },
      "PartnerCompanyRef" : {
        "type" : "object",
        "description" : "A lightweight reference to a company, used inside a customer response.",
        "properties" : {
          "doolaCompanyId" : {
            "type" : "string",
            "description" : "doola company ID (KSUID)."
          },
          "name" : {
            "type" : "string",
            "description" : "Company name.",
            "example" : "Acme Labs LLC"
          },
          "entityType" : {
            "type" : "string",
            "description" : "Entity type.",
            "example" : "LLC"
          },
          "state" : {
            "type" : "string",
            "description" : "State of formation.",
            "example" : "DE"
          }
        }
      },
      "PartnerCustomerResponseDto" : {
        "type" : "object",
        "description" : "A partner customer.",
        "properties" : {
          "doolaCustomerId" : {
            "type" : "string",
            "description" : "doola customer ID (KSUID)."
          },
          "email" : {
            "type" : "string",
            "description" : "Customer email address.",
            "example" : "founder@example.com"
          },
          "firstName" : {
            "type" : "string",
            "example" : "Ada"
          },
          "lastName" : {
            "type" : "string",
            "example" : "Lovelace"
          },
          "countryOfResidence" : {
            "type" : "string",
            "description" : "ISO 3166-1 alpha-3 country of residence (e.g. USA).",
            "example" : "USA"
          },
          "phoneNumber" : {
            "type" : "string",
            "example" : "+12125550100"
          },
          "source" : {
            "type" : "string",
            "description" : "How the customer was created.",
            "enum" : [ "MCP", "PARTNER_API", "WHOP_APP", "DOOLA_DASHBOARDS" ]
          },
          "created" : {
            "type" : "boolean",
            "description" : "True if this request created the customer; false if it already existed."
          },
          "companies" : {
            "type" : "array",
            "description" : "Companies owned by this customer. Returned only on the get endpoint.",
            "items" : {
              "$ref" : "#/components/schemas/PartnerCompanyRef"
            }
          }
        }
      },
      "CreateCompanyRequest" : {
        "type" : "object",
        "description" : "Request body to create (form) a company for one of your customers.",
        "properties" : {
          "doolaCustomerId" : {
            "type" : "string",
            "description" : "doola customer ID (KSUID) that will own the company.",
            "minLength" : 1
          },
          "entityType" : {
            "type" : "string",
            "default" : "LLC",
            "description" : "Entity type to form. Defaults to LLC when omitted. An LLC takes `members`; a CCorp takes `executiveMembers` and `ccorpValuation`.",
            "enum" : [ "LLC", "CCorp" ],
            "example" : "LLC"
          },
          "state" : {
            "type" : "string",
            "description" : "US state of formation (two-letter abbreviation).",
            "example" : "DE"
          },
          "nameOptions" : {
            "type" : "array",
            "description" : "Candidate company names, in order of preference. One to three entries.",
            "items" : {
              "$ref" : "#/components/schemas/PartnerCompanyNameOptionDto"
            }
          },
          "industry" : {
            "type" : "string",
            "description" : "Unique NAICS industry label (the `industry` value from GET /v1/partner/references/naics-codes). Preferred over `naicsCode`: Provide either `industry` or `naicsCode`; when both are sent, `industry` wins.",
            "example" : "Custom Computer Programming Services"
          },
          "naicsCode" : {
            "type" : "string",
            "deprecated" : true,
            "description" : "NAICS industry code. DEPRECATED — use `industry` instead. When `industry` is also provided it takes precedence and this value is ignored; otherwise it must exist in the reference list. Supported through the 90-day deprecation window for backwards compatibility.",
            "example" : "541511"
          },
          "description" : {
            "type" : "string",
            "description" : "Short description of what the business does.",
            "example" : "Custom software development for small businesses.",
            "minLength" : 1
          },
          "responsibleParty" : {
            "$ref" : "#/components/schemas/PartnerResponsiblePartyDto",
            "description" : "The person legally responsible for the company."
          },
          "addresses" : {
            "type" : "array",
            "description" : "Company addresses. Exactly two entries are required: one `mailing` and one `business`. Each entry is either `customer`-provided or handed to doola's Registered Agent (see the `provider` field).",
            "items" : {
              "$ref" : "#/components/schemas/PartnerCompanyAddressDto"
            }
          },
          "members" : {
            "type" : "array",
            "description" : "Company members/owners. Required for an LLC (ownership percentages must total 100); omit for a CCorp.",
            "items" : {
              "$ref" : "#/components/schemas/PartnerCompanyMemberDto"
            }
          },
          "executiveMembers" : {
            "type" : "array",
            "description" : "C-Corp officers and directors. Required for a CCorp; omit for an LLC. Include at least one President, Secretary, Treasurer, and Director; the President, Secretary, and Treasurer may each appear only once.",
            "items" : {
              "$ref" : "#/components/schemas/PartnerCCorpExecMemberDto"
            }
          },
          "ccorpValuation" : {
            "$ref" : "#/components/schemas/PartnerCcorpValuationDto",
            "description" : "C-Corp share structure. Required for a CCorp; omit for an LLC."
          },
          "requestedServices" : {
            "type" : "array",
            "description" : "Optional per-service variant overrides. Today only the EIN service is configurable: include `{ \"service\": \"EinCreation\", \"variant\": \"Expedite\" }` to request the expedited EIN (requires a non-US applicant). Omit for standard processing.",
            "items" : {
              "$ref" : "#/components/schemas/RequestedServiceDto"
            }
          }
        },
        "required" : [ "addresses", "description", "doolaCustomerId", "nameOptions", "responsibleParty", "state" ]
      },
      "PartnerAddressDto" : {
        "type" : "object",
        "description" : "A postal address.",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Server-assigned ID.",
            "readOnly" : true
          },
          "line1" : {
            "type" : "string",
            "description" : "Street address line 1.",
            "example" : "251 W 30th St"
          },
          "line2" : {
            "type" : "string",
            "description" : "Street address line 2.",
            "example" : "Ste 12E"
          },
          "city" : {
            "type" : "string",
            "description" : "City.",
            "example" : "New York"
          },
          "state" : {
            "type" : "string",
            "description" : "State or province.",
            "example" : "NY"
          },
          "postalCode" : {
            "type" : "string",
            "description" : "Postal or ZIP code.",
            "example" : "10001"
          },
          "country" : {
            "type" : "string",
            "description" : "ISO 3166-1 alpha-3 country code (e.g. USA).",
            "example" : "USA"
          },
          "phone" : {
            "type" : "string",
            "description" : "Phone number in E.164 format. Required for a person's address (the responsible party, a member, or an executive member); optional for a company `mailing` or `business` address.",
            "example" : "+12125550100"
          }
        },
        "required" : [ "city", "country", "line1", "postalCode", "state" ]
      },
      "PartnerCCorpExecMemberDto" : {
        "type" : "object",
        "description" : "A C-Corp executive member — an officer or director.",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Server-assigned ID.",
            "readOnly" : true
          },
          "type" : {
            "type" : "string",
            "description" : "Executive role. The list must include at least one of each role; President, Secretary, and Treasurer may each appear only once, while Director may repeat.",
            "enum" : [ "President", "Secretary", "Treasurer", "Director" ],
            "example" : "President"
          },
          "legalFirstName" : {
            "type" : "string",
            "description" : "Legal first name.",
            "example" : "Ada"
          },
          "legalLastName" : {
            "type" : "string",
            "description" : "Legal last name.",
            "example" : "Lovelace"
          },
          "ssn" : {
            "type" : "string",
            "description" : "Social Security Number or ITIN. Optional. Format: XXX-XX-XXXX. Handled as sensitive data."
          },
          "address" : {
            "$ref" : "#/components/schemas/PartnerAddressDto",
            "description" : "Executive member's address."
          }
        },
        "required" : [ "address", "legalFirstName", "legalLastName", "type" ]
      },
      "PartnerCcorpValuationDto" : {
        "type" : "object",
        "description" : "C-Corp share structure.",
        "properties" : {
          "noOfShares" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "Number of authorized shares. Must be greater than 0.",
            "example" : 10000000
          },
          "shareValue" : {
            "type" : "number",
            "description" : "Par value per share, in USD. Must be greater than 0.",
            "example" : 1.0E-4
          }
        },
        "required" : [ "noOfShares", "shareValue" ]
      },
      "PartnerCompanyAddressDto" : {
        "type" : "object",
        "description" : "A company address of a given type.",
        "properties" : {
          "provider" : {
            "type" : "string",
            "description" : "Who provides this address. Use `customer` to supply the address yourself in the `address` field. Use `registeredAgent` to have doola fill in its Registered Agent address for the company's state; leave `address` out, as it is not used for a registered-agent entry.",
            "enum" : [ "customer", "registeredAgent" ],
            "example" : "registeredAgent"
          },
          "type" : {
            "type" : "string",
            "description" : "Which address this is. Send exactly one `mailing` entry and one `business` entry.",
            "enum" : [ "mailing", "business" ],
            "example" : "business"
          },
          "address" : {
            "$ref" : "#/components/schemas/PartnerAddressDto",
            "description" : "The address itself."
          }
        },
        "required" : [ "provider", "type" ]
      },
      "PartnerCompanyMemberDto" : {
        "type" : "object",
        "description" : "A company member/owner. Ownership across all members must total 100.",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Server-assigned ID.",
            "readOnly" : true
          },
          "legalFirstName" : {
            "type" : "string",
            "description" : "Legal first name (natural persons).",
            "example" : "Ada"
          },
          "legalLastName" : {
            "type" : "string",
            "description" : "Legal last name (natural persons).",
            "example" : "Lovelace"
          },
          "contactFullName" : {
            "type" : "string",
            "description" : "Full contact name (entities or where a single name is used).",
            "example" : "Acme Holdings LLC"
          },
          "isNaturalPerson" : {
            "type" : "boolean",
            "description" : "True if the member is a person, false if it is another entity.",
            "example" : true
          },
          "address" : {
            "$ref" : "#/components/schemas/PartnerAddressDto",
            "description" : "Member's address."
          },
          "ownershipPercent" : {
            "type" : "number",
            "description" : "Ownership percentage (0–100).",
            "example" : 100
          },
          "ssn" : {
            "type" : "string",
            "description" : "Social Security Number or ITIN. Optional. Format: XXX-XX-XXXX. Handled as sensitive data."
          }
        },
        "required" : [ "address", "isNaturalPerson", "ownershipPercent" ]
      },
      "PartnerCompanyNameOptionDto" : {
        "type" : "object",
        "description" : "A candidate company name.",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Server-assigned ID.",
            "readOnly" : true
          },
          "name" : {
            "type" : "string",
            "description" : "Proposed company name, without the entity ending.",
            "example" : "Acme Labs"
          },
          "entityTypeEnding" : {
            "type" : "string",
            "description" : "Entity-type ending appended to the name.",
            "example" : "LLC"
          },
          "position" : {
            "type" : "integer",
            "format" : "int32",
            "description" : "Preference order (1 = first choice).",
            "example" : 1
          }
        },
        "required" : [ "entityTypeEnding", "name" ]
      },
      "PartnerResponsiblePartyDto" : {
        "type" : "object",
        "description" : "The person legally responsible for the company (used for tax filings).",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Server-assigned ID.",
            "readOnly" : true
          },
          "legalFirstName" : {
            "type" : "string",
            "description" : "Legal first name.",
            "example" : "Ada"
          },
          "legalLastName" : {
            "type" : "string",
            "description" : "Legal last name.",
            "example" : "Lovelace"
          },
          "ssn" : {
            "type" : "string",
            "description" : "Social Security Number or ITIN. Optional. Format: XXX-XX-XXXX. Handled as sensitive data."
          },
          "email" : {
            "type" : "string",
            "description" : "Contact email.",
            "example" : "ada@example.com"
          },
          "address" : {
            "$ref" : "#/components/schemas/PartnerAddressDto",
            "description" : "Responsible party's address."
          }
        },
        "required" : [ "email", "legalFirstName", "legalLastName" ]
      },
      "RequestedServiceDto" : {
        "type" : "object",
        "description" : "Requests a specific variant for one of the company's services.",
        "properties" : {
          "service" : {
            "type" : "string",
            "description" : "Service to configure. Only `EinCreation` is supported today.",
            "enum" : [ "EinCreation" ],
            "example" : "EinCreation"
          },
          "variant" : {
            "type" : "string",
            "description" : "Variant for the service. `Expedite` requests the expedited EIN; `Standard` is the default and behaves the same as omitting the entry.",
            "enum" : [ "Standard", "Expedite" ],
            "example" : "Expedite"
          }
        }
      },
      "CreateSignatureSessionRequest" : {
        "type" : "object",
        "properties" : {
          "documentType" : {
            "type" : "string",
            "enum" : [ "SS4", "FORM8821" ]
          }
        },
        "required" : [ "documentType" ]
      },
      "SignatureSessionDto" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "url" : {
            "type" : "string"
          },
          "documentType" : {
            "type" : "string",
            "enum" : [ "SS4", "FORM8821" ]
          },
          "expiresAt" : {
            "type" : "string",
            "format" : "date-time"
          }
        }
      },
      "SubmitRequiredActionResolutionRequest" : {
        "type" : "object",
        "description" : "Resolution payload for a required action",
        "properties" : {
          "actionCode" : {
            "type" : "string",
            "description" : "The code of the required action being resolved",
            "enum" : [ "FORMATION_NAME_OPTIONS_EXHAUSTED" ],
            "example" : "FORMATION_NAME_OPTIONS_EXHAUSTED"
          },
          "nameOptions" : {
            "type" : "array",
            "description" : "Replacement company names, in preference order, one to three entries. Required when actionCode is FORMATION_NAME_OPTIONS_EXHAUSTED.",
            "items" : {
              "$ref" : "#/components/schemas/PartnerCompanyNameOptionDto"
            }
          }
        },
        "required" : [ "actionCode" ]
      },
      "JsonNode" : {
        "type" : "object",
        "properties" : {
          "empty" : {
            "type" : "boolean"
          },
          "array" : {
            "type" : "boolean"
          },
          "null" : {
            "type" : "boolean"
          },
          "object" : {
            "type" : "boolean"
          },
          "float" : {
            "type" : "boolean"
          },
          "container" : {
            "type" : "boolean"
          },
          "textual" : {
            "type" : "boolean",
            "deprecated" : true
          },
          "number" : {
            "type" : "boolean"
          },
          "nodeType" : {
            "type" : "string",
            "enum" : [ "ARRAY", "BINARY", "BOOLEAN", "MISSING", "NULL", "NUMBER", "OBJECT", "POJO", "STRING" ]
          },
          "string" : {
            "type" : "boolean"
          },
          "integralNumber" : {
            "type" : "boolean"
          },
          "missingNode" : {
            "type" : "boolean"
          },
          "valueNode" : {
            "type" : "boolean"
          },
          "pojo" : {
            "type" : "boolean"
          },
          "floatingPointNumber" : {
            "type" : "boolean"
          },
          "short" : {
            "type" : "boolean"
          },
          "int" : {
            "type" : "boolean"
          },
          "long" : {
            "type" : "boolean"
          },
          "double" : {
            "type" : "boolean"
          },
          "bigDecimal" : {
            "type" : "boolean"
          },
          "bigInteger" : {
            "type" : "boolean"
          },
          "boolean" : {
            "type" : "boolean"
          },
          "binary" : {
            "type" : "boolean"
          },
          "embeddedValue" : {
            "type" : "boolean"
          }
        }
      },
      "PartnerRequiredActionDto" : {
        "type" : "object",
        "description" : "An action doola needs you to take on a company",
        "properties" : {
          "requiredActionId" : {
            "type" : "string",
            "example" : "31pLdpvMh4OfO90moxLgLT8AuQr"
          },
          "doolaCompanyId" : {
            "type" : "string",
            "example" : "31pLD0Tq2lm2FsgRBoHv4x3BpzZ"
          },
          "actionCode" : {
            "type" : "string",
            "description" : "What is needed",
            "enum" : [ "FORMATION_NAME_OPTIONS_EXHAUSTED", "FORMATION_SIGNATURE_SS4_RESET" ],
            "example" : "FORMATION_NAME_OPTIONS_EXHAUSTED"
          },
          "actionName" : {
            "type" : "string",
            "description" : "Human-readable label for the action",
            "example" : "New company names needed"
          },
          "status" : {
            "type" : "string",
            "enum" : [ "created", "delivered", "delivery_failed", "submitted", "rejected", "resolved" ],
            "example" : "delivered"
          },
          "reason" : {
            "type" : "string",
            "description" : "Human-readable explanation you can surface to your user",
            "example" : "All submitted company name options were rejected by the state. Submit new options."
          },
          "open" : {
            "type" : "boolean"
          },
          "updatedAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "When this action last changed"
          },
          "history" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PartnerRequiredActionEventDto"
            }
          }
        }
      },
      "PartnerRequiredActionEventDto" : {
        "type" : "object",
        "description" : "A single step in a required action's history",
        "properties" : {
          "status" : {
            "type" : "string",
            "description" : "Status this step set",
            "enum" : [ "created", "delivered", "delivery_failed", "submitted", "rejected", "resolved" ],
            "example" : "delivered"
          },
          "submittedPayload" : {
            "$ref" : "#/components/schemas/JsonNode",
            "description" : "The resolution exactly as you submitted it. Present on submitted steps only; a historical record of that step, not the company's current state."
          },
          "createdAt" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "When this step happened"
          }
        }
      },
      "PartnerSearchPagePartnerRequiredActionDto" : {
        "type" : "object",
        "properties" : {
          "content" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PartnerRequiredActionDto"
            }
          },
          "page" : {
            "type" : "integer",
            "format" : "int32"
          },
          "size" : {
            "type" : "integer",
            "format" : "int32"
          },
          "total" : {
            "type" : "integer",
            "format" : "int64"
          },
          "totalPages" : {
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "StateCode" : {
        "type" : "object",
        "description" : "A US state.",
        "properties" : {
          "abbreviation" : {
            "type" : "string",
            "description" : "Two-letter state abbreviation.",
            "example" : "DE"
          },
          "name" : {
            "type" : "string",
            "description" : "State name.",
            "example" : "Delaware"
          }
        }
      },
      "StateFee" : {
        "type" : "object",
        "description" : "The state formation filing fee.",
        "properties" : {
          "state" : {
            "type" : "string",
            "description" : "Two-letter state abbreviation.",
            "example" : "DE"
          },
          "priceInCents" : {
            "type" : "integer",
            "format" : "int64",
            "description" : "Filing fee in US cents.",
            "example" : 9000
          }
        }
      },
      "NaicsCode" : {
        "type" : "object",
        "description" : "A NAICS industry classification code.",
        "properties" : {
          "naicsCodeId" : {
            "type" : "string",
            "description" : "Internal identifier for the NAICS entry."
          },
          "naicsCode" : {
            "type" : "string",
            "description" : "The NAICS code.",
            "example" : "541511"
          },
          "industry" : {
            "type" : "string",
            "description" : "Human-readable industry label.",
            "example" : "Custom Computer Programming Services"
          }
        }
      },
      "Country" : {
        "type" : "object",
        "description" : "A country.",
        "properties" : {
          "code" : {
            "type" : "string",
            "description" : "ISO 3166-1 alpha-3 country code (e.g. USA).",
            "example" : "USA"
          },
          "name" : {
            "type" : "string",
            "description" : "Country name.",
            "example" : "United States"
          }
        }
      },
      "PartnerCustomerListItemDto" : {
        "type" : "object",
        "description" : "A customer as it appears in a list response.",
        "properties" : {
          "doolaCustomerId" : {
            "type" : "string",
            "description" : "doola customer ID (KSUID)."
          },
          "email" : {
            "type" : "string",
            "example" : "founder@example.com"
          },
          "firstName" : {
            "type" : "string",
            "example" : "Ada"
          },
          "lastName" : {
            "type" : "string",
            "example" : "Lovelace"
          },
          "customerTenantId" : {
            "type" : "string",
            "description" : "Tenant the customer belongs to."
          }
        }
      },
      "PartnerSearchPagePartnerCustomerListItemDto" : {
        "type" : "object",
        "properties" : {
          "content" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PartnerCustomerListItemDto"
            }
          },
          "page" : {
            "type" : "integer",
            "format" : "int32"
          },
          "size" : {
            "type" : "integer",
            "format" : "int32"
          },
          "total" : {
            "type" : "integer",
            "format" : "int64"
          },
          "totalPages" : {
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "PartnerCompanyListItemDto" : {
        "type" : "object",
        "description" : "A company as it appears in a list response.",
        "properties" : {
          "doolaCompanyId" : {
            "type" : "string",
            "description" : "doola company ID (KSUID)."
          },
          "doolaCustomerId" : {
            "type" : "string",
            "description" : "Owning doola customer ID (KSUID)."
          },
          "name" : {
            "type" : "string",
            "description" : "Company name.",
            "example" : "Acme Labs LLC"
          },
          "state" : {
            "type" : "string",
            "description" : "State of formation.",
            "example" : "DE"
          },
          "formationSubmissionStatus" : {
            "type" : "string",
            "description" : "Formation submission status."
          }
        }
      },
      "PartnerSearchPagePartnerCompanyListItemDto" : {
        "type" : "object",
        "properties" : {
          "content" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PartnerCompanyListItemDto"
            }
          },
          "page" : {
            "type" : "integer",
            "format" : "int32"
          },
          "size" : {
            "type" : "integer",
            "format" : "int32"
          },
          "total" : {
            "type" : "integer",
            "format" : "int64"
          },
          "totalPages" : {
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "DocumentDto" : {
        "type" : "object",
        "description" : "Metadata for a company document.",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Document ID."
          },
          "companyId" : {
            "type" : "string",
            "description" : "doola company ID (KSUID) the document belongs to."
          },
          "name" : {
            "type" : "string",
            "description" : "File name.",
            "example" : "Articles-of-Organization.pdf"
          },
          "contentType" : {
            "type" : "string",
            "description" : "MIME content type.",
            "example" : "application/pdf"
          },
          "documentType" : {
            "type" : "string",
            "description" : "Document type. One of ArticlesOfOrganization, EinLetter, Mail.",
            "example" : "ArticlesOfOrganization"
          },
          "lastModified" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "Last modified timestamp (RFC 3339).",
            "example" : "2026-07-06T21:11:56Z"
          },
          "createdAt" : {
            "type" : [ "string", "null" ],
            "format" : "date-time",
            "description" : "Creation timestamp (RFC 3339). May be null for files whose source provides no creation time.",
            "example" : "2026-07-06T21:11:56Z"
          }
        }
      },
      "DocumentDownloadUrlDto" : {
        "type" : "object",
        "description" : "Document metadata plus a short-lived, pre-signed download URL.",
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Document ID."
          },
          "companyId" : {
            "type" : "string",
            "description" : "doola company ID (KSUID) the document belongs to."
          },
          "name" : {
            "type" : "string",
            "description" : "File name.",
            "example" : "Articles-of-Organization.pdf"
          },
          "contentType" : {
            "type" : "string",
            "description" : "MIME content type.",
            "example" : "application/pdf"
          },
          "documentType" : {
            "type" : "string",
            "description" : "Document type. One of ArticlesOfOrganization, EinLetter, Mail.",
            "example" : "ArticlesOfOrganization"
          },
          "lastModified" : {
            "type" : "string",
            "format" : "date-time",
            "description" : "Last modified timestamp (RFC 3339).",
            "example" : "2026-07-06T21:11:56Z"
          },
          "createdAt" : {
            "type" : [ "string", "null" ],
            "format" : "date-time",
            "description" : "Creation timestamp (RFC 3339). May be null for files whose source provides no creation time.",
            "example" : "2026-07-06T21:11:56Z"
          },
          "downloadUrl" : {
            "type" : "string",
            "description" : "Short-lived, pre-signed URL to download the file."
          }
        }
      },
      "PartnerAdminNoteDto" : {
        "type" : "object",
        "description" : "A note attached to a company.",
        "properties" : {
          "noteId" : {
            "type" : "string",
            "description" : "Note ID."
          },
          "note" : {
            "type" : "string",
            "description" : "Note body."
          },
          "status" : {
            "type" : "string",
            "description" : "Note status.",
            "enum" : [ "Unresolved", "Resolved", "Deleted" ]
          },
          "createdBy" : {
            "type" : "string",
            "description" : "Who created the note."
          }
        }
      },
      "PartnerCompanyResponse" : {
        "type" : "object",
        "description" : "A company, including formation progress and post-formation details.",
        "properties" : {
          "doolaCompanyId" : {
            "type" : "string",
            "description" : "doola company ID (KSUID)."
          },
          "doolaCustomerId" : {
            "type" : "string",
            "description" : "Owning doola customer ID (KSUID)."
          },
          "entityType" : {
            "type" : "string",
            "description" : "Entity type.",
            "enum" : [ "LLC", "CCorp" ],
            "example" : "LLC"
          },
          "state" : {
            "type" : "string",
            "description" : "State of formation.",
            "example" : "DE"
          },
          "nameOptions" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PartnerCompanyNameOptionDto"
            }
          },
          "naicsCode" : {
            "type" : "string",
            "example" : "541511"
          },
          "industry" : {
            "type" : "string",
            "description" : "Unique NAICS industry label the company was classified under.",
            "example" : "Custom Computer Programming Services"
          },
          "description" : {
            "type" : "string"
          },
          "responsibleParty" : {
            "$ref" : "#/components/schemas/PartnerResponsiblePartyDto"
          },
          "addresses" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PartnerCompanyAddressDto"
            }
          },
          "members" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PartnerCompanyMemberDto"
            }
          },
          "adminNotes" : {
            "type" : "array",
            "description" : "Internal notes visible to the partner.",
            "items" : {
              "$ref" : "#/components/schemas/PartnerAdminNoteDto"
            }
          },
          "formationSubmissionStatus" : {
            "type" : "string",
            "description" : "Tracks doola's intake of the formation request only, not whether the company is formed. PENDING: request received and being processed. SUBMITTED: accepted and formation started. FAILED: submission failed (see adminNotes). Never reports completion; track the Formation service in the services list, or the company_formation_completed webhook, for that.",
            "enum" : [ "PENDING", "SUBMITTED", "FAILED" ]
          },
          "ein" : {
            "type" : "string",
            "description" : "Employer Identification Number, once issued.",
            "example" : "99-1234567"
          },
          "formationFilingDate" : {
            "type" : "string",
            "format" : "date",
            "description" : "Date the formation was filed with the state, once filed."
          },
          "formationFilingNumber" : {
            "type" : [ "string", "null" ],
            "description" : "Filing number assigned by the state when the formation was filed, once filed.",
            "example" : "2024-001234567"
          },
          "services" : {
            "type" : "array",
            "description" : "Services attached to the company.",
            "items" : {
              "$ref" : "#/components/schemas/PartnerCompanyServiceDto"
            }
          },
          "executiveMembers" : {
            "type" : "array",
            "description" : "C-Corp officers and directors. Present for a CCorp.",
            "items" : {
              "$ref" : "#/components/schemas/PartnerCCorpExecMemberDto"
            }
          },
          "ccorpValuation" : {
            "$ref" : "#/components/schemas/PartnerCcorpValuationDto",
            "description" : "C-Corp share structure. Present for a CCorp."
          },
          "signatureRequirements" : {
            "type" : "array",
            "description" : "Signature steps required for this company, with their current status. A non-US founder — no member, executive member, or responsible party has an SSN or ITIN — has a single SS-4 requirement; a US founder has an empty list. The status is COMPLETED once the SS-4 has been signed, otherwise PENDING. Always present — an empty list means no signature is required, not that the field is absent.",
            "items" : {
              "$ref" : "#/components/schemas/PartnerSignatureRequirementDto"
            }
          }
        }
      },
      "PartnerCompanyServiceDto" : {
        "type" : "object",
        "description" : "A service attached to a company.",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "Service name.",
            "example" : "Registered Agent"
          },
          "variant" : {
            "type" : "string",
            "description" : "Service variant."
          },
          "status" : {
            "type" : "string",
            "description" : "Service status."
          },
          "subStatus" : {
            "type" : "string",
            "description" : "Service sub-status."
          }
        }
      },
      "PartnerSignatureRequirementDto" : {
        "type" : "object",
        "description" : "A signature step required for the company.",
        "properties" : {
          "documentType" : {
            "type" : "string",
            "description" : "Document the signature applies to.",
            "enum" : [ "SS4", "FORM8821" ],
            "example" : "SS4"
          },
          "status" : {
            "type" : "string",
            "description" : "Whether the signature step is still outstanding or fulfilled.",
            "enum" : [ "PENDING", "COMPLETED" ],
            "example" : "PENDING"
          }
        }
      },
      "PartnerComplianceCalendarResponse" : {
        "type" : "object",
        "description" : "A company's compliance calendar — its tracked obligations.",
        "properties" : {
          "events" : {
            "type" : "array",
            "description" : "Tracked compliance obligations. Always includes the annual-report event, even when the state is unsupported or the company is too new — the event's status carries the reason, so an empty list never has to be disambiguated.",
            "items" : {
              "$ref" : "#/components/schemas/PartnerComplianceEventDto"
            }
          }
        }
      },
      "PartnerComplianceEventDto" : {
        "type" : "object",
        "description" : "A compliance obligation with its next due date and derived status.",
        "properties" : {
          "type" : {
            "type" : "string",
            "description" : "Obligation type. Only the annual report is returned today.",
            "enum" : [ "ANNUAL_REPORT" ],
            "example" : "ANNUAL_REPORT"
          },
          "state" : {
            "type" : [ "string", "null" ],
            "description" : "US state the obligation applies to.",
            "example" : "CA"
          },
          "nextDueDate" : {
            "type" : [ "string", "null" ],
            "description" : "Next due date (yyyy-MM-dd). Null when there is no concrete date — UNSUPPORTED_STATE or NOT_YET_DUE.",
            "example" : "2026-11-30"
          },
          "lastFiledDate" : {
            "type" : [ "string", "null" ],
            "description" : "Date the obligation was last filed (yyyy-MM-dd), or null if never filed. Included so a rolled-forward due date is explainable.",
            "example" : "2025-11-15"
          },
          "status" : {
            "type" : "string",
            "description" : "Derived status. UPCOMING: a due date is set in the future. OVERDUE: the due date passed and it was not filed. NOT_YET_DUE: the company's formation filing is not yet complete. UNSUPPORTED_STATE: doola does not track an annual report for the company's state.",
            "enum" : [ "UPCOMING", "OVERDUE", "NOT_YET_DUE", "UNSUPPORTED_STATE" ],
            "example" : "UPCOMING"
          }
        }
      }
    },
    "securitySchemes" : {
      "PartnerApiKey" : {
        "type" : "apiKey",
        "description" : "Partner API key. Send the raw key as the `Authorization` header value — e.g. `dk_test_…` in sandbox or `dk_live_…` in production. Generate and rotate keys in the doola Partner Portal.",
        "name" : "Authorization",
        "in" : "header"
      }
    }
  }
}
