Developer Guide
Get started with the SynerMail REST API
Get your token
Open the account or profile settings and look for API Token or Developer / API. Keep the token in a secret store and use a customer-scoped token for customer integrations.
Make a read-only request
Confirm the API base path, supported authentication method, and resource routes for your SynerMail version. The supplied draft uses /api/v1/me and /api/v1/lists with Bearer authentication. These examples need deployment verification.
curl -fsS "https://mail.example.com/api/v1/lists" \
-H "Authorization: Bearer $SYNERMAIL_TOKEN" \
-H "Accept: application/json"
Use the list UID from the response for later requests. Keep credentials out of URLs and browser code.
Use the same headers in an integration
- PHP: configure Guzzle with the base URI and headers, then call get.
- Python: call requests.get with headers and a timeout, then raise_for_status.
- Node.js: use fetch with headers, and check response.ok before reading JSON.
- Go: use net/http with a client timeout, check request and response errors, then decode JSON.
Troubleshoot requests
- 401 or 403: verify the token, permissions, and account scope.
- 404: check the base URL and whether your version exposes the route.
- 415: use the correct Content-Type for the request body.
- 422: read the validation response and correct the request.
- 429: honor Retry-After if supplied and use bounded backoff.
- 500: check application logs through your administrator.
- Certificate error: fix the trust chain or configure the correct staging CA.
Keep credentials scoped
Confirm permissions, token rotation, rate limits, and any login endpoint against your deployment. Keep API calls that use private tokens on your backend. For CSV integrations, see List Management.