---
updatedAt: 2026-04-21T03:00:29.000Z
agentTools:
  projectIndex: https://docs.flextract.com/llms.txt
---

# List folder links

List all folder links accessible to the authenticated user.
        
        Folder links determine how documents are automatically routed to folders based on
        the document's source (user or phone number). When a document is uploaded by a
        user or received from a phone number, it will be automatically placed in any
        folders that have a matching folder link.
        

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Flextract API",
    "version": "1.0.1",
    "description": "\n        This is the API for Flextract. It is used to interact with the Flextract platform.\n\n        For additional sets of documentation:\n        - (Readme)  https://docs.flextract.com - Primary Documentation\n        - (Swagger) https://api.flextract.ai/api-docs/schema/swagger-ui/#/\n        - (Redoc)  https://api.flextract.ai/api-docs/schema/redoc/#/\n\n        The API is versioned, and the current version is: 1.0.1\n    "
  },
  "paths": {
    "/api/folder-links/": {
      "get": {
        "operationId": "api_folder_links_list",
        "description": "List all folder links accessible to the authenticated user.\n        \n        Folder links determine how documents are automatically routed to folders based on\n        the document's source (user or phone number). When a document is uploaded by a\n        user or received from a phone number, it will be automatically placed in any\n        folders that have a matching folder link.\n        ",
        "summary": "List folder links",
        "parameters": [
          {
            "in": "query",
            "name": "folder_id",
            "schema": {
              "type": "string"
            },
            "description": "Filter by folder hashid"
          },
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "required": false,
            "in": "query",
            "description": "The initial index from which to return the results.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "phone_number",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by phone number ID"
          },
          {
            "in": "query",
            "name": "user",
            "schema": {
              "type": "integer"
            },
            "description": "Filter by user ID"
          }
        ],
        "tags": [
          "Folders"
        ],
        "security": [
          {
            "jwtAuth": []
          },
          {
            "tokenAuth": []
          },
          {
            "phoneTokenAuth": []
          },
          {
            "cookieAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedFolderLinkListResponseList"
                }
              }
            },
            "description": ""
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "nullable": true,
                            "description": "A unique identifier for this particular occurrence of the problem."
                          },
                          "status": {
                            "type": "string",
                            "nullable": true,
                            "description": "The HTTP status code applicable to this problem."
                          },
                          "code": {
                            "type": "string",
                            "nullable": true,
                            "description": "An application-specific error code."
                          },
                          "title": {
                            "type": "string",
                            "default": "Service Error",
                            "description": "A short, human-readable summary of the problem."
                          },
                          "detail": {
                            "type": "string",
                            "default": "An error occurred while processing your request.",
                            "description": "A human-readable explanation specific to this occurrence of the problem."
                          },
                          "source": {
                            "type": "object",
                            "nullable": true,
                            "description": "An object containing references to the primary source of the error."
                          },
                          "meta": {
                            "type": "object",
                            "nullable": true,
                            "description": "A meta object containing non-standard meta-information about the error."
                          }
                        }
                      }
                    }
                  }
                }
              }
            },
            "description": ""
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "FolderLinkListResponse": {
        "type": "object",
        "description": "Documentation serializer for FolderLink list responses.",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Total number of folder links"
          },
          "next": {
            "type": "string",
            "format": "uri",
            "description": "URL for the next page of results"
          },
          "previous": {
            "type": "string",
            "format": "uri",
            "description": "URL for the previous page of results"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FolderLinkResponse"
            },
            "description": "List of folder links"
          }
        },
        "required": [
          "count",
          "results"
        ]
      },
      "FolderLinkResponse": {
        "type": "object",
        "description": "Documentation serializer for FolderLink responses.",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the folder link"
          },
          "folder": {
            "type": "string",
            "description": "ID of the linked folder"
          },
          "user": {
            "type": "integer",
            "description": "ID of the linked user (null if phone_number is used)"
          },
          "phone_number": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PhoneNumberResponse"
              }
            ],
            "description": "Phone number data (null if user is used)"
          },
          "person": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PersonResponse"
              }
            ],
            "description": "Person data associated with the phone number (empty object if no person exists)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the folder link was created"
          }
        },
        "required": [
          "created_at",
          "folder",
          "id"
        ]
      },
      "PaginatedFolderLinkListResponseList": {
        "type": "object",
        "required": [
          "count",
          "results"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "example": 123
          },
          "next": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=400&limit=100"
          },
          "previous": {
            "type": "string",
            "nullable": true,
            "format": "uri",
            "example": "http://api.example.org/accounts/?offset=200&limit=100"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FolderLinkListResponse"
            }
          }
        }
      },
      "PersonResponse": {
        "type": "object",
        "description": "Documentation serializer for person data in responses.",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the person"
          },
          "preferred_name": {
            "type": "string",
            "description": "The person's preferred name"
          },
          "email_address": {
            "type": "string",
            "format": "email",
            "description": "The person's email address"
          },
          "role": {
            "type": "string",
            "description": "The person's role"
          },
          "allows_email": {
            "type": "boolean",
            "description": "Whether the person allows email communication"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the person record was created"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the person record was last updated"
          }
        },
        "required": [
          "allows_email",
          "created_at",
          "email_address",
          "id",
          "preferred_name",
          "role",
          "updated_at"
        ]
      },
      "PhoneNumberResponse": {
        "type": "object",
        "description": "Documentation serializer for phone number data in responses.",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the phone number"
          },
          "raw_number": {
            "type": "string",
            "description": "Phone number in E.164 format"
          },
          "valid": {
            "type": "boolean",
            "description": "Whether the phone number is valid"
          }
        },
        "required": [
          "id",
          "raw_number",
          "valid"
        ]
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      },
      "cookieAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "sessionid"
      },
      "jwtAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "phoneTokenAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Token-based authentication for phone numbers. Format: 'Token <token>'"
      },
      "tokenAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Token-based authentication with required prefix \"Token\""
      }
    }
  },
  "servers": [
    {
      "url": "https://api.flextract.dev",
      "description": "Dev Server"
    },
    {
      "url": "https://api.flextract.ai",
      "description": "Production Server"
    }
  ]
}
```