Preview the inbox AI summary (Gmail and Apple Mail) using the customer AI key
const url = 'https://api.replifier.com/v1/brands/brd_01hx0000000000000000000000/ai/inbox-preview';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"document":{"additionalProperty":"example"},"htmlOverride":"example","subject":"example","preheader":"example","opening":"example","senderName":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.replifier.com/v1/brands/brd_01hx0000000000000000000000/ai/inbox-preview \ --header 'Content-Type: application/json' \ --data '{ "document": { "additionalProperty": "example" }, "htmlOverride": "example", "subject": "example", "preheader": "example", "opening": "example", "senderName": "example" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
brd_01hx0000000000000000000000Request Bodyrequired
Section titled “Request Bodyrequired”object
M5 document (schemaVersion 1)
object
HTML mode: replaces the block design
Suggested opening lines that were applied: they are prepended to the text before summarizing
Sender name; defaults to the brand name
Example generated
{ "document": { "additionalProperty": "example" }, "htmlOverride": "example", "subject": "example", "preheader": "example", "opening": "example", "senderName": "example"}Responses
Section titled “Responses”Simulated summary
object
object
object
Suggested subjects, preheaders and opening lines; apply them by sending them back in subject, preheader and opening
object
The email text exceeded the limit and was truncated before summarizing
Simulation using the customer model: Gmail and Apple do not publish how they summarize
Example
{ "provider": "anthropic", "approximate": true}Invalid data
object
object
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
object
object
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
object
object
Example
{ "error": { "code": "not_found" }}Does not exist or is not visible to you
object
object
Example
{ "error": { "code": "not_found" }}Conflict
object
object
Example
{ "error": { "code": "not_found" }}Error
object
object
Example
{ "error": { "code": "not_found" }}Error
object
object
Example
{ "error": { "code": "not_found" }}Error
object
object
Example
{ "error": { "code": "not_found" }}Too many attempts
object
object
Example
{ "error": { "code": "not_found" }}Internal error
object
object
Example
{ "error": { "code": "not_found" }}Error
object
object
Example
{ "error": { "code": "not_found" }}Service temporarily unavailable
object
object
Example
{ "error": { "code": "not_found" }}