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

# API-Only Onboarding

> Onboarding users via API only

### The onboarding flow

In certain usecases it is not possible to guide the user through a web-based onboarding flow. For these use cases, you can use the API-only onboarding flow.
<Info>Your Account will require special permissions for this onboarding flow.</Info>

Onboading a company and its users entails the following steps:

<Steps>
  <Step title="Create a Company">
    Create a [Company](/api-docs/partner-api/entities#companies). In this step you MUST provide all input data that is relevant for your company. See the entities page for a description of required information.
    <Tip>To validate that you submitted all relevant information you can check the `data_submission_completed` flag on the company.</Tip>
  </Step>

  <Step title="Create users">
    Using the new [Company](/api-docs/partner-api/entities#companies) you can create the first [User](/api-docs/partner-api/entities#users). Again, you must provide all relevant data for the user.
    <Info>You have to create both the company as well as at least one user to start creating claim</Info>
  </Step>

  <Step title="Wait for user to confirm their Email">
    All newly created users will be issued an invitation email that serves both as a verification that the user actually owns this email address and as a means for the user to set a password for their new account.
    <Info>See [About Email Verification](/api-docs/partner-api/onboarding-api-only#about-email-verification).</Info>
  </Step>

  <Step title="Start handing over Claims">
    <Check>The client is onboarded successfully and you can start handing over data using the [Case Management API](/api-docs/case-management-api/)</Check>

    All Data in the Case Management API has to be managed by a user that is allowed to access this information. As such, you must provide information on the user performing the current request. To do so, add a custom Header `X-User-Id` to every request to the Case Management API alongside your Partner Token as the Authorization Header. The `X-User-Id` must contain the identifier of one of the users you created in the previous steps.
    <Info>Please Note that when making requests to the Case Management API, both the user and the company must be fully onboarded, i.e. the `data_submission_completed` flag on the company must be set to `true` and the `email_verified` flag must be set for the user.</Info>
  </Step>
</Steps>

### About Email Verification

When onboading a user you can decide whether they need to re-verify their email address with paywise. This is intended to further facilitate the onboarding process in cases where you already verified a user's address and want to sign them up immediately to begin handing over claims.
However, even if you choose to skip email verification, users will still receive an email prompting them to set an initial password for their paywise account.

#### Email Duplications

In rare cases, it might happen that you try to onboard a user that was already created, either through the API or by regular registration. In this case, the User API will respond with a 400 status code and you can prompt the user to choose a different email
<Info>If you want the existing account to be associated with the company you created, please contact our support</Info>
