# Import phonebook contacts for authenticated user **POST /phonebook/import/** Import phonebook contacts for the authenticated user. The request must be a multipart/form-data POST with a single file field named `file` containing the CSV of contacts. The authenticated user's JWT must contain the capability `phonebook.ad_phonebook` to allow import. ## Servers - Local development server: http://localhost:8080 (Local development server) - Production server: https://middleware.example.com/api (Production server) ## Authentication methods - Bearer auth ## Parameters ### Body: multipart/form-data (object) - **file** (string(binary)) CSV file containing phonebook contacts ## Responses ### 200 Phonebook import completed for the authenticated user #### Body: application/json (object) - **message** (string) - **total_rows** (integer) Total rows in the CSV - **imported_rows** (integer) Successfully imported rows - **failed_rows** (integer) Failed rows - **skipped_rows** (integer) Skipped rows (validation errors) - **error_messages** (array[string]) List of error messages encountered during import ### 400 Bad request - missing file or invalid CSV #### Body: application/json (object) - **message** (string) - **error** (string) ### 401 Unauthorized - invalid or missing JWT #### Body: application/json (object) - **code** (integer) - **message** (string) ### 403 Forbidden - missing capability (phonebook.ad_phonebook) #### Body: application/json (object) - **code** (integer) - **message** (string) [Powered by Bump.sh](https://bump.sh)