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

# Send Code

> Send a one-time verification code to the provided email address for email-based OAuth login.

**Overview:**

This endpoint initiates the email login flow by sending a one-time PIN (OTP) to the account’s email address via Privy.

1. Provide a valid email address in the request body.
2. A one-time verification code will be sent to that email.
3. Use the received code with the [Login with OTP](/api-reference/oauth/login) endpoint to complete the authentication flow.



## OpenAPI

````yaml POST /oauth/code
openapi: 3.1.0
info:
  title: In•Process API
  description: >-
    The In•Process API enables browsing and managing moments from timelines.
    Retrieve moments from a specific artist's timeline, browse the in•process
    collective timeline, or filter by collection. The API supports creating
    moments, managing collections, handling payments, and interacting with the
    In•Process protocol ecosystem.
  version: 1.0.0
servers:
  - url: https://api.inprocess.world/api
    description: Production server
security: []
paths:
  /oauth/code:
    post:
      summary: Send Code
      description: >-
        Send a one-time verification code to the provided email address for
        email-based OAuth login.


        **Overview:**


        This endpoint initiates the email login flow by sending a one-time PIN
        (OTP) to the account’s email address via Privy.


        1. Provide a valid email address in the request body.

        2. A one-time verification code will be sent to that email.

        3. Use the received code with the [Login with
        OTP](/api-reference/oauth/login) endpoint to complete the authentication
        flow.
      operationId: sendCode
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendCodeRequest'
      responses:
        '200':
          description: Verification code sent successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendCodeResponse'
              example:
                success: true
        '400':
          description: Validation error - Invalid email address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Invalid request body
        '500':
          description: Server error - Failed to send verification code
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Failed to send code
      security: []
components:
  schemas:
    SendCodeRequest:
      type: object
      required:
        - email
      properties:
        email:
          type: string
          format: email
          description: The email address to send the one-time verification code to
          example: artist@example.com
    SendCodeResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Indicates whether the verification code was sent successfully
          example: true
    Error:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
          description: Error status
        message:
          type: string
          description: Error message
        errors:
          type: array
          description: >-
            Optional array of field-level validation errors. Typically included
            in 400 Bad Request responses for validation errors.
          items:
            type: object
            required:
              - field
              - message
            properties:
              field:
                type: string
                description: The field name that failed validation
              message:
                type: string
                description: The validation error message for this field

````