# PATCH /apps/:app_id/audiences/:audience_id

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

Change a version of an app (the Views and access panel): its name, pages, the information it shows, its actions (buttons), or what it may do with the app's tables. Takes effect for everyone who has that version within a minute. Workspace admins only.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `app_id` | path | string | yes | The app's id. |
| `audience_id` | path | string | yes | The version's id, from list_app_audiences. |
| `name` | body | string | no | A new name for the version, 1 to 60 characters and different from the app's other versions. |
| `side` | body | string | no | "team" or "portal". Changing it re-checks the pages, data and buttons against the new side, so change those in the same call. |
| `view_keys` | body | array | no | The pages this version shows: a list of page keys from the app's manifest (get_app lists them). Team versions take team pages and client versions take client pages. Send the whole new list. |
| `reads` | body | array | no | The TrustPager data this version can see: a list of the app's declared reads, for example "opportunities:read" (Opportunities), "tasks:read" (Tasks), "scheduling:read" (Bookings), "invoices:read" (Invoices), "activities:read" (Activities), "referrals:read" (Referrals). Only reads the app's manifest declares (crm_reads) are allowed. A client version can see none: send []. Send the whole new list. |
| `actions` | body | array | no | The buttons this version has: a list of the app's declared actions, for example "opportunities:write" (move an opportunity, set its next action), "tasks:write" (create or complete a task), "activities:write" (log an activity), "scheduling:write" (mark a booking attended, late or no-show), "invoices:write-approval" (send an invoice reminder), "referrals:write-approval" (ask for a referral). Only actions the manifest declares (crm_actions) are allowed. A button works only when the version has it AND the person's own role allows it. A client version can only have "tasks:write", which for clients means "tell the team" (it creates a task for your team). list_app_audiences shows, for every button, what else it can set off, such as automations. Send the whole new list. |
| `can_write_rows` | body | boolean | no | true lets people with this version add and change rows in the app's own tables. Clients can then only add and change rows linked to themselves. Default true for a new version. |
| `can_see_all_rows` | body | boolean | no | true lets people with this version see everyone's rows in tables that keep rows per person. Team versions only: a client version always sees only the rows linked to that client. Default false. |
| `position` | body | number | no | Order of the versions (0 first). When one person is given two versions by equally specific shares, the lower number wins. |
| `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 PATCH   "https://api.trustpager.com/functions/v1/api/v1/apps/:app_id/audiences/:audience_id"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"name":"...","side":"...","view_keys":"..."}'
```

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