Skip to content

The customer's AI proposes subjects, copy or a design using the brand kit (ai.use; nothing is applied)

POST
/v1/brands/{brand}/ai/suggestions
curl --request POST \
--url https://api.replifier.com/v1/brands/brd_01hx0000000000000000000000/ai/suggestions \
--header 'Content-Type: application/json' \
--data '{ "kind": "subject", "brief": "example", "language": "es-MX", "count": 3, "bodyText": "example", "currentSubject": "example", "tone": "formal", "customTone": "example" }'

Uses the customer’s AI key. Returns variants already checked by code (clean subjects and copy; design with the kit’s colors, logos and fonts, and size measured against the 100 KB limit). The user decides with :accept or :reject.

brand
required
string
/^brd_[a-z0-9]{26}$/

Example

brd_01hx0000000000000000000000
Media typeapplication/json
One of:
object
kind
required
string
Allowed values: subject
brief
required

What to communicate. It is data for the AI, not instructions.

string
>= 3 characters <= 2000 characters /^[^\x00-\x08\x0b\x0c\x0e-\x1f\x7f]*$/
language
string
default: es-MX /^[a-z]{2,3}(-[A-Za-z0-9]{2,8}){0,2}$/
count

Variants for the A/B test.

integer
default: 3 >= 1 <= 5
bodyText

Email body text, so the subject reflects it.

string
<= 8000 characters
currentSubject
string
<= 200 characters /^[^\x00-\x1f\x7f]*$/
tone

Predefined subject tone.

string
Allowed values: formal friendly urgent playful inspirational professional
customTone

Custom tone, in the user’s own words. Cannot be combined with tone.

string
>= 3 characters <= 200 characters /^[^\x00-\x1f\x7f]*$/

Proposal pending decision

Media typeapplication/json
object
id
required
string
brandId
required
string
kind
required
string
Allowed values: subject copy design
status
required
string
Allowed values: proposed accepted edited rejected
input
required
object
key
additional properties
nullable
options
required
Array<object>
object
key
additional properties
nullable
kitVersion
required
number
nullable
provider
required
string
model
required
string
chosen
required
number
nullable
final
required
object
key
additional properties
nullable
createdAt
required
string
decidedAt
required
string
nullable

Example

{
"kind": "subject",
"status": "proposed"
}

Invalid data

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

No session, expired session, or invalid, expired or revoked API key

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Does not exist or is not visible to you

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Conflict

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Too many attempts

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Internal error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Service temporarily unavailable

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}