Back to Home

API Reference

Complete API reference for DocSignerHub. Base URL: https://api.docsignerhub.com

REST / JSON
JWT Bearer
API Key (X-Api-Key)
Swagger UI
Open Swagger UI

Authentication

Guide & Reference

All protected endpoints use JWT Bearer authentication. Register an account, verify your email, then call Login to receive a token. Include it in every subsequent request via the Authorization: Bearer <token> header. Two access roles exist: User (default) and Admin.

StepEndpointNotes
1 — RegisterPOST /api/auth/registerCreates the account and sends a verification email
2 — Verify emailGET /api/auth/verify-email/{token}Must complete before first login
3 — LoginPOST /api/auth/loginReturns JWT token in response body
4 — Call APIsAny protected endpointHeader: Authorization: Bearer <token>

Register, verify your email, then login to obtain a Bearer token.

curl
# 1. Register
curl -X POST https://api.docsignerhub.com/api/auth/register \
  -H "Content-Type: application/json" \
  -d '{"name":"Jane Doe","email":"jane@example.com","password":"Secure1234","country":"GB"}'

# 2. Verify email — click the link in the inbox or call the token URL
curl "https://api.docsignerhub.com/api/auth/verify-email/{token}"

# 3. Login — returns { token, userId, name, email }
curl -X POST https://api.docsignerhub.com/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"jane@example.com","password":"Secure1234"}'

# 4. Use the token on protected routes
curl https://api.docsignerhub.com/api/users \
  -H "Authorization: Bearer eyJ..."

Request a reset email then submit the new password with the token from the email.

curl
# Step 1 — Send reset email
curl -X POST https://api.docsignerhub.com/api/auth/forgot-password \
  -H "Content-Type: application/json" \
  -d '{"email":"jane@example.com"}'

# Step 2 — Reset password using the token from the email
curl -X POST https://api.docsignerhub.com/api/auth/reset-password \
  -H "Content-Type: application/json" \
  -d '{"token":"uuid-from-email","newPassword":"NewPass123"}'

Endpoints