# Register user

- Operation ID: `registerUserUsingPOST`
- HTTP method: `POST`
- Path: `/uauth/user/register`
- [Human-readable API reference](https://hub.synerise.com/api-reference/identity-and-access-management#tag/User-account-management/operation/registerUserUsingPOST)

## Self-contained OpenAPI method

The fenced document below contains this method's documentation and all of its local references. It is self-contained; no category or master specification fetch is required.

```yaml
openapi: 3.0.0
info:
  title: Synerise Public API
  version: 1.9.1
paths:
  /uauth/user/register:
    post:
      tags:
        - User account management
      summary: Register user
      description: |
        Register a new user. Before the new account can be used, it must be [confirmed](#operation/confirmUserUsingGET).

        ---

        **Authentication:** Not required
      operationId: registerUserUsingPOST
      requestBody:
        content:
          application/json:
            schema:
              required:
                - email
                - password
              type: object
              properties:
                email:
                  type: string
                  description: User's email address
                password:
                  type: string
                  description: Account password
                invitationToken:
                  type: string
                  description: Invitation token, received from another user
                externalProviderToken:
                  type: string
                externalProviderType:
                  type: string
                  enum:
                    - GOOGLE
        required: true
      responses:
        "200":
          description: OK
          content: {}
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
        "409":
          description: User already registered
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-account-management/operation/registerUserUsingPOST
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/uauth/user/register \
              --header 'content-type: application/json' \
              --data '{"email":"string","password":"string","invitationToken":"string","externalProviderToken":"string","externalProviderType":"GOOGLE"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"email\":\"string\",\"password\":\"string\",\"invitationToken\":\"string\",\"externalProviderToken\":\"string\",\"externalProviderType\":\"GOOGLE\"}"

            headers = { 'content-type': "application/json" }

            conn.request("POST", "/uauth/user/register", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "email": "string",
              "password": "string",
              "invitationToken": "string",
              "externalProviderToken": "string",
              "externalProviderType": "GOOGLE"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/uauth/user/register");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/uauth/user/register",
              "headers": {
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              email: 'string',
              password: 'string',
              invitationToken: 'string',
              externalProviderToken: 'string',
              externalProviderType: 'GOOGLE'
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/user/register');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"email":"string","password":"string","invitationToken":"string","externalProviderToken":"string","externalProviderType":"GOOGLE"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/uauth/user/register")
              .header("content-type", "application/json")
              .body("{\"email\":\"string\",\"password\":\"string\",\"invitationToken\":\"string\",\"externalProviderToken\":\"string\",\"externalProviderType\":\"GOOGLE\"}")
              .asString();
servers:
  - description: Microsoft Azure EU
    url: https://api.synerise.com
  - description: Microsoft Azure USA
    url: https://api.azu.synerise.com
  - description: Google Cloud Platform
    url: https://api.geb.synerise.com
tags:
  - name: User account management
```
