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

# Sign up

> Creates the diner and sends them a login code. Then call [Log in](/connect/accounts-api/sign-in/log-in) with that code. The diner's account is created when they log in for the first time, and they join the merchant's point program then.




## OpenAPI

````yaml specs/accounts-v1.yaml POST /signup
openapi: 3.1.0
info:
  title: Atlas Accounts API
  version: 1.0.0
  description: ''
servers:
  - url: https://api.atlas.kitchen/accounts/v1
    description: Accounts API
security:
  - channelId: []
    sessionId: []
tags:
  - name: Introduction
    description: >
      The Accounts API lets a diner sign in on your storefront, then read and
      manage their own account with the merchant: profile, saved addresses, past
      orders, points and wallet promotions.


      It uses the same `X-Channel-Id` and `X-Session-Id` headers as the
      [Storefront API](/connect/storefront-api/authentication). Signing in
      attaches the diner to the session, so the Storefront API cart can use and
      earn their points.


      Everything here belongs to one merchant. The channel decides the merchant,
      and the merchant's point program for the channel's brand decides the
      points. The same diner can have different balances with different
      merchants.
  - name: Sign in
    description: Request a one-time code and sign the diner in.
  - name: Profile
    description: The signed-in diner's details.
  - name: Addresses
    description: Delivery addresses the signed-in diner has saved.
  - name: Orders
    description: The signed-in diner's past orders with this merchant.
  - name: Loyalty
    description: The signed-in diner's points and wallet promotions.
paths:
  /signup:
    post:
      tags:
        - Sign in
      summary: Sign up
      description: >
        Creates the diner and sends them a login code. Then call [Log
        in](/connect/accounts-api/sign-in/log-in) with that code. The diner's
        account is created when they log in for the first time, and they join
        the merchant's point program then.
      operationId: signUp
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - email
                - mobile_number
              properties:
                name:
                  type: string
                email:
                  type: string
                  format: email
                mobile_number:
                  type: string
                  description: International format.
                date_of_birth:
                  type: string
                  format: date
                title:
                  type: string
                  example: Ms
                marketing_consent:
                  type: boolean
                  description: Whether the diner agrees to marketing from this merchant.
                use_error_code:
                  type: boolean
                  description: >-
                    Set to `true` to get `EMAIL_TAKEN` or `MOBILE_NUMBER_TAKEN`
                    when the email or number already belongs to an account.
            example:
              name: Grace Tan
              email: grace.tan@example.com
              mobile_number: '+6581230045'
              marketing_consent: true
              use_error_code: true
      responses:
        '200':
          description: Diner created and code sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OtpRecipient'
              example:
                is_mobile_verified: false
                last_otp_delivery_mode: whatsapp
                masked_email: g********@e**********
                masked_mobile_number: '*******0045'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          description: >
            A field is missing or invalid, the email or number already belongs
            to an account (log the diner in instead), or the diner asked again
            within 30 seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                type: User Exists
                message: >-
                  An account with this email or mobile number already exists.
                  Log in instead.
                details:
                  - field: user
                    message: EMAIL_TAKEN
components:
  schemas:
    OtpRecipient:
      type: object
      description: Who the code went to, with the email and number masked.
      properties:
        is_mobile_verified:
          type: boolean
        last_otp_delivery_mode:
          type: string
          enum:
            - whatsapp
            - email
          description: How the code was sent. Tell the diner where to look.
        masked_email:
          type: string
        masked_mobile_number:
          type: string
    Error:
      type: object
      properties:
        type:
          type: string
          example: Invalid Parameter
        message:
          type: string
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
  responses:
    Unauthorized:
      description: Missing or invalid `X-Channel-Id` or `X-Session-Id`
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            type: Unauthorized
            message: >-
              You did not provide valid credentials for this request. Please
              check your request and try again.
            details:
              - field: session_id
                message: >-
                  Check if the session ID is set correctly in the X-Session-Id
                  header.
  securitySchemes:
    channelId:
      type: apiKey
      in: header
      name: X-Channel-Id
      description: Merchant storefront identifier. Provided during onboarding.
    sessionId:
      type: apiKey
      in: header
      name: X-Session-Id
      description: >-
        Diner session identifier from the Storefront API's `GET /channel`. Log
        in returns a new one.

````

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