문서로 건너뛰기
API

내 계정

이 그룹의 모든 작업: 받는 값, 반환하는 값, 응답할 수 있는 오류.

작업

The account of the person behind the key or the app: which email notifications they get, their profile photo and username, the apps they connected and the invitations waiting for them. These calls act on a person, never on a workspace: an API key acts for the workspace owner, and an app for the person who connected it. Reading needs account:read and every change needs account:write. Neither is ever limited by a role, so an app a member connected reaches the member's own account too.

GET/account/notifications

Read your notification settings

범위account:read읽기

Which kinds of email OpenEmail sends the person, as Account, Notifications shows them, and the workspaces whose notifications are muted on their phone. Account and billing email cannot be turned off.

Requires the account:read scope.

반환값

The notification settings.

오류

모든 작업이 반환할 수 있는 오류400401403404422500오류 목록

다른 사용처

SDK
account.getNotifications()
CLI
openemail account get-notifications
MCP
getNotificationSettings

PUT/account/notifications/email/{category}

Turn a kind of email on or off

범위account:write데이터 변경

enabled: false stops OpenEmail sending the person that kind of email, and true starts it again. account and billing cannot be turned off, and asking to is a 422 invalid_parameter on category.

Requires the account:write scope.

경로 매개변수

categorystring필수

The kind of email.

다음 중 하나"account""billing""activity""product"

요청 본문

enabledboolean필수

True to receive that email, false to stop it.

반환값

The notification settings as they are now.

오류

모든 작업이 반환할 수 있는 오류400401403404422500오류 목록

다른 사용처

SDK
account.setEmailNotification()
CLI
openemail account set-email-notification
MCP
setEmailNotification

PUT/account/notifications/push/{workspaceId}

Mute a workspace on your phone

범위account:write데이터 변경

muted: true stops the phone app notifying the person about the mail of one workspace, and false lets it notify them again. It applies to every phone they signed in on. A workspace they cannot open is a 404.

Requires the account:write scope.

경로 매개변수

workspaceIdstring필수

A workspace from GET /workspaces.

요청 본문

mutedboolean필수

True to mute it, false to let it notify again.

반환값

The notification settings as they are now.

오류

모든 작업이 반환할 수 있는 오류400401403404422500오류 목록

다른 사용처

SDK
account.setPushMuted()
CLI
openemail account set-push-muted
MCP
setWorkspacePushMuted

PUT/account/photo

Set your profile photo

범위account:write데이터 변경

Uploads the person's profile photo, replacing any there was, as Account, Profile does. Send the image itself as the body, not JSON, with its type in Content-Type: image/png, image/jpeg, image/webp, image/gif. Up to 5 MB goes in. It is fitted into a 512 pixel square and stored as WebP, and an animated image keeps its first frame.

Requires the account:write scope.

요청 본문

콘텐츠 유형image/png, image/jpeg, image/webp, image/gif

binary

반환값

The photo, with its new url.

오류

422

invalid_image when the body is not an image of an accepted type, is too large or cannot be read.

502

image_not_stored: the image was read but could not be stored. Try again.

503

image_busy: the image service is saturated. Try again shortly.

모든 작업이 반환할 수 있는 오류400401403404500오류 목록

다른 사용처

SDK
account.setPhoto()
CLI
openemail account set-photo
MCP
setProfilePhoto

GET/account/username

Read your username

범위account:read읽기

The username of the person, whether they chose it or it was made for them, and the free address it gives them. A username is made from their name the first time it is read.

Requires the account:read scope.

반환값

The username.

오류

모든 작업이 반환할 수 있는 오류400401403404422500오류 목록

다른 사용처

SDK
account.getUsername()
CLI
openemail account get-username
MCP
getUsername

PUT/account/username

Choose your username

범위account:write데이터 변경

Sets the username for good, and with it the free address. Once chosen it never changes: a second choice is a 409 username_locked. A username another account has is a 409 username_taken, and one that is too short, too long, reserved or not lowercase letters, numbers and single dots is a 422 invalid_parameter on username. Check one first with GET /account/username/availability.

Requires the account:write scope.

요청 본문

usernamestring필수
최대 60자

반환값

The username, now chosen.

오류

409

username_locked: the username was chosen before and never changes. username_taken: another account has it.

모든 작업이 반환할 수 있는 오류400401403404422500오류 목록

다른 사용처

SDK
account.setUsername()
CLI
openemail account set-username
MCP
chooseUsername

GET/account/username/availability

Check a username

범위account:read읽기

Whether the person could choose a username, without choosing it. The answer says why when they could not.

Requires the account:read scope.

쿼리 매개변수

usernamestring필수

The username to check. It is lowercased and its spaces become dots before it is checked, as the app does.

1~60자

반환값

The verdict.

오류

모든 작업이 반환할 수 있는 오류400401403404422500오류 목록

다른 사용처

SDK
account.checkUsername()
CLI
openemail account check-username
MCP
checkUsername

GET/account/connected-apps

List your connected apps

범위account:read읽기

Every app the person connected with OAuth, as Account, Connected apps lists them: what each may reach, until when, how many tokens it holds and whether changes are allowed without a code for it right now. current marks the app making the call. Changing what an app may reach is done in the app, never through an app.

Requires the account:read scope.

반환값

The connected apps.

오류

모든 작업이 반환할 수 있는 오류400401403404422500오류 목록

다른 사용처

SDK
account.listConnectedApps()
CLI
openemail account list-connected-apps
MCP
listConnectedApps

DELETE/account/connected-apps/{clientId}

Remove a connected app

범위account:write삭제

Deletes every token the app holds and the access the person gave it, so its next call is refused and it has to ask again. Removing the app making the call disconnects it. An app the person never connected is a 404.

Requires the account:write scope.

경로 매개변수

clientIdstring필수

The app's clientId from GET /account/connected-apps.

반환값

오류

모든 작업이 반환할 수 있는 오류400401403404422500오류 목록

다른 사용처

SDK
account.revokeConnectedApp()
CLI
openemail account revoke-connected-app
MCP
revokeConnectedApp

POST/account/invitations/{invitationId}/accept

Accept an invitation

범위account:write데이터 변경

Joins the workspace with the role and the addresses the invitation gives, as accepting it in the app or from its link does. activate: true also makes it the workspace the app opens. A workspace that asks for two-factor sign-in is a 403 two_factor_required until the person turns it on, and an invitation that expired, was withdrawn or went to another address is a 422.

Requires the account:write scope.

경로 매개변수

invitationIdstring필수

The invitation id from GET /account/invitations.

요청 본문

activateboolean

반환값

오류

403

two_factor_required: the workspace asks everyone in it to sign in with two-factor authentication. mailbox_login: a password sign-in for one address cannot join a workspace.

모든 작업이 반환할 수 있는 오류400401404422500오류 목록

다른 사용처

SDK
account.acceptInvitation()
CLI
openemail account accept-invitation
MCP
acceptInvitation

POST/account/invitations/{invitationId}/decline

Decline an invitation

범위account:write삭제

Turns the invitation down, so its link stops working, and tells whoever sent it. It cannot be taken back: they have to invite the person again. An invitation they already accepted is a 409 invitation_accepted.

Requires the account:write scope.

경로 매개변수

invitationIdstring필수

The invitation id from GET /account/invitations.

반환값

Declined.

오류

모든 작업이 반환할 수 있는 오류400401403404422500오류 목록

다른 사용처

SDK
account.declineInvitation()
CLI
openemail account decline-invitation
MCP
declineInvitation

객체

AcceptedInvitationobject

objectstring필수
다음 중 하나"invitation"
idstring필수
acceptedboolean필수
다음 중 하나true
workspaceIdstring필수
workspaceNamestring필수
addressesGrantedinteger필수
0 이상
domainsGrantedinteger필수
0 이상
activatedboolean필수

Whether the app now opens the workspace, after activate: true.

AccountPhotoobject

objectstring필수
다음 중 하나"account_photo"
urlstring필수
null 가능

ConnectedAppobject

objectstring필수
다음 중 하나"connected_app"
clientIdstring필수
namestring필수
null 가능
kindstring필수

cli for a sign-in of the command line tool, app for every other app.

다음 중 하나"app""cli"
cliDevicestring
null 가능
currentboolean필수

Whether it is the app making this call.

registeredByAccountboolean
redirectUrisstring[]
connectedAtstring
null 가능형식date-time
accessUntilstring

When its last token runs out.

null 가능형식date-time
tokenCountinteger필수
0 이상
statusstring필수
다음 중 하나"active""expired""needs-approval""access-lost"
usablePermissionsinteger

How many of the permissions it was given the person still holds.

null 가능
elevatedUntilstring

Until when it may make changes that ask for a verification code without one.

null 가능형식date-time
grantobject

What the person gave it, or null for an app that has to ask again.

null 가능
workspaceIdstring필수

The one workspace the app acts for.

workspaceNamestring필수
null 가능
permissionsstring[]필수
addressAllowliststring[]필수
null 가능
domainAllowliststring[]필수
null 가능
expiresAtstring필수

When the access ends, or null when it lasts until it is removed.

null 가능형식date-time
updatedAtstring필수
형식date-time

ConnectedAppListobject

objectstring
다음 중 하나"list"

DeclinedInvitationobject

objectstring필수
다음 중 하나"invitation"
idstring필수
declinedboolean필수
다음 중 하나true

EmailNotificationSettingobject

categorystring필수
다음 중 하나"account""billing""activity""product"
labelstring필수
descriptionstring필수
requiredboolean필수

Whether it can never be turned off.

enabledboolean필수

NotificationSettingsobject

objectstring필수
다음 중 하나"notification_settings"
emailEmailNotificationSetting[]필수

Every kind of email OpenEmail sends.

mutedWorkspacesstring[]필수

The workspaces whose notifications are muted on the phone.

ReceivedInvitationobject

objectstring필수
다음 중 하나"invitation"
idstring필수
workspaceIdstring필수
workspaceNamestring필수
roleNamestring필수
inviterNamestring
null 가능
addressesinteger필수

How many addresses and whole domains it gives.

0 이상
expiresAtstring필수
형식date-time
createdAtstring필수
형식date-time

RevokedConnectedAppobject

objectstring필수
다음 중 하나"connected_app"
clientIdstring필수
revokedboolean필수
다음 중 하나true
tokensRevokedinteger필수
0 이상

Usernameobject

objectstring필수
다음 중 하나"username"
usernamestring필수
null 가능
chosenboolean필수

Whether the person chose it. A chosen username never changes.

addressstring필수

The free address the username gives, when this deployment offers one.

null 가능

UsernameAvailabilityobject

objectstring필수
다음 중 하나"username_availability"
usernamestring필수

The username as it was checked.

statusstring필수

current when it is the username the person already has.

다음 중 하나"available""current""taken""reserved""invalid""too_short""too_long"
availableboolean필수
messagestring필수