# Change the person's full name (/api/account/update_me)

`PATCH /v1/me`

Operation name: `update_me`

Sets the full name shown to their teammates; answers the person as `get_me` does. Setting the same name again changes nothing, so a retry is safe.

## Authentication

An OAuth access token for the person who allowed your tool: register a client, then the authorization code flow with PKCE (S256). Send it as `Authorization: Bearer <token>` on every route that needs a signed-in person. Calls with a token are limited per person, across all their apps, to 120 calls a minute and 10,000 a UTC day; calls that start AI runs or knowledge base reads (creating an organization, starting a knowledge base read, rebuilding categories, retrying topics or rechecking) also to 10 a minute and 200 a UTC day. Over a limit a call answers 429 `rate_limited` with `Retry-After` and `details.retryAfter` in seconds, and changes nothing.

## Request body

Content type: `application/json` (required)

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029]*$",
      "description": "The full name, 1 to 100 characters, on one line."
    }
  },
  "required": [
    "name"
  ]
}
```

## Responses

### 200

The signed-in user

```json
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "user": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "email": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "email",
            "name"
          ]
        },
        "organizationCount": {
          "type": "integer"
        },
        "app": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "clientId": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "clientId",
            "name"
          ],
          "description": "The app this call came through: yours when you are an agent; null in Heuristic's web app."
        },
        "apiKey": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "kind": {
              "type": "string",
              "enum": [
                "member",
                "organization"
              ],
              "description": "`member`: a person's key, acting as them; `organization`: the organization's own key, acting for no person."
            },
            "organizationId": {
              "type": "string"
            },
            "organizationName": {
              "type": "string"
            },
            "access": {
              "type": "string",
              "enum": [
                "full",
                "read"
              ]
            }
          },
          "required": [
            "id",
            "name",
            "kind",
            "organizationId",
            "organizationName",
            "access"
          ],
          "description": "The API key this call used, or null without one. With an organization key, `user` is the key itself (its name, no email)."
        }
      },
      "required": [
        "user",
        "organizationCount",
        "app"
      ]
    },
    "meta": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "data",
    "meta"
  ]
}
```

### 400

Error

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "details": {}
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 401

Error

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "details": {}
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 403

Error

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "details": {}
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 413

Error

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "details": {}
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

## Example request

```bash
curl -X PATCH "https://staging.heuristic.app/v1/me" \
  -H "Authorization: Bearer <access token>" \
  -H "Content-Type: application/json" \
  -d '{"name":"string"}'
```
