Skip to Content
Event Definitions

Save Event Rule

PUT
/v0/projects/{idOrSlug}/event-rules

Authorization

apiKeyAuth
headerx-api-key<token>

FastStats API key. Pass it in the x-api-key header or as a Bearer token in the Authorization header.

Path Parameters

idOrSlug*string

Request Body

application/json
  1. body
pattern*string
Length1 <= length <= 200
sentWith*|null
properties*array<>
Itemsitems <= 50
unknownProperties*string
Value in"allow""drop""reject"
previousPattern?|null

Response Body

EventRule

application/json
  1. response
pattern*string
sentWith*|null
properties*array<>
unknownProperties*string
Value in"allow""drop""reject"
updatedAt*string
Example Request
curl -X PUT 'https://api.faststats.dev/v0/projects/string/event-rules' \
  -H 'Content-Type: application/json' \
  -d '{
  "pattern": "string",
  "sentWith": "api_key",
  "properties": [
    {
      "key": "string",
      "type": "string",
      "required": true,
      "values": [
        "string"
      ],
      "min": 0,
      "max": 0
    }
  ],
  "unknownProperties": "allow"
}'
Example Response
{
  "pattern": "string",
  "sentWith": "api_key",
  "properties": [
    {
      "key": "string",
      "type": "string",
      "required": true,
      "values": [
        "string"
      ],
      "min": 0,
      "max": 0
    }
  ],
  "unknownProperties": "allow",
  "updatedAt": "string"
}