- users
- /gmail/v1/users/{userId}/draftsGET
- /gmail/v1/users/{userId}/draftsPOST
- /gmail/v1/users/{userId}/drafts/sendPOST
- /gmail/v1/users/{userId}/drafts/{id}DELETE
- /gmail/v1/users/{userId}/drafts/{id}GET
- /gmail/v1/users/{userId}/drafts/{id}PUT
- /gmail/v1/users/{userId}/historyGET
- /gmail/v1/users/{userId}/labelsGET
- /gmail/v1/users/{userId}/labelsPOST
- /gmail/v1/users/{userId}/labels/{id}DELETE
- /gmail/v1/users/{userId}/labels/{id}GET
- /gmail/v1/users/{userId}/labels/{id}PATCH
- /gmail/v1/users/{userId}/labels/{id}PUT
- /gmail/v1/users/{userId}/messagesGET
- /gmail/v1/users/{userId}/messagesPOST
- /gmail/v1/users/{userId}/messages/batchDeletePOST
- /gmail/v1/users/{userId}/messages/batchModifyPOST
- /gmail/v1/users/{userId}/messages/importPOST
- /gmail/v1/users/{userId}/messages/sendPOST
- /gmail/v1/users/{userId}/messages/{id}DELETE
- /gmail/v1/users/{userId}/messages/{id}GET
- /gmail/v1/users/{userId}/messages/{id}/modifyPOST
- /gmail/v1/users/{userId}/messages/{id}/trashPOST
- /gmail/v1/users/{userId}/messages/{id}/untrashPOST
- /gmail/v1/users/{userId}/messages/{messageId}/attachments/{id}GET
- /gmail/v1/users/{userId}/profileGET
- /gmail/v1/users/{userId}/settings/autoForwardingGET
- /gmail/v1/users/{userId}/settings/autoForwardingPUT
- /gmail/v1/users/{userId}/settings/cse/identitiesGET
- /gmail/v1/users/{userId}/settings/cse/identitiesPOST
- /gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}DELETE
- /gmail/v1/users/{userId}/settings/cse/identities/{cseEmailAddress}GET
- /gmail/v1/users/{userId}/settings/cse/identities/{emailAddress}PATCH
- /gmail/v1/users/{userId}/settings/cse/keypairsGET
- /gmail/v1/users/{userId}/settings/cse/keypairsPOST
- /gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}GET
- /gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:disablePOST
- /gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:enablePOST
- /gmail/v1/users/{userId}/settings/cse/keypairs/{keyPairId}:obliteratePOST
- /gmail/v1/users/{userId}/settings/delegatesGET
- /gmail/v1/users/{userId}/settings/delegatesPOST
- /gmail/v1/users/{userId}/settings/delegates/{delegateEmail}DELETE
- /gmail/v1/users/{userId}/settings/delegates/{delegateEmail}GET
- /gmail/v1/users/{userId}/settings/filtersGET
- /gmail/v1/users/{userId}/settings/filtersPOST
- /gmail/v1/users/{userId}/settings/filters/{id}DELETE
- /gmail/v1/users/{userId}/settings/filters/{id}GET
- /gmail/v1/users/{userId}/settings/forwardingAddressesGET
- /gmail/v1/users/{userId}/settings/forwardingAddressesPOST
- /gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}DELETE
- /gmail/v1/users/{userId}/settings/forwardingAddresses/{forwardingEmail}GET
- /gmail/v1/users/{userId}/settings/imapGET
- /gmail/v1/users/{userId}/settings/imapPUT
- /gmail/v1/users/{userId}/settings/languageGET
- /gmail/v1/users/{userId}/settings/languagePUT
- /gmail/v1/users/{userId}/settings/popGET
- /gmail/v1/users/{userId}/settings/popPUT
- /gmail/v1/users/{userId}/settings/sendAsGET
- /gmail/v1/users/{userId}/settings/sendAsPOST
- /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}DELETE
- /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}GET
- /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}PATCH
- /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}PUT
- /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfoGET
- /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfoPOST
- /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}DELETE
- /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}GET
- /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/smimeInfo/{id}/setDefaultPOST
- /gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}/verifyPOST
- /gmail/v1/users/{userId}/settings/vacationGET
- /gmail/v1/users/{userId}/settings/vacationPUT
- /gmail/v1/users/{userId}/stopPOST
- /gmail/v1/users/{userId}/threadsGET
- /gmail/v1/users/{userId}/threads/{id}DELETE
- /gmail/v1/users/{userId}/threads/{id}GET
- /gmail/v1/users/{userId}/threads/{id}/modifyPOST
- /gmail/v1/users/{userId}/threads/{id}/trashPOST
- /gmail/v1/users/{userId}/threads/{id}/untrashPOST
- /gmail/v1/users/{userId}/watchPOST
/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 ''
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
Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom "from" address. Send-as aliases correspond to the "Send Mail As" feature in the web interface.
displayName
stringÂ
optional
isDefault
booleanÂ
optional
true
. Changing this from false
to true
for an address will result in this field becoming false
for the other previous default address.isPrimary
booleanÂ
optional
replyToAddress
stringÂ
optional
sendAsEmail
stringÂ
optional
signature
stringÂ
optional
smtpMsa
object (SmtpMsa)Â
optional
host
stringÂ
optional
password
stringÂ
optional
port
integer <int32>
optional
securityMode
enum<string>Â
optional
Allowed values:
securityModeUnspecifiednonesslstarttls
username
stringÂ
optional
treatAsAlias
booleanÂ
optional
verificationStatus
enum<string>Â
optional
Allowed values:
verificationStatusUnspecifiedacceptedpending
Examples
Responses
🟢200Successful response
application/json
Body
Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom "from" address. Send-as aliases correspond to the "Send Mail As" feature in the web interface.
displayName
stringÂ
optional
isDefault
booleanÂ
optional
true
. Changing this from false
to true
for an address will result in this field becoming false
for the other previous default address.isPrimary
booleanÂ
optional
replyToAddress
stringÂ
optional
sendAsEmail
stringÂ
optional
signature
stringÂ
optional
smtpMsa
object (SmtpMsa)Â
optional
host
stringÂ
optional
password
stringÂ
optional
port
integer <int32>
optional
securityMode
enum<string>Â
optional
Allowed values:
securityModeUnspecifiednonesslstarttls
username
stringÂ
optional
treatAsAlias
booleanÂ
optional
verificationStatus
enum<string>Â
optional
Allowed values:
verificationStatusUnspecifiedacceptedpending
Modified at 2023-08-15 05:40:23