Skip to main content
Upload a file

Authorizations

Authorization
string
header
required

A Tightknit admin API key, sent as Authorization: Bearer <key>.

Body

multipart/form-data
file
file
required

The file bytes.

file_category
enum<string>
required

What the file is for. Each category takes an image validated against that slot. One of:

  • calendar-event-cover: an event’s cover image, its cover_image_file_id.
  • calendar-events-banner: the banner of the community site’s events page.
  • site-logo: the community site’s square logo icon.
  • site-combination-logo: the community site’s horizontal logo.
  • site-favicon: the icon browsers show in the community site’s tab.
  • site-social-image: the image shown when a link to the community site is shared.
  • home-page-banner: the banner of the community site’s home page.
  • members-banner: the banner of the community site’s members page.
  • content-library-banner: the banner of the community site’s content library.
  • feed-banner: a feed’s banner.
  • group-banner: a group’s banner.
  • groups-banner: the banner of the community site’s groups page.
  • community-icon: the square logo used as the community’s avatar.
  • community-home-banner: the banner of the Community Home members see when they open Tightknit in Slack.
  • award-badge: an award’s badge image.
  • award-overlay-frame: the frame an award lays over its holders’ profile photos.
  • award-cert-template: the template an award’s certificates are drawn on.
  • content-resource-cover: a content resource’s cover image.
  • content-collection-cover: a content collection’s cover image.
  • login-marketing-panel: the image beside the sign-in form on the community site’s login page.
  • composition-image: an image in a Message Blaster message.
Available options:
calendar-event-cover,
calendar-events-banner,
site-logo,
site-combination-logo,
site-favicon,
site-social-image,
home-page-banner,
members-banner,
content-library-banner,
feed-banner,
group-banner,
groups-banner,
community-icon,
community-home-banner,
award-badge,
award-overlay-frame,
award-cert-template,
content-resource-cover,
content-collection-cover,
login-marketing-panel,
composition-image
Example:

"calendar-event-cover"

filename
string
required

The stored name, whose extension declares the file type.

Maximum string length: 100
Pattern: ^(?!\.+$)[a-zA-Z0-9_.-]+$
Example:

"cover.png"

description
string

Alt text or a short description, stored as the title. Defaults to filename.

Required string length: 1 - 150
Pattern: ^\P{Cc}*$/u
Example:

"Launch cover"

Response

Success

A file the community stored, uploaded or generated.

object
enum<string>
required

Always file.

Available options:
file
id
string
required

Unique identifier for the object.

Example:

"file_2b3c4d5e6f7g"

name
string
required

The file’s stored name, including its extension.

Example:

"cover.png"

title
string | null
required

Alt text or a short description of the file. An upload without one takes the filename. Null when none was recorded.

mimetype
string
required

The file’s media type.

Example:

"image/png"

size
integer
required

The file’s size in bytes.

Required range: x >= 0
url
string
required

Where to download the file.

thumbnail_url
string | null
required

A smaller preview of the file. Null when it has none.

created_at
string<date-time>
required

When the file was stored.