# Unregister an inbox DELETE https://api2.freecustom.email/v1/inboxes/{inbox} Unregisters (deletes) a previously registered inbox from your account. All messages stored in the inbox are permanently deleted along with it. **Path parameters:** - `:inbox` — URL-encoded inbox address (e.g., `test%40domain.com`) **Behaviour:** - Returns `204 No Content` on success — no response body. - Returns `404` if the inbox does not exist or does not belong to your account. - All messages within the inbox are deleted immediately and irreversibly. **Plan:** All plans (Free and above). Reference: https://docs.freecustom.email/free-custom-email-api/v-1/inboxes/inbox/unregister-an-inbox ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: collection version: 1.0.0 paths: /v1/inboxes/{inbox}: delete: operationId: unregister-an-inbox summary: Unregister an inbox description: >- Unregisters (deletes) a previously registered inbox from your account. All messages stored in the inbox are permanently deleted along with it. **Path parameters:** - `:inbox` — URL-encoded inbox address (e.g., `test%40domain.com`) **Behaviour:** - Returns `204 No Content` on success — no response body. - Returns `404` if the inbox does not exist or does not belong to your account. - All messages within the inbox are deleted immediately and irreversibly. **Plan:** All plans (Free and above). tags: - subpackage_v1.subpackage_v1/inboxes.subpackage_v1/inboxes/inbox parameters: - name: inbox in: path description: URL-encoded email address (e.g. test%40ditube.info) required: true schema: type: string - name: Authorization in: header description: Bearer authentication required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: >- #/components/schemas/v1_inboxes_{inbox}_Unregister an inbox_Response_200 '401': description: Unauthorized content: application/json: schema: $ref: >- #/components/schemas/DeleteV1InboxesInboxRequestUnauthorizedError '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/DeleteV1InboxesInboxRequestNotFoundError' '429': description: Too Many Requests content: application/json: schema: $ref: >- #/components/schemas/DeleteV1InboxesInboxRequestTooManyRequestsError servers: - url: https://api2.freecustom.email components: schemas: v1_inboxes_{inbox}_Unregister an inbox_Response_200: type: object properties: success: type: boolean message: type: string required: - success - message title: v1_inboxes_{inbox}_Unregister an inbox_Response_200 DeleteV1InboxesInboxRequestUnauthorizedError: type: object properties: success: type: boolean error: type: string message: type: string required: - success - error - message title: DeleteV1InboxesInboxRequestUnauthorizedError DeleteV1InboxesInboxRequestNotFoundError: type: object properties: success: type: boolean error: type: string message: type: string required: - success - error - message title: DeleteV1InboxesInboxRequestNotFoundError DeleteV1InboxesInboxRequestTooManyRequestsError: type: object properties: success: type: boolean error: type: string message: type: string upgrade_url: type: string format: uri credits_url: type: string format: uri hint: type: string required: - success - error - message - upgrade_url - credits_url - hint title: DeleteV1InboxesInboxRequestTooManyRequestsError securitySchemes: bearerAuth: type: http scheme: bearer ``` ## SDK Code Examples ```python v1_inboxes_{inbox}_Unregister an inbox_example import requests url = "https://api2.freecustom.email/v1/inboxes/string" headers = {"Authorization": "Bearer "} response = requests.delete(url, headers=headers) print(response.json()) ``` ```javascript v1_inboxes_{inbox}_Unregister an inbox_example const url = 'https://api2.freecustom.email/v1/inboxes/string'; const options = {method: 'DELETE', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go v1_inboxes_{inbox}_Unregister an inbox_example package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api2.freecustom.email/v1/inboxes/string" req, _ := http.NewRequest("DELETE", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby v1_inboxes_{inbox}_Unregister an inbox_example require 'uri' require 'net/http' url = URI("https://api2.freecustom.email/v1/inboxes/string") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Delete.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java v1_inboxes_{inbox}_Unregister an inbox_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.delete("https://api2.freecustom.email/v1/inboxes/string") .header("Authorization", "Bearer ") .asString(); ``` ```php v1_inboxes_{inbox}_Unregister an inbox_example request('DELETE', 'https://api2.freecustom.email/v1/inboxes/string', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp v1_inboxes_{inbox}_Unregister an inbox_example using RestSharp; var client = new RestClient("https://api2.freecustom.email/v1/inboxes/string"); var request = new RestRequest(Method.DELETE); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift v1_inboxes_{inbox}_Unregister an inbox_example import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api2.freecustom.email/v1/inboxes/string")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "DELETE" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```