---
updatedAt: 2026-06-12T13:19:10.000Z
agentTools:
  projectIndex: https://developers.superchat.com/llms.txt
---

# List all files

Lists all files in workspace. You can specify a limit of objects to be returned in one response, as well as set a *next* or *previous* value to navigate through the object stream. Objects are sorted descendingly by their *created_at* value. Please mind, you can only specify *next* or *previous* at once.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "components": {
    "schemas": {
      "Instant": {
        "type": "string",
        "format": "date-time",
        "example": "2022-03-10T16:15:50Z"
      },
      "PAFileDTO": {
        "type": "object",
        "required": [
          "id",
          "name",
          "mime_type",
          "link"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the file"
          },
          "name": {
            "type": "string",
            "description": "The name of the file"
          },
          "mime_type": {
            "type": "string",
            "description": "The MIME type of the file. Allowed types application/pdf, application/rtf, application/msword, application/*, image/jpeg, image/png, image/gif, image/*, audio/mpeg, audio/ogg, audio/webm, audio/aac, audio/*, video/mp4, video/quicktime, video/*"
          },
          "link": {
            "description": "The downloadable link information for the file",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/PAFileLinkDTO"
              }
            ]
          },
          "url": {
            "type": "string",
            "description": "The URL of the file resource"
          }
        }
      },
      "PAFileLinkDTO": {
        "type": "object",
        "required": [
          "url",
          "valid_until"
        ],
        "properties": {
          "url": {
            "type": "string",
            "description": "The download URL of the file"
          },
          "valid_until": {
            "description": "The time until which the download URL remains valid",
            "type": "string",
            "allOf": [
              {
                "$ref": "#/components/schemas/Instant"
              }
            ]
          }
        }
      },
      "PAFilePagedDocsExample": {
        "type": "object",
        "required": [
          "url",
          "results",
          "pagination"
        ],
        "properties": {
          "url": {
            "type": "string"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PAFileDTO"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        }
      },
      "Pagination": {
        "type": "object",
        "required": [
          "next_cursor",
          "previous_cursor",
          "next_url",
          "previous_url"
        ],
        "properties": {
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "previous_cursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "next_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "previous_url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PublicAPIExceptionError": {
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "detail": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "docs": {
            "type": [
              "string",
              "null"
            ]
          },
          "status_code": {
            "type": "integer"
          }
        },
        "required": [
          "status_code"
        ]
      },
      "PublicAPIExceptionResponse": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicAPIExceptionError"
            }
          }
        },
        "required": [
          "errors"
        ]
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    }
  },
  "paths": {
    "/files": {
      "get": {
        "summary": "List all files",
        "description": "Lists all files in workspace. You can specify a limit of objects to be returned in one response, as well as set a *next* or *previous* value to navigate through the object stream. Objects are sorted descendingly by their *created_at* value. Please mind, you can only specify *next* or *previous* at once.",
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "description": "Return files after this file ID.",
            "name": "after",
            "in": "query",
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Return files before this file ID.",
            "name": "before",
            "in": "query",
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "description": "Maximum number of files to return.",
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "maximum": 100,
              "minimum": 1,
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PAFilePagedDocsExample"
                },
                "example": {
                  "url": "/v1.0/files",
                  "results": [
                    {
                      "id": "fi_1aBMS9FKwvSDjljRJI1aZ",
                      "name": "invoice.pdf",
                      "mime_type": "application/pdf",
                      "link": {
                        "url": "https://files.example.com/invoice.pdf?signature=abc123",
                        "valid_until": "2026-05-21T10:15:30Z"
                      },
                      "url": "/files/fi_1aBMS9FKwvSDjljRJI1aZ"
                    }
                  ],
                  "pagination": {
                    "next_cursor": "fi_1aBMS9FKwvSDjljRJI1bY",
                    "previous_cursor": null,
                    "next_url": "/v1.0/files?after=fi_1aBMS9FKwvSDjljRJI1bY",
                    "previous_url": null
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicAPIExceptionResponse"
                },
                "example": {
                  "errors": [
                    {
                      "title": "Unauthorized request",
                      "detail": "We could not authenticate your request. Please check your API key.",
                      "url": "/example-endpoint",
                      "docs": "superchat.readme.com/v1.0/authentication",
                      "status_code": 401
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicAPIExceptionResponse"
                },
                "example": {
                  "errors": [
                    {
                      "title": "Resource forbidden",
                      "detail": "You do not have access to this resource",
                      "url": "/example-endpoint",
                      "status_code": 403
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicAPIExceptionResponse"
                },
                "example": {
                  "errors": [
                    {
                      "title": "Resource not found",
                      "url": "/example-endpoint",
                      "status_code": 404
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicAPIExceptionResponse"
                },
                "example": {
                  "errors": [
                    {
                      "title": "An error occurred",
                      "detail": "A general error occurred",
                      "url": "/example-endpoint",
                      "status_code": 500
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Files",
      "description": "Public API endpoints for managing files"
    }
  ],
  "info": {
    "version": "1.0",
    "title": "Superchat API",
    "description": "With the Superchat API you can send email, Instagram, Facebook, Google and WhatsApp messages, create and manage contacts, schedule campaigns, and much more.",
    "contact": {
      "name": "Superchat Developer",
      "email": "engineering@superchat.com",
      "url": "developers.superchat.com"
    }
  },
  "servers": [
    {
      "url": "https://api.superchat.com/v1.0"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "x-explorer-enabled": true,
  "x-proxy-enabled": true,
  "x-samples-enabled": true
}
```