social.colibri.beta.community.putImage

colibri.social

Documentation

Sets a community's picture or banner. The bytes are uploaded to the community's own repo, which is why this goes through the AppView: a community's blobs can only be written with the community credentials the AppView holds, and a space record must reference a blob living in the repo that holds the record. Replaces whatever was there before.

main procedure

Sets a community's picture or banner. The bytes are uploaded to the community's own repo, which is why this goes through the AppView: a community's blobs can only be written with the community credentials the AppView holds, and a space record must reference a blob living in the repo that holds the record. Replaces whatever was there before.

Parameters

community stringdid Required

The community to set the image on.

kind string Required

Which image to set.

Input

Encodingimage/*

Accepts raw binary data

Output

Encodingapplication/json

Errors

AuthRequired The request is missing, malformed, or unverifiable service auth.
Forbidden The requesting user lacks the community.manage permission.
CommunityNotFound No community exists with that DID.
UnsupportedImage The bytes are not one of the accepted image types.
ImageTooLarge The image exceeds the size limit for this kind.
CredentialsUnavailable The AppView's stored credentials for this community are missing or unusable.
UpstreamFailure A PDS or third-party call the AppView depends on failed.
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
{
  "type": "procedure",
  "input": {
    "encoding": "image/*",
    "description": "The raw image bytes. The content type must be one of image/jpeg, image/png, image/gif or image/webp, and is sniffed rather than trusted."
  },
  "errors": [
    {
      "name": "AuthRequired",
      "description": "The request is missing, malformed, or unverifiable service auth."
    },
    {
      "name": "Forbidden",
      "description": "The requesting user lacks the community.manage permission."
    },
    {
      "name": "CommunityNotFound",
      "description": "No community exists with that DID."
    },
    {
      "name": "UnsupportedImage",
      "description": "The bytes are not one of the accepted image types."
    },
    {
      "name": "ImageTooLarge",
      "description": "The image exceeds the size limit for this kind."
    },
    {
      "name": "CredentialsUnavailable",
      "description": "The AppView's stored credentials for this community are missing or unusable."
    },
    {
      "name": "UpstreamFailure",
      "description": "A PDS or third-party call the AppView depends on failed."
    }
  ],
  "output": {
    "schema": {
      "type": "object",
      "required": [
        "community"
      ],
      "properties": {
        "community": {
          "ref": "social.colibri.beta.community.defs#communityView",
          "type": "ref",
          "description": "The community with the new image resolved, so one call is enough to re-render."
        }
      }
    },
    "encoding": "application/json"
  },
  "parameters": {
    "type": "params",
    "required": [
      "community",
      "kind"
    ],
    "properties": {
      "kind": {
        "type": "string",
        "description": "Which image to set.",
        "knownValues": [
          "picture",
          "banner"
        ]
      },
      "community": {
        "type": "string",
        "format": "did",
        "description": "The community to set the image on."
      }
    }
  },
  "description": "Sets a community's picture or banner. The bytes are uploaded to the community's own repo, which is why this goes through the AppView: a community's blobs can only be written with the community credentials the AppView holds, and a space record must reference a blob living in the repo that holds the record. Replaces whatever was there before."
}

Lexicon Garden

@