> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.partnerpage.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.partnerpage.io/_mcp/server.

# Update a filter option

PATCH https://v1.api.partnerpage.io/api/directory/private/v1alpha/filters/{filterId}/options/{optionId}/
Content-Type: application/json

Update a custom filter option. To replace the image, send base64 in `image` or the URL returned by `POST /api/core/private/v1alpha/files/` in `imageUrl`; the file is copied into the option. Sending the option's current image URL back in `imageUrl` changes nothing; any other URL is refused. A file in `image` wins over `imageUrl`, and a value in either wins over `null` in the other. `null` alone removes the image, and leaving both out keeps it

Reference: https://docs.partnerpage.io/api-reference/directory/filters/filter-options/update-a-filter-option

## Authentication

- `Authorization` header (required) (prefixed with ` Token   `) — Your API key, sent as `Authorization: Token <your API key>`

## Request

### Path parameters

- `filterId` (string, required) — ID of the filter
- `optionId` (string, required) — ID of the filter option to update

### Body (application/json)

This endpoint expects a PatchedFilterOptionSerializerUpdaterRequest.

- `name` (string, optional)
- `order` (integer, optional)
- `image` (string, optional, nullable)
- `imageUrl` (string, optional, nullable)

## Response

### 200

Details of the filter option

- `href` (string, required)
- `id` (string, required)
- `name` (string, required)
- `order` (integer, required)
- `slug` (string, required)
- `image` (string, required, nullable)
- `imageUrl` (string, required, nullable)
- `filter` (string, required)
- `parentOptionId` (string, required)
- `parentOptionSlug` (string, required)
- `hasResults` (boolean, optional, nullable)

## Errors

### 400 Bad Request Error

Validation error, for example an invalid name or order, a base64 image of the wrong type or over 4 MB, an imageUrl not returned by the files upload endpoint, a staged file that is missing, of the wrong type or too large, or an option of a system filter, which can't be edited

- `any`

### 403 Forbidden Error

The filter does not exist, belongs to another organization, or the user cannot edit filters

- `any`

### 404 Not Found Error

Filter option not found

- `any`

### 429 Too Many Requests Error

Rate limit exceeded

- `any`

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "href": "/api/directory/private/v1alpha/filters/006059d7-4d1e-4ace-b816-32fa9a9659ac/options/64f0fab6-32a4-4205-991b-d4eb87e82da2/",
  "id": "64f0fab6-32a4-4205-991b-d4eb87e82da2",
  "name": "First Option",
  "order": 0,
  "slug": "first-option",
  "image": "https://image.domain.com/partner.png",
  "imageUrl": "https://image.domain.com/partner.png",
  "filter": "string",
  "parentOptionId": "string",
  "parentOptionSlug": "string"
}
```

**SDK Code**

```python application/json example
import requests

url = "https://v1.api.partnerpage.io/api/directory/private/v1alpha/filters/filterId/options/optionId/"

payload = {}
headers = {
    "Authorization": "Token  <apiKey>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript application/json example
const url = 'https://v1.api.partnerpage.io/api/directory/private/v1alpha/filters/filterId/options/optionId/';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Token  <apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```