Skip to Content
Xeonr Developer Docs
API SpecificationCurrent User

Add Email

POST
/xeonr.auth.api.v1.MeService/AddEmail

Adds an email address to the authenticated user's set and sends a verification link to it. The address is pending until the link is opened while signed in to the same account (VerifyEmail). Refused with failed_precondition when the address belongs to another account in the organisation (which account is never said), with already_exists when it is already in the caller's set, and with resource_exhausted past the hourly limit.

Required scopes: auth:emails:edit or auth:account:edit

Authorization

AuthorizationBearer <token>

JWT access token obtained via OAuth2 flow or service account

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

email?string

The address to add. It is stored trimmed and lower-cased.

Formatemail
Length3 <= length <= 254
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://auth.xeonr.io/xeonr.auth.api.v1.MeService/AddEmail" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{}'
{
  "email": {
    "id": "6f1c2a9e-3b7d-4c55-9a43-2f0e8d1b7c61",
    "email": "[email protected]",
    "verified": true,
    "primary": true,
    "sources": [
      "EMAIL_SOURCE_UNSPECIFIED"
    ],
    "connectionIdpSlugs": [
      "github"
    ],
    "verifiedAt": "2023-01-15T01:30:15.01Z",
    "verificationExpiresAt": "2023-01-15T01:30:15.01Z",
    "createdAt": "2023-01-15T01:30:15.01Z"
  }
}