Volcano API
🚀 API Endpoints

🔐 Authentication

User registration, login, and authentication endpoints. 3 endpoints available.

đŸŽ¯ Quick Stats

📊 Methods

  • 📝 POST: 3 endpoints

🔐 Authentication

All endpoints in this section use the same authentication methods. Choose one:

🔑 Bearer Token (Recommended)

For user session authentication

Add to request headers:

Authorization: Bearer YOUR_TOKEN

🔧 API Key

For server-side authentication

Add to request headers:

X-API-KEY: YOUR_API_KEY

âš ī¸ Important: Do not use both authentication methods simultaneously in the same request.

🔗 Endpoints Overview

MethodEndpointDescription
📝 POST/auth/register/codeSend email verification code
📝 POST/auth/registerRegister a new user
📝 POST/auth/loginLogin a user

📖 Detailed Documentation

Send email verification code

POST/auth/register/code
Full URL
https://api.market.decenctype.com/auth/register/code

📝 Request Body Parameters

ParameterTypeRequiredDescription
emailstringâŒé‚ŽįŽąåœ°å€

Description: Send email verification code

Operation ID: sendCode

Response Status:

  • ✅ 200: 发送成功
  • ✅ 201: Success

📝 Example Request

curl -X POST "https://api.market.decenctype.com/auth/register/code" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{}'

Register a new user

POST/auth/register
Full URL
https://api.market.decenctype.com/auth/register

📝 Request Body Parameters

ParameterTypeRequiredDescription
emailstringâœ…į”¨æˆˇé‚ŽįŽą
passwordstringâœ…į”¨æˆˇå¯†į 
usernamestringâœ…į”¨æˆˇå
codestring✅énj蝁᠁
inviteCodestringâŒé‚€č¯ˇį 

Description: Register a new user

Operation ID: register

Response Status:

  • ✅ 200: æŗ¨å†ŒæˆåŠŸ
  • ✅ 201: Success

📋 Response Examples

response.json
1{
2 "accessToken": "example-accessToken",
3 "user": "example-user"
4}

📝 Example Request

curl -X POST "https://api.market.decenctype.com/auth/register" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{
  "email": "user@example.com",
  "password": "password123",
  "username": "john doe",
  "code": "123456"
}'

Login a user

POST/auth/login
Full URL
https://api.market.decenctype.com/auth/login

📝 Request Body Parameters

ParameterTypeRequiredDescription
emailstringâœ…į”¨æˆˇé‚ŽįŽą
passwordstringâœ…į”¨æˆˇå¯†į 

Description: Login a user

Operation ID: login

Response Status:

  • ✅ 200: į™ģåŊ•成功
  • ✅ 201: Success

📋 Response Examples

response.json
1{
2 "accessToken": "example-accessToken",
3 "user": "example-user"
4}

📝 Example Request

curl -X POST "https://api.market.decenctype.com/auth/login" \\
  -H "Authorization: Bearer YOUR_TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{
  "email": "user@example.com",
  "password": "password123"
}'