{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/v3/accounts","auth":"required","method":"post","examples":{"codes":[{"code":"curl -X POST \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer YOUR-WYRE-SECRET-KEY\" \\\n-d '{\"type\":\"INDIVIDUAL\",\"country\": \"US\",\"subaccount\": true,\"profileFields\":[{\"fieldId\": \"individualLegalName\",\"value\": \"YOUR_NAME\"},{\"fieldId\": \"individualEmail\",\"value\": \"YOUREMAIL:::at:::EMAIL.com\"},{\"fieldId\": \"individualResidenceAddress\",\"value\": {\"street1\": \"1 Market St\",\"street2\": \"Suite 402\",\"city\": \"San Francisco\",\"state\": \"CA\",\"postalCode\": \"94105\",\"country\": \"US\"}}]}' \\\nhttps://api.testwyre.com/v3/accounts","language":"curl"},{"code":"{\n  \"type\": 'INDIVIDUAL', //Business accounts are not currently supported.\n  \"country\": 'US',\n  \"subaccount\": true,   \n  \"profileFields\":[\n        {\n           \"fieldType\":\"EMAIL\",\n           \"value\":\"[email protected]\",\n           \"note\":null,\n           \"status\":\"APPROVED\",\n           \"fieldId\":\"individualEmail\"\n        },\n        {\n           \"fieldType\":\"CELLPHONE\",\n           \"value\":\"+18888234567\",\n           \"note\":null,\n           \"status\":\"APPROVED\",\n           \"fieldId\":\"individualCellphoneNumber\"\n        },\n        {\n           \"fieldType\":\"STRING\",\n           \"value\":\"Christa Sullivan\",\n           \"note\":null,\n           \"status\":\"APPROVED\",\n           \"fieldId\":\"individualLegalName\"\n        },\n        {\n           \"fieldType\":\"STRING\",\n           \"value\":\"REDACTED\",\n           \"note\":null,\n           \"status\":\"APPROVED\",\n           \"fieldId\":\"individualSsn\"\n        },\n        {\n           \"fieldType\":\"DATE\",\n           \"value\":\"1985-12-26\",\n           \"note\":null,\n           \"status\":\"APPROVED\",\n           \"fieldId\":\"individualDateOfBirth\"\n        },\n        {\n           \"fieldType\":\"ADDRESS\",\n           \"value\":{\n              \"street1\":\"1234 Main ST\",\n              \"street2\":\"Apt 12\",\n              \"city\":\"Los Angeles\",\n              \"state\":\"CA\",\n              \"postalCode\":\"91604\",\n              \"country\":\"US\"\n           },\n           \"note\":null,\n           \"status\":\"APPROVED\",\n           \"fieldId\":\"individualResidenceAddress\"\n        },\n        {\n           \"fieldType\":\"DOCUMENT\",\n           \"value\":[\n              \"DO_WWZPZQ3WWPH\",\n              \"DO_P9L6VZP36HJ\"\n           ],\n           \"note\":null,\n           \"status\":\"APPROVED\",\n           \"fieldId\":\"individualGovernmentId\"\n        },\n        {\n           \"fieldType\":\"PAYMENT_METHOD\",\n           \"value\":\"PA_WVZ3QWC4ZPN\",\n           \"note\":null,\n           \"status\":\"APPROVED\",\n           \"fieldId\":\"individualSourceOfFunds\"\n        },\n        {\n           \"fieldType\":\"DOCUMENT\",\n           \"value\":[\n           ],\n           \"note\":\"Please provide utility bill that matches profile address.\",\n           \"status\":\"OPEN\",\n           \"fieldId\":\"individualProofOfAddress\"\n        },\n        {\n           \"fieldType\":\"DOCUMENT\",\n           \"value\":[\n           ],\n           \"note\":\"Please submit an ACH form for your bank account. Access the link: https://support.sendwyre.com/my-account/ach-authorization-steps\",\n           \"status\":\"OPEN\",\n           \"fieldId\":\"individualAchAuthorizationForm\"\n        }\n     ]\n}","language":"json"},{"code":"// This sample is assuming you are using the Express framework for Node.js.\nconst axios = require('axios');\nconst { signature } = require('../utils/signature');\n\n// Sensitive data like API keys should be stored in your environment configuration.\nconst YOUR_WYRE_API_KEY = AK-XXXX-XXXX-XXXX\nconst YOUR_WYRE_SECRET_KEY = SK-XXXX-XXXX-XXXX\n\nasync createAccount(req, res, next) {\n        try {\n            const timestamp = new Date().getTime();\n            const url = `https://api.testwyre.com/v3/accounts?timestamp=${timestamp}`;\n            const headers = {};\n            const body = {\n                type: 'INDIVIDUAL',\n                country: 'US',\n                subaccount: true,\n                profileFields:[\n                    {\n                        fieldId: \"individualLegalName\",\n                        value: req.body.name\n                    },\n                    {\n                        fieldId: \"individualEmail\",\n                        value: req.body.email\n                    },\n                    {\n                        fieldId: \"individualResidenceAddress\",\n                        value: {\n                            street1: req.body.street1,\n                            street2: req.body.street2,\n                            city: req.body.city,\n                            state: req.body.state,\n                            postalCode: req.body.postalCode,\n                            country: req.body.country\n                        }\n                    },\n                    {\n                        fieldId: \"individualCellphoneNumber\",\n                        value: req.body.phonenumber\n                    },\n                    {\n                        fieldId: \"individualDateOfBirth\",\n                        value: req.body.dob\n                    },\n                    {\n                        fieldId: \"individualSsn\",\n                        value: req.body.ssn\n                    }\n                ]\n            }\n            const details = JSON.stringify(body);\n\n            headers['Content-Type'] = 'application/json';\n            headers['X-Api-Key'] = YOUR_WYRE_API_KEY;\n            headers['X-Api-Signature'] = signature(url, details);\n\n            const config = {\n                method: \"POST\",\n                url: url,\n                headers: headers,\n                data: details\n            }\n\n            const response = await axios(config);\n            res.json(response.data);\n\n        } catch (error) {\n            console.log(\"this is erorr\");\n            next(error)\n        }\n     }\n\n//Signature Example\nconst CryptoJS = require('crypto-js');\nconst signature = (url, data) => {\n    const dataToSign = url + data;\n    const token = CryptoJS.enc.Hex.stringify(CryptoJS.HmacSHA256(dataToSign.toString(CryptoJS.enc.Utf8), YOUR_WYRE_SECRET_KEY));\n    return token;\n}","language":"javascript","name":"Node.js"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"id\" : \"AC-U4BWHGZDG6W\",\n  \"status\" : \"PENDING\",\n  \"type\" : \"INDIVIDUAL\",\n  \"country\" : \"US\",\n  \"createdAt\" : 1541789972000,\n  \"depositAddresses\" : {\n    \"ETH\" : \"0x98B031783d0efb1E65C4072C6576BaCa0736A912\",\n    \"BTC\" : \"14CriXWTRoJmQdBzdikw6tEmSuwxMozWWq\"\n  },\n  \"totalBalances\" : { \n    \"BTC\" : 1.0000000,\n    \"ETH\" : 0.1000000000000000000\n  },\n  \"availableBalances\" : { \n    \"BTC\" : 1.0000000,\n    \"ETH\" : 0.1000000000000000000\n  },\n  \"profileData\" : [ {\n    \"fieldId\" : \"individualCellphoneNumber\",\n    \"fieldType\" : \"CELLPHONE\",\n    \"value\" : null,\n    \"note\" : \"Must be verified by user.\",\n    \"status\" : \"OPEN\"\n  }, {\n    \"fieldId\" : \"individualEmail\",\n    \"fieldType\" : \"EMAIL\",\n    \"value\" : \"[email protected]\",\n    \"note\" : \"Must be verified by user.\",\n    \"status\" : \"OPEN\"\n  }, {\n    \"fieldId\" : \"individualLegalName\",\n    \"fieldType\" : \"STRING\",\n    \"value\" : \"Johnny Quest\",\n    \"note\" : null,\n    \"status\" : \"PENDING\"\n  }, {\n    \"fieldId\" : \"individualDateOfBirth\",\n    \"fieldType\" : \"DATE\",\n    \"value\" : null,\n    \"note\" : null,\n    \"status\" : \"OPEN\"\n  }, {\n    \"fieldId\" : \"individualSsn\",\n    \"fieldType\" : \"STRING\",\n    \"value\" : null,\n    \"note\" : null,\n    \"status\" : \"NULL\"\n  }, {\n    \"fieldId\" : \"individualResidenceAddress\",\n    \"fieldType\" : \"ADDRESS\",\n    \"value\" : {\n\t\t\t\t\"street1\": \"1 Market St\",\n\t\t\t\t\"street2\": \"Suite 402\",\n\t\t\t\t\"city\": \"San Francisco\",\n\t\t\t\t\"state\": \"CA\",\n\t\t\t\t\"postalCode\": \"94105\",\n\t\t\t\t\"country\": \"US\"\n\t\t},\n    \"note\" : null,\n    \"status\" : \"PENDING\"\n  }, {\n    \"fieldId\" : \"individualGovernmentId\",\n    \"fieldType\" : \"DOCUMENT\",\n    \"value\" : [],\n    \"note\" : null,\n    \"status\" : \"OPEN\"\n  }, {\n    \"fieldId\" : \"individualSourceOfFunds\",\n    \"fieldType\" : \"PAYMENT_METHOD\",\n    \"value\" : null,\n    \"note\" : \"Payment method not yet submitted\",\n    \"status\" : \"OPEN\"\n  } ]\n}","name":""}]},"settings":"","params":[{"name":"type","type":"string","default":"","desc":"the type of account, currently `INDIVIDUAL` is the only supported value","required":true,"in":"body","ref":"","_id":"5be6007145a5490061789903"},{"name":"country","type":"string","default":"","desc":"the country of the account holder. For individuals this is the country of residence. (Currently we only support US accounts)","required":true,"in":"body","ref":"","_id":"5be6007145a5490061789902"},{"name":"profileFields","type":"array_object","default":"","desc":"an array of the Fields submitted at the time of Account creation. You can submit as many or as few fields as you need at the time of Account creation. [More information](doc:account-resource#section-fields)","required":true,"in":"body","ref":"","_id":"5be6007145a5490061789901"},{"name":"referrerAccountId","type":"string","default":"","desc":"Supply your own Account ID when creating noncustodial accounts. This field is used to track which account referred the new account into our system","required":false,"in":"body","ref":"","_id":"5c400d555c006f0050b996c8"},{"name":"subaccount","type":"boolean","default":"true","desc":"When true, the newly created account will be a custodial subaccount owner by the caller. Otherwise, the account will be a standalone non-custodial account.","required":false,"in":"body","ref":"","_id":"5c400d555c006f0050b996c7"},{"name":"disableEmail","type":"boolean","default":"false","desc":"if true prevents all outbound emails to the account. This includes all communications listed [here](https://docs.sendwyre.com/docs/customer-emails-messaging).","required":false,"in":"body","ref":"","_id":"5e31d549d1e0e70067d195ab"}],"apiSetting":"5c50b085aae6150014b3e80e"},"next":{"description":"","pages":[]},"title":"Create Account","type":"endpoint","slug":"create-account","excerpt":"","body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note on fields required\",\n  \"body\": \"When creating the account you can submit as many or as few profileFields as you need at the time of Account creation. [More information](doc:account-resource#section-fields)\"\n}\n[/block]","updates":["5c68cb3266c99d00456c00cd","5d1afa4ec2c85a0012c945aa"],"order":1,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5bc634877db17000250c43e0","project":"550f74bb6fc8130d0038aad3","version":{"version":"3","version_clean":"3.0.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["550f75de61d9d30d00af9e02","551027e38579861900a86698","551029e08579861900a8669a","551029e7498062190006328a","5bc633a722d682005c9ad9e4","5bc633b08c4b0b000d6a7eaa","5bc633b48f3ff600626e3e18","5bc63538e5a6ba000d22ee6d","5bc63587a18a6b000decd295","5bc635c0937fcb0056223d9c","5bc6360f42f41800319aeaa6","5be5d13ff1d319002baca9ce","5be5d2287cd14d00291fbfdb","5be8b3b09f7cb70023c56a39","5be8b3cbb910100044e20206","5c1d769a4f6aed001fe527f0","5c402942010f0d001496dded","5e8127d61c906800374eeb1c","5f2768c98622b8005106544a","5f2768d05702ca0011f7655e","5f276e5348d2b600321aef9b","5f276fd300e519001139200a","5f9a2cb79dafe500259281a7","5fd92bf362bb7301b00e48ba"],"_id":"550f75de61d9d30d00af9e01","__v":24,"releaseDate":"2015-03-23T02:09:34.221Z","project":"550f74bb6fc8130d0038aad3","createdAt":"2015-03-23T02:09:34.221Z","forked_from":"550f74bb6fc8130d0038aad6"},"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Accounts","slug":"accounts","order":9,"from_sync":false,"reference":true,"_id":"5bc633a722d682005c9ad9e4","project":"550f74bb6fc8130d0038aad3","version":"550f75de61d9d30d00af9e01","createdAt":"2018-10-16T18:53:27.204Z","__v":0},"user":"56ddd4424acab82000ae9d30","createdAt":"2018-10-16T18:57:11.869Z","__v":34,"parentDoc":null}

postCreate Account


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

type:
required
string
the type of account, currently `INDIVIDUAL` is the only supported value
country:
required
string
the country of the account holder. For individuals this is the country of residence. (Currently we only support US accounts)
profileFields:
required
array of objects
an array of the Fields submitted at the time of Account creation. You can submit as many or as few fields as you need at the time of Account creation. [More information](doc:account-resource#section-fields)
referrerAccountId:
string
Supply your own Account ID when creating noncustodial accounts. This field is used to track which account referred the new account into our system
subaccount:
booleantrue
When true, the newly created account will be a custodial subaccount owner by the caller. Otherwise, the account will be a standalone non-custodial account.
disableEmail:
booleanfalse
if true prevents all outbound emails to the account. This includes all communications listed [here](https://docs.sendwyre.com/docs/customer-emails-messaging).

Examples


Result Format


Documentation

[block:callout] { "type": "info", "title": "Note on fields required", "body": "When creating the account you can submit as many or as few profileFields as you need at the time of Account creation. [More information](doc:account-resource#section-fields)" } [/block]