Skip to content
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
This is the documentation of the next version, still under development. See the latest release.

Add email addresses

POST
/user/emails
curl --request POST \
--url https://gitea.com/api/v1/user/emails \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "emails": [ "example" ] }'
Media typeapplication/json
CreateEmailOption

Options when creating email addresses

object
emails

Email addresses to add

Array<string>
Examplegenerated
{
"emails": [
"example"
]
}

EmailList

Media typeapplication/json
Array<object>
Email

An email address belonging to a user

object
email

The email address

string format: email
primary

Whether this is the primary email address

boolean
user_id

The unique identifier of the user who owns this email

integer format: int64
username

Username of the user

string
verified

Whether the email address has been verified

boolean
Examplegenerated
[
{
"email": "hello@example.com",
"primary": true,
"user_id": 1,
"username": "example",
"verified": true
}
]

APIError is error format response

message
string
url
string

APIError is error format response

message
string
url
string

APIValidationError is error format response related to input validation

message
string
url
string