# Apps ## Fetch all apps `client.realtimeKit.apps.get(AppGetParamsparams, RequestOptionsoptions?): AppGetResponse` **get** `/accounts/{account_id}/realtime/kit/apps` Fetch all apps for your account ### Parameters - `params: AppGetParams` - `account_id: string` Path param: The account identifier tag. - `page_no?: number` Query param: The page number from which you want your page search results to be displayed. - `per_page?: number` Query param: Number of results per page. - `search?: string` Query param: Search string that matches apps by name. - `sort_order?: "ASC" | "DESC"` Query param: Sort order for apps by creation time. - `"ASC"` - `"DESC"` ### Returns - `AppGetResponse` - `data?: Array` - `id?: string` - `created_at?: string` - `name?: string` - `paging?: Paging` - `end_offset?: number` - `start_offset?: number` - `total_count?: number` - `success?: boolean` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const app = await client.realtimeKit.apps.get({ account_id: '023e105f4ecef8ad9ca31a8372d0c353' }); console.log(app.data); ``` #### Response ```json { "data": [ { "created_at": "2025-01-01T08:16:40.644Z", "id": "14a396e7-ca44-4937-bf1f-050a69118543", "name": "my-first-app" } ], "paging": { "end_offset": 1, "start_offset": 1, "total_count": 1 }, "success": true } ``` ## Create App `client.realtimeKit.apps.post(AppPostParamsparams, RequestOptionsoptions?): AppPostResponse` **post** `/accounts/{account_id}/realtime/kit/apps` Create new app for your account ### Parameters - `params: AppPostParams` - `account_id: string` Path param: The account identifier tag. - `name: string` Body param ### Returns - `AppPostResponse` - `data?: Data` - `app?: App` - `id?: string` - `created_at?: string` - `name?: string` - `success?: boolean` ### Example ```typescript import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const response = await client.realtimeKit.apps.post({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', name: 'x', }); console.log(response.data); ``` #### Response ```json { "data": { "app": { "created_at": "2025-01-01T08:16:40.644Z", "id": "14a396e7-ca44-4937-bf1f-050a69118543", "name": "my-new-app" } }, "success": true } ``` ## Domain Types ### App Get Response - `AppGetResponse` - `data?: Array` - `id?: string` - `created_at?: string` - `name?: string` - `paging?: Paging` - `end_offset?: number` - `start_offset?: number` - `total_count?: number` - `success?: boolean` ### App Post Response - `AppPostResponse` - `data?: Data` - `app?: App` - `id?: string` - `created_at?: string` - `name?: string` - `success?: boolean`