# social.colibri.beta.thread.repoint

> 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.repoint)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.thread.repoint/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.thread.repoint/examples)

## Definitions

### `social.colibri.beta.thread.repoint`

**Type**: `procedure`

Moves a thread to another channel by rewriting the channel its record links to, and optionally repoints it at another message. Who may read the thread follows the new channel. Left without an anchor the thread keeps the one it has, so its marker sits wherever that message now lives.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `anchor` | `ref` → `social.colibri.beta.defs#spaceRecordRef` | No | The message the thread should hang under, for a thread whose anchor was moved. It has to sit in the destination channel, and may be a message the AppView has not indexed yet. Absent keeps the anchor as it is. |
| `channel` | `string` (space-ref) | Yes | The text channel to move it to. |
| `thread` | `string` (space-ref) | Yes | The thread to move. |

#### Output

**Encoding**: `application/json`

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

#### Errors

- **AuthRequired**: The request has no valid service auth.
- **Forbidden**: The requesting user lacks the thread.manage permission and did not write both the thread's current anchor and the message it is being repointed at.
- **ThreadNotFound**: No thread matches the given space reference.
- **ChannelNotFound**: No channel matches the given space reference.
- **InvalidRequest**: The destination channel belongs to another community, is not a text channel, or is the channel the thread is already in while no new anchor was given.
- **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": "Moves a thread to another channel by rewriting the channel its record links to, and optionally repoints it at another message. Who may read the thread follows the new channel. Left without an anchor the thread keeps the one it has, so its marker sits wherever that message now lives.",
      "errors": [
        {
          "description": "The request has no valid service auth.",
          "name": "AuthRequired"
        },
        {
          "description": "The requesting user lacks the thread.manage permission and did not write both the thread's current anchor and the message it is being repointed at.",
          "name": "Forbidden"
        },
        {
          "description": "No thread matches the given space reference.",
          "name": "ThreadNotFound"
        },
        {
          "description": "No channel matches the given space reference.",
          "name": "ChannelNotFound"
        },
        {
          "description": "The destination channel belongs to another community, is not a text channel, or is the channel the thread is already in while no new anchor was given.",
          "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": {
            "anchor": {
              "description": "The message the thread should hang under, for a thread whose anchor was moved. It has to sit in the destination channel, and may be a message the AppView has not indexed yet. Absent keeps the anchor as it is.",
              "ref": "social.colibri.beta.defs#spaceRecordRef",
              "type": "ref"
            },
            "channel": {
              "description": "The text channel to move it to.",
              "format": "space-ref",
              "type": "string"
            },
            "thread": {
              "description": "The thread to move.",
              "format": "space-ref",
              "type": "string"
            }
          },
          "required": [
            "thread",
            "channel"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "thread": {
              "description": "The thread, after the move.",
              "ref": "social.colibri.beta.thread.defs#threadView",
              "type": "ref"
            }
          },
          "required": [
            "thread"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "social.colibri.beta.thread.repoint",
  "lexicon": 1
}
```
