Tenant email api
Tenant Email API
This API allows you to send emails using your own authorized domains. A domain needs to be first added and verified in Paysight before it can be used.
Authentication
Authentication is done using a tenant_key
which is a UUID associated with your account. This key must be included in all API requests.
Tenant Key
Your tenant key can be found under Settings in your Paysight account.
Domain Authorization
You can only send emails from domains that have been authorized for your account. Domains can be managed within Paysight under Settings. (Coming soon). For now, please contact your account manager to add a domain to your account.
Endpoints
Send a Single Email
Endpoint: POST https://app.paysight.io/api/email
Request Body:
Note: For security reasons, loading templates from files is not supported. Templates must be provided directly in the
templateContent
field when using the “string” templateType.
Response:
Send Batch Emails
Endpoint: POST https://app.paysight.io/api/email/batch
Request Body:
Response:
Error Responses
Invalid Request Format
Invalid Tenant Key
Unauthorized Domain
Server Error
Idempotency
The API supports idempotency to prevent duplicate emails from being sent. You can provide your own idempotencyKey
in the request, or the API will generate one based on the content of the request.
Idempotency keys expire after 7 days.
Templates
React Templates
The following React templates are available:
generic
: A generic email template with heading, body content, and CTA buttonorder-confirmation
: An order confirmation email templatewelcome-membership
: A welcome email for new members
String Templates
String templates support variable substitution using the {{variable}}
syntax and conditional blocks using {{#if variable}}...{{/if}}
.
Example:
Implementation Notes
- Domain verification ensures you can only send from authorized domains
- Idempotency prevents duplicate emails from being sent
- All emails are tracked for monitoring and debugging purposes