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

# Create an OTP

> Generate a one time password (OTP) for your users



## OpenAPI

````yaml post /otps
openapi: 3.0.0
info:
  title: Flutterwave v3
  description: >-
    The Flutterwave for Business(F4B) APIs collection for all v3 endpoints with
    pre-formatted requests and response examples.
  contact: {}
  version: '1.0'
servers:
  - url: https://api.flutterwave.com/v3
    variables: {}
security:
  - bearer: []
tags:
  - name: Charges
    description: >-
      The charge APIs includes several payment collection methods to help you
      collect payments.
  - name: Tokenized Charges
    description: Tokenize your customers' cards with Flutterwave for faster payments
  - name: Preauthorization
    description: Manage preauth attemps on card transactions
  - name: Transactions
    description: Manage transactions, query statuses, logs and fees
  - name: Transfers
    description: Transfers to local and international customers
  - name: Beneficiaries
    description: Manage transfer beneficiaries
  - name: Virtual Cards
    description: Manage Flutterwave virtual cards
  - name: Virtual Account Numbers
    description: Manage virtual accounts
  - name: Collection Subaccounts
    description: Manage Collection Subaccounts
  - name: Payout Subaccounts
    description: Manage Payout Subaccounts
  - name: Subscriptions
    description: Manage user subscriptions
  - name: Payment Plans
    description: Manage Payment Plans
  - name: Bill Payments
    description: Manage Bill Payments
  - name: Banks
    description: Fetch Bank Information
  - name: Misc
    description: >-
      Verify user information like bank verification numbers, card bins, account
      information
  - name: Settlements
    description: Manage your settlements
  - name: Otps
    description: Create and manage one time passwords (OTPs) for your applications
  - name: Chargebacks
    description: Manage Chargebacks
paths:
  /otps:
    post:
      tags:
        - Otps
      summary: Create an OTP
      description: Generate a one time password (OTP) for your users
      operationId: CreateanOTP
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateanOTPRequest'
                - example:
                    length: 7
                    customer:
                      name: Example User
                      email: user@gmail.com
                      phone: '08130000000'
                    sender: Example Business
                    send: true
                    medium:
                      - email
                      - whatsapp
                    expiry: 5
            example:
              length: 7
              customer:
                name: Example User
                email: user@gmail.com
                phone: '08130000000'
              sender: Example Business
              send: true
              medium:
                - email
                - whatsapp
              expiry: 5
        required: true
      responses:
        '200':
          description: OK
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                  example: Mon, 18 Mar 2024 10:27:15 GMT
            Content-Length:
              content:
                text/plain:
                  schema:
                    type: string
                  example: '321'
            Connection:
              content:
                text/plain:
                  schema:
                    type: string
                  example: keep-alive
            Server:
              content:
                text/plain:
                  schema:
                    type: string
                  example: nginx/1.24.0
            Access-Control-Allow-Origin:
              content:
                text/plain:
                  schema:
                    type: string
                  example: '*'
            Access-Control-Allow-Headers:
              content:
                text/plain:
                  schema:
                    type: string
                  example: >-
                    Origin, X-Requested-With, Content-Type, Accept,
                    Authorization, v3-xapp-id, flw-auth-token, mra-auth-token,
                    alt_mode_auth, mid, altmodeauth, cc-admin-token, x-flw-lang
            Access-Control-Allow-Methods:
              content:
                text/plain:
                  schema:
                    type: string
                  example: PUT, POST, GET, DELETE, OPTIONS
            ETag:
              content:
                text/plain:
                  schema:
                    type: string
                  example: W/"141-thBeiajXyqzB7L+UU43Wtg"
            Strict-Transport-Security:
              content:
                text/plain:
                  schema:
                    type: string
                  example: max-age=31536000; includeSubDomains; preload; always;
          content:
            application/json; charset=utf-8:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SampleSuccessResponse37'
                  - example:
                      status: success
                      message: OTP generated successfully
                      data:
                        - medium: email
                          reference: CF-BARTER-20240318102713784653
                          otp: '5880211'
                          expiry: '2024-03-18T10:32:14.1232277+00:00'
                        - medium: whatsapp
                          reference: CF-BARTER-20240318102714764558
                          otp: '5880211'
                          expiry: '2024-03-18T10:32:14.7812808+00:00'
              example:
                status: success
                message: OTP generated successfully
                data:
                  - medium: email
                    reference: CF-BARTER-20240318102713784653
                    otp: '5880211'
                    expiry: '2024-03-18T10:32:14.1232277+00:00'
                  - medium: whatsapp
                    reference: CF-BARTER-20240318102714764558
                    otp: '5880211'
                    expiry: '2024-03-18T10:32:14.7812808+00:00'
        '400':
          description: Bad Request
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                  example: Thu, 28 Mar 2024 12:04:28 GMT
            Content-Length:
              content:
                text/plain:
                  schema:
                    type: string
                  example: '98'
            Connection:
              content:
                text/plain:
                  schema:
                    type: string
                  example: keep-alive
            Server:
              content:
                text/plain:
                  schema:
                    type: string
                  example: nginx/1.24.0
            Access-Control-Allow-Origin:
              content:
                text/plain:
                  schema:
                    type: string
                  example: '*'
            Access-Control-Allow-Headers:
              content:
                text/plain:
                  schema:
                    type: string
                  example: >-
                    Origin, X-Requested-With, Content-Type, Accept,
                    Authorization, v3-xapp-id, flw-auth-token, mra-auth-token,
                    alt_mode_auth, mid, altmodeauth, cc-admin-token, x-flw-lang
            Access-Control-Allow-Methods:
              content:
                text/plain:
                  schema:
                    type: string
                  example: PUT, POST, GET, DELETE, OPTIONS
            ETag:
              content:
                text/plain:
                  schema:
                    type: string
                  example: W/"62-DGBQQoQbzVmva7Usk61hPw"
          content:
            application/json; charset=utf-8:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SampleErrorResponse1'
                  - example:
                      status: error
                      message: 'Please specify the following parameters in body: length'
                      data: null
              example:
                status: error
                message: 'Please specify the following parameters in body: length'
                data: null
      deprecated: false
components:
  schemas:
    CreateanOTPRequest:
      title: CreateanOTPRequest
      required:
        - length
        - customer
        - sender
        - send
        - medium
        - expiry
      type: object
      properties:
        length:
          type: integer
          format: int32
        customer:
          $ref: '#/components/schemas/Customer25'
        sender:
          type: string
        send:
          type: boolean
        medium:
          type: array
          items:
            type: string
          description: ''
        expiry:
          type: integer
          format: int32
      example:
        length: 7
        customer:
          name: Example User
          email: user@gmail.com
          phone: '08130000000'
        sender: Example Business
        send: true
        medium:
          - email
          - whatsapp
        expiry: 5
    SampleSuccessResponse37:
      title: SampleSuccessResponse37
      required:
        - status
        - message
        - data
      type: object
      properties:
        status:
          type: string
        message:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/Data93'
          description: ''
      example:
        status: success
        message: OTP generated successfully
        data:
          - medium: email
            reference: CF-BARTER-20240318102713784653
            otp: '5880211'
            expiry: '2024-03-18T10:32:14.1232277+00:00'
          - medium: whatsapp
            reference: CF-BARTER-20240318102714764558
            otp: '5880211'
            expiry: '2024-03-18T10:32:14.7812808+00:00'
    SampleErrorResponse1:
      title: SampleErrorResponse1
      required:
        - status
        - message
        - data
      type: object
      properties:
        status:
          type: string
        message:
          type: string
        data:
          type: string
          nullable: true
      example:
        status: error
        message: >-
          retry_interval is required , retry_amount_variable is required ,
          retry_attempt_variable is required
        data: null
    Customer25:
      title: Customer25
      required:
        - name
        - email
        - phone
      type: object
      properties:
        name:
          type: string
        email:
          type: string
        phone:
          type: string
      example:
        name: Example User
        email: user@gmail.com
        phone: '08130000000'
    Data93:
      title: Data93
      required:
        - medium
        - reference
        - otp
        - expiry
      type: object
      properties:
        medium:
          type: string
        reference:
          type: string
        otp:
          type: string
        expiry:
          type: string
      example:
        medium: email
        reference: CF-BARTER-20240318102713784653
        otp: '5880211'
        expiry: '2024-03-18T10:32:14.1232277+00:00'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````