ConfigList snippets

List snippets

Every custom code snippet for this location. The list omits the code body unless include=code is passed, so an editor can load every snippet in one call.

curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/config/snippets?location_id=example_string&include=code" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "success": true,
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "code": "example_string",
      "tenant_key": "loc_abc123",
      "description": "Debug logger",
      "enabled": true,
      "trigger_rules": {
        "version": 1,
        "operator": "AND",
        "rules": [
          {
            "type": "url_pattern",
            "operator": "contains",
            "value": "/checkout"
          }
        ]
      },
      "created_at": "2024-12-25T10:00:00Z",
      "updated_at": "2024-12-25T10:00:00Z"
    }
  ]
}
GET
/client/v1/config/snippets
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Agency key (ak_) or location secret key (sk_). Writes require an agency key. Keys are server-side credentials — this surface serves no CORS headers on purpose. Scoped keys (mcp_) are accepted too and need the tags, snippets or transformers family the route belongs to. See Using an mcp_ key over HTTP.

Agency key (ak_) or location secret key (sk_). Writes require an agency key. Keys are server-side credentials — this surface serves no CORS headers on purpose. Scoped keys (mcp_) are accepted too and need the tags, snippets or transformers family the route belongs to. See Using an mcp_ key over HTTP.
query
location_idstring

Location to scope to. Required for ak_ keys (or send the X-Location-Id header); ignored for sk_.

query
includestring

Pass code to add each snippet's code body. Any other value is a 400 invalid_include.

Options: code
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Agency key (ak_) or location secret key (sk_). Writes require an agency key. Keys are server-side credentials — this surface serves no CORS headers on purpose. Scoped keys (mcp_) are accepted too and need the tags, snippets or transformers family the route belongs to. See Using an mcp_ key over HTTP.

Query Parameters

location_idstring

Location to scope to. Required for ak_ keys (or send the X-Location-Id header); ignored for sk_.

includestring

Pass code to add each snippet's code body. Any other value is a 400 invalid_include.

Allowed values:code

Responses

successboolean
dataarray