# Import phonebook contacts (Super Admin only) **POST /admin/phonebook/import** Admin phonebook import endpoint for super administrators. This endpoint allows super administrators to import phonebook contacts from a CSV file into any target user's phonebook. The target username must be provided as a form field. CSV Format: Requires multipart/form-data with: - Field "username" (string, required): Target username to import contacts for - Field "file" (binary, required): CSV file with contact data CSV Columns (case-insensitive): name (required), and optional: workemail, homeemail, workphone, homephone, cellphone, fax, title, company, notes, homestreet, homepob, homecity, homeprovince, homepostalcode, homecountry, workstreet, workpob, workcity, workprovince, workpostalcode, workcountry, url, extension, speeddial_num, type (optional, default: private). Security: Requires two factors of authentication: 1. IP Whitelist - Request must come from an allowed IP/CIDR range (default: 127.0.0.0/8) 2. Bearer Token - Must provide valid super admin token in Authorization header ## Servers - Local development server: http://localhost:8080 (Local development server) - Production server: https://middleware.example.com/api (Production server) ## Authentication methods - Super admin auth ## Parameters ### Body: multipart/form-data (object) - **username** (string) Target username to import contacts for - **file** (string(binary)) CSV file containing phonebook contacts ## Responses ### 200 Phonebook import completed #### Body: application/json (object) - **message** (string) - **total_rows** (integer) - **imported_rows** (integer) - **failed_rows** (integer) - **skipped_rows** (integer) - **error_messages** (array[string]) ### 400 Bad request - missing username field or invalid CSV #### Body: application/json (object) - **message** (string) ### 401 Unauthorized - invalid or missing super admin token #### Body: application/json (object) - **code** (integer) - **message** (string) ### 403 Forbidden - client IP is not in the super admin allowed IP whitelist #### Body: application/json (object) - **code** (integer) - **message** (string) ### 404 Not found - target user does not exist #### Body: application/json (object) - **message** (string) [Powered by Bump.sh](https://bump.sh)