POST
/
usage-metrics
Header
Body
curl --request POST \
  --url https://dev.seqhq.io/api/usage-metrics \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "aggregationProperty": "message_length",
  "aggregationType": "COUNT",
  "caseSensitive": true,
  "deletedAt": "2022-06-28T16:47:00Z",
  "description": "Total length of sent messages.",
  "eventType": "message_sent",
  "groupingProperty": "channel",
  "metricType": "GROUPED",
  "name": "Total length of sent messages.",
  "propertiesToNegate": [
    "channels"
  ],
  "propertyFilters": {
    "channels": [
      "text",
      "email"
    ]
  },
  "unit": "bytes"
}'
{
  "aggregationProperty": "message_length",
  "aggregationType": "COUNT",
  "caseSensitive": true,
  "createdAt": "2022-06-28T16:47:00Z",
  "deletedAt": "2022-06-28T16:47:00Z",
  "description": "Total length of sent messages.",
  "eventType": "message_sent",
  "groupingProperty": "channel",
  "id": "f092246c-6b90-4106-bcca-304ccf06bf45",
  "metricType": "GROUPED",
  "name": "Total length of sent messages.",
  "propertiesToNegate": [
    "channels"
  ],
  "propertyFilters": {
    "channels": [
      "text",
      "email"
    ]
  },
  "sequenceAccountId": "ec1479a2-6ba1-421f-a7de-0853a20d17a1",
  "unit": "bytes"
}

Headers

Authorization
string
required

Your API credentials. Eg. Basic {credentials}.

Body

application/json
aggregationProperty
string
aggregationType
enum<string>
required
Available options:
COUNT,
UNIQUE,
SUM
caseSensitive
boolean
deletedAt
string
description
string
eventType
string
required
groupingProperty
string
metricType
enum<string>
required
Available options:
SIMPLE,
GROUPED
name
string
required
propertiesToNegate
string[]
propertyFilters
object
unit
string

Response

201 - application/json
aggregationProperty
string
aggregationType
enum<string>
required
Available options:
COUNT,
UNIQUE,
SUM
caseSensitive
boolean
createdAt
string
deletedAt
string
description
string
eventType
string
required
groupingProperty
string
id
string
required
metricType
enum<string>
required
Available options:
SIMPLE,
GROUPED
name
string
required
propertiesToNegate
string[]
propertyFilters
object
required
sequenceAccountId
string
required
unit
string