# List inboxes GET https://api2.freecustom.email/v1/inboxes Returns all inboxes registered to your account, including both platform-domain and custom-domain inboxes. **Response fields (per inbox):** - `inbox` — Full email address of the inbox - `domain` — Domain portion of the address - `createdAt` — ISO 8601 timestamp of when the inbox was registered - `expiresAt` — Expiry timestamp (based on your plan's persistence tier) - `messageCount` — Number of messages currently stored **Behaviour:** - Returns an empty array `[]` if no inboxes are registered. - Inboxes are returned in descending order of creation time (newest first). **Plan:** All plans (Free and above). Reference: https://docs.freecustom.email/free-custom-email-api/v-1/inboxes/list-inboxes ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: collection version: 1.0.0 paths: /v1/inboxes: get: operationId: list-inboxes summary: List inboxes description: >- Returns all inboxes registered to your account, including both platform-domain and custom-domain inboxes. **Response fields (per inbox):** - `inbox` — Full email address of the inbox - `domain` — Domain portion of the address - `createdAt` — ISO 8601 timestamp of when the inbox was registered - `expiresAt` — Expiry timestamp (based on your plan's persistence tier) - `messageCount` — Number of messages currently stored **Behaviour:** - Returns an empty array `[]` if no inboxes are registered. - Inboxes are returned in descending order of creation time (newest first). **Plan:** All plans (Free and above). tags: - subpackage_v1.subpackage_v1/inboxes parameters: - 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_List inboxes_Response_200' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/GetV1InboxesRequestUnauthorizedError' '429': description: Too Many Requests content: application/json: schema: $ref: '#/components/schemas/GetV1InboxesRequestTooManyRequestsError' servers: - url: https://api2.freecustom.email components: schemas: V1InboxesGetResponsesContentApplicationJsonSchemaData: type: object properties: inboxes: type: array items: type: string count: type: integer required: - inboxes - count title: V1InboxesGetResponsesContentApplicationJsonSchemaData v1_inboxes_List inboxes_Response_200: type: object properties: success: type: boolean data: $ref: >- #/components/schemas/V1InboxesGetResponsesContentApplicationJsonSchemaData required: - success - data title: v1_inboxes_List inboxes_Response_200 GetV1InboxesRequestUnauthorizedError: type: object properties: success: type: boolean error: type: string message: type: string required: - success - error - message title: GetV1InboxesRequestUnauthorizedError GetV1InboxesRequestTooManyRequestsError: 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: GetV1InboxesRequestTooManyRequestsError securitySchemes: bearerAuth: type: http scheme: bearer ``` ## SDK Code Examples ```python v1_inboxes_List inboxes_example import requests url = "https://api2.freecustom.email/v1/inboxes" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript v1_inboxes_List inboxes_example const url = 'https://api2.freecustom.email/v1/inboxes'; const options = {method: 'GET', 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_List inboxes_example package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api2.freecustom.email/v1/inboxes" req, _ := http.NewRequest("GET", 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_List inboxes_example require 'uri' require 'net/http' url = URI("https://api2.freecustom.email/v1/inboxes") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java v1_inboxes_List inboxes_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api2.freecustom.email/v1/inboxes") .header("Authorization", "Bearer ") .asString(); ``` ```php v1_inboxes_List inboxes_example request('GET', 'https://api2.freecustom.email/v1/inboxes', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp v1_inboxes_List inboxes_example using RestSharp; var client = new RestClient("https://api2.freecustom.email/v1/inboxes"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift v1_inboxes_List inboxes_example import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api2.freecustom.email/v1/inboxes")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" 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() ```