# Upload a PDF file for a specific chat **POST /upload** ## Servers - Local development server: http://localhost:3000/api/v1 (Local development server) - Production server: https://referspecs-backend.onrender.com/api/v1 (Production server) ## Authentication methods - Bearer auth ## Parameters ### Query parameters - **chatId** (string) The CUID of the chat to associate the uploaded file with. ### Body: multipart/form-data (object) - **file** (string(binary)) The PDF file to upload. ## Responses ### 200 File uploaded and record saved successfully #### Body: application/json (object) - **success** (boolean) - **statusCode** (integer) - **message** (string) - **data** (object) ### 400 Bad Request (e.g., no file uploaded, invalid file type, file too large, missing chatId) #### Body: application/json (object) - **success** (boolean) - **statusCode** (integer) - **message** (string) ### 401 Unauthorized (User not authenticated) #### Body: application/json (object) - **success** (boolean) - **statusCode** (integer) - **message** (string) ### 500 Internal Server Error (e.g., missing blob token, upload failed, database error) #### Body: application/json (object) - **success** (boolean) - **statusCode** (integer) - **message** (string) [Powered by Bump.sh](https://bump.sh)