> For a complete page index of the Captain API documentation, fetch https://docs.captain.dev/llms.txt?excludeSpec=true

# Algolia Partial Update Object

POST https://acme.captain.dev/1/indexes/{index}/{objectID}/partial
Content-Type: application/json

Change some attributes of one object, with a Captain write key. Built-in operations such as Increment answer 400.

Reference: https://docs.captain.dev/reference/product-search/algolia-compatibility/algolia-partial-update-object

## Authentication

- `x-algolia-api-key` header (required) — A Captain key, as Algolia clients send it: a search key for queries, a write key for writes.
- `x-algolia-application-id` header (required) — Any value; the hostname selects the tenant.

## Request

### Path parameters

- `index` (string, required)
- `objectID` (string, required)

### Query parameters

- `createIfNotExists` (boolean, optional, default: true)

## Response

### 200

updated

## Examples

**Request**

```json
{
  "price": 119
}
```

**Response**

```json
{
  "updatedAt": "2026-10-02T19:30:04.502Z",
  "taskID": 1856,
  "objectID": "sku-10482"
}
```

**SDK Code**

```python Python REST
import json
import requests

BASE_URL = "https://acme.captain.dev"
API_KEY = "your_write_key"
INDEX = "products"
OBJECT_ID = "sku-10482"

headers = {
    "x-algolia-api-key": API_KEY,
    "x-algolia-application-id": "acme",
    "Content-Type": "application/json",
}

response = requests.post(
    f"{BASE_URL}/1/indexes/{INDEX}/{OBJECT_ID}/partial",
    headers=headers,
    json={
        "price": 119.0,
    },
    timeout=30.0,
)

print(json.dumps(response.json(), indent=2))
```

```typescript TypeScript REST
const BASE_URL = "https://acme.captain.dev";
const API_KEY = "your_write_key";
const index = "products";
const objectID = "sku-10482";

const response = await fetch(`${BASE_URL}/1/indexes/${index}/${objectID}/partial`, {
  method: "POST",
  headers: {
    "x-algolia-api-key": API_KEY,
    "x-algolia-application-id": "acme",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    price: 119.0,
  }),
});

const result = await response.json();
console.log(JSON.stringify(result, null, 2));
```