---
title: "Change the owner's display name"
description: "Sets the account owner's display name with an owner access token and returns the account."
canonical: "https://www.cool.computer/docs/api-reference/authentication/change-the-owners-display-name"
---
# Change the owner's display name

> Sets the account owner's display name with an owner access token and returns the account.

```http
PATCH https://api.cool.computer/api/account
```

Sets the account owner's display name with an owner access token and returns the account. The name is trimmed and must be 1 to 100 characters without control characters. It changes in WorkOS first, so signing in again keeps it; when WorkOS does not confirm the rename the answer is 503, and the rename may or may not have landed: send the same name again. API keys and agent tokens are rejected with access_token_required.

## Authorization

- A WorkOS access token returned by the self-serve email authorization flow. A claimed agent access token is also accepted for creating an API key, and only for that. API keys are not accepted for API-key administration.

## Request body

Required.

- `application/json` (object)
  - `name` (string, 1 to 100 characters, required): The owner's display name; surrounding whitespace is trimmed.

## Responses

- `200`: The account with its new owner name.
  - `application/json` (object)
    - `account_id` (integer, int64, required)
    - `owner` (object, required)
      - `id` (integer, int64, required)
      - `email` (string, email, required)
      - `name` (string, required)
- `400`: Bad Request. `invalid_name`: the name is empty, longer than 100 characters, or holds a control character; `invalid_body`: the JSON is malformed or has an unknown field.
- `401`: Unauthorized.
- `403`: A user access token from email sign-in (cool login) or the web session is required; API keys and agent tokens receive access_token_required.
- `413`: Payload Too Large.
- `429`: Too Many Requests. If the problem code is api_request_rate_exceeded, wait for Retry-After seconds; other problem codes describe a separate limit.
- `500`: Internal Server Error.
- `503`: WorkOS did not confirm the rename, which may or may not have landed; send the same name again.
- `default`: A machine-readable API error with a stable code and recovery instruction.

An error is an `application/problem+json` document with a stable `code`; [API errors](/docs/api-reference/errors) says how to handle one.

## Example

```sh
curl -X PATCH "https://api.cool.computer/api/account" \
  -H "authorization: Bearer $TOKEN" \
  -H "content-type: application/json" \
  --data '{"name":"string"}'
```
