GET/v2/projects/{projectId}/prompts/get-variables

List available prompt variables

Lists the variables available for prompts in a project. Supply keyId or targetLanguageId when you want the variables to reflect a particular key or target language; omit them to retrieve variables without those filters.

3 parameters
projectIdintegerrequired
The integer identifier of the project whose prompt variables to retrieve.
keyIdintegeroptional
The integer identifier of a key to use when determining available prompt variables.
targetLanguageIdintegeroptional
The integer identifier of a target language to use when determining available prompt variables.

5 status codes
200Returns an object with a `data` array of available prompt variables. Each variable includes a `name` and `type`, and may include a description, properties, or value.
dataarray<object>required
400Returned when an identifier or other request value is invalid.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
401Returned when the request is not authenticated.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
403Returned when the authenticated user does not have permission to access the project.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
404Returned when the project or a requested resource cannot be found.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional

Error handling

A 400 is returned when an identifier has an invalid value or format. A 401 is returned when the request is unauthenticated, and a 403 is returned when the authenticated user cannot access the project. A 404 is returned when the project or a requested resource cannot be found; projectId must identify the project.