# iCloud Email

### Endpoints

{% code title="Request" %}

```
GET https://aws.cubemmo.net/api/get_code?api_key={api_key}&mail={email}&all={all}&type={service}
```

{% endcode %}

### Request Parameters

| Parameters | Value           | Required | Type    | Description                                                                                                                                                                                                                             |
| ---------- | --------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| mail       | {email}         | yes      | string  | Specifies the email address to which the purchased account details will be sent. This value can be retrieved from the response of the GET <https://cubemmo.net/api/buy?account\\_type={account\\_type}\\&quantity={quantity}> endpoint. |
| api\_key   | {api\_key}      | yes      | string  | The API key provided to authenticate the user. Replace {apiKey} with your actual API key.                                                                                                                                               |
| type       | {service}       | optional | string  | Specifies the platform for which the accounts are being purchased. Valid values include: facebook, instagram, telegram, twitter, google, etc. If                                                                                        |
| all        | true \|\| false | optional | boolean | Get all email                                                                                                                                                                                                                           |

### Example

{% code title="Request" %}

```
GET https://aws.cubemmo.net/api/get_code?api_key=abcdef&mail=xxx-yyy@icloud.com&all=true&type=apple
```

{% endcode %}

### Response

The API returns a JSON object with the following structure:

{% code title="Success Response (200)" %}

```json
{
    "success": true,
    "data": [
        {
            "email": "xxx-yyy@icloud.com",
            "from": "apple",
            "code": "376005",
            "link": null,
            "subject": "Verify your email address.",
            "contents": "You recently added xxx-yyy@icloud.com as an additional email address for your Apple Account. To verify this email address belongs to you, enter the code below on the email verification page:\r\n\r\n376005\r\n\r\nWhy you received this email.\r\nApple requires verification whenever an email address is added to your Apple Account. Your email cannot be used until you verify it.\r\n\r\n\r\nIf you did not make this change or you believe an unauthorized person has accessed your account, you should change your password as soon as possible from your Apple Account page at https://account.apple.com.\r\n\r\nApple Support\r\n\r\n-------------------------------------------------------------\r\n\r\nApple Account\r\nhttps://account.apple.com\r\n\r\nSupport\r\nhttps://www.apple.com/support\r\n\r\nPrivacy Policy\r\nhttps://www.apple.com/legal/privacy\r\n\r\nCopyright (c) 2025 One Apple Park Way, Cupertino, CA 95014, United States All rights reserved.",
            "date": "04/02/2025 21:24:54"
        }
    ]
}
```

{% endcode %}

{% code title="Invalid API Key (401)" %}

```json
{
    "success": false,
    "message":"Invalid API Key"
}
```

{% endcode %}

{% code title="Internal Server Error (500)" %}

```json
 {   
     "success" : false,
     "message":"Error message."
}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cubemmo.net/mail-icloud/icloud-email.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
