# social.colibri.beta.thread.update

> Published by [colibri.social](https://lexicon.garden/identity/did:plc:mprdjqjluoswa7awzggaggj3)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.thread.update)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.thread.update/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.thread.update/examples)

## Definitions

### `social.colibri.beta.thread.update`

**Type**: `procedure`

Renames a thread or changes who may read it. An absent field leaves the current value unchanged.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | No | The thread's title. Absent leaves the current value unchanged. |
| `thread` | `string` (space-ref) | Yes | The thread to update. |
| `visibleToMembers` | `array` | No | Members that may read this thread beyond visibleToRoles. |
| `visibleToRoles` | `array` | No | Roles that may read this thread. Empty means everyone who may read the channel may read the thread. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `thread` | `ref` → `social.colibri.beta.thread.defs#threadView` | Yes | The thread, after the update. |

#### Errors

- **AuthRequired**: The request has no valid service auth.
- **Forbidden**: The requesting user lacks the thread.manage permission, and is not the user who opened the thread renaming it.
- **ThreadNotFound**: No thread matches the given space reference.
- **RoleHierarchy**: The requesting user cannot grant a role that outranks their own.
- **InvalidRequest**: The arguments are inconsistent or malformed beyond schema validation.
- **CredentialsUnavailable**: The AppView cannot act as the community because its stored credentials are missing or unusable.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Renames a thread or changes who may read it. An absent field leaves the current value unchanged.",
      "errors": [
        {
          "description": "The request has no valid service auth.",
          "name": "AuthRequired"
        },
        {
          "description": "The requesting user lacks the thread.manage permission, and is not the user who opened the thread renaming it.",
          "name": "Forbidden"
        },
        {
          "description": "No thread matches the given space reference.",
          "name": "ThreadNotFound"
        },
        {
          "description": "The requesting user cannot grant a role that outranks their own.",
          "name": "RoleHierarchy"
        },
        {
          "description": "The arguments are inconsistent or malformed beyond schema validation.",
          "name": "InvalidRequest"
        },
        {
          "description": "The AppView cannot act as the community because its stored credentials are missing or unusable.",
          "name": "CredentialsUnavailable"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "name": {
              "description": "The thread's title. Absent leaves the current value unchanged.",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "thread": {
              "description": "The thread to update.",
              "format": "space-ref",
              "type": "string"
            },
            "visibleToMembers": {
              "description": "Members that may read this thread beyond visibleToRoles.",
              "items": {
                "description": "A member.",
                "format": "did",
                "type": "string"
              },
              "type": "array"
            },
            "visibleToRoles": {
              "description": "Roles that may read this thread. Empty means everyone who may read the channel may read the thread.",
              "items": {
                "description": "A role.",
                "format": "record-key",
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "thread"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "thread": {
              "description": "The thread, after the update.",
              "ref": "social.colibri.beta.thread.defs#threadView",
              "type": "ref"
            }
          },
          "required": [
            "thread"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "social.colibri.beta.thread.update",
  "lexicon": 1
}
```
