CCP Games Mail API
The Mail API from CCP Games — 5 operation(s) for mail.
The Mail API from CCP Games — 5 operation(s) for mail.
openapi: 3.1.0
info:
contact:
name: ESI Support
url: https://developers.eveonline.com/docs/support/
license:
name: EVE Developer License
url: https://developers.eveonline.com/license-agreement
termsOfService: https://support.eveonline.com/hc/en-us/articles/8414770561948-EVE-Online-Terms-of-Service
title: EVE Swagger Incineration (ESI) - tranquility Alliance Mail API
version: '2020-01-01'
servers:
- url: https://esi.evetech.net
tags:
- name: Mail
paths:
/characters/{character_id}/mail:
get:
description: Return the 50 most recent mail headers belonging to the character that match the query criteria. Queries can be filtered by label, and last_mail_id can be used to paginate backwards
operationId: GetCharactersCharacterIdMail
parameters:
- description: The ID of the character
in: path
name: character_id
required: true
schema:
$ref: '#/components/schemas/CharacterID'
- in: query
name: labels
schema:
description: Fetch only mails that match one or more of the given labels
items:
format: int64
type: integer
maxItems: 25
minItems: 1
type: array
uniqueItems: true
- in: query
name: last_mail_id
schema:
description: List only mail with an ID lower than the given ID, if present
format: int64
type: integer
- $ref: '#/components/parameters/AcceptLanguage'
- $ref: '#/components/parameters/IfNoneMatch'
- $ref: '#/components/parameters/CompatibilityDate'
- $ref: '#/components/parameters/Tenant'
- $ref: '#/components/parameters/IfModifiedSince'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CharactersCharacterIdMailGet'
description: OK
headers:
Cache-Control:
$ref: '#/components/headers/CacheControl'
ETag:
$ref: '#/components/headers/ETag'
Last-Modified:
$ref: '#/components/headers/LastModified'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error
security:
- OAuth2:
- esi-mail.read_mail.v1
summary: Return mail headers
tags:
- Mail
x-cache-age: 30
x-compatibility-date: '2020-01-01'
x-rate-limit:
group: char-social
max-tokens: 600
window-size: 15m
post:
description: Create and send a new mail
operationId: PostCharactersCharacterIdMail
parameters:
- description: The ID of the character
in: path
name: character_id
required: true
schema:
$ref: '#/components/schemas/CharacterID'
- $ref: '#/components/parameters/AcceptLanguage'
- $ref: '#/components/parameters/IfNoneMatch'
- $ref: '#/components/parameters/CompatibilityDate'
- $ref: '#/components/parameters/Tenant'
- $ref: '#/components/parameters/IfModifiedSince'
requestBody:
content:
application/json:
schema:
properties:
approved_cost:
default: 0
format: int64
type: integer
body:
maxLength: 10000
type: string
recipients:
items:
description: recipient object
properties:
recipient_id:
format: int64
type: integer
recipient_type:
enum:
- alliance
- character
- corporation
- mailing_list
type: string
required:
- recipient_type
- recipient_id
type: object
maxItems: 50
minItems: 1
type: array
subject:
maxLength: 1000
type: string
required:
- recipients
- subject
- body
type: object
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/CharactersCharacterIdMailPost'
description: Created
headers:
Cache-Control:
$ref: '#/components/headers/CacheControl'
ETag:
$ref: '#/components/headers/ETag'
Last-Modified:
$ref: '#/components/headers/LastModified'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error
security:
- OAuth2:
- esi-mail.send_mail.v1
summary: Send a new mail
tags:
- Mail
x-compatibility-date: '2020-01-01'
x-rate-limit:
group: char-social
max-tokens: 600
window-size: 15m
/characters/{character_id}/mail/labels:
get:
description: Return a list of the users mail labels, unread counts for each label and a total unread count.
operationId: GetCharactersCharacterIdMailLabels
parameters:
- description: The ID of the character
in: path
name: character_id
required: true
schema:
$ref: '#/components/schemas/CharacterID'
- $ref: '#/components/parameters/AcceptLanguage'
- $ref: '#/components/parameters/IfNoneMatch'
- $ref: '#/components/parameters/CompatibilityDate'
- $ref: '#/components/parameters/Tenant'
- $ref: '#/components/parameters/IfModifiedSince'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CharactersCharacterIdMailLabelsGet'
description: OK
headers:
Cache-Control:
$ref: '#/components/headers/CacheControl'
ETag:
$ref: '#/components/headers/ETag'
Last-Modified:
$ref: '#/components/headers/LastModified'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error
security:
- OAuth2:
- esi-mail.read_mail.v1
summary: Get mail labels and unread counts
tags:
- Mail
x-cache-age: 30
x-compatibility-date: '2020-01-01'
x-rate-limit:
group: char-social
max-tokens: 600
window-size: 15m
post:
description: Create a mail label
operationId: PostCharactersCharacterIdMailLabels
parameters:
- description: The ID of the character
in: path
name: character_id
required: true
schema:
$ref: '#/components/schemas/CharacterID'
- $ref: '#/components/parameters/AcceptLanguage'
- $ref: '#/components/parameters/IfNoneMatch'
- $ref: '#/components/parameters/CompatibilityDate'
- $ref: '#/components/parameters/Tenant'
- $ref: '#/components/parameters/IfModifiedSince'
requestBody:
content:
application/json:
schema:
properties:
color:
default: '#ffffff'
description: Hexadecimal string representing label color, in RGB format
enum:
- '#0000fe'
- '#006634'
- '#0099ff'
- '#00ff33'
- '#01ffff'
- '#349800'
- '#660066'
- '#666666'
- '#999999'
- '#99ffff'
- '#9a0000'
- '#ccff9a'
- '#e6e6e6'
- '#fe0000'
- '#ff6600'
- '#ffff01'
- '#ffffcd'
- '#ffffff'
type: string
name:
maxLength: 40
minLength: 1
type: string
required:
- name
type: object
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/CharactersCharacterIdMailLabelsPost'
description: Created
headers:
Cache-Control:
$ref: '#/components/headers/CacheControl'
ETag:
$ref: '#/components/headers/ETag'
Last-Modified:
$ref: '#/components/headers/LastModified'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error
security:
- OAuth2:
- esi-mail.organize_mail.v1
summary: Create a mail label
tags:
- Mail
x-compatibility-date: '2020-01-01'
x-rate-limit:
group: char-social
max-tokens: 600
window-size: 15m
/characters/{character_id}/mail/labels/{label_id}:
delete:
description: Delete a mail label
operationId: DeleteCharactersCharacterIdMailLabelsLabelId
parameters:
- description: The ID of the character
in: path
name: character_id
required: true
schema:
$ref: '#/components/schemas/CharacterID'
- in: path
name: label_id
required: true
schema:
description: An EVE label id
format: int64
type: integer
- $ref: '#/components/parameters/AcceptLanguage'
- $ref: '#/components/parameters/IfNoneMatch'
- $ref: '#/components/parameters/CompatibilityDate'
- $ref: '#/components/parameters/Tenant'
- $ref: '#/components/parameters/IfModifiedSince'
responses:
'204':
description: Label deleted
headers:
Cache-Control:
$ref: '#/components/headers/CacheControl'
ETag:
$ref: '#/components/headers/ETag'
Last-Modified:
$ref: '#/components/headers/LastModified'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error
security:
- OAuth2:
- esi-mail.organize_mail.v1
summary: Delete a mail label
tags:
- Mail
x-compatibility-date: '2020-01-01'
x-rate-limit:
group: char-social
max-tokens: 600
window-size: 15m
/characters/{character_id}/mail/lists:
get:
description: Return all mailing lists that the character is subscribed to
operationId: GetCharactersCharacterIdMailLists
parameters:
- description: The ID of the character
in: path
name: character_id
required: true
schema:
$ref: '#/components/schemas/CharacterID'
- $ref: '#/components/parameters/AcceptLanguage'
- $ref: '#/components/parameters/IfNoneMatch'
- $ref: '#/components/parameters/CompatibilityDate'
- $ref: '#/components/parameters/Tenant'
- $ref: '#/components/parameters/IfModifiedSince'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CharactersCharacterIdMailListsGet'
description: OK
headers:
Cache-Control:
$ref: '#/components/headers/CacheControl'
ETag:
$ref: '#/components/headers/ETag'
Last-Modified:
$ref: '#/components/headers/LastModified'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error
security:
- OAuth2:
- esi-mail.read_mail.v1
summary: Return mailing list subscriptions
tags:
- Mail
x-cache-age: 120
x-compatibility-date: '2020-01-01'
x-rate-limit:
group: char-social
max-tokens: 600
window-size: 15m
/characters/{character_id}/mail/{mail_id}:
delete:
description: Delete a mail
operationId: DeleteCharactersCharacterIdMailMailId
parameters:
- description: The ID of the character
in: path
name: character_id
required: true
schema:
$ref: '#/components/schemas/CharacterID'
- in: path
name: mail_id
required: true
schema:
description: An EVE mail ID
format: int64
type: integer
- $ref: '#/components/parameters/AcceptLanguage'
- $ref: '#/components/parameters/IfNoneMatch'
- $ref: '#/components/parameters/CompatibilityDate'
- $ref: '#/components/parameters/Tenant'
- $ref: '#/components/parameters/IfModifiedSince'
responses:
'204':
description: Mail deleted
headers:
Cache-Control:
$ref: '#/components/headers/CacheControl'
ETag:
$ref: '#/components/headers/ETag'
Last-Modified:
$ref: '#/components/headers/LastModified'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error
security:
- OAuth2:
- esi-mail.organize_mail.v1
summary: Delete a mail
tags:
- Mail
x-compatibility-date: '2020-01-01'
x-rate-limit:
group: char-social
max-tokens: 600
window-size: 15m
get:
description: Return the contents of an EVE mail
operationId: GetCharactersCharacterIdMailMailId
parameters:
- description: The ID of the character
in: path
name: character_id
required: true
schema:
$ref: '#/components/schemas/CharacterID'
- in: path
name: mail_id
required: true
schema:
description: An EVE mail ID
format: int64
type: integer
- $ref: '#/components/parameters/AcceptLanguage'
- $ref: '#/components/parameters/IfNoneMatch'
- $ref: '#/components/parameters/CompatibilityDate'
- $ref: '#/components/parameters/Tenant'
- $ref: '#/components/parameters/IfModifiedSince'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CharactersCharacterIdMailMailIdGet'
description: OK
headers:
Cache-Control:
$ref: '#/components/headers/CacheControl'
ETag:
$ref: '#/components/headers/ETag'
Last-Modified:
$ref: '#/components/headers/LastModified'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error
security:
- OAuth2:
- esi-mail.read_mail.v1
summary: Return a mail
tags:
- Mail
x-cache-age: 30
x-compatibility-date: '2020-01-01'
x-rate-limit:
group: char-social
max-tokens: 600
window-size: 15m
put:
description: Update metadata about a mail
operationId: PutCharactersCharacterIdMailMailId
parameters:
- description: The ID of the character
in: path
name: character_id
required: true
schema:
$ref: '#/components/schemas/CharacterID'
- in: path
name: mail_id
required: true
schema:
description: An EVE mail ID
format: int64
type: integer
- $ref: '#/components/parameters/AcceptLanguage'
- $ref: '#/components/parameters/IfNoneMatch'
- $ref: '#/components/parameters/CompatibilityDate'
- $ref: '#/components/parameters/Tenant'
- $ref: '#/components/parameters/IfModifiedSince'
requestBody:
content:
application/json:
schema:
properties:
labels:
description: Labels to assign to the mail. Pre-existing labels are unassigned.
items:
description: label integer
format: int64
type: integer
maxItems: 25
type: array
uniqueItems: true
read:
description: Whether the mail is flagged as read
type: boolean
type: object
required: true
responses:
'204':
description: Mail updated
headers:
Cache-Control:
$ref: '#/components/headers/CacheControl'
ETag:
$ref: '#/components/headers/ETag'
Last-Modified:
$ref: '#/components/headers/LastModified'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Error
security:
- OAuth2:
- esi-mail.organize_mail.v1
summary: Update metadata about a mail
tags:
- Mail
x-compatibility-date: '2020-01-01'
x-rate-limit:
group: char-social
max-tokens: 600
window-size: 15m
components:
parameters:
CompatibilityDate:
description: The compatibility date for the request.
in: header
name: X-Compatibility-Date
required: true
schema:
enum:
- '2020-01-01'
format: date
type: string
AcceptLanguage:
description: The language to use for the response.
in: header
name: Accept-Language
schema:
default: en
enum:
- en
- de
- fr
- ja
- ru
- zh
- ko
- es
type: string
Tenant:
description: The tenant ID for the request.
example: ''
in: header
name: X-Tenant
schema:
default: tranquility
type: string
IfNoneMatch:
description: The ETag of the previous request. A 304 will be returned if this matches the current ETag.
in: header
name: If-None-Match
schema:
type: string
IfModifiedSince:
description: The date the resource was last modified. A 304 will be returned if the resource has not been modified since this date.
in: header
name: If-Modified-Since
schema:
type: string
headers:
LastModified:
description: The last modified date of the response. Use this with If-Modified-Since to check whether the resource has changed.
schema:
type: string
ETag:
description: The ETag value of the response body. Use this with If-None-Match to check whether the resource has changed.
schema:
type: string
CacheControl:
description: Directives for caching mechanisms. It controls how the response can be cached, by whom, and for how long.
schema:
type: string
schemas:
CharactersCharacterIdMailMailIdGet:
properties:
body:
description: Mail's body
type: string
from:
description: From whom the mail was sent
format: int64
type: integer
labels:
description: Labels attached to the mail
items:
description: label integer
format: int64
type: integer
type: array
uniqueItems: true
read:
description: Whether the mail is flagged as read
type: boolean
recipients:
description: Recipients of the mail
items:
description: recipient object
properties:
recipient_id:
format: int64
type: integer
recipient_type:
enum:
- alliance
- character
- corporation
- mailing_list
type: string
required:
- recipient_type
- recipient_id
type: object
type: array
uniqueItems: true
subject:
description: Mail subject
type: string
timestamp:
description: When the mail was sent
format: date-time
type: string
type: object
CharactersCharacterIdMailListsGet:
items:
properties:
mailing_list_id:
description: Mailing list ID
format: int64
type: integer
name:
type: string
required:
- mailing_list_id
- name
type: object
type: array
ErrorDetail:
properties:
location:
description: Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
type: string
message:
description: Error message text
type: string
value:
description: The value at the given location
type: object
CharactersCharacterIdMailGet:
items:
properties:
from:
description: From whom the mail was sent
format: int64
type: integer
is_read:
type: boolean
labels:
items:
description: label integer
format: int64
type: integer
type: array
uniqueItems: true
mail_id:
format: int64
type: integer
recipients:
description: Recipients of the mail
items:
description: recipient object
properties:
recipient_id:
format: int64
type: integer
recipient_type:
enum:
- alliance
- character
- corporation
- mailing_list
type: string
required:
- recipient_type
- recipient_id
type: object
type: array
uniqueItems: true
subject:
description: Mail subject
type: string
timestamp:
description: When the mail was sent
format: date-time
type: string
type: object
type: array
CharactersCharacterIdMailLabelsGet:
properties:
labels:
items:
description: label object
properties:
color:
default: '#ffffff'
enum:
- '#0000fe'
- '#006634'
- '#0099ff'
- '#00ff33'
- '#01ffff'
- '#349800'
- '#660066'
- '#666666'
- '#999999'
- '#99ffff'
- '#9a0000'
- '#ccff9a'
- '#e6e6e6'
- '#fe0000'
- '#ff6600'
- '#ffff01'
- '#ffffcd'
- '#ffffff'
type: string
label_id:
format: int64
type: integer
name:
type: string
unread_count:
format: int64
type: integer
type: object
type: array
total_unread_count:
format: int64
type: integer
type: object
CharactersCharacterIdMailLabelsPost:
description: Label ID
format: int64
type: integer
Error:
properties:
details:
description: List of individual error details.
items:
$ref: '#/components/schemas/ErrorDetail'
type: array
error:
description: Error message.
type: string
required:
- error
type: object
CharacterID:
examples:
- 90000001
format: int64
type: integer
x-common-model: 'true'
CharactersCharacterIdMailPost:
description: Mail ID
format: int64
type: integer
securitySchemes:
OAuth2:
flows:
authorizationCode:
authorizationUrl: https://login.eveonline.com/v2/oauth/authorize
scopes:
esi-access.read_lists.v1: esi-access.read_lists.v1
esi-activities.read_character.v1: esi-activities.read_character.v1
esi-alliances.read_contacts.v1: esi-alliances.read_contacts.v1
esi-assets.read_assets.v1: esi-assets.read_assets.v1
esi-assets.read_corporation_assets.v1: esi-assets.read_corporation_assets.v1
esi-calendar.read_calendar_events.v1: esi-calendar.read_calendar_events.v1
esi-calendar.respond_calendar_events.v1: esi-calendar.respond_calendar_events.v1
esi-characters.read_agents_research.v1: esi-characters.read_agents_research.v1
esi-characters.read_blueprints.v1: esi-characters.read_blueprints.v1
esi-characters.read_contacts.v1: esi-characters.read_contacts.v1
esi-characters.read_corporation_roles.v1: esi-characters.read_corporation_roles.v1
esi-characters.read_fatigue.v1: esi-characters.read_fatigue.v1
esi-characters.read_freelance_jobs.v1: esi-characters.read_freelance_jobs.v1
esi-characters.read_fw_stats.v1: esi-characters.read_fw_stats.v1
esi-characters.read_loyalty.v1: esi-characters.read_loyalty.v1
esi-characters.read_medals.v1: esi-characters.read_medals.v1
esi-characters.read_notifications.v1: esi-characters.read_notifications.v1
esi-characters.read_standings.v1: esi-characters.read_standings.v1
esi-characters.read_titles.v1: esi-characters.read_titles.v1
esi-characters.write_contacts.v1: esi-characters.write_contacts.v1
esi-clones.read_clones.v1: esi-clones.read_clones.v1
esi-clones.read_implants.v1: esi-clones.read_implants.v1
esi-contracts.read_character_contracts.v1: esi-contracts.read_character_contracts.v1
esi-contracts.read_corporation_contracts.v1: esi-contracts.read_corporation_contracts.v1
esi-corporations.read_blueprints.v1: esi-corporations.read_blueprints.v1
esi-corporations.read_contacts.v1: esi-corporations.read_contacts.v1
esi-corporations.read_container_logs.v1: esi-corporations.read_container_logs.v1
esi-corporations.read_corporation_membership.v1: esi-corporations.read_corporation_membership.v1
esi-corporations.read_divisions.v1: esi-corporations.read_divisions.v1
esi-corporations.read_facilities.v1: esi-corporations.read_facilities.v1
esi-corporations.read_freelance_jobs.v1: esi-corporations.read_freelance_jobs.v1
esi-corporations.read_fw_stats.v1: esi-corporations.read_fw_stats.v1
esi-corporations.read_medals.v1: esi-corporations.read_medals.v1
esi-corporations.read_projects.v1: esi-corporations.read_projects.v1
esi-corporations.read_standings.v1: esi-corporations.read_standings.v1
esi-corporations.read_starbases.v1: esi-corporations.read_starbases.v1
esi-corporations.read_structures.v1: esi-corporations.read_structures.v1
esi-corporations.read_titles.v1: esi-corporations.read_titles.v1
esi-corporations.track_members.v1: esi-corporations.track_members.v1
esi-fittings.read_fittings.v1: esi-fittings.read_fittings.v1
esi-fittings.write_fittings.v1: esi-fittings.write_fittings.v1
esi-fleets.read_fleet.v1: esi-fleets.read_fleet.v1
esi-fleets.write_fleet.v1: esi-fleets.write_fleet.v1
esi-industry.read_character_jobs.v1: esi-industry.read_character_jobs.v1
esi-industry.read_character_mining.v1: esi-industry.read_character_mining.v1
esi-industry.read_corporation_jobs.v1: esi-industry.read_corporation_jobs.v1
esi-industry.read_corporation_mining.v1: esi-industry.read_corporation_mining.v1
esi-killmails.read_corporation_killmails.v1: esi-killmails.read_corporation_killmails.v1
esi-killmails.read_killmails.v1: esi-killmails.read_killmails.v1
esi-location.read_location.v1: esi-location.read_location.v1
esi-location.read_online.v1: esi-location.read_online.v1
esi-location.read_ship_type.v1: esi-location.read_ship_type.v1
esi-mail.organize_mail.v1: esi-mail.organize_mail.v1
esi-mail.read_mail.v1: esi-mail.read_mail.v1
esi-mail.send_mail.v1: esi-mail.send_mail.v1
esi-markets.read_character_orders.v1: esi-markets.read_character_orders.v1
esi-markets.read_corporation_orders.v1: esi-markets.read_corporation_orders.v1
esi-markets.structure_markets.v1: esi-markets.structure_markets.v1
esi-planets.manage_planets.v1: esi-planets.manage_planets.v1
esi-planets.read_customs_offices.v1: esi-planets.read_customs_offices.v1
esi-search.search_structures.v1: esi-search.search_structures.v1
esi-skills.read_skillqueue.v1: esi-skills.read_skillqueue.v1
esi-skills.read_skills.v1: esi-skills.read_skills.v1
esi-structures.read_character.v1: esi-structures.read_character.v1
esi-structures.read_corporation.v1: esi-structures.read_corporation.v1
esi-ui.open_window.v1: esi-ui.open_window.v1
esi-ui.write_waypoint.v1: esi-ui.write_waypoint.v1
esi-universe.read_structures.v1: esi-universe.read_structures.v1
esi-wallet.read_character_wallet.v1: esi-wallet.read_character_wallet.v1
esi-wallet.read_corporation_wallets.v1: esi-wallet.read_corporation_wallets.v1
tokenUrl: https://login.eveonline.com/v2/oauth/token
type: oauth2