API

MeEmail

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/me/emails/{id}/resend_verification create Updated account emails
POST /api/v1/me/emails create Email registered and verification sent
GET /api/v1/me/emails list Account emails
PATCH /api/v1/me/emails/{id} patch Updated account emails
DELETE /api/v1/me/emails/{id} remove Updated account emails
PUT /api/v1/me/emails/{id} update Success

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

me_emails, err := client.MeEmail(nil).List(nil, nil)
if err != nil {
    panic(err)
}
fmt.Println(me_emails)
created, err := client.MeEmail(nil).Create(map[string]any{"email": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)
updated, err := client.MeEmail(nil).Update(map[string]any{"id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(updated)
patched, err := client.MeEmail(nil).Patch(map[string]any{"id": "example_id", "account": true, "commit_author": true}, nil)
if err != nil {
    panic(err)
}
fmt.Println(patched)
removed, err := client.MeEmail(nil).Remove(map[string]any{"id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(removed)

Lua

Construct client as shown in the Lua setup, then call the operations:

local me_emails, err = client:MeEmail():list()
local created, err = client:MeEmail():create({ email = "example" })
local updated, err = client:MeEmail():update({ id = "example_id" })
local patched, err = client:MeEmail():patch({ id = "example_id", account = true, commit_author = true })
local removed, err = client:MeEmail():remove({ id = "example_id" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$me_emails = $client->MeEmail()->list();
$created = $client->MeEmail()->create(["email" => "example"]);
$updated = $client->MeEmail()->update(["id" => "example_id"]);
$patched = $client->MeEmail()->patch(["id" => "example_id", "account" => true, "commit_author" => true]);
$client->MeEmail()->remove(["id" => "example_id"]);

Python

Construct client as shown in the Python setup, then call the operations:

me_emails = client.MeEmail().list()
created = client.MeEmail().create({ "email": "example" })
updated = client.MeEmail().update({"id": "example_id"})
patched = client.MeEmail().patch({"id": "example_id", "account": True, "commit_author": True})
client.MeEmail().remove({"id": "example_id"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

me_emails = client.MeEmail.list()
created = client.MeEmail.create({ "email" => "example" })
updated = client.MeEmail.update({ "id" => "example_id" })
patched = client.MeEmail.patch({ "id" => "example_id", "account" => true, "commit_author" => true })
client.MeEmail.remove({ "id" => "example_id" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const me_emails = await client.MeEmail().list()
const created = await client.MeEmail().create({ email: "example" })
const updated = await client.MeEmail().update({ id: "example_id" })
const patched = await client.MeEmail().patch({ id: "example_id", account: true, commit_author: true })
await client.MeEmail().remove({ id: "example_id" })

Fields

Field Type Required Description
account boolean Yes Account
can_delete boolean Yes Can Delete
can_resend_verification boolean Yes Can Resend Verification
can_set_account boolean Yes Can Set Account
can_set_commit_author boolean Yes Can Set Commit Author
commit_author boolean Yes Commit Author
email string Yes Email
emails array Yes Emails
id string Yes Id
message string No Message
verification_status string Yes Verification Status
verified boolean Yes Verified

create

POST /api/v1/me/emails/{id}/resend_verification

Operation ID: resend_verification_api_v1_user_email.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Updated account emails

application/json

Property Type Required Description
emails array of object Yes
emails[].account boolean Yes
emails[].can_delete boolean Yes
emails[].can_resend_verification boolean Yes
emails[].can_set_account boolean Yes
emails[].can_set_commit_author boolean Yes
emails[].commit_author boolean Yes
emails[].email string (email) Yes
emails[].id string Yes
emails[].verification_status enum: verified, unverified Yes
emails[].verified boolean Yes
message string No
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

POST /api/v1/me/emails

Operation ID: post_api_v1_me_emails.

Authentication: bearer token (bearerAuth).

Request body

application/json

Property Type Required Description
email string (email) Yes

Responses

200: Email registered and verification sent

application/json

Property Type Required Description
emails array of object Yes
emails[].account boolean Yes
emails[].can_delete boolean Yes
emails[].can_resend_verification boolean Yes
emails[].can_set_account boolean Yes
emails[].can_set_commit_author boolean Yes
emails[].commit_author boolean Yes
emails[].email string (email) Yes
emails[].id string Yes
emails[].verification_status enum: verified, unverified Yes
emails[].verified boolean Yes
message string No
201: Email registered and verification sent

application/json

Property Type Required Description
emails array of object Yes
emails[].account boolean Yes
emails[].can_delete boolean Yes
emails[].can_resend_verification boolean Yes
emails[].can_set_account boolean Yes
emails[].can_set_commit_author boolean Yes
emails[].commit_author boolean Yes
emails[].email string (email) Yes
emails[].id string Yes
emails[].verification_status enum: verified, unverified Yes
emails[].verified boolean Yes
message string No
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

list

GET /api/v1/me/emails

Operation ID: api_v1_user_emails.

Authentication: bearer token (bearerAuth).

Responses

200: Account emails

application/json

Property Type Required Description
emails array of object Yes
emails[].account boolean Yes
emails[].can_delete boolean Yes
emails[].can_resend_verification boolean Yes
emails[].can_set_account boolean Yes
emails[].can_set_commit_author boolean Yes
emails[].commit_author boolean Yes
emails[].email string (email) Yes
emails[].id string Yes
emails[].verification_status enum: verified, unverified Yes
emails[].verified boolean Yes
message string No
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

patch

PATCH /api/v1/me/emails/{id}

Operation ID: api_v1_user_email.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Request body

application/json

The request body is object or object.

Responses

200: Updated account emails

application/json

Property Type Required Description
emails array of object Yes
emails[].account boolean Yes
emails[].can_delete boolean Yes
emails[].can_resend_verification boolean Yes
emails[].can_set_account boolean Yes
emails[].can_set_commit_author boolean Yes
emails[].commit_author boolean Yes
emails[].email string (email) Yes
emails[].id string Yes
emails[].verification_status enum: verified, unverified Yes
emails[].verified boolean Yes
message string No
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

remove

DELETE /api/v1/me/emails/{id}

Operation ID: delete_api_v1_me_emails_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Responses

200: Updated account emails

application/json

Property Type Required Description
emails array of object Yes
emails[].account boolean Yes
emails[].can_delete boolean Yes
emails[].can_resend_verification boolean Yes
emails[].can_set_account boolean Yes
emails[].can_set_commit_author boolean Yes
emails[].commit_author boolean Yes
emails[].email string (email) Yes
emails[].id string Yes
emails[].verification_status enum: verified, unverified Yes
emails[].verified boolean Yes
message string No
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

update

PUT /api/v1/me/emails/{id}

Operation ID: put_api_v1_me_emails_id_.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway