API Reference
Build integrations with the JoshSecLogs REST API. All endpoints are JSON-based and authenticated with JWT or API keys.
Quick Start
All API requests are made to https://api.joshseclogs.com/api/v1. Authenticate by including your JWT token or API key in the Authorization header.
curl -X GET https://api.joshseclogs.com/api/v1/marketplace/countries \
-H "Authorization: Bearer YOUR_API_KEY"Authentication
Use the JWT access token from /auth/login or generate an API key from your dashboard. Include it as a Bearer token in the Authorization header for all authenticated requests.
Response Format
All responses are JSON. Successful responses return the data directly or wrapped in { data: ... }. Errors return { statusCode, message } with appropriate HTTP status codes.
Endpoints
/auth/registerCreate a new user account. Returns the user object.
/auth/loginAuthenticate with email and password. Returns a JWT access token.
/auth/meGet the authenticated user's profile.
Auth/auth/meUpdate the authenticated user's name and email.
Auth/auth/me/passwordChange password. Requires currentPassword and newPassword.
Auth/marketplace/countriesList all available countries for virtual numbers.
Auth/marketplace/products/:countryList available products/services for a given country.
Auth/marketplace/prices/:countryGet pricing for all services in a country, including stock counts.
Auth/marketplace/buyPurchase a virtual number. Deducts from wallet balance.
Auth/marketplace/ordersList all orders for the authenticated user.
Auth/marketplace/orders/:id/smsGet SMS messages received on a specific order's number.
Auth/marketplace/orders/:id/finishFinish an order (confirm SMS received).
Auth/marketplace/orders/:id/cancelCancel an order. Refunds the wallet if SMS was not received.
Auth/social-logs/categoriesList all social log categories.
Auth/social-logsList available social logs. Optional ?category= filter.
Auth/social-logs/:idGet full details of a social log (including credentials after purchase).
Auth/social-logs/:id/purchasePurchase a social log. Deducts from wallet and assigns to buyer.
Auth/social-logs/my-purchasesList all social logs purchased by the authenticated user.
Auth/walletGet the authenticated user's wallet balance.
Auth/wallet/transactionsList wallet transaction history.
Auth/payments/initializeInitialize a Paystack payment to fund the wallet.
Auth/payments/verifyVerify a Paystack payment and credit the wallet.
Auth/api-keysList the authenticated user's API keys (masked).
Auth/api-keysGenerate a new API key. Returns the full key once.
Auth/api-keys/:idDelete an API key permanently.
Auth