---
title: "Rename profile"
method: PATCH
path: "/v1/profiles/{id}"
tags: ["Profiles"]
---

# Rename profile

`PATCH /v1/profiles/{id}`

## Request

- Base URL: `https://api.postlake.dev`
- URL: `https://api.postlake.dev/v1/profiles/{id}`
- Auth: `bearerAuth` (a scheme the document does not define)

Rename a profile. The id is unchanged, so connected channels and posts are untouched, but the slugified identifier moves with the name. The response reports `previousUsername` and `usernameChanged` so anything addressing the profile by its old name can be updated.

## Request body

- object
  - `name` string, required

## Response `200`

Renamed

- object
  - `profile` Profile
    - `id` string, required
    - `username` string, required: The identifier agents put in `profile:`. Slugified.
    - `name` string: What the person typed, for display. Absent on profiles created before this existed.
    - `createdAt` string, date-time, required
  - `previousUsername` string
  - `usernameChanged` boolean

## Other responses

- `400`: Invalid name, no such profile, or the name is taken
- `401`: Unauthorized

---

[API](https://skmtc.dev/postlake/apis/postlake-api.md) · [All operations](https://skmtc.dev/postlake/apis/postlake-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postlake/apis/postlake-api/revisions/f81060e31f69?raw)
