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

# Sign up

> Let users create a Payt account from within your app via the sign_up endpoint.

Once the initial setup is completed your users should be able to start the sign up process from within your app. A request can be made to the [sign\_up endpoint](/api-reference/sign_up/sign-up-a-new-payt-account) containing user and administration details.

When the sign up request is valid, all objects will be created just as if the user went through a regular Payt sign up process. In addition a connection to your application will be set up if auto-connect has been enabled and the required connection credentials are provided in the request payload. Finally the new account will be connected to your Payt application, webhooks are activated and an `authorization_code` will be returned with which the first `access_token` can be created. This request must be completed before the `authorization_code` expires, which is after 10 minutes. The `access_token` is required if you want to query the created account through the API. You can also use it to query invoices and debtors from the API if the API module is enabled for the administration or if it has been enabled for your app.

Your users can now create a Payt account without leaving your app. They will receive an email from Payt with a link that brings them to a page where they can set their password and agree with the Payt terms and conditions. After this, they are logged in and can finalize setting up their account. The activation link the user receives in the email is also returned from the sign up endpoint so you can choose to present it to the user as the next step to take in the integration process.

If users do not confirm their Payt account we will send them a reminder via email. If, after 30 days, still no action has been taken then the account will automatically be deleted. Users can always, at a later moment, restart the sign up process.

```mermaid theme={null}
sequenceDiagram
    participant U as User
    participant P as Partner app
    participant Payt as Payt

    U->>P: Provide credentials
    P->>P: Login user
    U->>P: Initialise the creation of a Payt account
    P->>Payt: Send a sign_up request
    Payt->>Payt: Create account: Company with user and administration
    Payt->>Payt: Setup auto-connect if api credentials are provided
    Payt->>P: Return created account including an authorization_code
    P->>U: Receive feedback
    P->>P: Associate the current administration with the created Payt administration
    P->>Payt: Request the first access_token using the authorization_code
    Payt->>Payt: Create access_token
    Payt->>P: Save access_token
    Payt->>U: Send welcome email with "set your password" url
    U->>U: Click link in the email
    U->>Payt: Choose password and agree to Payt terms and conditions
    Payt->>Payt: Login user
    Payt->>Payt: Confirm account and send webhook if configured
    Payt->>P: Receive webhook event: company_updated
    Payt->>Payt: Start the first import if api credentials were provided
```
