Skip to content

Variables

Global variables are reusable values — brand name, tone, CTA, target audience — that can be referenced in generation prompts and cell content. Variables are managed per-sheet via an XLSX upload.


Returns the global variables sheet for a given sheet.

GET /v1/autocontentengine/{id}/global_variables?agent_id={agent_id}
ParameterTypeDescription
idintegerThe sheet ID.

Returns the variables sheet object, or null if no variables have been imported.

{
"id": 600,
"variables": [
{ "key": "brand_name", "value": "Acme Corp" },
{ "key": "tone", "value": "casual and friendly" },
{ "key": "cta", "value": "Link in bio!" }
]
}
Terminal window
curl "https://api.gen.pro/v1/autocontentengine/101/global_variables?agent_id=42" \
-H "X-API-Key: your-api-key"

Uploads an XLSX file to set (or replace) the global variables for a sheet. Use multipart/form-data with the file in the file field.

POST /v1/autocontentengine/{id}/import_global_variables?agent_id={agent_id}
ParameterTypeDescription
idintegerThe sheet ID.
FieldTypeRequiredDescription
filefileYesAn XLSX file matching the variables template format.

Returns the updated variables sheet.

Terminal window
curl -X POST "https://api.gen.pro/v1/autocontentengine/101/import_global_variables?agent_id=42" \
-H "X-API-Key: your-api-key" \
-F "file=@variables.xlsx"
StatusError codeDescription
422validation_errorInvalid file format or missing required columns.

Returns a blank XLSX template with the expected column headers. Use this as a starting point for your variables file.

GET /v1/autocontentengine/global_variables_template

Returns the XLSX file as a binary download (Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet).

Terminal window
curl -o template.xlsx "https://api.gen.pro/v1/autocontentengine/global_variables_template" \
-H "X-API-Key: your-api-key"