Skip to main content
PUT
/
projects
/
{projectId}
/
segments
/
{segmentId}
Update a segment
curl --request PUT \
  --url http://localhost:3000/projects/{projectId}/segments/{segmentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "description": "<string>",
  "rules": [
    {
      "type": "rule",
      "attribute": "<string>",
      "operator": "eq",
      "value": "<string>"
    }
  ],
  "logical_op": "AND",
  "force": false,
  "key": "<string>"
}
'
{
  "statusCode": 123,
  "message": "OK",
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "rules": [
      {
        "type": "rule",
        "attribute": "<string>",
        "operator": "eq",
        "value": "<string>"
      }
    ],
    "logical_op": "AND",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "description": "<string>",
    "force": false,
    "key": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

projectId
string
required
segmentId
string
required

Body

application/json
id
string<uuid>
name
string
description
string
rules
object[]
logical_op

Logical operator to combine multiple rules. 'AND' requires all rules to match, 'OR' requires at least one rule to match.

Available options:
AND
force
boolean
default:false
key
string

A unique key for the segment within the project.

Pattern: ^[a-zA-Z0-9-_]+$

Response

Default Response

statusCode
number
message
string
default:OK
data
object