J10Intermediate
API Documentation Writing
45 minEvery new API
Format: Write documentation for an API endpoint.
Template:
## Create User
`POST /api/v1/users`
### Description
Create a new user account.
### Request Parameters
| Parameter | Type | Required | Description |
|------|------|------|------|
| email | string | Yes | User email |
| password | string | Yes | Password (>=8 characters) |
| name | string | No | User display name |
### Success Response (201)
```json
{ "id": "123", "email": "user@example.com", "name": "John" }
Error Responses
| Status Code | Description |
|---|---|
| 400 | Invalid email format |
| 409 | Email already registered |
| 500 | Internal server error |
Example
curl -X POST https://api.example.com/v1/users \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","password":"secure123"}'