đ API Endpoints
đ Authentication
User registration, login, and authentication endpoints. 3 endpoints available.
đ¯ Quick Stats
- Total Endpoints: 3
- Base URL:
https://api.market.decenctype.com - Authentication: Bearer Token / API Key
đ 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
| Method | Endpoint | Description |
|---|---|---|
đ POST | /auth/register/code | Send email verification code |
đ POST | /auth/register | Register a new user |
đ POST | /auth/login | Login a user |
đ Detailed Documentation
Send email verification code
POST
/auth/register/codeFull URL
https://api.market.decenctype.com/auth/register/codeđ Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | â | éŽįŽąå°å |
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/registerFull URL
https://api.market.decenctype.com/auth/registerđ Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | â | ፿ˇéŽįŽą |
password | string | â | ፿ˇå¯į |
username | string | â | ፿ˇå |
code | string | â | éĒč¯į |
inviteCode | string | â | é蝎į |
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/loginFull URL
https://api.market.decenctype.com/auth/loginđ Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | â | ፿ˇéŽįŽą |
password | string | â | ፿ˇå¯į |
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"
}'