Overview
The Create Snippet endpoint allows you to create new reusable code snippets that can be shared across multiple checks. Snippets help maintain code consistency and reduce duplication in your monitoring setup. Common Use Cases:- Shared Function Creation
- Code Template Development
- Authentication Logic Reuse
- Utility Function Storage
Create snippets for commonly used functions, authentication patterns, and utility code to maintain consistency across your monitoring checks.
Authorizations
The Checkly Public API uses API keys to authenticate requests. You can get the API Key here.
Your API key is like a password: keep it secure!
Authentication to the API is performed using the Bearer auth method in the Authorization header and using the account ID.
For example, set Authorization header while using cURL:
curl -H "Authorization: Bearer [apiKey]" "X-Checkly-Account: [accountId]"
Headers
Your Checkly account ID, you can find it at https://app.checklyhq.com/settings/account/general
Body
application/json
Response
Created