---
agentTools:
  projectIndex: https://pavlok.readme.io/llms.txt
---

# Register

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "title": "Pavlok API v5",
    "version": "5.0.0"
  },
  "servers": [
    {
      "url": "https://api.pavlok.com",
      "description": "Prod server"
    }
  ],
  "paths": {
    "/api/v5/users/": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Register",
        "operationId": "auth_register_api_v5_users__post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_auth_register_api_v5_users__post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserInResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Body_auth_register_api_v5_users__post": {
        "title": "Body_auth_register_api_v5_users__post",
        "required": [
          "user"
        ],
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/UserInCreate"
          }
        }
      },
      "HTTPValidationError": {
        "title": "HTTPValidationError",
        "type": "object",
        "properties": {
          "errors": {
            "title": "Errors",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            }
          }
        }
      },
      "UserInCreate": {
        "title": "UserInCreate",
        "required": [
          "email",
          "password"
        ],
        "type": "object",
        "properties": {
          "email": {
            "title": "Email",
            "type": "string",
            "format": "email"
          },
          "password": {
            "title": "Password",
            "type": "string"
          }
        }
      },
      "UserInResponse": {
        "title": "UserInResponse",
        "required": [
          "user"
        ],
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/UserWithToken"
          }
        }
      },
      "UserSetting": {
        "title": "UserSetting",
        "required": [
          "settingKey",
          "settingValue",
          "settingType"
        ],
        "type": "object",
        "properties": {
          "createdAt": {
            "title": "Createdat",
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "title": "Updatedat",
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "title": "Deletedat",
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "title": "Id",
            "type": "integer",
            "default": 0
          },
          "settingKey": {
            "title": "Settingkey",
            "type": "string"
          },
          "settingValue": {
            "title": "Settingvalue",
            "type": "string"
          },
          "settingType": {
            "$ref": "#/components/schemas/UserSettingsTypes"
          },
          "settingMeta": {
            "title": "Settingmeta",
            "type": "object"
          }
        }
      },
      "UserSettingsTypes": {
        "title": "UserSettingsTypes",
        "enum": [
          "integer",
          "float",
          "string",
          "boolean"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "UserWithToken": {
        "title": "UserWithToken",
        "required": [
          "email",
          "id",
          "token"
        ],
        "type": "object",
        "properties": {
          "username": {
            "title": "Username",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "phone": {
            "title": "Phone",
            "type": "string"
          },
          "countryCode": {
            "title": "Countrycode",
            "type": "string"
          },
          "phoneConfirmed": {
            "title": "Phoneconfirmed",
            "type": "boolean",
            "default": false
          },
          "firstName": {
            "title": "Firstname",
            "type": "string"
          },
          "lastName": {
            "title": "Lastname",
            "type": "string"
          },
          "birthDate": {
            "title": "Birthdate",
            "type": "string",
            "format": "date"
          },
          "weight": {
            "title": "Weight",
            "type": "number"
          },
          "weightMeasurementUnit": {
            "title": "Weightmeasurementunit",
            "type": "string"
          },
          "height": {
            "title": "Height",
            "type": "number"
          },
          "heightMeasurementUnit": {
            "title": "Heightmeasurementunit",
            "type": "string"
          },
          "resetPasswordToken": {
            "title": "Resetpasswordtoken",
            "type": "string"
          },
          "resetPasswordSentAt": {
            "title": "Resetpasswordsentat",
            "type": "string",
            "format": "date-time"
          },
          "profilePictureId": {
            "title": "Profilepictureid",
            "type": "integer"
          },
          "profilePictureUrl": {
            "title": "Profilepictureurl",
            "type": "string"
          },
          "emailConfirmed": {
            "title": "Emailconfirmed",
            "type": "boolean",
            "default": false
          },
          "anonymous": {
            "title": "Anonymous",
            "type": "boolean"
          },
          "role": {
            "title": "Role",
            "type": "string"
          },
          "timezone": {
            "title": "Timezone",
            "type": "string"
          },
          "settings": {
            "title": "Settings",
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/UserSetting"
            }
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "token": {
            "title": "Token",
            "type": "string"
          }
        }
      },
      "ValidationError": {
        "title": "ValidationError",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "type": "object",
        "properties": {
          "loc": {
            "title": "Location",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            }
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 101,
      "1": 22,
      "2": 222,
      "3": 193,
      "4": 223,
      "5": 202,
      "6": 7,
      "7": 26,
      "8": 169,
      "9": 253,
      "10": 19,
      "11": 43
    }
  }
}
```