# Create Account

Submits a request to create an account for your end user. <br/><br/>Related Event Notifications: <br/>Please refer to the Event Push API documentation: [Application Events](../fd-events/application-events)

# OpenAPI definition

```json
{
  "info": {
    "title": "Webull Open API Reference",
    "description": "application.yml\\ncom\\ni18n\\nMETA-INF\\nstatic\\n\\r\\n",
    "contact": {
      "name": "",
      "url": "",
      "email": ""
    },
    "version": "2.0",
    "x-logo": {
      "url": "static/png/logo.png"
    }
  },
  "servers": [
    {
      "url": "https://broker-api.sandbox.webull.com"
    }
  ],
  "path": "/broker/accounts/create",
  "method": "post",
  "tags": [
    "Accounts"
  ],
  "description": "Submits a request to create an account for your end user. <br/><br/>Related Event Notifications: <br/>Please refer to the Event Push API documentation: [Application Events](../fd-events/application-events)",
  "operationId": "createAccountApply",
  "parameters": [
    {
      "name": "x-app-key",
      "in": "header",
      "description": "A unique identifier issued to a developer for accessing an application's API.",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "x-app-secret",
      "in": "header",
      "description": "A unique key issued to developers to access the application's API.",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "x-timestamp",
      "in": "header",
      "description": "Timestamp of the request, follows ISO8601 format: YYYY-MM-DDThh:mm:ssZ, e.g. 2023-07-16T19:23:51Z, only supports UTC time zone.",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "x-signature-version",
      "in": "header",
      "description": "Signature algorithm version, default is 1.0.",
      "required": true,
      "schema": {
        "type": "string",
        "default": "1.0"
      },
      "examples": {
        "1.0": {
          "value": "1.0"
        }
      }
    },
    {
      "name": "x-signature-algorithm",
      "in": "header",
      "description": "Signature algorithm, default is HMAC-SHA1.",
      "required": true,
      "schema": {
        "type": "string",
        "default": "HMAC-SHA1"
      },
      "examples": {
        "HMAC-SHA1": {
          "value": "HMAC-SHA1"
        }
      }
    },
    {
      "name": "x-signature-nonce",
      "in": "header",
      "description": "Signature unique random number.",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "x-version",
      "in": "header",
      "description": "API interface version. Supported values: `v2`, `v3`.",
      "required": true,
      "schema": {
        "type": "string",
        "default": "v3"
      },
      "examples": {
        "v3": {
          "value": "v3"
        }
      }
    },
    {
      "name": "x-signature",
      "in": "header",
      "description": "A signature is a unique digital fingerprint, typically encrypted, that verifies the authenticity and integrity of a message or transaction, ensuring it has not been tampered with during transmission.",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "required": [
            "client_request_id",
            "forms"
          ],
          "type": "object",
          "properties": {
            "client_request_id": {
              "type": "string",
              "description": "Client-supplied request ID, which is unique for each account submission request.",
              "example": "123e4567e89b12d3a456426614174000"
            },
            "application_id": {
              "type": "string",
              "description": "System-generated unique identifier assigned to the account application record. This field is omitted for the initial submission and must be provided for subsequent submissions related to the same account application.",
              "example": "4F5A13B5FDFD43D29C7A3A856B2458A2"
            },
            "related_account_id": {
              "type": "string",
              "description": "The unique identifier of the related account. This field is required when submitting an additional account application related to an existing account. For example, if you have an Event Contract account and want to add a Brokerage Margin account, you would provide the account_id of the Event Contract account in this field. If this field is not provided or is empty, it indicates that this submission is for an initial account application.",
              "example": "SVHC5L98E0D79UR0AB4QJ962JB"
            },
            "forms": {
              "type": "array",
              "description": "Array of one or more FormData objects representing the account form being submitted. Use form details API to retrieve the form schema and details.",
              "items": {
                "required": [
                  "form_info",
                  "json_data"
                ],
                "type": "object",
                "properties": {
                  "form_info": {
                    "required": [
                      "form_code",
                      "version"
                    ],
                    "type": "object",
                    "properties": {
                      "form_code": {
                        "type": "string",
                        "description": "Unique identifier of the form, typically used to distinguish different form definitions.",
                        "example": "NEW_ACCOUNT_BASIC_FORM"
                      },
                      "version": {
                        "type": "string",
                        "description": "Version number of the form definition, used for compatibility and evolutionary control.",
                        "example": "1.0"
                      }
                    },
                    "description": "Form Identifier.",
                    "title": "FormId"
                  },
                  "json_data": {
                    "type": "object",
                    "description": "Object containing the completed form data as defined by the form schema and will vary from form to form. ",
                    "example": {}
                  }
                },
                "description": "Account Form",
                "title": "AccountForm"
              }
            }
          },
          "description": "Account Submit Request",
          "title": "AccountSubmitRequest"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "required": [
              "application_id",
              "client_request_id"
            ],
            "type": "object",
            "properties": {
              "client_request_id": {
                "type": "string",
                "description": "Unique client-generated identifier used for request tracking, idempotency and audit purposes.",
                "example": "4F5A13B5FDFD43D29C7A3A856B2458A1"
              },
              "application_id": {
                "type": "string",
                "description": "System-generated unique identifier assigned to the account application record.",
                "example": "4F5A13B5FDFD43D29C7A3A856B2458A2"
              }
            },
            "description": "Account Submit Response",
            "title": "AccountSubmitResult"
          }
        }
      }
    },
    "401": {
      "description": "Unauthorized: Authentication required",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error_code": {
                "type": "string",
                "description": "Internal logic error code",
                "example": "UNAUTHORIZED"
              },
              "message": {
                "type": "string",
                "description": "Error message",
                "example": "Insufficient permission"
              }
            }
          }
        }
      }
    },
    "417": {
      "description": "A business logic error triggered when the request cannot be processed due to domain-specific constraints.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error_code": {
                "type": "string",
                "description": "Internal logic error code",
                "example": "INVALID_PARAMETER"
              },
              "message": {
                "type": "string",
                "description": "Error message",
                "example": "Parameter error, phone"
              }
            }
          }
        }
      }
    },
    "500": {
      "description": "Internal Server Error.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error_code": {
                "type": "string",
                "description": "Internal logic error code",
                "example": "SYSTEM_ERROR"
              },
              "message": {
                "type": "string",
                "description": "Error message",
                "example": "Internal Server Error"
              }
            }
          }
        }
      }
    }
  },
  "jsonRequestBodyExample": {
    "client_request_id": "123e4567e89b12d3a456426614174000",
    "application_id": "4F5A13B5FDFD43D29C7A3A856B2458A2",
    "related_account_id": "SVHC5L98E0D79UR0AB4QJ962JB",
    "forms": [
      {
        "form_info": {
          "form_code": "NEW_ACCOUNT_BASIC_FORM",
          "version": "1.0"
        },
        "json_data": {}
      }
    ]
  },
  "postman": {
    "name": "Create Account",
    "description": {
      "content": "Submits a request to create an account for your end user. <br/><br/>Related Event Notifications: <br/>Please refer to the Event Push API documentation: [Application Events](../fd-events/application-events)",
      "type": "text/plain"
    },
    "url": {
      "path": [
        "broker",
        "accounts",
        "create"
      ],
      "host": [
        "{{baseUrl}}"
      ],
      "query": [],
      "variable": []
    },
    "header": [
      {
        "disabled": false,
        "description": {
          "content": "(Required) A unique identifier issued to a developer for accessing an application's API.",
          "type": "text/plain"
        },
        "key": "x-app-key",
        "value": ""
      },
      {
        "disabled": false,
        "description": {
          "content": "(Required) A unique key issued to developers to access the application's API.",
          "type": "text/plain"
        },
        "key": "x-app-secret",
        "value": ""
      },
      {
        "disabled": false,
        "description": {
          "content": "(Required) Timestamp of the request, follows ISO8601 format: YYYY-MM-DDThh:mm:ssZ, e.g. 2023-07-16T19:23:51Z, only supports UTC time zone.",
          "type": "text/plain"
        },
        "key": "x-timestamp",
        "value": ""
      },
      {
        "disabled": false,
        "description": {
          "content": "(Required) Signature algorithm version, default is 1.0.",
          "type": "text/plain"
        },
        "key": "x-signature-version",
        "value": ""
      },
      {
        "disabled": false,
        "description": {
          "content": "(Required) Signature algorithm, default is HMAC-SHA1.",
          "type": "text/plain"
        },
        "key": "x-signature-algorithm",
        "value": ""
      },
      {
        "disabled": false,
        "description": {
          "content": "(Required) Signature unique random number.",
          "type": "text/plain"
        },
        "key": "x-signature-nonce",
        "value": ""
      },
      {
        "disabled": false,
        "description": {
          "content": "(Required) API interface version. Supported values: `v2`, `v3`.",
          "type": "text/plain"
        },
        "key": "x-version",
        "value": ""
      },
      {
        "disabled": false,
        "description": {
          "content": "(Required) A signature is a unique digital fingerprint, typically encrypted, that verifies the authenticity and integrity of a message or transaction, ensuring it has not been tampered with during transmission.",
          "type": "text/plain"
        },
        "key": "x-signature",
        "value": ""
      },
      {
        "key": "Content-Type",
        "value": "application/json"
      },
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "method": "POST",
    "body": {
      "mode": "raw",
      "raw": "",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    }
  }
}
```
