Register, rename or remove a React Native app's screens.
Changes the screen list of a React Native app (react_native_app_kernel_v1) once its screen files are written with POST .../sandbox/edit: app-extensions/routes.ts is generated from these changes, never written as text. Send several changes as one batch: all of them apply or none does, and a resent batch that is already in effect changes nothing (a repeated single add is refused as duplicate_id). The run started next with externalAgent: true checks the screens, saves them as a mobile revision and deploys the preview.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your access token.
clientportal-ai. writeOAuthPrivate IntegrationSub-Account TokenRequest
Headers
The API version.
v3v3Path Parameters
Project identifier.
Possible values: Value must match regular expression ^prj_[A-Za-z0-9_-]+$
prj_01HXQ8Z6J9K2Body
One change, or several as { "action": "batch", "changes": [...] }. A change is { "action": "add", "route": { "id", "label", "icon", "requires"?, "parent"?, "copyKey"?, "filledIcon"? } }, { "action": "rename", "id", "newId", "label"? } or { "action": "remove", "id" }. id is kebab-case and names the screen file; icon is one of the kernel's icon names, and an unknown one is refused; parent makes the screen a detail pushed from that route.
Response
The route change, or why it was refused (ok false with reason and error).
Whether the change applied. False changes nothing; reason, error and problems say why.
trueThe action that applied.
addrenameremovebatchbatchThe route id a single change added, renamed to or removed; for a batch, every such id.
Ids whose change in the batch was already in effect.
[]The app's routes after the change.
What changed, in one sentence.
Added class-schedule.Why the change was refused, as a code.
duplicate_idWhy the change was refused, in words.
change 0: screen id "class-schedule" is already registeredEvery problem a refused batch found, so one answer fixes them all.