List folders
Every folder of a kind in the workspace (at most 1,000), by name, with the folder each is in and what's directly in it: enough to show any folder's contents and path.
Every folder of a kind in the workspace (at most 1,000), by name, with the folder each is in and what's directly in it: enough to show any folder's contents and path.
apiKey readAuthorizationBearer <token>A workspace API key (pf_…), created under Developers → API keys.
Scope: read
kind*string"asset""template"OK
application/json- response
items*array<|>curl -X GET 'https://api.postforge.dev/v1/folders?kind=asset'{ "items": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43", "folders": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "kind": "asset", "images": 0, "fonts": 0 } ]}Upload an asset’s file PUT
The file’s bytes (`application/octet-stream` with its Content-Length, the size `create` was given). Checks what the file really is and reads an image’s size; the asset is then ready at its URL. Sending them again before that replaces them. 422 `asset_type_mismatch` when the bytes aren’t the type given (or aren’t a file every email client shows, like WebP or SVG); 422 `asset_size_mismatch` when the size differs; 409 `asset_ready` once it’s ready (a new file is a new asset).
Create a folder POST
In the folder named by `parentId` (one of the same kind), or at the top level. 409 `folder_exists` when that folder has one by the name; 422 `folder_limit` past 1,000 folders of the kind or 10 levels.