/gmail/v1/users/{userId}/settings/sendAs
POST
/gmail/v1/users/{userId}/settings/sendAs
users
pending
; otherwise, the resource will be created with verification status set to accepted
. If a signature is provided, Gmail will sanitize the HTML before saving it with the alias. This method is only available to service account clients that have been delegated domain-wide authority.Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://gmail.googleapis.com//gmail/v1/users//settings/sendAs' \
--header 'Content-Type: application/json' \
--data-raw '{
"displayName": "string",
"isDefault": true,
"isPrimary": true,
"replyToAddress": "string",
"sendAsEmail": "string",
"signature": "string",
"smtpMsa": {
"host": "string",
"password": "string",
"port": 0,
"securityMode": "securityModeUnspecified",
"username": "string"
},
"treatAsAlias": true,
"verificationStatus": "verificationStatusUnspecified"
}'
Response Response Example
{
"displayName": "string",
"isDefault": true,
"isPrimary": true,
"replyToAddress": "string",
"sendAsEmail": "string",
"signature": "string",
"smtpMsa": {
"host": "string",
"password": "string",
"port": 0,
"securityMode": "securityModeUnspecified",
"username": "string"
},
"treatAsAlias": true,
"verificationStatus": "verificationStatusUnspecified"
}
Request
Path Params
userId
stringÂ
required
Body Params application/json