social.colibri.beta.thread.create

colibri.social

Documentation

Opens a thread beside a text channel. This creates a space for the thread, then writes the thread's configuration record at key 'self' inside it. The anchor message is referenced rather than copied, so it stays in its author's repo in the channel where it was written.

main procedure

Opens a thread beside a text channel. This creates a space for the thread, then writes the thread's configuration record at key 'self' inside it. The anchor message is referenced rather than copied, so it stays in its author's repo in the channel where it was written.

Input

Encodingapplication/json
anchor refsocial.colibri.beta.defs#spaceRecordRef Optional

The message to open the thread from. Absent opens a thread from scratch, which has no marker in the channel river and is reachable from the channel's thread list and the sidebar.

channel stringspace-ref Required

The text channel to open the thread beside.

community stringdid Required

The community the thread's channel belongs to.

name string Required

The thread's title.

maxLength: 128 bytesminLength: 1 bytes
visibleToMembers array Optional

Members that may read this thread beyond visibleToRoles.

visibleToRoles array Optional

Roles that may read this thread. Empty means everyone who may read the channel may read the thread.

Output

Encodingapplication/json

Errors

AuthRequired The request has no valid service auth.
Forbidden The requesting user lacks the thread.create permission or may not post in the channel.
CommunityNotFound No community matches the given DID.
ChannelNotFound No channel matches the given space reference.
MessageNotFound The anchor message does not exist in the given channel.
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.
PdsUnavailable The community's PDS is unreachable or the AppView has no administrative access to it.
UpstreamFailure The community's PDS failed while creating the thread's space.
Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://bsky.social)
Enter valid JSON for the request body
View raw schema
{
  "description": "Opens a thread beside a text channel. This creates a space for the thread, then writes the thread's configuration record at key 'self' inside it. The anchor message is referenced rather than copied, so it stays in its author's repo in the channel where it was written.",
  "errors": [
    {
      "description": "The request has no valid service auth.",
      "name": "AuthRequired"
    },
    {
      "description": "The requesting user lacks the thread.create permission or may not post in the channel.",
      "name": "Forbidden"
    },
    {
      "description": "No community matches the given DID.",
      "name": "CommunityNotFound"
    },
    {
      "description": "No channel matches the given space reference.",
      "name": "ChannelNotFound"
    },
    {
      "description": "The anchor message does not exist in the given channel.",
      "name": "MessageNotFound"
    },
    {
      "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"
    },
    {
      "description": "The community's PDS is unreachable or the AppView has no administrative access to it.",
      "name": "PdsUnavailable"
    },
    {
      "description": "The community's PDS failed while creating the thread's space.",
      "name": "UpstreamFailure"
    }
  ],
  "input": {
    "encoding": "application/json",
    "schema": {
      "properties": {
        "anchor": {
          "description": "The message to open the thread from. Absent opens a thread from scratch, which has no marker in the channel river and is reachable from the channel's thread list and the sidebar.",
          "ref": "social.colibri.beta.defs#spaceRecordRef",
          "type": "ref"
        },
        "channel": {
          "description": "The text channel to open the thread beside.",
          "format": "space-ref",
          "type": "string"
        },
        "community": {
          "description": "The community the thread's channel belongs to.",
          "format": "did",
          "type": "string"
        },
        "name": {
          "description": "The thread's title.",
          "maxLength": 128,
          "minLength": 1,
          "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": [
        "community",
        "channel",
        "name"
      ],
      "type": "object"
    }
  },
  "output": {
    "encoding": "application/json",
    "schema": {
      "properties": {
        "thread": {
          "description": "The thread.",
          "ref": "social.colibri.beta.thread.defs#threadView",
          "type": "ref"
        }
      },
      "required": [
        "thread"
      ],
      "type": "object"
    }
  },
  "type": "procedure"
}

Lexicon Garden

@