> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mosaic.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a Shared Store

> Rename a shared store.

This page documents its request, success response, and error response fields in full.

## Request

### Headers

| Header          | Type   | Required | Allowed value and meaning                                             |
| --------------- | ------ | -------- | --------------------------------------------------------------------- |
| `Authorization` | string | Yes      | `Bearer <Mosaic API key>`. The key's organization must own the store. |
| `Content-Type`  | string | Yes      | `application/json`.                                                   |

### Path parameters

| Parameter  | Type        | Required | Allowed value and meaning                                                                                |
| ---------- | ----------- | -------- | -------------------------------------------------------------------------------------------------------- |
| `store_id` | UUID string | Yes      | Mosaic-generated `store.id` of the store to rename. The store must belong to the API key's organization. |

This endpoint has no query parameters.

```bash theme={null}
curl -X PATCH \
  "https://api.mosaic.so/shared-stores/11111111-1111-4111-8111-111111111111" \
  -H "Authorization: Bearer mk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"name":"Creators"}'
```

### JSON body

| Field  | Type   | Required | Possible values                                                     |
| ------ | ------ | -------- | ------------------------------------------------------------------- |
| `name` | string | Yes      | Any non-empty display name after surrounding whitespace is removed. |

## Response

### `200 OK`

```json theme={null}
{
  "store": {
    "id": "11111111-1111-4111-8111-111111111111",
    "name": "Creators",
    "source_type": "manual",
    "created_at": "2026-08-03T20:00:00Z",
    "updated_at": "2026-08-04T18:30:00Z"
  }
}
```

| Field               | Type            | Meaning and possible values                                                                                |
| ------------------- | --------------- | ---------------------------------------------------------------------------------------------------------- |
| `store`             | object          | The complete shared store after the update. The object always contains every field listed below.           |
| `store.id`          | UUID string     | Permanent Mosaic-generated store identifier. Updating a store never changes it.                            |
| `store.name`        | string          | New trimmed name accepted from the request. Always non-empty.                                              |
| `store.source_type` | string          | Existing source label. This endpoint does not change it. May be any non-empty string; this is not an enum. |
| `store.created_at`  | ISO 8601 string | UTC creation timestamp. Updating a store does not change it.                                               |
| `store.updated_at`  | ISO 8601 string | UTC timestamp of this latest store update.                                                                 |

## Error responses

| Status                      | Payload                                        | Possible value                                                                                                                              |
| --------------------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `400 Bad Request`           | `{ "error": "name is required" }`              | `name` is missing, empty, or only whitespace.                                                                                               |
| `401 Unauthorized`          | `{ "detail": string }`                         | `detail` is exactly `Authorization header must start with Bearer`, `invalid_api_key`, or `API key must be associated with an organization`. |
| `403 Forbidden`             | `{ "detail": "api_access_required" }`          | API access is unavailable for the organization.                                                                                             |
| `404 Not Found`             | `{ "error": "Shared store not found" }`        | The ID does not exist or belongs to another organization.                                                                                   |
| `500 Internal Server Error` | `{ "error": "Failed to rename shared store" }` | The store could not be updated.                                                                                                             |
