# POST /apps

**Resource:** [Apps](./apps.md)  
**MCP tool:** `create_app`  
**Scopes:** `apps:write`  
**Write operation:** yes

Create a draft app with a manifest: its views, the tables it uses and what CRM data it may read. A draft is visible only to workspace admins. Next add its tables (create_app_table), share it (share_app) and publish it (publish_app), which waits for a workspace admin. Check list_apps first so the same app is not created twice. A team member who is not a workspace admin can make a personal app instead: send template_key as one of the personal starters (no manifest) and it is ready at once, private to them and workspace admins, showing only what their role allows, five at most each.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `name` | body | string | yes | The app's name (80 characters at most), for example "Morning brief". |
| `manifest` | body | object | no | Required for a workspace admin; ignored for anyone else (a personal app is built from its starter). What the app is and may touch: { schema_version: 1, name, views: [{ key, label, audience: "team" \| "portal" }], tables: [table keys it uses], crm_reads: [read scopes such as "deals:read"], crm_actions: [action scopes such as "email:send-approval"] }. Unknown keys are refused. |
| `slug` | body | string | no | Short unique address for the app (lower case, digits and dashes). Made from the name when left out. |
| `description` | body | string | no | One or two sentences on what the app is for (600 characters at most). |
| `icon` | body | string | no | A short icon name such as "calendar" or "chart". |
| `accent` | body | string | no | The app's theme colour on the team side, as a hex colour such as "#15803d". Clients in the Client Portal always see the workspace's brand colour. Left out, the app wears the colour of its starter's category. |
| `template_key` | body | string | no | The starter the app came from, for example "morning_brief". A team member who is not a workspace admin must send one of the personal starters: morning_brief, follow_up_board, bookings_running_sheet, work_in_progress, key_dates, certificate_tracker, ready_to_invoice, response_times. |
| `audience` | body | string | no | "team" (default), "portal" (clients through the Client Portal) or "both". |
| `require_approval` | body | boolean | no | Optional. Set true to route this write into the approval queue for human review instead of executing it immediately (returns 202 + an approval_id). Works even when your key/token has permission to execute directly. |

## Request example

```bash
curl -X POST   "https://api.trustpager.com/functions/v1/api/v1/apps"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"name":"...","manifest":"...","slug":"..."}'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`