GET/v2/projects/{projectId}/prompts/{promptId}

Get a project prompt by ID

Retrieves a prompt configuration from a project by its identifier. Use this endpoint to inspect the prompt's provider, template, and configured context options.

2 parameters
promptIdintegerrequired
The integer identifier of the prompt to retrieve.
projectIdintegerrequired
The integer identifier of the project containing the prompt.

5 status codes
200Returns the prompt configuration, including its `id`, `name`, `projectId`, and `providerName`, with any configured template and basic prompt options.
basicPromptOptionsarray<string>optional
idintegerrequired
namestringrequired
projectIdintegerrequired
providerNamestringrequired
templatestringoptional
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 prompt.
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 prompt 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 is invalid. A 401 is returned when the request is unauthenticated, and a 403 is returned when the authenticated user cannot access the prompt. A 404 is returned when the project or prompt cannot be found; the promptId and projectId path parameters must identify the prompt and its project.