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}, {company}, and {lastLinkedInPost}.", "outputSchema": { "type": "text", "provideExplanation": true }, "search": true } '
{
  "message": "<string>",
  "data": {
    "id": 123,
    "name": "<string>",
    "prompt": "<string>",
    "model": "<string>",
    "outputSchema": {
      "values": [
        "<string>"
      ],
      "provideExplanation": true,
      "jsonSchema": "<string>"
    },
    "search": true,
    "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"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.enginy.ai/llms.txt

Use this file to discover all available pages before exploring further.

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 the valid placeholder names for this workspace. Unsupported generic placeholders such as {previousMessage} are rejected in manual/public AI-variable creation.

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