saveCopilotPlaybookRule
Requires permission settings:organization:update.
Adds a playbook rule, or edits an existing one when its key is given. The playbook is the organization's standing instructions to the copilot: at most 12 rules, each 1 to 200 characters. A new rule takes the lowest free number. Limited to 20 requests a minute. Needs the catalog copilot feature on the plan and permission to update organization settings.
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 SaveCopilotPlaybookRule($text: String!) {
saveCopilotPlaybookRule(text: $text) {
category
confidence
key
origin
sourceSessionId
subjectType
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation SaveCopilotPlaybookRule($text: String!) {\n saveCopilotPlaybookRule(text: $text) {\n category\n confidence\n key\n origin\n sourceSessionId\n subjectType\n }\n}",
"variables": {
"text": "string"
}
}
EOF
Variables:
{
"text": "string"
}
Response:
{
"data": {
"saveCopilotPlaybookRule": {
"category": "CONSTRAINT",
"confidence": 0,
"key": "string",
"origin": "string",
"sourceSessionId": "id",
"subjectType": "TENANT"
}
}
}
saveCopilotPlaybookRule(
key: String
text: String!
): CopilotMemoryFactType!
Arguments
saveCopilotPlaybookRule.key ● String scalar
The key of the rule to edit. Omit it to add a new rule.
saveCopilotPlaybookRule.text ● String! non-null scalar
The rule's wording, 1 to 200 characters.
Type
CopilotMemoryFactType object
A fact the copilot remembers.