Skip to content
Baremetrics

Create Segment

POST https://api.baremetrics.com/v1/segments

The category is one of three keys: baremetrics, clearbit, or customer_properties that you can see from listing fields.

Segment filters in Baremetrics

Body

application/json
  • query array of objects required
    • category string required
    • field string required
    • value string required

      Can be an string, integer, or boolean

    • method string required
  • name string

Responses

200OK
{
  "segment": {
    "id": "1",
    "name": "Active Customers",
    "query": [
      {
        "category": "baremetrics",
        "field": "subscriptions.is_active",
        "method": "boolean",
        "value": "true"
      }
    ],
    "created_at": 1492523687,
    "updated_at": 1492614366
  }
}
400Bad Request
{}