# Rotate addon secrets

Starts a secret rotation for the given addon. New credentials are created with the same permissions; the old credentials remain valid until the rotation is finalised.

Required permission: Project > Addons > General > Update

**Path parameters:**

{object}
- `projectId`: (string) (required) ID of the project
- `addonId`: (string) (required) ID of the addon

**Response body:**

{object}
- `data`: {object}

## API reference

POST /v1/projects/{projectId}/addons/{addonId}/secret-rotation

POST /v1/teams/{teamId}/projects/{projectId}/addons/{addonId}/secret-rotation

### Example Response

200 OK: The operation was performed successfully.

```json
{
  "data": {}
}
```

## CLI reference

$ northflank start addon secret-rotation

Options:

- `--projectId <projectId>`: ID of the project

- `--addonId <addonId>`: ID of the addon

- `--verbose `: Verbose output

- `--quiet `: No console output

- `-o --output <format>`: Output formatting 

### Example Response

 The operation was performed successfully.

```json
{}
```

## JavaScript client reference

### Example request



```javascript
await apiClient.start.addon.secretRotation({
  parameters: {
    "projectId": "default-project",
    "addonId": "example-addon"
  }
});
```

### Example Response

 The operation was performed successfully.

```json
{
  "data": {},
  "rawResponse": "...",
  "request": "...",
  "error": "..."
}
```

Previous: [Scale addon resources](/docs/v1/api/project/addons/scale-addon-resources)

Next: [Finalise addon secret rotation](/docs/v1/api/project/addons/finalise-addon-secret-rotation)