# Create a user with a registration code

Wise uses email address as unique identifier for users. If email is new (there is no active user already) then a new user will be created.

When you are submitting an email which already exists amongst our users then you will get a warning that "You're already a member. Please login". If user already exists then you need to redirect to "Get user authorization" webpage.

Endpoint: POST /v1/user/signup/registration_code
Security: ClientCredentialsToken

## Security:

  - `ClientCredentialsToken` (unknown)
    http bearer JWT

## Header parameters:

  - `X-External-Correlation-Id` (string)
    Optional UUID for correlating requests across systems. If provided, Wise echoes it back in the response. Maximum 36 characters. [Learn more](/guides/developer/headers/correlation-id).

## Request fields (application/json):

  - `email` (string, required)
    New user's email address.
    Example: user@email.com

  - `registrationCode` (string, required)
    Randomly generated registration code that is unique to this user and request. At least 32 characters long.
You need to store registration code to obtain access token on behalf of this newly created user in next step.
Please apply the same security standards to handling registration code as if it was a password.
    Example: a]#Et6(yLW@mq4Ky_+EAjXxpHGq7*&lr

  - `language` (string)
    User default language for UI and email communication.
Allowed values: EN, US, PT, ES, FR, DE, IT, JA, RU, PL, HU, TR, RO, NL, HK.
Default value: EN.
    Example: EN

## Response 200:

  - `200` (unknown)
    OK - User is created successfully.

## Response 200 fields (application/json):

  - `id` (integer)
    User ID.
    Example: 101

  - `name` (string | null)
    User's full name.
    Example: Example Person

  - `email` (string)
    User's email.
    Example: person@example.com

  - `active` (boolean)
    If user is active or not.
    Example: true

  - `details` (object | null)
    User details.

  - `details.firstName` (string)
    User's first name.
    Example: Example

  - `details.lastName` (string)
    User's last name.
    Example: Person

  - `details.phoneNumber` (string)
    Phone number.
    Example: +37111111111

  - `details.dateOfBirth` (string)
    Date of birth (YYYY-MM-DD).
    Example: 1977-01-01

  - `details.occupation` (string)
    Person's occupation.

  - `details.avatar` (string)
    Link to person avatar image.
    Example: https://lh6.googleusercontent.com/photo.jpg

  - `details.primaryAddress` (integer)
    Address object ID to use in addresses endpoints.
    Example: 111

  - `details.address` (object)
    User's address.

  - `details.address.countryCode` (string)
    Address country code in 2 digits. "US" for example.
    Example: EE

  - `details.address.firstLine` (string)
    Address first line.
    Example: Road 123

  - `details.address.postCode` (string)
    Address post code.
    Example: 11111

  - `details.address.city` (string)
    Address city name.
    Example: Tallinn

  - `details.address.state` (string)
    Address state code. Required if country is US, CA, AU, or BR.

  - `details.address.occupation` (string)
    User occupation. Required for US, CA, JP.

## Response 200 headers (application/json):

  - `X-External-Correlation-Id` (string)
    Echoed back when `X-External-Correlation-Id` was included in the request. [Learn more](/guides/developer/headers/correlation-id).
    Example: f47ac10b-58cc-4372-a567-0e02b2c3d479

  - `x-trace-id` (string)
    Unique trace identifier assigned by Wise. Useful when contacting support about a specific request.
    Example: fba501b6d453b96789f52338f019341f

## Response 409:

  - `409` (unknown)
    Conflict - User already exists.

## Response 409 fields (application/json):

  - `errors` (array)

  - `errors.code` (string)

  - `errors.message` (string)

  - `errors.path` (string)

  - `errors.arguments` (array)

## Response 409 headers (application/json):

  - `X-External-Correlation-Id` (string)
    Echoed back when `X-External-Correlation-Id` was included in the request. [Learn more](/guides/developer/headers/correlation-id).
    Example: f47ac10b-58cc-4372-a567-0e02b2c3d479

  - `x-trace-id` (string)
    Unique trace identifier assigned by Wise. Useful when contacting support about a specific request.
    Example: fba501b6d453b96789f52338f019341f

## Response 429:

  - `429` (unknown)
    Rate limit exceeded. Retry after the number of seconds specified in the `Retry-After` header.

## Response 429 headers (application/json):

  - `Retry-After` (integer)
    Number of seconds to wait before retrying the request.
    Example: 5

  - `X-Rate-Limited-By` (string)
    Identifies the rate limiter that triggered the 429 response.
    Example: wise-public-api

  - `X-External-Correlation-Id` (string)
    Echoed back when `X-External-Correlation-Id` was included in the request. [Learn more](/guides/developer/headers/correlation-id).
    Example: f47ac10b-58cc-4372-a567-0e02b2c3d479

  - `x-trace-id` (string)
    Unique trace identifier assigned by Wise. Useful when contacting support about a specific request.
    Example: fba501b6d453b96789f52338f019341f

