API overview

Every APULODI developer API route lives under /v1 and authenticates with a Bearer API key.

Base URL

text
https://api.apulodi.com/v1

For local development, point the SDK at your running instance:

ts
const apulodi = new Apulodi({
  apiKey: process.env.APULODI_API_KEY!,
  baseUrl: "http://localhost:3000",
});

Conventions

  • Content type — request and response bodies are JSON (Content-Type: application/json).

  • Success envelope — collection and object endpoints return their payload under a data key:

    json
    { "data": { "id": "file_…", "status": "uploaded" } }
    
  • Pagination — list endpoints return data plus pagination:

    json
    {
      "data": [],
      "pagination": { "hasMore": false, "nextCursor": null }
    }
    
  • Dates — all timestamps are ISO 8601 UTC strings.

  • Status — file status is lowercase (pending, uploaded, failed, deleted).

  • IdempotencyPOST /v1/files/upload accepts an optional Idempotency-Key header; retrying with the same key returns the same file instead of creating a duplicate.

Error envelope

Errors always use this shape:

json
{
  "error": {
    "code": "FILE_NOT_FOUND",
    "message": "The file could not be found.",
    "details": { "issues": {} }
  }
}

details is optional and carries structured context (for example Zod field errors). The full code list is in Errors.

Endpoints

MethodPathPurpose
GET/v1/meResolve the API key's context
POST/v1/files/uploadCreate a file + presigned upload URL
POST/v1/files/:id/completeFinalize an upload
GET/v1/filesList / filter / paginate files
GET/v1/files/:idFetch a file
PATCH/v1/files/:idRename / move / update metadata
DELETE/v1/files/:idDelete a file (removes object)
POST/v1/files/:id/copyServer-side copy
POST/v1/files/:id/download-urlPresigned download URL
POST/v1/files/:id/restoreRestore a deleted file
POST/v1/files/:id/replaceStart a content replacement
POST/v1/files/:id/replace/completeFinalize a replacement
POST/v1/files/:id/transformRequest an image variant (async)
GET/v1/files/:id/variantsList a file's image variants
POST/v1/files/:id/variants/:variantId/download-urlPresigned download URL for a variant
POST/v1/uploads/multipartInitiate a multipart upload
POST/v1/uploads/multipart/:id/parts(Re)generate part URLs
GET/v1/uploads/multipart/:id/partsList uploaded parts
POST/v1/uploads/multipart/:id/completeComplete a multipart upload
DELETE/v1/uploads/multipart/:idAbort a multipart upload
GET/v1/foldersList logical folders