Skip to main content
POST
/
v1
/
ai-variables
curl --request POST \
  --url https://openapi.enginy.ai/v1/ai-variables \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "iceBreaker",
  "entity": "CONTACT",
  "prompt": "Write a short ice breaker using {firstName}, {jobTitle}, {companyName}, and {lastLinkedInPost}.",
  "outputSchema": {
    "type": "text",
    "provideExplanation": true
  },
  "search": true
}
'
{
  "status": "success",
  "message": "<string>",
  "data": {
    "id": 123,
    "name": "<string>",
    "prompt": "<string>",
    "model": "<string>",
    "outputSchema": {
      "type": "text",
      "values": [
        "<string>"
      ],
      "provideExplanation": true,
      "jsonSchema": "<string>"
    },
    "search": true,
    "entity": "CONTACT",
    "folderId": 123,
    "customWebsiteField": "<string>",
    "description": "<string>",
    "isPublic": true,
    "archivedAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

x-api-key
string
header
required

Body

application/json
name
string
required

Unique AI variable name.

Minimum string length: 1
prompt
string
required

Prompt template. Reference entity fields with {fieldName} placeholders. Use GET /v1/contacts/fields or GET /v1/companies/fields to discover valid field names.

Minimum string length: 1
entity
enum<string>
required

Entity that will store the generated value.

Available options:
CONTACT,
COMPANY
model
string | null

Optional model ID. Defaults to Enginy’s default AI model.

outputSchema
object

Optional output contract. Defaults to { "type": "text", "provideExplanation": false }.

Enable Deep Search for this AI variable. Defaults to false.

folderId
integer | null

Optional folder ID.

customWebsiteField
string | null

Optional custom website field source.

Response

AI variable created successfully

status
enum<string>
required
Available options:
success
message
string
required
data
object
required