# dev.knotless.updateProfile

> Changes the dev.knotless.profile record of the account logged in to this appview's web pages, as `knotless account profile` does: a field left out stays as it is, and one given empty is taken out, so the Bluesky profile's shows again. A profile left with nothing in it is deleted. Requires the session cookie the pages' login sets: the appview writes with the session it keeps for that account. Clients holding their own session write the record themselves.

- Kind: procedure
- Authority: knotless.dev
- Lexicon: 1
- Published by [lexicons.knotless.dev](https://lexicon.garden/identity/did:plc:yqsg7znbbhfmj3a2nrpnaerk), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.updateProfile)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.updateProfile/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.updateProfile/analytics)

## Procedure (`dev.knotless.updateProfile`)

Type: procedure · POST

### Input (application/json)

- `bot` (boolean): Whether the account says it is a bot, as dev.knotless.profile's `bot`. Left out, it stays as it is.
- `description` (string): Free text about the account: its bio.
  - Constraints: maxLength: 2560, maxGraphemes: 256
- `displayName` (string): The name shown over the account's handle.
  - Constraints: maxLength: 640, maxGraphemes: 64
- `links` (array): The links to show, in order, in place of those there were; none shows the Bluesky profile's.
  - Constraints: maxLength: 10
  - `items` (ref)
    - Reference: `dev.knotless.defs#link`
- `pronouns` (string): Free-form pronouns text.
  - Constraints: maxLength: 200, maxGraphemes: 20
- `removeAvatar` (boolean): Takes the picture out, so the Bluesky profile's shows again. dev.knotless.uploadAvatar sets one.

### Output (application/json)

- `schema` (ref)
  - Reference: `dev.knotless.getOwnProfile#ownProfile`

### Errors

- `InvalidRequest`: A field is too long, or a link is no http or https address.
- `AuthenticationRequired`: No account is logged in to the pages, or its session has ended.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Changes the dev.knotless.profile record of the account logged in to this appview's web pages, as `knotless account profile` does: a field left out stays as it is, and one given empty is taken out, so the Bluesky profile's shows again. A profile left with nothing in it is deleted. Requires the session cookie the pages' login sets: the appview writes with the session it keeps for that account. Clients holding their own session write the record themselves.",
      "errors": [
        {
          "description": "A field is too long, or a link is no http or https address.",
          "name": "InvalidRequest"
        },
        {
          "description": "No account is logged in to the pages, or its session has ended.",
          "name": "AuthenticationRequired"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "bot": {
              "description": "Whether the account says it is a bot, as dev.knotless.profile's `bot`. Left out, it stays as it is.",
              "type": "boolean"
            },
            "description": {
              "description": "Free text about the account: its bio.",
              "maxGraphemes": 256,
              "maxLength": 2560,
              "type": "string"
            },
            "displayName": {
              "description": "The name shown over the account's handle.",
              "maxGraphemes": 64,
              "maxLength": 640,
              "type": "string"
            },
            "links": {
              "description": "The links to show, in order, in place of those there were; none shows the Bluesky profile's.",
              "items": {
                "ref": "dev.knotless.defs#link",
                "type": "ref"
              },
              "maxLength": 10,
              "type": "array"
            },
            "pronouns": {
              "description": "Free-form pronouns text.",
              "maxGraphemes": 20,
              "maxLength": 200,
              "type": "string"
            },
            "removeAvatar": {
              "description": "Takes the picture out, so the Bluesky profile's shows again. dev.knotless.uploadAvatar sets one.",
              "type": "boolean"
            }
          },
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "ref": "dev.knotless.getOwnProfile#ownProfile",
          "type": "ref"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Changes how the account logged in to this appview's pages shows on knotless.",
  "id": "dev.knotless.updateProfile",
  "lexicon": 1
}
```
