---
updatedAt: 2026-06-29T20:33:19.000Z
agentTools:
  projectIndex: https://developer.bill.com/llms.txt
---

# Validate MFA challenge

Validate the MFA challenge for creating an MFA-trusted API sign in session. This validation requires the `challengeId` and `token` from `POST /v3/mfa/challenge`.

After the validation is complete, your API session is MFA trusted.

There are two stages in the BILL MFA process.
1. **MFA setup**: Add a valid phone number for setting up MFA in the organization (with `POST /v3/mfa/setup`), and then complete the setup by validating the entered phone number (with `POST /v3/mfa/validate`). At this point, the phone number is registered for the MFA sign in operation.
2. **MFA sign in**: Generate an MFA challenge (with `POST /v3/mfa/challenge`), and then complete MFA sign in by validating the MFA challenge (with `POST /v3/mfa/challenge/validate`). At this point, your API session is MFA trusted.

**Note**: In the production environment, BILL requires an MFA-trusted API session for a set of API operations.
* Enable vendor `autoPay`
* Enable recurring bill `autoPayment`
* Create a payment or bulk payment
* Create a bank account for a BILL organization
* Reset MFA (Complete MFA setup and MFA sign-in again)

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "BILL v3 API",
    "description": "BILL is a cloud-based financial operations platform for an organization's accounts payable (AP), accounts receivable (AR), and spend & expense (S&E) automation.\n\nThe BILL v3 API gives you access to the same infrastructure that powers the AP, AR, and S&E products. In addition, you can receive real-time event notifications with webhooks.\n\nThe BILL Developer Documentation is available at [developer.bill.com](https://developer.bill.com/docs/home).\n\n## Quickstart\nSign-up and generate a developer key for working with the BILL v3 API. With this key, you can build with the AP, AR, BILL network, and webhook workflows. See [Sandbox API sign up](https://developer.bill.com/docs/api-sandbox-sign-up) for more information.\n\n### Spend & Expense API\nAn API token is required for working with the Spend & Expense API. See [Authentication with Spend & Expense API token](https://developer.bill.com/docs/authentication-with-api-token) for more information.\n\n### BILL v3 API in Postman\nWith this collection, you have access to the BILL v3 API in Postman. When you save your sandbox API credentials as environment variables in Postman, you can simply refer to the variables when you are testing with the BILL v3 API. See [BILL v3 API in Postman](https://developer.bill.com/docs/bill-v3-api-in-postman) for more information.",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://gateway.stage.bill.com/connect",
      "description": "sandbox"
    }
  ],
  "paths": {
    "/v3/mfa/challenge/validate": {
      "post": {
        "tags": [
          "mfa"
        ],
        "summary": "Validate MFA challenge",
        "description": "Validate the MFA challenge for creating an MFA-trusted API sign in session. This validation requires the `challengeId` and `token` from `POST /v3/mfa/challenge`.\n\nAfter the validation is complete, your API session is MFA trusted.\n\nThere are two stages in the BILL MFA process.\n1. **MFA setup**: Add a valid phone number for setting up MFA in the organization (with `POST /v3/mfa/setup`), and then complete the setup by validating the entered phone number (with `POST /v3/mfa/validate`). At this point, the phone number is registered for the MFA sign in operation.\n2. **MFA sign in**: Generate an MFA challenge (with `POST /v3/mfa/challenge`), and then complete MFA sign in by validating the MFA challenge (with `POST /v3/mfa/challenge/validate`). At this point, your API session is MFA trusted.\n\n**Note**: In the production environment, BILL requires an MFA-trusted API session for a set of API operations.\n* Enable vendor `autoPay`\n* Enable recurring bill `autoPayment`\n* Create a payment or bulk payment\n* Create a bank account for a BILL organization\n* Reset MFA (Complete MFA setup and MFA sign-in again)",
        "operationId": "validateChallenge",
        "parameters": [
          {
            "name": "sessionId",
            "in": "header",
            "schema": {
              "type": "string",
              "description": "API session ID generated with `/v3/login`",
              "nullable": true,
              "example": "{{session_id}}"
            }
          },
          {
            "name": "devKey",
            "in": "header",
            "schema": {
              "type": "string",
              "description": "Developer key generated with your BILL developer account",
              "nullable": true,
              "example": "{{developer_key}}"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MfaChallengeValidateRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Validate MFA challenge response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MfaChallengeValidateResponseDto"
                }
              }
            }
          },
          "4XX": {
            "description": "List of errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BdcError"
                  }
                }
              }
            }
          },
          "5XX": {
            "description": "List of errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BdcError"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BdcError": {
        "required": [
          "category",
          "code",
          "severity",
          "timestamp"
        ],
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "code": {
            "type": "string"
          },
          "severity": {
            "$ref": "#/components/schemas/Severity"
          },
          "category": {
            "$ref": "#/components/schemas/Category"
          },
          "message": {
            "type": "string"
          },
          "params": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Param"
            }
          },
          "detail": {
            "type": "string"
          },
          "help": {
            "type": "string"
          }
        }
      },
      "Category": {
        "type": "string",
        "enum": [
          "REQUEST",
          "APPLICATION",
          "SERVER",
          "DOWNSTREAM"
        ]
      },
      "MfaChallengeValidateRequestDto": {
        "required": [
          "challengeId",
          "token"
        ],
        "type": "object",
        "properties": {
          "challengeId": {
            "type": "string",
            "description": "MFA `challengeId` from the `POST /v3/mfa/challenge` response"
          },
          "token": {
            "type": "string",
            "description": "Validation `token` sent to the registered phone number"
          },
          "device": {
            "type": "string",
            "description": "Mobile device name. This is a nickname for your mobile device. Set this field when `rememberMe` is set as `true`."
          },
          "machineName": {
            "type": "string",
            "description": "Machine name. This is a nickname for the machine used to complete MFA sign in. Set this field when `rememberMe` is set as `true`."
          },
          "rememberMe": {
            "type": "boolean",
            "description": "Set as `true` for the generated MFA ID to expire in 30 days"
          }
        },
        "description": "Validate MFA challenge",
        "example": {
          "challengeId": "{{mfa_challenge_id}}",
          "token": "{{mfa_token}}",
          "device": "{{mfa_device_name}}",
          "machineName": "{{mfa_machine_name}}",
          "rememberMe": true
        }
      },
      "MfaChallengeValidateResponseDto": {
        "type": "object",
        "properties": {
          "rememberMeId": {
            "type": "string",
            "description": "MFA ID. This value expires in 30 days.\n\nWhen your API session is expiring, this value is required for generating a new MFA-trusted API session with `POST /v3/login`."
          }
        },
        "description": "Response for MFA challenge validation."
      },
      "Param": {
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "properties": {
          "additional": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "value": {
            "minLength": 1,
            "type": "string"
          }
        }
      },
      "Severity": {
        "type": "string",
        "enum": [
          "ERROR",
          "WARNING",
          "INFORMATION"
        ]
      }
    }
  }
}
```