Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: X Road Global Mail API
version: 2.1.0
contact:
name: Nordic Institute for Interoperability Solutions (NIIS)
url: https://github.com/nordic-institute/X-Road-development/#enhancement-requests-and-error-reports
email: info@niis.org
license:
name: MIT
url: https://opensource.org/licenses/MIT
description: 'Operations tagged mail across 2 of this provider''s published API definitions: security-server-admin-openapi.yaml, x-road-global-security-server-admin-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: /api/v1
description: basepath for API v1
security:
- ApiKeyAuth: []
tags:
- name: Mail
paths:
/mail/mail-notification-status:
get:
tags:
- Mail
summary: view status of automatic e-mail notifications
operationId: getMailNotificationStatus
description: Administrator views the status of sending automatic e-mail notifications sent by automatic certificate renewal job.
responses:
'200':
description: e-mail notifications status
content:
application/json:
schema:
$ref: '#/components/schemas/MailNotificationStatus'
'500':
description: internal server error
servers:
- url: /api/v1
description: basepath for API v1
/mail/send-test-mail:
put:
tags:
- Mail
summary: send test mail to the given recipient
operationId: sendTestMail
description: Administrator send a test e-mail to the given recipient to verify the e-mail configuration
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MailRecipient'
responses:
'200':
description: test mail sent
content:
application/json:
schema:
$ref: '#/components/schemas/TestMailResponse'
'400':
description: request was invalid
'500':
description: internal server error, that is not mail related
servers:
- url: /api/v1
description: basepath for API v1
components:
schemas:
MailStatus:
type: string
description: Whether the sending was a success or an error
example: success
enum:
- success
- error
TestMailResponse:
type: object
required:
- status
- text
properties:
status:
$ref: '#/components/schemas/MailStatus'
text:
type: string
description: A success or an error message
format: text
MailNotificationStatus:
type: object
description: automatic e-mail notification status
properties:
enabled_notifications:
type: array
uniqueItems: true
description: array containing the mail notification types that are enabled
items:
$ref: '#/components/schemas/MailNotificationType'
configuration_present:
type: boolean
description: whether automatic e-mail has been configured
recipients_emails:
type: array
description: configured recipients e-mail addresses
items:
type: string
format: text
minLength: 1
maxLength: 255
MailRecipient:
type: object
required:
- mail_address
properties:
mail_address:
type: string
description: recipient e-mail address
format: text
minLength: 1
maxLength: 255
example:
name: member1@example.org
MailNotificationType:
type: string
description: types of mail notifications that can be turned on or off via configuration
example: ACME_FAILURE
enum:
- ACME_FAILURE
- ACME_SUCCESS
- AUTH_CERT_REGISTERED
- ACME_CERT_AUTOMATICALLY_ACTIVATED
- ACME_CERT_AUTOMATIC_ACTIVATION_FAILURE
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: Authorization
description: X-Road-ApiKey token=<api key>
x-refined-from:
- security-server-admin-openapi.yaml
- x-road-global-security-server-admin-openapi.yml