Postly
  1. Files
Postly
  • Overview
  • Workspaces
    • Fetch workspaces
      GET
  • Social Accounts
    • Fetch social accounts
      GET
  • Files
    • Upload a file
      POST
    • Fetch files
      GET
    • Delete a file
      DELETE
  • Posts
    • Create a post
      POST
    • Update a post
      PUT
    • Fetch a post
      GET
    • Fetch posts
      GET
    • Delete a post
      DELETE
  1. Files

Fetch files

GET
/{workspaceId}/files
Retrieves a paginated list of files uploaded to the specified workspace.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.postly.ai/v2//files?limit=10&offset=0' \
--header 'X-API-KEY;'
Response Response Example
200 - Success
{
    "code": 200,
    "message": "Workspace files retrieved",
    "data": [
        {
            "url": "https://files.example.com/a.png",
            "type": "image/png"
        },
        {
            "url": "https://files.example.com/a.png",
            "type": "video/mp4"
        }
    ]
}

Request

Authorization
API Key
Add parameter in header
X-API-KEY
Example:
X-API-KEY: ********************
or
Path Params
workspaceId
string 
required
24-character hexadecimal identifier for the workspace
Query Params
limit
integer 
optional
Maximum number of files to return
Example:
10
offset
integer 
optional
Number of files to skip before starting to collect the result set
Example:
0

Responses

🟢200FilesFetchSuccess
application/json
Body
code
integer 
required
200
message
string 
required
List of files in the workspace
data
array[object (FileData) {2}] 
required
The list of files in the workspace
url
string 
required
Public URL of the media file
type
string 
required
MIME type of the media (e.g., image/png, video/mp4)
🟠400BadRequestResponse
🟠401UnAuthorizedResponse
Modified at 2025-05-29 22:22:38
Previous
Upload a file
Next
Delete a file
Built with