Import phonebook contacts (Super Admin only)

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://bump.sh/nethesis/doc/nethcti-middleware/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
"NethVoice - NethCTI middleware MCP server": {
  "url": "https://bump.sh/nethesis/doc/nethcti-middleware/mcp"
}
Close
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
multipart/form-data

Body Required

  • username string Required

    Target username to import contacts for

  • file string(binary) Required

    CSV file containing phonebook contacts

Responses

  • 200 application/json

    Phonebook import completed

    Hide response attributes Show response attributes 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 application/json

    Bad request - missing username field or invalid CSV

    Hide response attribute Show response attribute object
    • message string
  • 401 application/json

    Unauthorized - invalid or missing super admin token

    Hide response attributes Show response attributes object
    • code integer
    • message string
  • 403 application/json

    Forbidden - client IP is not in the super admin allowed IP whitelist

    Hide response attributes Show response attributes object
    • code integer
    • message string
POST /admin/phonebook/import
curl \
 --request POST 'http://localhost:8080/admin/phonebook/import' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: multipart/form-data" \
 --form "username=john.smith" \
 --form "file=@file"
Response examples (200)
{
  "message": "string",
  "total_rows": 42,
  "imported_rows": 42,
  "failed_rows": 42,
  "skipped_rows": 42,
  "error_messages": [
    "string"
  ]
}
Response examples (400)
{
  "message": "username field is required"
}
Response examples (401)
{
  "code": 401,
  "message": "super admin authentication required"
}
Response examples (403)
{
  "code": 403,
  "message": "access denied: IP not in allowed list"
}