Create Prompt

Reference for the POST /console/v1/prompts endpoint of the Statsig API.

posthttps://statsigapi.net/console/v1/prompts

Authorizations

STATSIG-API-KEYstringrequired

apiKey (header)

Body

application/json
namestringrequired

Name for the AI Config.

Example:my_prompt
Constraints:min length: 3max length: 100pattern: ^[a-zA-Z0-9_\-. ]*$
displayNamestring

Optional display name for the AI Config.

Constraints:min length: 3max length: 100pattern: ^[a-zA-Z0-9_\-. ]*$
descriptionstring

Description for the AI Config.

Constraints:max length: 1000
targetAppsoneOf

List of target app names.

Constraints:stringstring[]
teamstring

Team name.

teamIDstring

Team ID.

tagsstring[]

Optional tags to associate with the AI Config.

creatorIDstring
Constraints:nullable
ownerobject

Schema for owner data including ID, type, name. Note that if Entity is created by CONSOLE API, owner will be undefined.

Example:{"ownerID":"user123","ownerType":"USER","ownerName":"John Doe","ownerEmail":"owner123@test.com"}
Constraints:nullable
Show child attributes
ownerIDstring

ID of the owner

Example:abc123
ownerTypestring

Type of the owner (e.g., SDK_KEY or USER)

Example:USER
ownerNamestring

The name of the owner. This field is optional.

Example:John Doe
ownerEmailstring

The email of the owner. This field is optional.

creatorEmailstring
Constraints:nullable

Response

application/json
200· Create Prompt
messagestringrequired

A simple string explaining the result of the operation.

dataobjectrequired
Show child attributes
idstringrequired

ID

namestring

The gate display name

Constraints:min length: 3max length: 100pattern: ^[a-zA-Z0-9_\-. ]*$
idTypestring
descriptionstringrequired
Constraints:max length: 1000
lastModifierIDstringrequired

ID of the last modifier.

Constraints:nullable
lastModifiedTimenumberrequired

Time of the last modification.

Constraints:format: doublenullable
lastModifierEmailstringrequired

Email of the last modifier.

Constraints:nullable
lastModifierNamestringrequired

Name of the last modifier.

Constraints:nullable
creatorIDstring
Constraints:nullable
createdTimenumberrequired

Timestamp when the entity was created.

Constraints:format: double
creatorNamestringrequired

Name of the creator.

Constraints:nullable
creatorEmailstring
Constraints:nullable
tagsstring[]
targetAppsstring[]

List of target applications associated with this configuration.

holdoutIDsstring[]

Holdouts applied to this configuration.

teamstring
Constraints:nullable
teamIDstring
Constraints:nullable
versionnumber

Version number

Constraints:format: double
400· Invalid request. Please check the request input and try again.
statusintegerrequired
Allowed values:400
messagestringrequired
401· This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx
statusintegerrequired
Allowed values:401
messagestringrequired
403· Forbidden. The request was valid, but the server is refusing action. You might not have the necessary permissions to access the resource.
statusintegerrequired
Allowed values:403
messagestringrequired

Was this helpful?