Skip to main content

Create/Add change to a change request

POST 

<your-unleash-url>/api/admin/projects/:projectId/environments/:environment/change-requests

Given a change request exists, this endpoint will attempt to add a change to an existing change request for the user. If a change request does not exist, it will attempt to create one.

Request

Path Parameters

    projectId stringrequired
    environment stringrequired

Bodyrequired

changeRequestOneOrManyCreateSchema

    oneOf
    actionstringrequired

    The name of this action.

    Possible values: [updateSegment]

    payload objectrequired

    Data used to create or update a segment

    idintegerrequired

    The ID of the segment to update.

    Example: 1

Responses

changeRequestSchema

Schema
    oneOf

Authorization: Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
curl -L '<your-unleash-url>/api/admin/projects/:projectId/environments/:environment/change-requests' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: <Authorization>' \
-d '{
"action": "updateSegment",
"payload": {
"id": 1
}
}'
Request Collapse all
Base URL
<your-unleash-url>
Auth
Parameters
— pathrequired
— pathrequired
Body required
{
  "action": "updateSegment",
  "payload": {
    "id": 1
  }
}
ResponseClear

Click the Send API Request button above and see the response here!