v3 bulk restore
The purpose of this API function is to restore phone numbers in bulk. POST: https://api.multitel.net/v3/bulk_restore - Auth: HTTP basic with the user’s API credentials. - Body (application/json): { "numbers": [ "15551230111", "15551230112", "15551230113" ], "webhook_url": "https://client.example.com/restore-hook" } - Accepts digit-only strings; numbers_text (newline-separated) also works. - 10 numbers or less → handled synchronously; more than 10 → queued and processed by a service worker. - Synchronous response (only possible if 10 numbers or less are provided): { "job_uuid": "8f6c1f0e-23d2-4717-8c8e-1a518e5738f0", "status": "completed", "total_numbers": 3, "success_count": 1, "failure_count": 2, "webhook_url": "https://client.example.com/restore-hook", "created_at": "2025-10-28 12:31:45", "started_at": "2025-10-28 12:31:45", "completed_at": "2025-10-28 12:31:48", "results": [ { "number": "15551230111", "status": "success", "message": "Number restored", "status_code": 200, "requires_identity_update": 0 }, { "number": "15551230112", "status": "failed", "message": "Error: 'restore failed, please contact support'", "status_code": 500, "requires_identity_update": 0 }, { "number": "15551230113", "status": "success", "message": "Number restored", "status_code": 200, "requires_identity_update": 1, "needs_registration": 1 } ] } In case there are errors processing the payload (timeouts, domain cannot be resolved in DNS, etc) , errors will be returned after the "results" array: "webhook_error":"Could not resolve host: asidhaiufsd0uf.multitel.net" OR, if more than 10 numbers were provided: - Queued (202 Accepted): { "job_uuid": "c5bc4f3a-7b0a-4d5d-9f7e-d3fd87f41a00", "status": "pending", "total_numbers": 25, "webhook_url": "https://client.example.com/restore-hook", "message": "Restore job queued. Results will be POSTed to https://client.example.com/restore-hook" } - Webhook payload is identical to the final synchronous structure (including per-number status codes/messages). Status Polling - GET https://api.multitel.net/v3/bulk_restore_status - Required job_uuid, optional number (digits only). - Response mirrors the job summary with current per-number state plus attempts and timestamps; number filter returns just that entry. - Example: GET …/bulk_restore_status?job_uuid=8f6c1f0e-23d2-4717-8c8e-1a518e5738f0 - Filtered: GET …/bulk_restore_status?job_uuid=…&number=15551230113 - GET https://api.multitel.net/v3/bulk_restore_status - Auth: same HTTP Basic as other v3 calls. - Query parameters: - job_uuid (required) – returned from the POST response. - number (optional) – digits only; narrows the results to a single DID. - Response mirrors the webhook payload and now includes requires_identity_update (1/0) plus needs_registration when applicable. Example: { "job_uuid": "8f6c1f0e-23d2-4717-8c8e-1a518e5738f0", "status": "processing", "total_numbers": 25, "success_count": 10, "failure_count": 0, "webhook_url": "https://client.example.com/restore-hook", "created_at": "2025-10-28 12:31:45", "started_at": "2025-10-28 12:31:45", "completed_at": null, "results": [ { "number": "15551230111", "status": "success", "message": "Number restored", "status_code": 200, "attempts": 1, "started_at": "2025-03-28 12:31:45", "completed_at": "2025-03-28 12:31:47", "requires_identity_update": 0 }, { "number": "15551230112", "status": "failed", "message": "Error: 'restore failed, please contact support'", "status_code": 500, "attempts": 1, "started_at": "2025-03-28 12:31:45", "completed_at": "2025-03-28 12:31:46", "requires_identity_update": 0 }, { "number": "15551230113", "status": "success", "message": "Number restored", "status_code": 200, "attempts": 1, "started_at": "2025-03-28 12:31:45", "completed_at": "2025-03-28 12:31:48", "requires_identity_update": 1, "needs_registration": 1 } ] } - With number=15551230113, the results array will contain only that entry plus filtered_number in the payload. If you would like to craft your own bulk restore function, you can use the single number api endpoint below, and call it repeatedly, for each number you wish to restore. curl -u 'USERNAME:PASSWORD' \ -H 'Accept: application/json' \ https://api.multitel.net/v3/restore/447000123456