Register a direct upload
const url = 'https://your-board.mudda.today/rails/active_storage/direct_uploads';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"blob":{"filename":"screenshot.png","byte_size":12345,"checksum":"GQ5SqLsM7ylnji0Wgd9wNC==","content_type":"image/png"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-board.mudda.today/rails/active_storage/direct_uploads \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "blob": { "filename": "screenshot.png", "byte_size": 12345, "checksum": "GQ5SqLsM7ylnji0Wgd9wNC==", "content_type": "image/png" } }'Registers a blob and answers with where to PUT its bytes. Send the file there with
exactly the direct_upload.headers given, then use the blob’s signed_id as a user’s
avatar, or its attachable_sgid in an <action-text-attachment sgid="…"> in rich text.
Answers JSON whatever the path’s format. Not subject to the token’s request allowance.
Scope: write.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
The file’s size in bytes.
The file’s MD5 digest, Base64-encoded.
object
Example
{ "blob": { "filename": "screenshot.png", "byte_size": 12345, "checksum": "GQ5SqLsM7ylnji0Wgd9wNC==", "content_type": "image/png" }}Responses
Section titled “Responses”The blob, and where to upload its bytes.
object
object
What avatar takes.
What a rich-text attachment’s sgid takes.
object
PUT the file’s bytes here.
Send exactly these with the PUT.
object
Example
{ "id": 9, "key": "5tl09q813hmri5z2ui4zzrdj8gqi", "filename": "screenshot.png", "content_type": "image/png", "metadata": {}, "service_name": "local", "byte_size": 12345, "checksum": "GQ5SqLsM7ylnji0Wgd9wNC==", "created_at": "2026-10-16T14:02:11Z", "signed_id": "eyJfcmFpbHMiOnsiZGF0YSI6OSwicHVyIjoiYmxvYl9pZCJ9fQ==--d724…", "attachable_sgid": "eyJfcmFpbHMiOnsiZGF0YSI6ImdpZDovL211ZGRh…", "direct_upload": { "url": "https://your-board.mudda.today/rails/active_storage/disk/eyJfcmFpbHMiOnsiZGF0YSI6eyJrZXkiOiI1dGwwOXE4--08c33a68f1982870d7d1", "headers": { "Content-Type": "image/png" } }}No credential, or a revoked or expired token.
Every failure’s envelope. request_id matches the X-Request-Id header.
object
Messages keyed by field; base when no field is to blame.
object
Example
{ "errors": { "base": [ "Unauthorized" ] }, "request_id": "5f0c1e9a-2b7d-4c1e-9a63-0e4f8d2b1c55"}The user is deactivated, the record isn’t yours to change, or the token lacks the scope.
Every failure’s envelope. request_id matches the X-Request-Id header.
object
Messages keyed by field; base when no field is to blame.
object
Example
{ "errors": { "base": [ "This token is not granted the write scope" ] }, "request_id": "5f0c1e9a-2b7d-4c1e-9a63-0e4f8d2b1c55"}Validation failed, a query parameter isn’t recognised, or a filter value is outside its list.
Every failure’s envelope. request_id matches the X-Request-Id header.
object
Messages keyed by field; base when no field is to blame.
object
Example
{ "errors": { "due_on": [ "can't be blank in Todo or Doing" ] }, "request_id": "5f0c1e9a-2b7d-4c1e-9a63-0e4f8d2b1c55"}