Skip to main content
POST
/
files
/
create
Create file
curl --request POST \
  --url https://api.obselite.com/v0/files/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "alt": "<string>",
  "key": "<string>",
  "url": "<string>",
  "type": "<string>",
  "size": 123,
  "metadata": "<string>",
  "isPublished": true,
  "lockedAt": "<string>"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "url": "<string>",
  "organization": {},
  "user": {},
  "userBanner": {},
  "userAvatar": {},
  "organizationAvatar": {},
  "comments": [
    {}
  ],
  "cycles": [
    {}
  ],
  "resources": [
    {}
  ],
  "tasks": [
    {}
  ],
  "teams": [
    {}
  ],
  "activities": [
    {}
  ]
}

Authorizations

Authorization
string
header
required

The API token generated from the Obselite dashboard

Body

application/json
name
string | null
description
string | null
alt
string | null
key
string | null
url
string | null
type
string | null
size
integer
metadata
isPublished
boolean
lockedAt
string | null

Response

Successful response

id
string<uuid>
required

File UUID

url
string | null
organization
object | null

The organization that owns this file, following the organization schema

user
object | null

The user who uploaded or owns this file, following the user schema

userBanner
object | null

The user's banner image file, following the file schema

userAvatar
object | null

The user's profile picture file, following the file schema

organizationAvatar
object | null

The organization's profile picture file, following the file schema

comments
array
cycles
array
resources
array
tasks
array
teams
array
activities
array