cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/emails/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"customer_ids": [
"<string>"
],
"delivery_statuses": [],
"end_time": "2023-11-07T05:31:56Z",
"entity_ids": [
"<string>"
],
"expand": "<string>",
"limit": 500,
"offset": 1,
"sort": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"triggers": []
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.invoices.query_email()
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.invoices.queryEmail({});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Invoices.QueryEmail(ctx, types.EmailLogFilter{})
if err != nil {
log.Fatal(err)
}
if res.ListEmailLogsResponse != nil {
// handle response
}
}{
"items": [
{
"cc_addresses": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"customer_id": "<string>",
"delivered_at": "2023-11-07T05:31:56Z",
"delivery_status": "queued",
"entity_id": "<string>",
"entity_type": "feature",
"environment_id": "<string>",
"from_address": "<string>",
"id": "<string>",
"idempotency_key": "<string>",
"metadata": {},
"provider": "resend",
"provider_message_id": "<string>",
"reply_to": "<string>",
"sent_at": "2023-11-07T05:31:56Z",
"status": "published",
"status_reason": "<string>",
"subject": "<string>",
"template_key": "invoice_finalized",
"tenant_id": "<string>",
"to_addresses": [
"<string>"
],
"trigger": "auto",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Invoices
Search emails
Use when reviewing emails sent to customers, for example every bounced email this month or every email to one customer. Filter by delivery status, trigger, customer, document and date. Newest first; paginated.
POST
/
emails
/
search
cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/emails/search \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"customer_ids": [
"<string>"
],
"delivery_statuses": [],
"end_time": "2023-11-07T05:31:56Z",
"entity_ids": [
"<string>"
],
"expand": "<string>",
"limit": 500,
"offset": 1,
"sort": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"triggers": []
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.invoices.query_email()
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.invoices.queryEmail({});
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/types"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Invoices.QueryEmail(ctx, types.EmailLogFilter{})
if err != nil {
log.Fatal(err)
}
if res.ListEmailLogsResponse != nil {
// handle response
}
}{
"items": [
{
"cc_addresses": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"customer_id": "<string>",
"delivered_at": "2023-11-07T05:31:56Z",
"delivery_status": "queued",
"entity_id": "<string>",
"entity_type": "feature",
"environment_id": "<string>",
"from_address": "<string>",
"id": "<string>",
"idempotency_key": "<string>",
"metadata": {},
"provider": "resend",
"provider_message_id": "<string>",
"reply_to": "<string>",
"sent_at": "2023-11-07T05:31:56Z",
"status": "published",
"status_reason": "<string>",
"subject": "<string>",
"template_key": "invoice_finalized",
"tenant_id": "<string>",
"to_addresses": [
"<string>"
],
"trigger": "auto",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>"
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Body
application/json
Filter

