Here’s a nicely decorated version with better formatting and clear separation:
Endpoint:
POST http://localhost:4001/api/invite
Request:
curl -X POST http://localhost:4001/api/invite \
-H "Content-Type: application/json" \
-d '{
"email": "test@example.com"
}'
Response:
{
"success": true,
"message": "Invite sent to test@example.com"
}
Endpoint:
POST http://localhost:4001/api/invite/accept
Request:
curl -X POST http://localhost:4001/api/invite/accept \
-H "Content-Type: application/json" \
-d '{
"email": "test@example.com"
}'
Response:
{
"message": "Invite accepted for test@example.com"
}
Endpoint:
POST http://localhost:4001/api/invite/confirm
Request:
curl -X POST http://localhost:4001/api/invite/confirm \
-H "Content-Type: application/json" \
-d '{
"email": "test@example.com"
}'
Response:
{
"message": "Invite confirmed for test@example.com"
}
Endpoint:
POST http://localhost:4001/api/invite/reject
Request:
curl -X POST http://localhost:4001/api/invite/reject \
-H "Content-Type: application/json" \
-d '{
"email": "test@example.com"
}'
Response:
{
"message": "Invite rejected for test@example.com"
}
Action | Endpoint | Description |
---|---|---|
📨 Send Invite | /api/invite |
Sends an invitation to the user |
✅ Accept Invite | /api/invite/accept |
Marks the invitation as accepted |
📩 Confirm Invite | /api/invite/confirm |
Confirms the user's invitation |
❌ Reject Invite | /api/invite/reject |
Rejects the invitation |