---
title: Create member account
slug: mihai-tests/ryLN-create-member-account
createdAt: 2024-10-17T06:33:52.755Z
---

{
  "id": "6J9aoi5zlNG9A7ectMrXJ",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "/api/v1/member/create/",
    "servers": [],
    "name": "Create member account",
    "description": "Opens member's account to receive contributions.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "kind": "required",
          "name": "X-Product-Id",
          "type": "string",
          "description": "Pass in product Id."
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "Account",
          "schema": [
            {
              "name": "email",
              "kind": "required",
              "type": "string<email>",
              "example": ""
            },
            {
              "name": "title",
              "kind": "optional",
              "type": "string",
              "example": ""
            },
            {
              "name": "first_name",
              "kind": "required",
              "type": "string",
              "example": ""
            },
            {
              "name": "last_name",
              "kind": "required",
              "type": "string",
              "example": ""
            },
            {
              "name": "dob",
              "kind": "required",
              "type": "string<date>",
              "description": "yyyy-mm-dd",
              "example": ""
            },
            {
              "name": "gender",
              "kind": "required",
              "type": "string",
              "example": ""
            },
            {
              "name": "mobile",
              "kind": "optional",
              "type": "string",
              "example": ""
            },
            {
              "name": "addresses",
              "kind": "required",
              "type": "array",
              "description": "",
              "modelRef": "#/components/schemas/MemberAddresses",
              "customType": "MemberAddresses[]",
              "schema": [
                {
                  "name": "address_type",
                  "kind": "optional",
                  "type": "string<Postal | Residential>",
                  "example": ""
                },
                {
                  "name": "address_line1",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "address_line2",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "suburb",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "state",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "postcode",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "country",
                  "kind": "optional",
                  "type": "string<AU | AF | AX | AL | DZ | AS | AD | AO | AI | AQ | AG | AR | AM | AW | AT | AZ | BS | BH | BD | BB | BY | BE | BZ | BJ | BM | BT | BO | BQ | BA | BW | BV | BR | IO | BN | BG | BF | BI | CV | KH | CM | CA | KY | CF | TD | CL | CN | CX | CC | CO | KM | CG | CD | CK | CR | CI | HR | CU | CW | CY | CZ | DK | DJ | DM | DO | EC | EG | SV | GQ | ER | EE | SZ | ET | FK | FO | FJ | FI | FR | GF | PF | TF | GA | GM | GE | DE | GH | GI | GR | GL | GD | GP | GU | GT | GG | GN | GW | GY | HT | HM | VA | HN | HK | HU | IS | IN | ID | IR | IQ | IE | IM | IL | IT | JM | JP | JE | JO | KZ | KE | KI | KW | KG | LA | LV | LB | LS | LR | LY | LI | LT | LU | MO | MG | MW | MY | MV | ML | MT | MH | MQ | MR | MU | YT | MX | FM | MD | MC | MN | ME | MS | MA | MZ | MM | NA | NR | NP | NL | NC | NZ | NI | NE | NG | NU | NF | KP | MK | MP | NO | OM | PK | PW | PS | PA | PG | PY | PE | PH | PN | PL | PT | PR | QA | RE | RO | RU | RW | BL | SH | KN | LC | MF | PM | VC | WS | SM | ST | SA | SN | RS | SC | SL | SG | SX | SK | SI | SB | SO | ZA | GS | KR | SS | ES | LK | SD | SR | SJ | SE | CH | SY | TW | TJ | TZ | TH | TL | TG | TK | TO | TT | TN | TR | TM | TC | TV | UG | UA | AE | GB | UM | US | UY | UZ | VU | VE | VN | VG | VI | WF | EH | YE | ZM | ZW |  | >",
                  "example": ""
                }
              ]
            },
            {
              "name": "tfn",
              "kind": "optional",
              "type": "string",
              "example": ""
            },
            {
              "name": "investments",
              "kind": "optional",
              "type": "array",
              "description": "",
              "modelRef": "#/components/schemas/InitialInvestment",
              "customType": "InitialInvestment[]",
              "schema": [
                {
                  "name": "investment_portfolio",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/Account",
          "isExpanded": true
        }
      ],
      "formDataParameters": [
        {
          "name": "email",
          "kind": "required",
          "type": "string<email>",
          "example": ""
        },
        {
          "name": "title",
          "kind": "optional",
          "type": "string",
          "example": ""
        },
        {
          "name": "first_name",
          "kind": "required",
          "type": "string",
          "example": ""
        },
        {
          "name": "last_name",
          "kind": "required",
          "type": "string",
          "example": ""
        },
        {
          "name": "dob",
          "kind": "required",
          "type": "string<date>",
          "description": "yyyy-mm-dd",
          "example": ""
        },
        {
          "name": "gender",
          "kind": "required",
          "type": "string",
          "example": ""
        },
        {
          "name": "mobile",
          "kind": "optional",
          "type": "string",
          "example": ""
        },
        {
          "name": "addresses",
          "kind": "required",
          "type": "array",
          "description": "",
          "modelRef": "#/components/schemas/MemberAddresses",
          "customType": "MemberAddresses[]",
          "schema": [
            {
              "name": "address_type",
              "kind": "optional",
              "type": "string<Postal | Residential>",
              "example": ""
            },
            {
              "name": "address_line1",
              "kind": "optional",
              "type": "string",
              "example": ""
            },
            {
              "name": "address_line2",
              "kind": "optional",
              "type": "string",
              "example": ""
            },
            {
              "name": "suburb",
              "kind": "optional",
              "type": "string",
              "example": ""
            },
            {
              "name": "state",
              "kind": "optional",
              "type": "string",
              "example": ""
            },
            {
              "name": "postcode",
              "kind": "optional",
              "type": "string",
              "example": ""
            },
            {
              "name": "country",
              "kind": "optional",
              "type": "string<AU | AF | AX | AL | DZ | AS | AD | AO | AI | AQ | AG | AR | AM | AW | AT | AZ | BS | BH | BD | BB | BY | BE | BZ | BJ | BM | BT | BO | BQ | BA | BW | BV | BR | IO | BN | BG | BF | BI | CV | KH | CM | CA | KY | CF | TD | CL | CN | CX | CC | CO | KM | CG | CD | CK | CR | CI | HR | CU | CW | CY | CZ | DK | DJ | DM | DO | EC | EG | SV | GQ | ER | EE | SZ | ET | FK | FO | FJ | FI | FR | GF | PF | TF | GA | GM | GE | DE | GH | GI | GR | GL | GD | GP | GU | GT | GG | GN | GW | GY | HT | HM | VA | HN | HK | HU | IS | IN | ID | IR | IQ | IE | IM | IL | IT | JM | JP | JE | JO | KZ | KE | KI | KW | KG | LA | LV | LB | LS | LR | LY | LI | LT | LU | MO | MG | MW | MY | MV | ML | MT | MH | MQ | MR | MU | YT | MX | FM | MD | MC | MN | ME | MS | MA | MZ | MM | NA | NR | NP | NL | NC | NZ | NI | NE | NG | NU | NF | KP | MK | MP | NO | OM | PK | PW | PS | PA | PG | PY | PE | PH | PN | PL | PT | PR | QA | RE | RO | RU | RW | BL | SH | KN | LC | MF | PM | VC | WS | SM | ST | SA | SN | RS | SC | SL | SG | SX | SK | SI | SB | SO | ZA | GS | KR | SS | ES | LK | SD | SR | SJ | SE | CH | SY | TW | TJ | TZ | TH | TL | TG | TK | TO | TT | TN | TR | TM | TC | TV | UG | UA | AE | GB | UM | US | UY | UZ | VU | VE | VN | VG | VI | WF | EH | YE | ZM | ZW |  | >",
              "example": ""
            }
          ]
        },
        {
          "name": "tfn",
          "kind": "optional",
          "type": "string",
          "example": ""
        },
        {
          "name": "investments",
          "kind": "optional",
          "type": "array",
          "description": "",
          "modelRef": "#/components/schemas/InitialInvestment",
          "customType": "InitialInvestment[]",
          "schema": [
            {
              "name": "investment_portfolio",
              "kind": "optional",
              "type": "string",
              "example": ""
            }
          ]
        }
      ],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "Created.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "object",
                "kind": "optional",
                "type": "",
                "example": "",
                "default": "v1:create_account"
              },
              {
                "name": "account_id",
                "kind": "optional",
                "type": "",
                "example": "",
                "default": "ELMO12345678"
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "object",
                "kind": "optional",
                "type": "",
                "example": "",
                "default": "v1:member:create_account"
              },
              {
                "name": "status_code",
                "kind": "optional",
                "type": "",
                "example": "",
                "default": 400
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "",
                "example": "",
                "default": {
                  "gender": "Value can only be M, F, or U.",
                  "code": "elmo_value_error"
                }
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "422",
        "description": "Unprocessable Entity",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "object",
                "kind": "optional",
                "type": "",
                "example": "",
                "default": "v1:member:create_account"
              },
              {
                "name": "status_code",
                "kind": "optional",
                "type": "",
                "example": "",
                "default": 422
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "",
                "example": "",
                "default": {
                  "error": "Email address already registered",
                  "member_number": "12345"
                }
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url /api/v1/member/create/ \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-product-id: string' \\\n     --form 'email=\"string<email>\"' \\\n     --form 'first_name=\"string\"' \\\n     --form 'last_name=\"string\"' \\\n     --form 'dob=\"string<date>\"' \\\n     --form 'gender=\"string\"' \\\n     --form 'addresses=\"array\"' \\\n     --form 'investments=\"array\"'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-product-id\", \"string\");\n\nvar formdata = new FormData();\nformdata.append(\"email\", \"string<email>\");\nformdata.append(\"first_name\", \"string\");\nformdata.append(\"last_name\", \"string\");\nformdata.append(\"dob\", \"string<date>\");\nformdata.append(\"gender\", \"string\");\nformdata.append(\"addresses\", \"array\");\nformdata.append(\"investments\", \"array\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: formdata,\n   redirect: 'follow'\n};\n\nfetch(\"/api/v1/member/create/\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/api/v1/member/create/\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-product-id\"] = \"string\"\nform_data = [['email', File.open('undefined')],['first_name', File.open('undefined')],['last_name', File.open('undefined')],['dob', File.open('undefined')],['gender', File.open('undefined')],['addresses', File.open('undefined')],['investments', File.open('undefined')]]\nrequest.set_form form_data, 'multipart/form-data'\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/api/v1/member/create/\"\n\npayload = {}\nfiles=[\n\n]\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-product-id': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload, files=files)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-201",
          "language": "201",
          "code": "// Created.\n{\n  \"object\": \"\",\n  \"account_id\": \"\"\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad Request\n{\n  \"object\": \"\",\n  \"status_code\": \"\",\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-2-422",
          "language": "422",
          "code": "// Unprocessable Entity\n{\n  \"object\": \"\",\n  \"status_code\": \"\",\n  \"message\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-201"
    }
  },
  "children": [
    {
      "id": "LNHT9C_2MDABoulL8rIhn",
      "type": "paragraph",
      "children": [
        {
          "text": "Opens member's account to receive contributions."
        }
      ]
    }
  ]
}