Commits
Environments that require commit run their latest commit. Changes wait as pending changes until someone commits them.
List pending changes
Section titled “List pending changes”GET/v1/orgs/{org}/projects/{project}/environments/{environment}/pending
What committing would change in an environment that requires commit: each difference between what its SDKs run (the latest commit) and the settings as they are now. Empty for an environment that applies changes at once. Review these, then commitEnvironment with working_version.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
orgrequired | path | string | The organization's slug, as in its URL in the app. Example: "snugghome". |
projectrequired | path | string | The project's slug, as in its URL in the app. Example: "snugghome-app". |
environmentrequired | path | string | The environment's slug, as in its URL in the app. Example: "production". |
Example request
curl https://api.spanslice.com/v1/orgs/snugghome/projects/snugghome-app/environments/production/pending \ -H "Authorization: Bearer $SPANSLICE_TOKEN"Response 200
Example response
{ "environment": "production", "requires_commit": true, "working_version": "5f0c2e9a41d3b7c8", "committed": { "message": "Sample checkout at 1 in 10", "created_at": "2026-10-07T09:12:44.000Z", "by": "Ada" }, "changes": [ { "id": "WyJydWxlIiwiYWRkZWQiLDE3LG51bGxd", "kind": "rule", "change": "added", "rule": "rule_RVeVNOTP", "services": [ "Api", "Main" ], "after": { "key": "ZWMVUY0p", "name": "Drop health checks", "stage": "created", "target": "root" }, "revertible": true } ]}Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | The request is invalid; errors says where. |
| 401 | unauthorized | The access token is missing, unknown, expired or revoked. |
| 404 | not_found | It doesn't exist, or this token can't reach it. |
Commit pending changes
Section titled “Commit pending changes”POST/v1/orgs/{org}/projects/{project}/environments/{environment}/commits
Makes the environment's SDKs run its settings as they are now: every pending change at once. Only for environments that require commit. Commits are how changes reach production there, so commit only what a person asked for or approved.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
orgrequired | path | string | The organization's slug, as in its URL in the app. Example: "snugghome". |
projectrequired | path | string | The project's slug, as in its URL in the app. Example: "snugghome-app". |
environmentrequired | path | string | The environment's slug, as in its URL in the app. Example: "production". |
Request body
CommitEnvironmentRequest, required.
Example request
curl -X POST https://api.spanslice.com/v1/orgs/snugghome/projects/snugghome-app/environments/production/commits \ -H "Authorization: Bearer $SPANSLICE_TOKEN" \ -H 'Content-Type: application/json' \ -d '{ "working_version": "5f0c2e9a41d3b7c8", "message": "Drop health checks"}'Response 201
Example response
{ "message": "Drop health checks", "created_at": "2026-10-08T14:20:01.000Z", "by": "Ada"}Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | The environment doesn't require commit; its changes already apply. |
| 401 | unauthorized | The access token is missing, unknown, expired or revoked. |
| 403 | forbidden | The token's role is too low for this operation. |
| 404 | not_found | It doesn't exist, or this token can't reach it. |
| 409 | conflict | The settings changed since working_version; review the pending changes again. |
Revert a pending change
Section titled “Revert a pending change”POST/v1/orgs/{org}/projects/{project}/environments/{environment}/pending/{change}/revert
Undoes one pending change, putting that setting back as the latest commit has it. Other environments that share the setting (rules are shared) change too, as they would in the app.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
orgrequired | path | string | The organization's slug, as in its URL in the app. Example: "snugghome". |
projectrequired | path | string | The project's slug, as in its URL in the app. Example: "snugghome-app". |
environmentrequired | path | string | The environment's slug, as in its URL in the app. Example: "production". |
changerequired | path | string | A pending change's id. |
Request body
RevertChangeRequest, required.
Example request
curl -X POST https://api.spanslice.com/v1/orgs/snugghome/projects/snugghome-app/environments/production/pending/{change}/revert \ -H "Authorization: Bearer $SPANSLICE_TOKEN" \ -H 'Content-Type: application/json' \ -d '{ "working_version": "5f0c2e9a41d3b7c8"}'Response 204
No content.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | The change is to an organization-wide setting, which only its own settings page changes. |
| 401 | unauthorized | The access token is missing, unknown, expired or revoked. |
| 403 | forbidden | The token's role is too low for this operation. |
| 404 | not_found | It doesn't exist, or this token can't reach it. |
| 409 | conflict | The settings changed since working_version; review the pending changes again. |