POST
/
api
/
v1
/
namespaces
/
{namespaceKey}
/
segments
curl --request POST \
  --url https://try.flipt.io/api/v1/namespaces/default/segments \
  --header 'Content-Type: application/json' \
  --header 'Accept: application/json' \
  --data '{
  "description": "<description>",
  "key": "<key>",
  "matchType": "<matchtype>",
  "name": "<name>"
}'
{
  "namespaceKey": "<string>",
  "key": "<string>",
  "name": "<string>",
  "description": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "constraints": [
    {
      "id": "<string>",
      "namespaceKey": "<string>",
      "segmentKey": "<string>",
      "type": "UNKNOWN_COMPARISON_TYPE",
      "property": "<string>",
      "operator": "<string>",
      "value": "<string>",
      "description": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "matchType": "ALL_MATCH_TYPE"
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

namespaceKey
string
required

Body

application/json
key
string
required
name
string
required
description
string
required
matchType
enum<string>
required
Available options:
ALL_MATCH_TYPE,
ANY_MATCH_TYPE

Response

200 - application/json
namespaceKey
string
required
key
string
required
name
string
required
description
string
required
createdAt
string
required
updatedAt
string
required
constraints
object[]
required
matchType
enum<string>
required
Available options:
ALL_MATCH_TYPE,
ANY_MATCH_TYPE