{ "value": ... }; to leave a field untouched omit it entirely. To clear the path (un-group a snippet) pass { "value": null }.
For TypeScript, the GraphQL SDK gives you a fully typed client for these operations.
snippet:edit
Mutation
Variables
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Change a snippet’s name, text, or group using field-level wrapper inputs.
{ "value": ... }; to leave a field untouched omit it entirely. To clear the path (un-group a snippet) pass { "value": null }.
snippet:editmutation updateSnippet($input: UpdateSnippetInput!) {
updateSnippet(input: $input) {
snippet {
id
name
text
markdown
path
}
error {
message
type
code
fields {
field
message
type
}
}
}
}
{
"input": {
"snippetId": "sn_01HXXXXXXXXXXXXXXXXXXXXXXX",
"name": { "value": "Out of office (updated)" },
"text": { "value": "Thanks for getting in touch! We'll reply within one business day." }
}
}
Was this page helpful?
