Modoboa Domains API
The domains API from Modoboa — 11 operation(s) for domains.
The domains API from Modoboa — 11 operation(s) for domains.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/modoboa:modoboa-domains-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a 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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Modoboa Domains API
version: v2
servers:
- url: https://demo.modoboa.org/api/schema-v2/
description: Remote Demo server
- url: https://localhost:5000/api/schema-v2/
description: Local server
tags:
- name: Domains
paths:
/api/v2/domains/:
get:
operationId: domains_list
summary: Retrieve a list of domains
parameters:
- name: ordering
required: false
in: query
description: Which field to use when ordering the results.
schema:
type: string
- name: page
required: false
in: query
description: A page number within the paginated result set.
schema:
type: integer
- name: page_size
required: false
in: query
description: Number of results to return per page.
schema:
type: integer
- name: search
required: false
in: query
description: A search term.
schema:
type: string
tags:
- Domains
security:
- tokenAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedDomainList'
description: ''
post:
operationId: domains_create
summary: Create a new domain
tags:
- Domains
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Domain'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Domain'
multipart/form-data:
schema:
$ref: '#/components/schemas/Domain'
required: true
security:
- tokenAuth: []
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/Domain'
description: ''
/api/v2/domains/{id}/:
get:
operationId: domains_retrieve
summary: Retrieve a particular domain
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this domain.
required: true
tags:
- Domains
security:
- tokenAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Domain'
description: ''
put:
operationId: domains_update
description: V2 viewset.
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this domain.
required: true
tags:
- Domains
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Domain'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Domain'
multipart/form-data:
schema:
$ref: '#/components/schemas/Domain'
required: true
security:
- tokenAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Domain'
description: ''
summary: Domains update
x-summary-source: derived
patch:
operationId: domains_partial_update
description: V2 viewset.
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this domain.
required: true
tags:
- Domains
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchedDomain'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PatchedDomain'
multipart/form-data:
schema:
$ref: '#/components/schemas/PatchedDomain'
security:
- tokenAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Domain'
description: ''
summary: Domains partial update
x-summary-source: derived
/api/v2/domains/{id}/administrators/:
get:
operationId: domains_administrators_retrieve
description: Retrieve all administrators of a domain.
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this domain.
required: true
tags:
- Domains
security:
- tokenAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DomainAdmin'
description: ''
summary: Domains administrators retrieve
x-summary-source: derived
/api/v2/domains/{id}/administrators/add/:
post:
operationId: domains_administrators_add_create
description: Add an administrator to a domain.
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this domain.
required: true
tags:
- Domains
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SimpleDomainAdmin'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/SimpleDomainAdmin'
multipart/form-data:
schema:
$ref: '#/components/schemas/SimpleDomainAdmin'
required: true
security:
- tokenAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SimpleDomainAdmin'
description: ''
summary: Domains administrators add create
x-summary-source: derived
/api/v2/domains/{id}/administrators/remove/:
post:
operationId: domains_administrators_remove_create
description: Remove an administrator from a domain.
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this domain.
required: true
tags:
- Domains
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SimpleDomainAdmin'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/SimpleDomainAdmin'
multipart/form-data:
schema:
$ref: '#/components/schemas/SimpleDomainAdmin'
required: true
security:
- tokenAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SimpleDomainAdmin'
description: ''
summary: Domains administrators remove create
x-summary-source: derived
/api/v2/domains/{id}/delete/:
post:
operationId: domains_delete_create
summary: Delete a particular domain
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this domain.
required: true
tags:
- Domains
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteDomain'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/DeleteDomain'
multipart/form-data:
schema:
$ref: '#/components/schemas/DeleteDomain'
security:
- tokenAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteDomain'
description: ''
/api/v2/domains/{id}/dmarc/alignment_stats/:
get:
operationId: domains_dmarc_alignment_stats_retrieve
description: 'Override default get_throttle behaviour to assign throttle
classes to different actions.'
parameters:
- in: path
name: id
schema:
type: string
required: true
tags:
- Domains
security:
- tokenAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DMARCAligment'
description: ''
summary: Domains dmarc alignment stats retrieve
x-summary-source: derived
/api/v2/domains/{id}/dns_detail/:
get:
operationId: domains_dns_detail_retrieve
description: A viewset to provide extra routes related to DNS information.
parameters:
- in: path
name: id
schema:
type: string
required: true
tags:
- Domains
security:
- tokenAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DNSDetail'
description: ''
summary: Domains dns detail retrieve
x-summary-source: derived
/api/v2/domains/bulk_delete/:
post:
operationId: domains_bulk_delete_create
description: Delete multiple domains at the same time.
tags:
- Domains
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DomainBulkDelete'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/DomainBulkDelete'
multipart/form-data:
schema:
$ref: '#/components/schemas/DomainBulkDelete'
required: true
security:
- tokenAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DomainBulkDelete'
description: ''
summary: Domains bulk delete create
x-summary-source: derived
/api/v2/domains/export/:
get:
operationId: domains_export_retrieve
description: Export domains and aliases to CSV.
tags:
- Domains
security:
- tokenAuth: []
responses:
'200':
content:
text/csv:
schema:
$ref: '#/components/schemas/Domain'
description: ''
summary: Domains export retrieve
x-summary-source: derived
/api/v2/domains/import/:
post:
operationId: domains_import_create
description: Import domains and aliases from CSV file.
tags:
- Domains
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/CSVImport'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/CSVImport'
required: true
security:
- tokenAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Domain'
description: ''
summary: Domains import create
x-summary-source: derived
components:
schemas:
SimpleDomainAdmin:
type: object
description: Serializer used for add/remove operations.
properties:
account:
type: integer
required:
- account
NullEnum:
enum:
- null
DMARCAligment:
type: object
properties:
aligned:
type: object
additionalProperties:
type: object
additionalProperties:
$ref: '#/components/schemas/Source'
trusted:
type: object
additionalProperties:
type: object
additionalProperties:
$ref: '#/components/schemas/Source'
forwarded:
type: object
additionalProperties:
type: object
additionalProperties:
$ref: '#/components/schemas/Source'
failed:
type: object
additionalProperties:
type: object
additionalProperties:
$ref: '#/components/schemas/Source'
required:
- aligned
- failed
- forwarded
- trusted
DomainAdmin:
type: object
description: Serializer used for administrator related routes.
properties:
id:
type: integer
readOnly: true
username:
type: string
maxLength: 254
first_name:
type: string
maxLength: 150
last_name:
type: string
maxLength: 150
required:
- id
- username
DeleteDomain:
type: object
description: Serializer used with delete operation.
properties:
keep_folder:
type: boolean
default: false
DkimKeyLengthEnum:
enum:
- 1024
- 2048
- 4096
type: integer
description: '* `1024` - 1024
* `2048` - 2048
* `4096` - 4096'
MXRecord:
type: object
description: Serializer for MXRecord.
properties:
name:
type: string
maxLength: 254
address:
type: string
dnsbl_results:
type: array
items:
$ref: '#/components/schemas/DNSBLResult'
updated:
type: string
format: date-time
required:
- address
- dnsbl_results
- name
- updated
DNSBLResult:
type: object
description: Serializer for DNSBLResult.
properties:
provider:
type: string
maxLength: 254
status:
type: string
maxLength: 45
required:
- provider
Source:
type: object
properties:
total:
type: integer
spf:
$ref: '#/components/schemas/TestResult'
dkim:
$ref: '#/components/schemas/TestResult'
required:
- dkim
- spf
- total
DNSRecord:
type: object
description: Serializer for DNSRecord.
properties:
type:
$ref: '#/components/schemas/DNSRecordTypeEnum'
value:
type: string
is_valid:
type: boolean
error:
type:
- string
- 'null'
maxLength: 50
updated:
type: string
format: date-time
required:
- type
Transport:
type: object
description: Serializer for Transport model.
properties:
service:
type: string
maxLength: 30
settings:
type: object
additionalProperties: {}
required:
- service
- settings
DNSDetail:
type: object
properties:
mx_records:
type: array
items:
$ref: '#/components/schemas/MXRecord'
autoconfig_record:
$ref: '#/components/schemas/DNSRecord'
autodiscover_record:
$ref: '#/components/schemas/DNSRecord'
spf_record:
$ref: '#/components/schemas/DNSRecord'
dkim_record:
$ref: '#/components/schemas/DNSRecord'
dmarc_record:
$ref: '#/components/schemas/DNSRecord'
required:
- autoconfig_record
- autodiscover_record
- dkim_record
- dmarc_record
- mx_records
- spf_record
CSVImport:
type: object
description: Base serializer for all CSV import endpoints.
properties:
sourcefile:
type: string
format: uri
sepchar:
type: string
default: ;
continue_if_exists:
type: boolean
default: false
required:
- sourcefile
TestResult:
type: object
properties:
success:
type: integer
failure:
type: integer
required:
- failure
- success
CreateDomainAdmin:
type: object
description: Sub serializer for domain administrator creation.
properties:
username:
type: string
password:
type: string
with_mailbox:
type: boolean
default: false
with_aliases:
type: boolean
default: false
required:
- username
DNSRecordTypeEnum:
enum:
- spf
- dkim
- dmarc
- autoconfig
- autodiscover
type: string
description: '* `spf` - SPF
* `dkim` - DKIM
* `dmarc` - DMARC
* `autoconfig` - Autoconfig
* `autodiscover` - Autodiscover'
DomainBulkDelete:
type: object
description: Serializer used with bulk delete operation.
properties:
ids:
type: array
items:
type: integer
keep_folder:
type: boolean
default: false
required:
- ids
Domain:
type: object
description: Domain serializer for v2 API.
properties:
pk:
type: integer
readOnly: true
title: ID
name:
type: string
description: The domain name
maxLength: 253
quota:
type: string
description: Quota shared between mailboxes. Can be expressed in KB, MB (default) or GB. A value of 0 means no quota.
default_mailbox_quota:
type: string
description: Default quota in MB applied to mailboxes. A value of 0 means no quota.
enabled:
type: boolean
description: Check to activate this domain
type:
type: string
maxLength: 20
enable_dkim:
type: boolean
title: Enable DKIM signing
description: If you activate this feature, a DKIM key will be generated for this domain.
dkim_key_selector:
type: string
maxLength: 30
dkim_key_length:
title: Key length
minimum: 0
maximum: 9223372036854775807
oneOf:
- $ref: '#/components/schemas/DkimKeyLengthEnum'
- $ref: '#/components/schemas/NullEnum'
dkim_public_key:
type: string
readOnly: true
dkim_private_key_path:
type: string
readOnly: true
mailbox_count:
type: integer
readOnly: true
mbalias_count:
type: integer
readOnly: true
domainalias_count:
type: integer
readOnly: true
dns_global_status:
type: string
description: Return global DNS status.
readOnly: true
message_limit:
type:
- integer
- 'null'
maximum: 9223372036854775807
minimum: 0
format: int64
title: Message sending limit
description: Number of messages this domain can send per day
creation:
type: string
format: date-time
readOnly: true
last_modification:
type: string
format: date-time
readOnly: true
allocated_quota_in_percent:
type: string
readOnly: true
enable_dns_checks:
type: boolean
description: Check to enable DNS checks for this domain
domain_admin:
allOf:
- $ref: '#/components/schemas/CreateDomainAdmin'
writeOnly: true
transport:
$ref: '#/components/schemas/Transport'
opened_alarms_count:
type: integer
description: Number of alarms currently opened for this domain.
readOnly: true
sent_messages:
type: string
readOnly: true
sent_messages_in_percent:
type:
- integer
- 'null'
description: Return number of sent messages as a percentage.
readOnly: true
last_dns_check_execution:
type:
- string
- 'null'
format: date-time
required:
- allocated_quota_in_percent
- creation
- dkim_private_key_path
- dkim_public_key
- dns_global_status
- domainalias_count
- last_modification
- mailbox_count
- mbalias_count
- name
- opened_alarms_count
- pk
- sent_messages
- sent_messages_in_percent
PaginatedDomainList:
type: object
required:
- count
- results
properties:
count:
type: integer
example: 123
next:
type:
- string
- 'null'
format: uri
example: http://api.example.org/accounts/?page=4
previous:
type:
- string
- 'null'
format: uri
example: http://api.example.org/accounts/?page=2
results:
type: array
items:
$ref: '#/components/schemas/Domain'
PatchedDomain:
type: object
description: Domain serializer for v2 API.
properties:
pk:
type: integer
readOnly: true
title: ID
name:
type: string
description: The domain name
maxLength: 253
quota:
type: string
description: Quota shared between mailboxes. Can be expressed in KB, MB (default) or GB. A value of 0 means no quota.
default_mailbox_quota:
type: string
description: Default quota in MB applied to mailboxes. A value of 0 means no quota.
enabled:
type: boolean
description: Check to activate this domain
type:
type: string
maxLength: 20
enable_dkim:
type: boolean
title: Enable DKIM signing
description: If you activate this feature, a DKIM key will be generated for this domain.
dkim_key_selector:
type: string
maxLength: 30
dkim_key_length:
title: Key length
minimum: 0
maximum: 9223372036854775807
oneOf:
- $ref: '#/components/schemas/DkimKeyLengthEnum'
- $ref: '#/components/schemas/NullEnum'
dkim_public_key:
type: string
readOnly: true
dkim_private_key_path:
type: string
readOnly: true
mailbox_count:
type: integer
readOnly: true
mbalias_count:
type: integer
readOnly: true
domainalias_count:
type: integer
readOnly: true
dns_global_status:
type: string
description: Return global DNS status.
readOnly: true
message_limit:
type:
- integer
- 'null'
maximum: 9223372036854775807
minimum: 0
format: int64
title: Message sending limit
description: Number of messages this domain can send per day
creation:
type: string
format: date-time
readOnly: true
last_modification:
type: string
format: date-time
readOnly: true
allocated_quota_in_percent:
type: string
readOnly: true
enable_dns_checks:
type: boolean
description: Check to enable DNS checks for this domain
domain_admin:
allOf:
- $ref: '#/components/schemas/CreateDomainAdmin'
writeOnly: true
transport:
$ref: '#/components/schemas/Transport'
opened_alarms_count:
type: integer
description: Number of alarms currently opened for this domain.
readOnly: true
sent_messages:
type: string
readOnly: true
sent_messages_in_percent:
type:
- integer
- 'null'
description: Return number of sent messages as a percentage.
readOnly: true
last_dns_check_execution:
type:
- string
- 'null'
format: date-time
securitySchemes:
oauth2:
type: oauth2
flows: {}
tokenAuth:
type: apiKey
in: header
name: Authorization
description: Token-based authentication with required prefix "Token"