Zum Hauptinhalt springen

List mail addresses

GET/v2/mail-addresses/
API-Version
v2
Request-Methode
GET
Operation-ID
mail-list-mail-addresses-for-user

Request​

Responses​

Response-Header
  • X-Pagination-Limitinteger

    The limit used to select the resources for the response

  • X-Pagination-Skipinteger

    The number of skipped items

  • X-Pagination-Pagenumber

    The calculate page of the list response. Refer to parameters to learn more.

  • X-Pagination-TotalCountinteger

    The total amount of items available in the remote ressource. Use this value in combination with the limit to calculate the available pages.

Format
application/json
Beschreibung

OK

  • Array[
    • *object
      • addressstring (idn-email)required
      • archiveobjectrequired
        • activebooleanrequired

          Shows if the mail-archive is enabled.

        • quotainteger (int64)required

          Maximum available mail-archive storage in bytes.

        • usedBytesinteger (int64)required

          Current mail-archive usage in bytes.

      • autoResponderobjectrequired
        • activebooleanrequired
        • expiresAtstring (date-time)
        • messagestring
        • startsAtstring (date-time)
      • forwardAddressesArray von string (idn-email)required
        • Array[
          • *string (idn-email)
          ]
      • idstring (uuid)required
      • isArchivedbooleanrequired
      • isBackupInProgressbooleanrequired
      • isCatchAllbooleanrequired
      • mailboxobject
        • mailsystemSettingsobjectrequired
          • rateLimitIdstringrequired
        • namestringrequired
        • passwordUpdatedAtstring (date-time)required
        • sendingEnabledbooleanrequired
        • spamProtectionobjectrequired
          • activebooleanrequired
          • autoDeleteSpambooleanrequired
          • folderstring (einer von: spam, inbox)required
          • relocationMinSpamScoreintegerrequired
        • storageInBytesobjectrequired
          • currentobjectrequired
            • updatedAtstring (date-time)required
            • valueinteger (int64)required
          • limitinteger (int64)required
      • originalAddressstring (idn-email)

        For archived mail addresses, the address the mailbox had right before it was archived.

      • projectIdstringrequired
      • rateLimitChangeRequestobject
        • rateLimitIdstringrequired

          ID of the rate limit requested.

      • receivingDisabledbooleanrequired
      • updatedAtstring (date-time)required
    ]
Content-Type: application/json

[
{
"address": "email@mittwald.example",
"archive": {
"active": true,
"quota": 123,
"usedBytes": 123
},
"autoResponder": {
"active": true,
"expiresAt": "1985-10-26T01:21:00.000Z",
"message": "string",
"startsAt": "1985-10-26T01:21:00.000Z"
},
"forwardAddresses": [
"email@mittwald.example"
],
"id": "f0f86186-0a5a-45b2-aa33-502777496347",
"isArchived": true,
"isBackupInProgress": true,
"isCatchAll": true,
"mailbox": {
"mailsystemSettings": {
"rateLimitId": "string"
},
"name": "string",
"passwordUpdatedAt": "1985-10-26T01:21:00.000Z",
"sendingEnabled": true,
"spamProtection": {
"active": true,
"autoDeleteSpam": true,
"folder": "spam",
"relocationMinSpamScore": 123
},
"storageInBytes": {
"current": {
"updatedAt": "1985-10-26T01:21:00.000Z",
"value": 123
},
"limit": 123
}
},
"originalAddress": "email@mittwald.example",
"projectId": "string",
"rateLimitChangeRequest": {
"rateLimitId": "string"
},
"receivingDisabled": true,
"updatedAt": "1985-10-26T01:21:00.000Z"
}
]
{
"items": {
"properties": {
"address": {
"format": "idn-email",
"type": "string"
},
"archive": {
"properties": {
"active": {
"description": "Shows if the mail-archive is enabled.",
"type": "boolean"
},
"quota": {
"description": "Maximum available mail-archive storage in bytes.",
"format": "int64",
"type": "integer"
},
"usedBytes": {
"description": "Current mail-archive usage in bytes.",
"format": "int64",
"type": "integer"
}
},
"required": [
"active",
"quota",
"usedBytes"
],
"type": "object"
},
"autoResponder": {
"properties": {
"active": {
"type": "boolean"
},
"expiresAt": {
"format": "date-time",
"type": "string"
},
"message": {
"type": "string"
},
"startsAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"active"
],
"type": "object"
},
"forwardAddresses": {
"items": {
"format": "idn-email",
"type": "string"
},
"type": "array"
},
"id": {
"format": "uuid",
"type": "string"
},
"isArchived": {
"type": "boolean"
},
"isBackupInProgress": {
"type": "boolean"
},
"isCatchAll": {
"type": "boolean"
},
"mailbox": {
"properties": {
"mailsystemSettings": {
"properties": {
"rateLimitId": {
"type": "string"
}
},
"required": [
"rateLimitId"
],
"type": "object"
},
"name": {
"type": "string"
},
"passwordUpdatedAt": {
"format": "date-time",
"type": "string"
},
"sendingEnabled": {
"type": "boolean"
},
"spamProtection": {
"properties": {
"active": {
"type": "boolean"
},
"autoDeleteSpam": {
"type": "boolean"
},
"folder": {
"enum": [
"spam",
"inbox"
],
"type": "string"
},
"relocationMinSpamScore": {
"maximum": 10,
"type": "integer"
}
},
"required": [
"active",
"folder",
"relocationMinSpamScore",
"autoDeleteSpam"
],
"type": "object"
},
"storageInBytes": {
"properties": {
"current": {
"properties": {
"updatedAt": {
"format": "date-time",
"type": "string"
},
"value": {
"format": "int64",
"type": "integer"
}
},
"required": [
"value",
"updatedAt"
],
"type": "object"
},
"limit": {
"format": "int64",
"type": "integer"
}
},
"required": [
"limit",
"current"
],
"type": "object"
}
},
"required": [
"name",
"sendingEnabled",
"spamProtection",
"storageInBytes",
"passwordUpdatedAt",
"mailsystemSettings"
],
"type": "object"
},
"originalAddress": {
"description": "For archived mail addresses, the address the mailbox had right before it was archived.",
"format": "idn-email",
"type": "string"
},
"projectId": {
"type": "string"
},
"rateLimitChangeRequest": {
"properties": {
"rateLimitId": {
"description": "ID of the rate limit requested.",
"type": "string"
}
},
"required": [
"rateLimitId"
],
"type": "object"
},
"receivingDisabled": {
"type": "boolean"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"id",
"receivingDisabled",
"address",
"isCatchAll",
"projectId",
"forwardAddresses",
"updatedAt",
"autoResponder",
"isArchived",
"isBackupInProgress",
"archive"
],
"type": "object"
},
"type": "array"
}

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/mail-addresses/?projectId=string&search=string&forwardAddress=true&catchAll=true&autoResponder=true&mailArchive=true&limit=50&page=1&sort=address.domain&order=asc
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";

const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.mail.listMailAddressesForUser({
"queryParameters": {
"projectId": "string",
"search": "string",
"forwardAddress": true,
"catchAll": true,
"autoResponder": true,
"mailArchive": true,
"limit": 50,
"page": 1,
"sort": [
"address.domain"
],
"order": [
"asc"
]
}
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Mail\ListMailAddressesForUser\ListMailAddressesForUserRequest;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

$request = (new ListMailAddressesForUserRequest())
->withProjectId("string")
->withSearch("string")
->withForwardAddress(true)
->withCatchAll(true)
->withAutoResponder(true)
->withMailArchive(true)
->withLimit(50)
->withPage(1)
->withSort(["address.domain"])
->withOrder(["asc"]);
$response = $client->mail()->listMailAddressesForUser($request);

var_dump($response->getBody();

Auf dieser Seite