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

# Send TOTP code

> Forward a TOTP (2FA, MFA) email or sms message containing the code to Skyvern. This endpoint stores the code in database so that Skyvern can use it while running tasks/workflows.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/credentials/totp
openapi: 3.1.0
info:
  title: Skyvern API
  description: API for Skyvern
  version: 1.0.0
servers:
  - url: https://api.skyvern.com
    x-fern-server-name: Cloud
  - url: https://api-staging.skyvern.com
    x-fern-server-name: Staging
  - url: http://localhost:8000
    x-fern-server-name: Local
security: []
paths:
  /v1/credentials/totp:
    post:
      tags:
        - Credentials
      summary: Send TOTP code
      description: >-
        Forward a TOTP (2FA, MFA) email or sms message containing the code to
        Skyvern. This endpoint stores the code in database so that Skyvern can
        use it while running tasks/workflows.
      operationId: send_totp_code_v1_credentials_totp_post
      parameters:
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Skyvern API key for authentication. API key can be found at
              https://app.skyvern.com/settings.
            title: X-Api-Key
          description: >-
            Skyvern API key for authentication. API key can be found at
            https://app.skyvern.com/settings.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TOTPCodeCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TOTPCode'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TOTPCodeCreate:
      properties:
        totp_identifier:
          type: string
          title: Totp Identifier
          description: >-
            The identifier of the TOTP code. It can be the email address, phone
            number, or the identifier of the user.
          examples:
            - john.doe@example.com
            - '4155555555'
            - user_123
        task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Id
          description: >-
            The task_id the totp code is for. It can be the task_id of the task
            that the TOTP code is for.
          examples:
            - task_123456
        workflow_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Workflow Id
          description: >-
            The workflow ID the TOTP code is for. It can be the workflow ID of
            the workflow that the TOTP code is for.
          examples:
            - wpid_123456
        workflow_run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Workflow Run Id
          description: >-
            The workflow run id that the TOTP code is for. It can be the
            workflow run id of the workflow run that the TOTP code is for.
          examples:
            - wr_123456
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
          description: >-
            An optional field. The source of the TOTP code. e.g. email, sms,
            etc.
          examples:
            - email
            - sms
            - app
        content:
          type: string
          title: Content
          description: >-
            The content of the TOTP code. It can be the email content that
            contains the TOTP code, or the sms message that contains the TOTP
            code. Skyvern will automatically extract the TOTP code from the
            content.
          examples:
            - Hello, your verification code is 123456
        expired_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expired At
          description: The timestamp when the TOTP code expires
          examples:
            - '2025-01-01T00:00:00Z'
        type:
          anyOf:
            - $ref: '#/components/schemas/OTPType'
            - type: 'null'
          description: >-
            Optional. If provided, forces extraction of this specific OTP type
            (totp or magic_link). Use this when the content contains multiple
            OTP types and you want to specify which one to extract.
          examples:
            - totp
            - magic_link
      type: object
      required:
        - totp_identifier
        - content
      title: TOTPCodeCreate
    TOTPCode:
      properties:
        totp_identifier:
          type: string
          title: Totp Identifier
          description: >-
            The identifier of the TOTP code. It can be the email address, phone
            number, or the identifier of the user.
          examples:
            - john.doe@example.com
            - '4155555555'
            - user_123
        task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Id
          description: >-
            The task_id the totp code is for. It can be the task_id of the task
            that the TOTP code is for.
          examples:
            - task_123456
        workflow_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Workflow Id
          description: >-
            The workflow ID the TOTP code is for. It can be the workflow ID of
            the workflow that the TOTP code is for.
          examples:
            - wpid_123456
        workflow_run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Workflow Run Id
          description: >-
            The workflow run id that the TOTP code is for. It can be the
            workflow run id of the workflow run that the TOTP code is for.
          examples:
            - wr_123456
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
          description: >-
            An optional field. The source of the TOTP code. e.g. email, sms,
            etc.
          examples:
            - email
            - sms
            - app
        content:
          type: string
          title: Content
          description: >-
            The content of the TOTP code. It can be the email content that
            contains the TOTP code, or the sms message that contains the TOTP
            code. Skyvern will automatically extract the TOTP code from the
            content.
          examples:
            - Hello, your verification code is 123456
        expired_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expired At
          description: The timestamp when the TOTP code expires
          examples:
            - '2025-01-01T00:00:00Z'
        type:
          anyOf:
            - $ref: '#/components/schemas/OTPType'
            - type: 'null'
          description: >-
            Optional. If provided, forces extraction of this specific OTP type
            (totp or magic_link). Use this when the content contains multiple
            OTP types and you want to specify which one to extract.
          examples:
            - totp
            - magic_link
        totp_code_id:
          type: string
          title: Totp Code Id
          description: The skyvern ID of the TOTP code.
        code:
          type: string
          title: Code
          description: The TOTP code extracted from the content.
        organization_id:
          type: string
          title: Organization Id
          description: The ID of the organization that the TOTP code is for.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The timestamp when the TOTP code was created.
        modified_at:
          type: string
          format: date-time
          title: Modified At
          description: The timestamp when the TOTP code was modified.
        otp_type:
          anyOf:
            - $ref: '#/components/schemas/OTPType'
            - type: 'null'
          description: The type of the OTP code.
      type: object
      required:
        - totp_identifier
        - content
        - totp_code_id
        - code
        - organization_id
        - created_at
        - modified_at
      title: TOTPCode
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OTPType:
      type: string
      enum:
        - totp
        - magic_link
      title: OTPType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````