Cloudreve
  1. User
Cloudreve
  • Site
    • Ping
      GET
    • Get CAPTCHA
      GET
    • Get site settings
      GET
  • Session
    • Token
      • Password sign-in
      • Finish sign-in with 2FA
      • Refresh Token
    • OpenID
      • Prepare OpenID sign-in
      • Finish OpenID sign-in
      • Unlink OpenID
    • Passkey
      • Prepare Passkey sign-in
      • Finish Passkey sign-in
    • Prepare login
      GET
  • User
    • Sign up
      POST
    • Send reset password email
      POST
    • Reset password via temp link
      PATCH
    • Get profile picture
      GET
    • Get user
      GET
    • List user's share links
      GET
  • Callback
    • Complete OneDrive upload
      GET
    • Complete COS upload
      GET
    • Complete S3 upload
      GET
    • Complete OBS uploa
      GET
  • Workflow
    • List tasks
      GET
    • Get task progress
      GET
  • File
  1. User

Sign up

POST
http://localhost:5212/api/v4/user
Auth: None
Create a new account from given email and password.

Request

Body Params application/json
email
string <email>
required
Account email.
Example:
example@cloudreve.org
password
string 
required
Account password.
>= 6 characters<= 64 characters
Example:
P@ssw0rd
language
string 
optional
Primary UI and Email language code, should be a registered language in i18n.ts.
Example:
en-US
captcha
string  | null 
optional
User input value of the graphical CAPTCHA. Required if graphic CAPTCHA enabled for current action.
Example:
z3ds
ticket
string  | null 
optional
Ticket/Token of the CAPTCHA. Required if CAPTCHA is enabled for current action. Can be obtained from Get CAPTCHA.
Example:
4qXv7KmbYajJ0yFDKcmJ
Example
{
  "email": "example@cloudreve.org",
  "password": "P@ssw0rd",
  "language": "en-US",
  "captcha": "z3ds",
  "ticket": "4qXv7KmbYajJ0yFDKcmJ"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://localhost:5212/api/v4/user' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "example@cloudreve.org",
    "password": "P@ssw0rd",
    "language": "en-US",
    "captcha": "z3ds",
    "ticket": "4qXv7KmbYajJ0yFDKcmJ"
}'

Responses

🟢200Success
application/json
Body
data
object (User) 
required
Response content
id
string 
required
ID of the user.
Example:
6JIo
email
string  | null 
optional
Email of the user. For anonymous session, it is empty.
nickname
string  | null 
required
Display name of the user.
Example:
Johnny Zhang
created_at
string <date-time>
required
Time at which the user is created. For anonymous session, this value is invalid.
Example:
2023-08-06T19:21:59+08:00
anonymous
boolean  | null 
required
Indicating whether the session is anonymous.
group
object (Group) 
required
status
enum<string>  | enum<null> 
optional
Allowed values:
activeinactivemanual_bannedsys_banned
avatar
enum<string>  | enum<null> 
required
Source type of the profile picture. Empty value indicates no profile picture.
Allowed values:
filegravatar
Example:
file
preferred_theme
string  | null 
required
Primary color of preferred theme.
Example:
#131313
credit
integer  | null 
required
Credit balance.
language
string 
required
Primary language.
Example:
en-US
code
integer 
required
Response code.
0 - Success.
Default:
0
Example:
0
msg
string 
optional
Human readable error message (if any).
error
string  | null 
optional
Internal error message, only visable in debug mode.
correlation_id
string <uuid> | null 
optional
Correlation ID of the request. Only presented on failed reqeust.
Example:
b4351ecc-ee1a-4455-bc94-2c3dbcc58538
Example
{
  "data": {
    "id": "6JIo",
    "email": "Grover30@hotmail.com",
    "nickname": "Johnny Zhang",
    "created_at": "2023-08-06T19:21:59+08:00",
    "anonymous": null,
    "group": {
      "id": "1AI8",
      "name": "Admin",
      "permission": "/f8B",
      "direct_link_batch_size": 10,
      "trash_retention": 864000
    },
    "status": "inactive",
    "avatar": "file",
    "preferred_theme": "#131313",
    "credit": 8,
    "language": "en-US"
  },
  "code": 0,
  "msg": ""
}
🟢200Email activation required
Previous
Prepare login
Next
Send reset password email
Built with