---
updatedAt: 2026-05-11T06:52:42.000Z
agentTools:
  projectIndex: https://platform.simpplr.com/llms.txt
---

# Add files

This API lets you add files to a site.

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "version": "1.0.0",
    "title": "Simpplr User API Documentation",
    "description": ""
  },
  "x-proxy-enabled": true,
  "tags": [
    {
      "name": "Files",
      "description": "Everything about Files"
    }
  ],
  "servers": [
    {
      "url": "https://{endpoint}/v1",
      "variables": {
        "env": {
          "default": "app"
        },
        "endpoint": {
          "default": "platform.app.simpplr.com"
        }
      }
    }
  ],
  "paths": {
    "/content/files": {
      "post": {
        "operationId": "addFilesUser",
        "tags": [
          "Files"
        ],
        "summary": "Add files",
        "description": "This API lets you add files to a site.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "parent_dir": {
                    "type": "string",
                    "format": "uuid",
                    "description": "UUID of the parent directory",
                    "example": "123e4567-e89b-12d3-a456-426614174000"
                  },
                  "file_id": {
                    "type": "array",
                    "items": {
                      "title": "Files",
                      "type": "object",
                      "description": "File object with provider-specific properties",
                      "properties": {
                        "file_id": {
                          "type": "string",
                          "description": "File identifier"
                        },
                        "provider": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string",
                          "nullable": true,
                          "description": "File name"
                        },
                        "type": {
                          "type": "string",
                          "nullable": true,
                          "description": "File type/MIME type"
                        },
                        "size": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true,
                          "description": "File size in bytes"
                        },
                        "version": {
                          "type": "integer",
                          "minimum": 1,
                          "nullable": true,
                          "description": "File version number"
                        }
                      },
                      "required": [
                        "file_id",
                        "provider"
                      ],
                      "allOf": [
                        {
                          "oneOf": [
                            {
                              "type": "object",
                              "title": "Intranet File",
                              "description": "File stored in intranet with UUID file_id",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "intranet"
                                  ]
                                },
                                "file_id": {
                                  "type": "string",
                                  "format": "uuid"
                                }
                              },
                              "required": [
                                "provider",
                                "file_id"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "title": "Google Drive File",
                              "description": "File stored in Google Drive with required metadata",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "googledrive"
                                  ]
                                },
                                "file_id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "size": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "type": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "version": {
                                  "type": "integer",
                                  "minimum": 1
                                }
                              },
                              "required": [
                                "provider",
                                "file_id",
                                "name",
                                "size",
                                "type",
                                "version"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "title": "Box File",
                              "description": "File stored in Box with required metadata",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "box"
                                  ]
                                },
                                "file_id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "size": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "type": {
                                  "type": "string",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "provider",
                                "file_id",
                                "name",
                                "size",
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "title": "OneDrive File",
                              "description": "File stored in OneDrive with required metadata",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "onedrive"
                                  ]
                                },
                                "file_id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "size": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "type": {
                                  "type": "string",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "provider",
                                "file_id",
                                "name",
                                "size",
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "title": "SharePoint File",
                              "description": "File stored in SharePoint with required metadata",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "sharepoint"
                                  ]
                                },
                                "file_id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "size": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "type": {
                                  "type": "string",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "provider",
                                "file_id",
                                "name",
                                "size",
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "title": "Dropbox File",
                              "description": "File stored in Dropbox with required metadata",
                              "properties": {
                                "provider": {
                                  "type": "string",
                                  "enum": [
                                    "dropbox"
                                  ]
                                },
                                "file_id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "size": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "type": {
                                  "type": "string",
                                  "nullable": true
                                }
                              },
                              "required": [
                                "provider",
                                "file_id",
                                "name",
                                "size",
                                "type"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      ]
                    },
                    "description": "Array of files to be added"
                  },
                  "site_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "UUID of the site",
                    "example": "123e4567-e89b-12d3-a456-426614174000"
                  }
                },
                "required": [
                  "file_id",
                  "site_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "success"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "listOfFiles": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "example": "PNG"
                              },
                              "title": {
                                "type": "string",
                                "example": "Screenshot 2025-10-14 at 1.05.47 AM.png"
                              },
                              "provider": {
                                "type": "string",
                                "example": "intranet"
                              },
                              "driveType": {
                                "type": "string",
                                "nullable": true,
                                "example": null
                              },
                              "owner": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "example": "Ajay Tanwar"
                                  },
                                  "id": {
                                    "type": "string",
                                    "example": "e5149282-2b89-4588-8b70-590ea3218e83"
                                  }
                                }
                              },
                              "onlyPDFDownload": {
                                "type": "boolean",
                                "example": false
                              },
                              "modifiedAtDateTime": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-11-18T07:17:14.244Z"
                              },
                              "modifiedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-11-18T07:17:14.244Z"
                              },
                              "filepk": {
                                "type": "string",
                                "example": "1186775"
                              },
                              "listOfSite": {
                                "type": "array",
                                "items": {
                                  "type": "object"
                                },
                                "example": []
                              },
                              "isDownloadableOniOS": {
                                "type": "boolean",
                                "example": true
                              },
                              "id": {
                                "type": "string",
                                "example": "f5f4a9db-462d-4a15-8d27-4845ce3b82cc"
                              },
                              "isExternal": {
                                "type": "boolean",
                                "example": false
                              },
                              "isRestricted": {
                                "type": "boolean",
                                "example": false
                              },
                              "canMarkRestricted": {
                                "type": "boolean",
                                "example": false
                              },
                              "canMarkUnrestricted": {
                                "type": "boolean",
                                "example": false
                              },
                              "fileExtension": {
                                "type": "string",
                                "example": "png"
                              },
                              "isImage": {
                                "type": "boolean",
                                "example": true
                              },
                              "isAudio": {
                                "type": "boolean",
                                "example": false
                              },
                              "thumbnailImg": {
                                "type": "string",
                                "example": "https://zeta-qna.dev.simpplr.xyz/content/r/f5f4a9db-462d-4a15-8d27-4845ce3b82cc?site_id=YzVhZWVjNjItNTZmZC00NTJmLWJiNDMtMDU0ZGVmOTQ1OGYy"
                              },
                              "downloadUrl": {
                                "type": "string",
                                "example": "https://zeta-qna.dev.simpplr.xyz/content/r/f5f4a9db-462d-4a15-8d27-4845ce3b82cc?site_id=YzVhZWVjNjItNTZmZC00NTJmLWJiNDMtMDU0ZGVmOTQ1OGYy"
                              },
                              "fileId": {
                                "type": "string",
                                "example": "f5f4a9db-462d-4a15-8d27-4845ce3b82cc"
                              },
                              "size": {
                                "type": "string",
                                "example": "354007"
                              },
                              "version": {
                                "type": "integer",
                                "example": 1
                              },
                              "description": {
                                "type": "string",
                                "example": ""
                              },
                              "canFavorite": {
                                "type": "boolean",
                                "example": true
                              },
                              "canLike": {
                                "type": "boolean",
                                "example": true
                              },
                              "isLiked": {
                                "type": "boolean",
                                "example": false
                              },
                              "isFavorited": {
                                "type": "boolean",
                                "example": false
                              },
                              "canEditDescription": {
                                "type": "boolean",
                                "example": true
                              },
                              "canDelete": {
                                "type": "boolean",
                                "example": true
                              },
                              "canCreateNewVersion": {
                                "type": "boolean",
                                "example": true
                              },
                              "canDownload": {
                                "type": "boolean",
                                "example": true
                              },
                              "altText": {
                                "type": "string",
                                "example": ""
                              },
                              "canCreatePublicShareLink": {
                                "type": "boolean",
                                "example": false
                              },
                              "canRemove": {
                                "type": "boolean",
                                "example": true
                              },
                              "canMove": {
                                "type": "boolean",
                                "example": true
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "error"
                    },
                    "message": {
                      "type": "string",
                      "example": "Failed to add files"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "seq_id": {
                            "type": "integer",
                            "example": 0
                          },
                          "field_name": {
                            "type": "string",
                            "example": "site"
                          },
                          "error_code": {
                            "type": "integer",
                            "example": 1001
                          },
                          "message": {
                            "type": "string",
                            "example": "The site is deactivated"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiAuthSecurity": {
        "type": "oauth2",
        "description": "This API uses OAuth 2 with the implicit grant flow.",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://platform.test.simpplr.xyz/v1",
            "scopes": {
              "read": "read data",
              "write": "create/update data",
              "everything": "allow full access"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "apiAuthSecurity": []
    }
  ]
}
```