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

# Register a user

> Creates an end user and returns a token pair for them, so you can start
reading their data as soon as they connect a bank. The same pair can be
re-minted at any time via `POST /oauth/token` with
`grant_type=managed_user`.

The user has no Synci account and no password: send them to the connection
portal, where they sign in with a code emailed to this address.



## OpenAPI

````yaml /openapi/managed.json post /users
openapi: 3.1.0
info:
  title: Synci
  version: '1.0'
  description: >-
    Register and manage the end users your Managed app pays for. Authenticate
    with HTTP Basic using your app's client id and client secret. See the
    Managed apps guide for the full flow.
servers:
  - url: https://api.synci.io/managed/v1
security:
  - basicAuth: []
tags:
  - name: Managed Users
  - name: Managed Connections
  - name: Managed Webhooks
paths:
  /users:
    post:
      tags:
        - Managed Users
      summary: Register a user
      description: >-
        Creates an end user and returns a token pair for them, so you can start

        reading their data as soon as they connect a bank. The same pair can be

        re-minted at any time via `POST /oauth/token` with

        `grant_type=managed_user`.


        The user has no Synci account and no password: send them to the
        connection

        portal, where they sign in with a code emailed to this address.
      operationId: managed.users.store
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterManagedUserRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    RegisterManagedUserRequest:
      type: object
      properties:
        email:
          type: string
          format: email
          description: |-
            The end user's email address. Synci emails their sign-in codes here,
            so it must be an address they can read. Must not already belong to a
            Synci account.
          maxLength: 255
        external_user_id:
          type:
            - string
            - 'null'
          description: |-
            Your own identifier for this user, echoed back on every response so
            you can correlate without storing Synci ids. Unique within your app.
          maxLength: 255
        name:
          type:
            - string
            - 'null'
          description: Display name. Derived from the email address when omitted.
          maxLength: 255
        connection_limit:
          type:
            - integer
            - 'null'
          description: |-
            How many financial connections this user may create: bank,
            brokerage and crypto-exchange alike. Defaults to your
            app's limit.
          minimum: 0
          maximum: 20
      required:
        - email
      title: RegisterManagedUserRequest
  responses:
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    basicAuth:
      type: http
      description: |-
        **Username = your client id. Password = your client secret.**

        So the base64-encoded `username:password` described below is
        `client_id:client_secret`:

        ```
        Authorization: Basic base64(YOUR_CLIENT_ID:YOUR_CLIENT_SECRET)
        ```

        Most HTTP clients build that header for you:

        ```bash
        curl -u "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
             https://api.synci.io/managed/v1/users
        ```

        Both values come from **Developers → Apps → your app**. The
        secret is shown once at creation and is prefixed `oac_`.
      scheme: basic

````

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