Skip to main content
POST
/
user
/
emails
Add email addresses
curl --request POST \
  --url https://gogs.example.com/api/v1/user/emails \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "emails": [
    "[email protected]"
  ]
}
'
[
  {
    "email": "[email protected]",
    "verified": true,
    "primary": true
  }
]

Authorizations

Authorization
string
header
required

Personal access token. Use format: token {YOUR_ACCESS_TOKEN}

Body

application/json
emails
string<email>[]
required

Response

Success

email
string<email>
verified
boolean
primary
boolean