Skip to main content
POST
Preview an AI custom field

Authorizations

Authorization
string
header
required

Authenticate every request with a Bearer token. Pass your Reply API key in the Authorization header:

Get your API key from the Reply dashboard: Settings → API Key.

Path Parameters

id
integer
required

Custom field ID

Body

application/json
contactId
integer
required

The contact the prompt's template variables are resolved against.

Required range: x >= 1
promptText
string

Prompt to run instead of the one stored on the field, so an edit can be tried before it is saved. Omit it to use the field's own prompt.

Maximum string length: 8000

Response

The prompt ran. Check status for the outcome — a run that produced no value still returns 200, with value set to null.

The value an AI custom field's prompt produced for one contact. Nothing is written to the contact.

customFieldId
integer
required

The custom field the prompt belongs to.

contactId
integer
required

The contact the prompt was resolved against.

status
enum<string>
required

Outcome of the run. missingData means the contact does not carry a template variable the prompt refers to; noResults means the prompt produced nothing.

Available options:
succeeded,
failed,
missingData,
noResults
value
string | null

The generated value, or null when status is anything other than succeeded.

errorMessage
string | null

Explains any status other than succeeded; null otherwise.