Here’s a nicely decorated version with better formatting and clear separation:
Endpoint:
POST http://localhost:4001/api/inviteRequest:
curl -X POST http://localhost:4001/api/invite \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]"
}'Response:
{
"success": true,
"message": "Invite sent to [email protected]"
}Endpoint:
POST http://localhost:4001/api/invite/acceptRequest:
curl -X POST http://localhost:4001/api/invite/accept \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]"
}'Response:
{
"message": "Invite accepted for [email protected]"
}Endpoint:
POST http://localhost:4001/api/invite/confirmRequest:
curl -X POST http://localhost:4001/api/invite/confirm \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]"
}'Response:
{
"message": "Invite confirmed for [email protected]"
}Endpoint:
POST http://localhost:4001/api/invite/rejectRequest:
curl -X POST http://localhost:4001/api/invite/reject \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]"
}'Response:
{
"message": "Invite rejected for [email protected]"
}| 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 |