DestinationsUpdate destination

Update destination

Partially update a destination. Requires an agency (ak_) key. Only include fields you want to change; action_type is immutable. When action_config is supplied it fully replaces the stored config and is re-validated against the existing action_type.

curl -X PATCH "https://mythic-analytics.gulp.workers.dev/client/v1/destinations/123e4567-e89b-12d3-a456-426614174000" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "name": "John Doe",
  "enabled": true,
  "trigger_rules": {
    "operator": "AND",
    "rules": [
      {
        "type": "mythic_event",
        "eventName": "purchase",
        "operator": "equals"
      }
    ]
  },
  "action_config": {},
  "rate_limit_max": 3.14,
  "rate_limit_window_seconds": 3.14
}'
{
  "success": true,
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "tenant_key": "example_string",
    "name": "Purchase → Meta",
    "action_type": "webhook",
    "trigger_rules": {
      "operator": "AND",
      "rules": [
        {
          "type": "mythic_event",
          "eventName": "purchase",
          "operator": "equals"
        }
      ]
    },
    "action_config": {},
    "enabled": true,
    "rate_limit_max": 42,
    "rate_limit_window_seconds": 42,
    "trigger_count": 10,
    "last_triggered_at": "2024-12-25T10:00:00Z",
    "last_error": "example_string",
    "created_at": "2024-12-25T10:00:00Z",
    "updated_at": "2024-12-25T10:00:00Z"
  }
}
PATCH
/client/v1/destinations/{id}
PATCH
Base URLstring

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

Bearer Token
Bearer Tokenstring
Required

Client key as bearer token. Use an agency key (Bearer ak_...) for read-write access or a location secret key (Bearer sk_...) for read-only access. Scoped keys (mcp_) are accepted too and need destinations:read or destinations:write. See Using an mcp_ key over HTTP.

Client key as bearer token. Use an agency key (Bearer ak_...) for read-write access or a location secret key (Bearer sk_...) for read-only access. Scoped keys (mcp_) are accepted too and need destinations:read or destinations:write. See Using an mcp_ key over HTTP.
path
idstring
Required

Destination (action) identifier.

Format: uuid
Content-Typestring
Required

The media type of the request body

Options: application/json
namestring
Min length: 1
trigger_rulesobject

Conditions that gate whether a destination fires for a given event. For server-side delivery, the only rule type that filters on the event name is mythic_event (with an eventName and an operator). Unknown types are rejected with 400 invalid_config. See the "Trigger rules" section of the overview for the full field-by-field contract and how this interacts with event_mapping.

action_configobject

Fully replaces the stored config; re-validated against the existing type.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Client key as bearer token. Use an agency key (Bearer ak_...) for read-write access or a location secret key (Bearer sk_...) for read-only access. Scoped keys (mcp_) are accepted too and need destinations:read or destinations:write. See Using an mcp_ key over HTTP.

Path Parameters

idstring
Required

Destination (action) identifier.

Body

application/json
trigger_rulesobject

Conditions that gate whether a destination fires for a given event. For server-side delivery, the only rule type that filters on the event name is mythic_event (with an eventName and an operator). Unknown types are rejected with 400 invalid_config. See the "Trigger rules" section of the overview for the full field-by-field contract and how this interacts with event_mapping.

action_configobject

Fully replaces the stored config; re-validated against the existing type.

Responses

successboolean
dataobject