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

# Rename Event

> Change an event's name; the gallery link stays the same

## Overview

Renames an event, as the dashboard's event settings do. The event slug and gallery link do not change.

OAuth only. Requires `events:read` and `events:write`, plus an accepted organiser **admin** membership. Send a bearer token without `X-API-Key`.

The write runs in one call: send `mode: "execute"` with a stable `idempotency_key`; `mode: "preview"` (the default) is an optional dry run. See [Operations](/api-reference/operations) for retry rules.

## Endpoint

```
PATCH /api/v1/ext/{org_id}/event/{event_id}/details
```

## Path Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `org_id` | integer | Yes | Organiser where the caller has an accepted admin membership. |
| `event_id` | integer | Yes | Event to rename. |

## Request Body

| Field | Type | Description |
| - | - | - |
| `name` | string | Required new name, up to 1000 characters. Surrounding spaces are removed; it must differ from the current name. |
| `mode` | string | `execute` to rename; `preview` (the default) is a dry run. |
| `idempotency_key` | string | Required with `execute`; stable retry key. |

## Example Request

```bash cURL theme={null}
curl -i -X PATCH \
  -H "Authorization: Bearer <oauth_access_token>" \
  -H "Content-Type: application/json" \
  "https://api.9pic.ai/api/v1/ext/903/event/456/details" \
  -d '{"mode": "execute", "idempotency_key": "event-456-rename-1", "name": "Race Photography 2026 Finals"}'
```

```python Python theme={null}
import requests

response = requests.patch(
    "https://api.9pic.ai/api/v1/ext/903/event/456/details",
    headers={"Authorization": "Bearer <oauth_access_token>"},
    json={'mode': 'execute', 'idempotency_key': 'event-456-rename-1', 'name': 'Race Photography 2026 Finals'},
)
print(response.status_code, response.json())
```

```javascript JavaScript theme={null}
const response = await fetch("https://api.9pic.ai/api/v1/ext/903/event/456/details", {
  method: "PATCH",
  headers: { "Authorization": "Bearer <oauth_access_token>", "Content-Type": "application/json" },
  body: JSON.stringify({"mode": "execute", "idempotency_key": "event-456-rename-1", "name": "Race Photography 2026 Finals"}),
});
console.log(await response.json());
```

## Example Response

```json theme={null}
{
  "responseType": "success",
  "message": "Event renamed",
  "data": {
    "mode": "execute",
    "operation": "rename_event",
    "org_id": 903,
    "event_id": 456,
    "review_token": null,
    "expires_at": null,
    "proposed": {
      "before": "Race Photography 2026",
      "after": "Race Photography 2026 Finals"
    },
    "consequences": [
      "Renames the event wherever it is shown; the gallery link stays the same."
    ],
    "operation_id": "ddc661a7-8861-4793-9437-af42a82d12f8",
    "status": "completed",
    "result": {
      "event_id": 456,
      "event_name": "Race Photography 2026 Finals"
    }
  }
}
```

## Response Models

[ReviewedWriteRequest](/api-reference/models/workflow#reviewedwriterequest) and [GuardedOperationData](/api-reference/models/workflow#guardedoperationdata).

## Error Responses

| Status | Meaning |
| - | - |
| `400` / `422` | Invalid input, nothing to change, or missing `idempotency_key` at execution. |
| `401` | Invalid or expired access token. |
| `403` | Missing scopes, membership, or admin role; API keys are rejected. |
| `404` | Event configuration not found. |
| `409` | Retry key reused for a different action, or active photo work. |
| `503` | Organiser writes are temporarily unavailable. |

See [Errors](/api-reference/errors) and [Conventions](/api-reference/conventions).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.