---
title: Update Audience Profile
protocol: rest
method: PATCH
endpoint: /v1/projects/{projectId}/audiences/{profileId}
description: "Update an existing audience profile"
---

# Update Audience Profile

Update the name, description, or audience tags of an existing profile. The slug cannot be changed after creation.

<Endpoint method="PATCH" path="/v1/projects/{projectId}/audiences/{profileId}" />

## Path Parameters

<ParamField path="projectId" type="string" required>
  The project ID.
</ParamField>

<ParamField path="profileId" type="string" required>
  The audience profile ID.
</ParamField>

## Request Body

All fields are optional. Only provided fields will be updated.

<ParamField body="name" type="string">
  Updated display name for the profile.
</ParamField>

<ParamField body="description" type="string">
  Updated description. Set to `null` to clear.
</ParamField>

<ParamField body="audiences" type="string[]">
  Updated array of audience tags. Replaces the existing tags entirely.
  
  <Callout type="warning">
    Changing audiences affects all existing tokens for this profile. Clients with old tokens will gain or lose access to pages based on the new tags.
  </Callout>
</ParamField>

## Response

Returns the updated audience profile object.

## Example

<CodeGroup>
```bash cURL
curl -X PATCH https://api.syntext.dev/v1/projects/proj_abc123/audiences/aud_xyz789 \
  -H "Authorization: Bearer stx_abc12345_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp (Enterprise)",
    "audiences": ["otc", "virtual-accounts", "transfers"]
  }'
```

```typescript SDK
import { Syntext } from '@syntext/sdk'

const client = new Syntext('stx_abc12345_...')

const profile = await client.audiences.update('proj_abc123', 'aud_xyz789', {
  name: 'Acme Corp (Enterprise)',
  audiences: ['otc', 'virtual-accounts', 'transfers'],
})
```

```python Python
from syntext import Syntext

client = Syntext("stx_abc12345_...")

profile = client.audiences.update(
    "proj_abc123",
    "aud_xyz789",
    name="Acme Corp (Enterprise)",
    audiences=["otc", "virtual-accounts", "transfers"],
)
```
</CodeGroup>

### Response

```json
{
  "id": "aud_xyz789",
  "name": "Acme Corp (Enterprise)",
  "slug": "acme-corp",
  "description": "Enterprise partner with OTC and VA access",
  "audiences": ["otc", "virtual-accounts", "transfers"],
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-03-20T14:45:00Z"
}
```

## Error Responses

### 404 Not Found

Returned when the profile does not exist.

```json
{
  "error": {
    "code": "profile_not_found",
    "message": "Profile does not exist"
  }
}
```

### 422 Unprocessable Entity

Returned when the request contains invalid data.

```json
{
  "error": {
    "code": "empty_audiences",
    "message": "Audiences array cannot be empty"
  }
}
```

```json
{
  "error": {
    "code": "slug_immutable",
    "message": "Slug cannot be changed after creation"
  }
}
```
