v1

latestOpenAPI 3.0.0Apache 2.02026-07-2410185524.2 KB
Media

media

Add an image to the organisation media library. Accepts either a multipart/form-data upload or an application/json body with a url to fetch server-side. Accepted formats: PNG, JPG, GIF, WebP, SVG (max 20 MB). SVG files are sanitised before upload. An optional folder field (default: "uploads") organises the upload; only lowercase letters, numbers, hyphens, and underscores are accepted. On success the new item is prepended to the organisation media library.

For custom components:

RaiselyComponents.api.one('organisations', '{organisation}').all('media').post(data = {}, params = {}, headers = {}) => Promise<{result}>

:fa-gears: See Restie Response Data for a more detailed overview of responses through the client wrapper

post/organisations/{organisation}/media

Path parameters

organisationstring required

The UUID of the organisation

Headers

Authorizationstring

A valid HTTP Bearer token, required to access private records.

Request body

urlstring required

Public URL of the image to fetch

folderstring

Organising folder for the upload (optional, default "uploads")

Example request

{
  "url": "https://example.com/logo.png",
  "folder": "brand-assets"
}

Response

Successfully uploaded media item

Example response

{
  "data": {
    "uuid": "a1b2c3d4-0000-0000-0000-000000000000",
    "url": "https://raisely-images.imgix.net/adfa1c10-593e-11f1-9802-736d47f9bf37/brand-assets/logo-4a2f91.png",
    "file": "logo-4a2f91.png",
    "type": "image/png",
    "folder": "brand-assets"
  }
}