curl --request GET \
--url https://api.credira.com/v1/emails?callout_id=callout_987654321 \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json'
{
"success": true,
"data": [
{
"id": "email_123456789",
"callout_id": "callout_987654321",
"subject": "Payment Reminder - Invoice #INV-001",
"recipient_email": "customer@example.com",
"recipient_name": "John Doe",
"status": "delivered",
"template_id": "template_456789123",
"template_name": "Payment Reminder Template",
"sent_time": "2024-01-15T10:30:00Z",
"opened_time": "2024-01-15T11:15:00Z",
"clicked_time": "2024-01-15T11:20:00Z",
"bounced": false,
"unsubscribed": false,
"account_id": "acc_789123456",
"created_time": "2024-01-15T10:25:00Z",
"email_type": "payment_reminder",
"priority": "high",
"metadata": {
"campaign_id": "camp_123",
"department": "billing",
"invoice_amount": 1250.0
}
}
],
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789",
"total_emails": 1
}
}
Emails
Get Emails
Retrieve emails associated with a callout
GET
/
emails
curl --request GET \
--url https://api.credira.com/v1/emails?callout_id=callout_987654321 \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json'
{
"success": true,
"data": [
{
"id": "email_123456789",
"callout_id": "callout_987654321",
"subject": "Payment Reminder - Invoice #INV-001",
"recipient_email": "customer@example.com",
"recipient_name": "John Doe",
"status": "delivered",
"template_id": "template_456789123",
"template_name": "Payment Reminder Template",
"sent_time": "2024-01-15T10:30:00Z",
"opened_time": "2024-01-15T11:15:00Z",
"clicked_time": "2024-01-15T11:20:00Z",
"bounced": false,
"unsubscribed": false,
"account_id": "acc_789123456",
"created_time": "2024-01-15T10:25:00Z",
"email_type": "payment_reminder",
"priority": "high",
"metadata": {
"campaign_id": "camp_123",
"department": "billing",
"invoice_amount": 1250.0
}
}
],
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789",
"total_emails": 1
}
}
Retrieve all emails associated with a specific callout ID.
This endpoint returns
false if no emails exist for the given callout ID, or
an array of email objects if emails are found.Request
The unique identifier of the callout to retrieve emails for
Bearer token for API authentication
curl --request GET \
--url https://api.credira.com/v1/emails?callout_id=callout_987654321 \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json'
{
"success": true,
"data": [
{
"id": "email_123456789",
"callout_id": "callout_987654321",
"subject": "Payment Reminder - Invoice #INV-001",
"recipient_email": "customer@example.com",
"recipient_name": "John Doe",
"status": "delivered",
"template_id": "template_456789123",
"template_name": "Payment Reminder Template",
"sent_time": "2024-01-15T10:30:00Z",
"opened_time": "2024-01-15T11:15:00Z",
"clicked_time": "2024-01-15T11:20:00Z",
"bounced": false,
"unsubscribed": false,
"account_id": "acc_789123456",
"created_time": "2024-01-15T10:25:00Z",
"email_type": "payment_reminder",
"priority": "high",
"metadata": {
"campaign_id": "camp_123",
"department": "billing",
"invoice_amount": 1250.0
}
}
],
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789",
"total_emails": 1
}
}
{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "Missing required parameter: callout_id"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789"
}
}
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789"
}
}
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Callout not found"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789"
}
}
{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded"
},
"meta": {
"timestamp": "2024-01-15T10:30:00Z",
"request_id": "req_123456789"
}
}
⌘I
