saveCopilotPromptTemplate
Requires permission settings:organization:update.
Create or replace a saved prompt, returning the organization's full list. The slug is the handle and re-using one overwrites that template.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation SaveCopilotPromptTemplate($body: String!, $slug: String!, $title: String!) {
saveCopilotPromptTemplate(body: $body, slug: $slug, title: $title) {
title
body
slug
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation SaveCopilotPromptTemplate($body: String!, $slug: String!, $title: String!) {\n saveCopilotPromptTemplate(body: $body, slug: $slug, title: $title) {\n title\n body\n slug\n }\n}",
"variables": {
"body": "string",
"slug": "string",
"title": "string"
}
}
EOF
Variables:
{
"body": "string",
"slug": "string",
"title": "string"
}
Response:
{
"data": {
"saveCopilotPromptTemplate": [
{
"title": "string",
"body": "string",
"slug": "string"
}
]
}
}
saveCopilotPromptTemplate(
body: String!
slug: String!
title: String!
): [CopilotPromptTemplateType!]!
Arguments
saveCopilotPromptTemplate.body ● String! non-null scalar
The text of the template.
saveCopilotPromptTemplate.slug ● String! non-null scalar
The slug that identifies the template. An existing slug is overwritten.
saveCopilotPromptTemplate.title ● String! non-null scalar
The new title.
Type
CopilotPromptTemplateType object
A saved prompt: work a workspace does every week, written down once. It is inserted as the seller's own message and nothing more.