---
title: "Regenerate a user's calendar feed URL key"
method: POST
path: "/users/{id}/regenerate_private_url_key"
tags: ["Users"]
---

# Regenerate a user's calendar feed URL key

`POST /users/{id}/regenerate_private_url_key`

Regenerate the private URL key used to construct a user's personal iCal calendar feed URLs
(`http_cal_url` and `web_cal_url`). The old key is immediately invalidated; callers should
update any stored feed subscriptions with the new key.

A user may only regenerate their own key. Account admins may regenerate on behalf of any user.

The calendar feed URLs act as bearer credentials: anyone with the URL can read that user's
on-call calendar without further authentication. Rotate the key here whenever a URL may
have been exposed (for example, if it was shared outside the intended audience or if an
admin with `can_update_user` retrieved it via `GET /users/{id}?include[]=calendar_urls`).

Users are members of a PagerDuty account that have the ability to interact with Incidents and
other data on the account.

For more information see the [API Concepts Document](../../api-reference/a47605517c19a-api-concepts#users)

Scoped OAuth requires: `users.write`

## Path parameters

- `id` string, required

## Headers

- `Accept` string, required
- `Content-Type` 'application/json', required

## Response `200`

The user's new private URL key.

- object
  - `private_url_key` string, required — The newly generated private URL key for calendar feed URLs.

## Other responses

- `401` — Caller did not supply credentials or did not provide the correct credentials. If you are using an API key, it may be invalid or your Authorization header may be malformed.
- `403` — Caller is not authorized to view the requested resource. While your authentication is valid, the authenticated user or token does not have permission to perform this action.
- `404` — The requested resource was not found.
- `429` — Too many requests have been made, the rate limit has been reached.

---

[API](https://skmtc.net/pagerduty/apis/rest-api.md) · [All operations](https://skmtc.net/pagerduty/apis/rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pagerduty/rest-api/versions/b679a8f3f02c/schema)
