v1.0.0
OpenAPI 3.1.0

Create a manual segment

US region

Client Libraries

Create a manual segment

​

Create a manual segment with a name and a description. This request creates an empty segment.

Body
application/json
  • segment
    Type: object
    required
Responses
  • application/json
  • 400

    The request was malformed.

  • application/json
Request Example for post/v1/segments
{
  "segment": {
    "name": "Manual Segment 1",
    "description": "My first manual segment"
  }
}
{
  "segment": {
    "conditions": {
      "and": [
        {
          "event": {
            "filters": {
              "and": [
                {
                  "field": "to",
                  "inverse": false,
                  "operator": "eq",
                  "value": "premium"
                },
                {
                  "field": "from",
                  "inverse": true,
                  "operator": "eq",
                  "value": "premium"
                }
              ]
            },
            "id": 12,
            "name": "plan",
            "type": "attribute_change"
          },
          "inverse": false,
          "times": 1,
          "within": 0
        },
        {
          "segment": {
            "id": 7,
            "inverse": false
          }
        }
      ]
    },
    "created_at": 1552341937,
    "deduplicate_id": "15:1492548073",
    "description": "My first manual segment",
    "id": 7,
    "name": "Manual Segment 1",
    "progress": null,
    "state": "finished",
    "tags": null,
    "type": "manual",
    "updated_at": 1552341937
  }
}