Submit Change Request

Submit a change to a feature flag or segment for approval

Access requirements

The Authorization Bearer (Admin API Key authorizing the request) must have one of the following roles and scopes:

Admin API Key roles accepted

  • API_ALL_GRANTED
  • API_FEATURE_FLAG_EDITOR*
  • API_SEGMENT_EDITOR**

Admin API Key scopes accepted

  • GLOBAL
  • WORKSPACE
  • ENVIRONMENT


To learn more about Admin API Key roles and scopes, see API keys overview.


Below are some examples of the expected payload for other types of updates to feature flags and segments.

Open Change Request to modify an existing feature flag definition

curl  --request POST 'https://api.split.io/internal/api/v2/changeRequests/ws/{ws_id}/environments/{environment_id}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ADMIN_API_KEY' \
--data-raw '{
	"split": {"name":"admin", "treatments":[{"name":"on","configurations":"{\"color\":\"blue\"}"},{"name":"off","configurations": "{\"color\":\"red\"}"}],"defaultTreatment":"off", "baselineTreatment": "off","rules":[{"buckets":[{"treatment":"on","size":50},{"treatment":"off","size":50}],"condition":{"matchers":[{"type":"IN_SEGMENT","string":"employees"}]}}],"defaultRule":[{"treatment":"off","size":50},{"treatment":"on","size":50}]},
	
	"operationType":"UPDATE",
	"title":"update split definition",
	"comment":"update split defition",
	"approvers":["approvers email address"]
}
'

Open Change Request to kill a feature flag

curl --location --request POST 'https://api.split.io/internal/api/v2/changeRequests/ws/{ws_id}/environments/{environment_id}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ADMIN_API_EY' \
--data-raw '{
	"{
	"split": {"name":"admin"},
	"operationType":"KILL",
	"title":"kill split submission",
	"comment":"a great Comment",
	"approvers":["approvers email address"]
}
'

Open Change Request to restore a feature flag

curl --request POST 'https://api.split.io/internal/api/v2/changeRequests/ws/{ws_id}/environments/{environment_id}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ADMIN_API_KEY' \
--data-raw '{
	"split": {"name":"<SPLIT_NAME>"},
	
		"operationType":"RESTORE",
	"title":"restore split",
	"comment":"a great comment",
	"approvers":["[email protected]"]
}
'

Open Change Request to archive a feature flag definition

curl --request POST 'https://api.split.io/internal/api/v2/changeRequests/ws/{ws_id}/environments/{environment_id}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ADMIN_API_KEY' \
--data-raw '{
	"split": {"name":"<SPLIT_NAME>"},
	
	"operationType":"ARCHIVE",
	"title":"Some CR Title",
	"comment":"Some CR Comment",
	"approvers":["[email protected]"]
}
'

Open Change Request to add members to a segment

curl --request POST 'https://api.split.io/internal/api/v2/changeRequests/ws/{ws_id}/environments/{environment_id}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ADMIN_API_KEY' \
--data-raw '{
	"segment":{"name":"<SEGMENT_NAME>", "keys":["k1","k2"]},
	"operationType":"CREATE",
	"title":"Some CR Title",
	"comment":"Some CR Comment",
	"approvers":["[email protected]"]
}
'

Open Change Request to add members to a segment via CSV

curl  --request POST 'https://api.split.io/internal/api/v2/changeRequests/ws/{ws_id}/environments/{environment_id}' \
--header 'Authorization: Bearer ADMIN API KEY' \
--form 'file=@/Users/someuser/approvalFlowsKeys.csv' \
--form 'segmentName=<SEGMENT_NAME>' \
--form 'title=Some CR Title' \
--form 'comment=Some CR Comment' \
--form '[email protected],[email protected]' \
--form 'operationType=CREATE'

Open Change Request to remove members from a segment

curl --location --request POST 'https://api.split.io/internal/api/v2/changeRequests/ws/{ws_id}/environments/{environment_id}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ADMIN_API_KEY' \
--data-raw '{
	"segment":{"name":"<SEGMENT_NAME>", "keys":["k1","k2"]},
	"operationType":"ARCHIVE",
	"title":"Some CR Title",
	"comment":"Some CR Comment",
	"approvers":["[email protected]"]
}
'
Language