- API-Referenz
- Get a mail address
Get a mail address
Request
- mailAddressIdstring (uuid)required
ID of the MailAddress to be retrieved.
Responses
OK
- 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"
}
{
"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"
}
Validation Error caused by invalid input data in the request
- type"ValidationError"required
- messagestring
- validationErrorsArray von objectrequired
- Array[
- *object
- messagestringrequired
The standard error message
- pathstringrequired
The path to the part of the data that was validated. JavaScript property access notation (e.g., ".prop[1].subProp") is used.
- typestringrequired
ajv validation error type (e.g. "format", "required", "type") or own validation error types
- contextobject
The object with the additional information about the error that can be used to create custom error messages. Keys depend on the type that failed validation (e.g. "missingProperty" for type "required")
- *string
]
Content-Type: application/json
{
"type": "ValidationError",
"message": "Validation failed",
"validationErrors": [
{
"message": "should be string",
"path": ".address.street",
"type": "format",
"context": {
"format": "email"
}
}
]
}
{
"type": "object",
"required": [
"type",
"validationErrors"
],
"properties": {
"type": {
"type": "string",
"enum": [
"ValidationError"
]
},
"message": {
"type": "string",
"example": "Validation failed"
},
"validationErrors": {
"type": "array",
"items": {
"type": "object",
"required": [
"message",
"path",
"type"
],
"properties": {
"message": {
"type": "string",
"description": "The standard error message",
"example": "should be string"
},
"path": {
"type": "string",
"description": "The path to the part of the data that was validated. JavaScript property access notation (e.g., \".prop[1].subProp\") is used.\n",
"example": ".address.street"
},
"type": {
"type": "string",
"description": "ajv validation error type (e.g. \"format\", \"required\", \"type\") or own validation error types",
"example": "format"
},
"context": {
"type": "object",
"example": {
"format": "email"
},
"description": "The object with the additional information about the error that can be used to create custom error messages. Keys depend on the\ntype that failed validation (e.g. \"missingProperty\" for type \"required\")\n",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
}
An unexpected Error that occurred while handling the request
- messagestringrequired
- typestringrequired
Content-Type: application/json
{
"message": "Something went wrong",
"type": "InternalServerError"
}
{
"type": "object",
"required": [
"type",
"message"
],
"properties": {
"message": {
"type": "string",
"example": "Something went wrong"
},
"type": {
"type": "string",
"example": "InternalServerError"
}
}
}
The requested resource was not found
- messagestringrequired
- typestringrequired
Content-Type: application/json
{
"message": "Something went wrong",
"type": "InternalServerError"
}
{
"type": "object",
"required": [
"type",
"message"
],
"properties": {
"message": {
"type": "string",
"example": "Something went wrong"
},
"type": {
"type": "string",
"example": "InternalServerError"
}
}
}
Your request ran into a rate limit. You have to wait until rate limit expires
- messagestring
- typestring
Content-Type: application/json
{
"message": "too many requests",
"type": "RateLimitError"
}
{
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "too many requests"
},
"type": {
"type": "string",
"example": "RateLimitError"
}
}
}
An unexpected Error that occurred while handling the request
- messagestringrequired
- typestringrequired
Content-Type: application/json
{
"message": "Something went wrong",
"type": "InternalServerError"
}
{
"type": "object",
"required": [
"type",
"message"
],
"properties": {
"message": {
"type": "string",
"example": "Something went wrong"
},
"type": {
"type": "string",
"example": "InternalServerError"
}
}
}
An unexpected Error that occurred while handling the request
- messagestringrequired
- typestringrequired
Content-Type: application/json
{
"message": "Something went wrong",
"type": "InternalServerError"
}
{
"type": "object",
"required": [
"type",
"message"
],
"properties": {
"message": {
"type": "string",
"example": "Something went wrong"
},
"type": {
"type": "string",
"example": "InternalServerError"
}
}
}
An unexpected Error that occurred while handling the request
- messagestringrequired
- typestringrequired
Content-Type: application/json
{
"message": "Something went wrong",
"type": "InternalServerError"
}
{
"type": "object",
"required": [
"type",
"message"
],
"properties": {
"message": {
"type": "string",
"example": "Something went wrong"
},
"type": {
"type": "string",
"example": "InternalServerError"
}
}
}
Nutzungsbeispiele
$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/mail-addresses/f0f86186-0a5a-45b2-aa33-502777496347
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.getMailAddress({
"mailAddressId": "f0f86186-0a5a-45b2-aa33-502777496347"
});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\Mail\GetMailAddress\GetMailAddressRequest;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
$request = (new GetMailAddressRequest(
mailAddressId: "f0f86186-0a5a-45b2-aa33-502777496347"
));
$response = $client->mail()->getMailAddress($request);
var_dump($response->getBody();