> ## Documentation Index > Fetch the complete documentation index at: https://www.canva.dev/docs/apps/llms.txt > Use this file to discover all available pages before exploring further. # appProcess.requestClose API reference for the appProcess.requestClose method. Requests the termination of the specified app process. Once called, this method: 1. Transitions the state of the process to `"closing"`. 2. Invokes all registered `setOnDispose` callbacks. 3. Waits for the process to finish closing. 4. Transitions the state of the process to `"closed"`. Each time the state changes, all of the `registerOnStateChange` callbacks are called. ## Usage ### Close a process ```typescript import { appProcess, type AppProcessId } from '@canva/platform'; const placeholderProcessId = "PLACEHOLDER_PROCESS_ID" as AppProcessId; await appProcess.requestClose(placeholderProcessId, { reason: 'completed' }); ``` ### Pass structured data to a process as it closes ```typescript import { appProcess, type AppProcessId, type CloseParams } from '@canva/platform'; type DetailedCloseParams = CloseParams & { savePoint: string; timestamp: number; userInitiated: boolean; }; const placeholderProcessId = "PLACEHOLDER_PROCESS_ID" as AppProcessId; await appProcess.requestClose(placeholderProcessId, { reason: 'completed', savePoint: 'auto_backup_1', timestamp: Date.now(), userInitiated: true }); ``` ## Parameters The ID of an app process. Parameters to pass to the `setOnDispose` callback. Any kind of structured data can be passed via this property. Properties of params}> The reason the app process is closing. **Available values**: * `"completed"` * `"aborted"` ## Returns `Promise`