Skip to content

Asset Store โ€‹

The Asset Store is S-Launch's content repository โ€” a folder/asset tree plus an external sharing layer. Every binary the platform manages (uploaded artwork, generated PDFs, attachments) lives here. The store is organized around three resources:

ResourceWhat it isLives at
AssetsIndividual files โ€” image, PDF, archive, etc./api/store/asset/*
FoldersHierarchical containers for assets./api/store/folder/*
SharesExternal, token-based links that grant time-limited access to an asset or folder./api/share/*

There is also a single "resolve a store object by URL" endpoint that sits above this resource grouping:

Endpoints (Asset Store) โ€‹

Get Store Object by URL โ€‹

GET /api/store/

Resolves a store URL to its underlying object (asset or folder) and returns the record. Useful when you have a permalink or path and need to identify what it points at.

Required scope: store:read ยท also accepts API key

Query parameters

NameTypeDefaultDescription
urlstringโ€”The store URL to resolve. Required.
as_jsonbooleanโ€”When true, the response is JSON. When false, the raw object is streamed.
hydratebooleantrueWhen false, related objects are returned as IDs only. See Conventions โ€บ Hydration.

Response 200 โ€” the resolved store object (an AssetRead, FolderRead, or similar, depending on what the URL points at).

Errors: 401, 403, 404, 422 โ€” see Conventions โ€บ Errors.

Scopes โ€‹

ScopeReach
store:readReading assets, folders, and share metadata. Required for nearly every list/get operation in this section.
store:writeCreating, updating, deleting assets, folders, and shares.
store:shareCreating new share links and emailing them out. Separate from store:write so a role can create assets without distributing them.

Workflow: Upload an Asset and Share It โ€‹

A common end-to-end flow combines the Assets and Shares endpoints:

bash
# 1. Upload an asset (multipart/form-data; `folder` query param is optional).
ASSET_ID=$(curl -X POST "https://<tenant>.s-launch.com/api/store/asset/upload?folder=$FOLDER_ID" \
  -H "X-API-Key: $API_KEY" \
  -F "file=@./brochure.pdf" \
  | jq -r '.id')

# 2. Create a share link pointing at the asset.
SHARE=$(curl -X POST "https://<tenant>.s-launch.com/api/share/" \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"object_id\":\"$ASSET_ID\",\"object_type\":\"asset\"}")

# 3. (Optional) Email the share link to recipients.
curl -X POST "https://<tenant>.s-launch.com/api/share/send_email" \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"share_id\":\"$(echo $SHARE | jq -r '.id')\",\"to\":[\"client@example.com\"]}"

The exact body shape for share create and email is defined in ShareWriteCreate and ShareEmailRequest. Use the Interactive Reference to see all available fields.

See also โ€‹

S-Launch