Snippets
Snippets
Methods
get/zones/{zone_id}/snippets
Fetches all snippets belonging to the zone.
get/zones/{zone_id}/snippets/{snippet_name}
Fetches a snippet belonging to the zone.
put/zones/{zone_id}/snippets/{snippet_name}
Creates or updates a snippet belonging to the zone.
delete/zones/{zone_id}/snippets/{snippet_name}
Deletes a snippet belonging to the zone.
Snippets
Content
Snippets.Content
Methods
get/zones/{zone_id}/snippets/{snippet_name}/content
Fetches the content of a snippet belonging to the zone.
Security
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Snippets Write Snippets Read
Parameters
snippetName: string
The identifying name of the snippet.
params:
zone_id: string
The unique ID of the zone.
Returns
Request example
Snippets
Rules
Snippets.Rules
Methods
get/zones/{zone_id}/snippets/snippet_rules
Fetches all snippet rules belonging to the zone.
put/zones/{zone_id}/snippets/snippet_rules
Updates all snippet rules belonging to the zone.
delete/zones/{zone_id}/snippets/snippet_rules
Deletes all snippet rules belonging to the zone.