# Create a test account

> Create a Bolt shopper account for testing purposes.

Source: https://help.boltapp.com/api-reference/embeddable-checkout-v3/testing/testingaccountcreate

`POST /testing/accounts`

## OpenAPI definition

This endpoint as it appears in the OpenAPI document, with every schema it references included.

```json
{
  "openapi": "3.2.0",
  "info": {
    "version": "3.3.22",
    "title": "Bolt API Reference",
    "description": "A comprehensive Bolt API reference for interacting with Accounts, Payments, Orders and more.",
    "termsOfService": "https://www.boltapp.com/end-user-terms",
    "contact": {
      "name": "Bolt",
      "email": "merchantsupport@boltapp.com",
      "url": "https://help.boltapp.com/api-bolt/"
    }
  },
  "servers": [
    {
      "url": "https://{environment}.boltapp.com/v3",
      "variables": {
        "environment": {
          "enum": [
            "api",
            "api-sandbox"
          ],
          "default": "api-sandbox"
        }
      }
    }
  ],
  "paths": {
    "/testing/accounts": {
      "post": {
        "summary": "Create a test account",
        "operationId": "testingAccountCreate",
        "x-speakeasy-name-override": "CreateAccount",
        "description": "Create a Bolt shopper account for testing purposes.",
        "tags": [
          "Testing"
        ],
        "security": [
          {
            "api-key": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/x-publishable-key"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/account-test-creation-data"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The account was successfully created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account-test-creation-data"
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/response-4xx"
          },
          "default": {
            "$ref": "#/components/responses/response-default"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "x-publishable-key": {
        "description": "The publicly shareable identifier used to identify your Bolt merchant division.",
        "in": "header",
        "name": "X-Publishable-Key",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "account-test-creation-data": {
        "type": "object",
        "required": [
          "email",
          "email_state",
          "phone",
          "phone_state",
          "otp_code",
          "oauth_code"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "readOnly": true,
            "examples": [
              "alice@example.com"
            ]
          },
          "email_state": {
            "type": "string",
            "enum": [
              "missing",
              "unverified",
              "verified"
            ],
            "examples": [
              "unverified"
            ]
          },
          "phone": {
            "type": "string",
            "format": "phone",
            "readOnly": true,
            "examples": [
              "+14155550199"
            ]
          },
          "phone_state": {
            "type": "string",
            "enum": [
              "missing",
              "unverified",
              "verified"
            ],
            "examples": [
              "verified"
            ]
          },
          "is_migrated": {
            "type": "boolean",
            "writeOnly": true,
            "examples": [
              true
            ]
          },
          "has_address": {
            "type": "boolean",
            "writeOnly": true,
            "examples": [
              true
            ]
          },
          "has_credit_card": {
            "type": "boolean",
            "writeOnly": true,
            "examples": [
              true
            ]
          },
          "otp_code": {
            "type": "string",
            "readOnly": true,
            "examples": [
              "123456"
            ]
          },
          "oauth_code": {
            "type": "string",
            "readOnly": true,
            "examples": [
              "7GSjMRSHs6Ak7C_zvVW6P2IhZOHxMK7HZKW1fMX85ms"
            ]
          }
        }
      },
      "error": {
        "type": "object",
        "required": [
          ".tag",
          "message"
        ],
        "properties": {
          ".tag": {
            "type": "string",
            "enum": [
              "unauthorized",
              "forbidden",
              "unprocessable_request",
              "not_found"
            ],
            "description": "The type of error returned",
            "examples": [
              "unprocessable_request"
            ]
          },
          "message": {
            "type": "string",
            "description": "A human-readable error message, which might include information specific to the request that was made.",
            "examples": [
              "We were unable to process your request."
            ]
          }
        }
      },
      "field-error": {
        "type": "object",
        "description": "An error that pertains to validation of a specific field in the request.",
        "required": [
          ".tag",
          "message",
          "field"
        ],
        "properties": {
          ".tag": {
            "type": "string",
            "enum": [
              "invalid_input_parameter"
            ],
            "description": "The type of error returned",
            "examples": [
              "invalid_input_parameter"
            ]
          },
          "message": {
            "type": "string",
            "description": "A human-readable error message, which might include information specific to the request that was made.",
            "examples": [
              "We were unable to process your request."
            ]
          },
          "field": {
            "type": "string",
            "description": "The field (in its hierarchical form) that is failing validation.",
            "examples": [
              "address.phone"
            ]
          }
        }
      }
    },
    "responses": {
      "response-4xx": {
        "description": "An error has occurred, and further details are contained in the response",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/error"
                },
                {
                  "$ref": "#/components/schemas/field-error"
                }
              ]
            }
          }
        }
      },
      "response-default": {
        "description": "An error has occurred, and no further details are provided (e.g. 5xx errors)"
      }
    },
    "securitySchemes": {
      "api-key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      },
      "oauth": {
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "/v1/oauth/authorize",
            "refreshUrl": "/v1/oauth/token",
            "tokenUrl": "/v1/oauth/token",
            "scopes": {
              "bolt.account.manage": "This scope grants permissions to perform read/edit/delete actions on Bolt Account data",
              "bolt.account.view": "This scope grants permissions to perform read only actions on Bolt Account data",
              "openid": "This scope grants permissions that enable Bolt Single Sign-On (SSO) by granting a JSON Web Token (JWT) that stores account data."
            }
          }
        },
        "type": "oauth2"
      }
    }
  }
}
```
