- API Reference
- endpoint
- beta
Beta Prompts
Beta Prompts
GET /v2/prompts
ListPrompts
ListPrompts
Parameters
pageSize
int32querypageToken
stringqueryalias
stringqueryfields
array<string>querysort.field
"list_sort_field_unspecified" | "list_sort_field_created_at" | "list_sort_field_last_modified_at" | "list_sort_field_name" | "list_sort_field_title"queryDefaults to created_at when omitted.
sort.direction
"list_sort_direction_unspecified" | "list_sort_direction_asc" | "list_sort_direction_desc"queryDefaults to descending for timestamp fields and ascending for text fields.
sort_by
stringqueryREST-friendly alias for sort.field. Supported values: created_at, last_modified_at, name, title.
sort_direction
stringqueryREST-friendly alias for sort.direction. Supported values: asc, desc.
Responses
Success
data
array<Prompt>Prompt
aliases
array<string>Aliases pointing to this version.
createdAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s
createdBy
stringdefinition
PromptDefinitionVersioned prompt content.
PromptDefinition
Versioned prompt content.
content
string* requiredPrompt template content.
variables
array<PromptVariable>Variables used by the prompt.
PromptVariable
name
stringStable object name.
description
stringDisplay description.
id
stringlatestVersion
int32Latest version number.
Example:
1
name
stringStable object name.
notes
stringNotes for this version.
sharingScope
"sharing_scope_unspecified" | "private" | "workspace"title
stringDisplay title.
updatedAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s
version
int32Example:
1
versionCreatedAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s
nextPageToken
stringPOST /v2/prompts
CreatePrompt
CreatePrompt
Request Example
{
"definition": {
"content": "ipsum eiusmod"
},
"name": "consequat do"
}
Request Body
aliases
array<string>Aliases pointing to this version.
Versioned prompt content.
PromptDefinition
Versioned prompt content.
content
string* requiredPrompt template content.
variables
array<PromptVariable>Variables used by the prompt.
PromptVariable
name
stringStable object name.
description
string | nullDisplay description.
name
string* requiredStable object name.
notes
string | nullNotes for this version.
sharingScope
"sharing_scope_unspecified" | "private" | "workspace"title
string | nullDisplay title.
workspaceRelation
"share_relation_unspecified" | "reader" | "writer"Relation a subject holds on a shared registry object.
Responses
Success
aliases
array<string>Aliases pointing to this version.
createdAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s
createdBy
stringdefinition
PromptDefinitionVersioned prompt content.
PromptDefinition
Versioned prompt content.
content
string* requiredPrompt template content.
variables
array<PromptVariable>Variables used by the prompt.
PromptVariable
name
stringStable object name.
description
stringDisplay description.
id
stringlatestVersion
int32Latest version number.
Example:
1
name
stringStable object name.
notes
stringNotes for this version.
sharingScope
"sharing_scope_unspecified" | "private" | "workspace"title
stringDisplay title.
updatedAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s
version
int32Example:
1
versionCreatedAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s
GET /v2/prompts/{prompt_id}
GetPrompt
GetPrompt
Parameters
prompt_id
stringpath* requiredversion
int32queryalias
stringqueryfields
array<string>queryResponses
Success
aliases
array<string>Aliases pointing to this version.
createdAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s
createdBy
stringdefinition
PromptDefinitionVersioned prompt content.
PromptDefinition
Versioned prompt content.
content
string* requiredPrompt template content.
variables
array<PromptVariable>Variables used by the prompt.
PromptVariable
name
stringStable object name.
description
stringDisplay description.
id
stringlatestVersion
int32Latest version number.
Example:
1
name
stringStable object name.
notes
stringNotes for this version.
sharingScope
"sharing_scope_unspecified" | "private" | "workspace"title
stringDisplay title.
updatedAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s
version
int32Example:
1
versionCreatedAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s
DELETE /v2/prompts/{prompt_id}
DeletePrompt
DeletePrompt
Parameters
prompt_id
stringpath* requiredResponses
Success
PATCH /v2/prompts/{prompt_id}
UpdatePrompt
UpdatePrompt
Parameters
prompt_id
stringpath* requiredRequest Example
{}
Request Body
description
string | nullDisplay description.
sharingScope
"sharing_scope_unspecified" | "private" | "workspace"title
string | nullDisplay title.
workspaceRelation
"share_relation_unspecified" | "reader" | "writer"Relation a subject holds on a shared registry object.
Responses
Success
aliases
array<string>Aliases pointing to this version.
createdAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s
createdBy
stringdefinition
PromptDefinitionVersioned prompt content.
PromptDefinition
Versioned prompt content.
content
string* requiredPrompt template content.
variables
array<PromptVariable>Variables used by the prompt.
PromptVariable
name
stringStable object name.
description
stringDisplay description.
id
stringlatestVersion
int32Latest version number.
Example:
1
name
stringStable object name.
notes
stringNotes for this version.
sharingScope
"sharing_scope_unspecified" | "private" | "workspace"title
stringDisplay title.
updatedAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s
version
int32Example:
1
versionCreatedAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s
GET /v2/prompts/{prompt_id}/versions
ListPromptVersions
ListPromptVersions
Parameters
prompt_id
stringpath* requiredResponses
Success
data
array<PromptVersion>PromptVersion
aliases
array<string>Aliases pointing to this version.
createdAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s
definition
PromptDefinitionVersioned prompt content.
PromptDefinition
Versioned prompt content.
content
string* requiredPrompt template content.
variables
array<PromptVariable>Variables used by the prompt.
PromptVariable
name
stringStable object name.
notes
stringNotes for this version.
version
int32Example:
1
POST /v2/prompts/{prompt_id}/versions
CreatePromptVersion
CreatePromptVersion
Parameters
prompt_id
stringpath* requiredRequest Example
{
"definition": {
"content": "ipsum eiusmod"
}
}
Request Body
aliases
array<string>Aliases pointing to this version.
Versioned prompt content.
PromptDefinition
Versioned prompt content.
content
string* requiredPrompt template content.
variables
array<PromptVariable>Variables used by the prompt.
PromptVariable
name
stringStable object name.
notes
string | nullNotes for this version.
Responses
Success
deduplicated
booleanExample:
false
version
int32Example:
1
GET /v2/prompts/{prompt_id}/versions/{version}
GetPromptVersion
GetPromptVersion
Parameters
prompt_id
stringpath* requiredversion
int32path* requiredfields
array<string>queryResponses
Success
aliases
array<string>Aliases pointing to this version.
createdAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s
createdBy
stringdefinition
PromptDefinitionVersioned prompt content.
PromptDefinition
Versioned prompt content.
content
string* requiredPrompt template content.
variables
array<PromptVariable>Variables used by the prompt.
PromptVariable
name
stringStable object name.
description
stringDisplay description.
id
stringlatestVersion
int32Latest version number.
Example:
1
name
stringStable object name.
notes
stringNotes for this version.
sharingScope
"sharing_scope_unspecified" | "private" | "workspace"title
stringDisplay title.
updatedAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s
version
int32Example:
1
versionCreatedAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s
PATCH /v2/prompts/{prompt_id}/versions/{version}
UpdatePromptVersionMetadata
UpdatePromptVersionMetadata
Parameters
prompt_id
stringpath* requiredversion
int32path* requiredRequest Example
{}
Request Body
aliases
AliasListPresence wrapper for a set of alias labels on update RPCs. As a message field it carries presence, so callers can distinguish "leave aliases unchanged" (field omitted) from "clear all aliases" (field set, empty values).
AliasList
Presence wrapper for a set of alias labels on update RPCs. As a message field it carries presence, so callers can distinguish "leave aliases unchanged" (field omitted) from "clear all aliases" (field set, empty values).
values
array<string>notes
string | nullNotes for this version.
Responses
Success
aliases
array<string>Aliases pointing to this version.
createdAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s
createdBy
stringdefinition
PromptDefinitionVersioned prompt content.
PromptDefinition
Versioned prompt content.
content
string* requiredPrompt template content.
variables
array<PromptVariable>Variables used by the prompt.
PromptVariable
name
stringStable object name.
description
stringDisplay description.
id
stringlatestVersion
int32Latest version number.
Example:
1
name
stringStable object name.
notes
stringNotes for this version.
sharingScope
"sharing_scope_unspecified" | "private" | "workspace"title
stringDisplay title.
updatedAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s
version
int32Example:
1
versionCreatedAt
date-timeRFC 3339 timestamp.
Examples:
1s
1.000340012s