openapi: 3.0.1 info: title: MailPace API Tokens Domains API description: The MailPace transactional email API. Send application email over HTTPS, manage DKIM-verified sending domains and their API tokens, and receive Ed25519-signed delivery event webhooks. Only HTTPS is supported. termsOfService: https://mailpace.com/terms contact: name: MailPace Support email: support@mailpace.com url: https://docs.mailpace.com version: '1.0' servers: - url: https://app.mailpace.com/api/v1 description: MailPace production API tags: - name: Domains description: Manage sending domains and DKIM verification. paths: /domains: get: operationId: listDomains tags: - Domains summary: List domains description: Returns an array of domains for the authenticated organization. security: - OrganizationToken: [] responses: '200': description: An array of domains. content: application/json: schema: type: array items: $ref: '#/components/schemas/Domain' '401': description: Missing or invalid organization token. content: application/json: schema: $ref: '#/components/schemas/Error' post: operationId: createDomain tags: - Domains summary: Create a domain description: Creates a new sending domain for the authenticated organization. security: - OrganizationToken: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DomainCreateRequest' responses: '200': description: The created domain. content: application/json: schema: $ref: '#/components/schemas/Domain' '422': description: Validation error. content: application/json: schema: $ref: '#/components/schemas/Error' /domains/{id}: parameters: - $ref: '#/components/parameters/DomainId' get: operationId: getDomain tags: - Domains summary: Retrieve a domain description: Returns a single domain by ID. security: - OrganizationToken: [] responses: '200': description: The requested domain. content: application/json: schema: $ref: '#/components/schemas/Domain' '404': description: Domain not found. content: application/json: schema: $ref: '#/components/schemas/Error' patch: operationId: updateDomain tags: - Domains summary: Update a domain description: Updates the name or url of an existing domain. security: - OrganizationToken: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DomainUpdateRequest' responses: '200': description: The updated domain. content: application/json: schema: $ref: '#/components/schemas/Domain' /domains/{id}/verify: parameters: - $ref: '#/components/parameters/DomainId' post: operationId: verifyDomain tags: - Domains summary: Verify a domain description: Triggers verification of the domain's DKIM and advanced DNS records. security: - OrganizationToken: [] responses: '200': description: The domain with updated verification status. content: application/json: schema: $ref: '#/components/schemas/Domain' components: schemas: Domain: type: object properties: id: type: integer name: type: string nullable: true url: type: string dkim_selector: type: string dkim_string: type: string dkim_verified: type: boolean advanced_verified: type: boolean webhook_public_key: type: string description: Base64-encoded Ed25519 public key used to verify webhook signatures. created_at: type: string format: date-time modified_at: type: string format: date-time Error: type: object properties: error: type: string description: Human-readable error message. errors: type: object description: Field-level validation errors, when applicable. additionalProperties: type: array items: type: string DomainUpdateRequest: type: object required: - domain properties: domain: type: object properties: url: type: string name: type: string DomainCreateRequest: type: object required: - domain properties: domain: type: object required: - url properties: url: type: string description: The domain to send from. example: acme.com name: type: string description: Optional display name. parameters: DomainId: name: id in: path required: true description: The numeric ID of the domain. schema: type: integer securitySchemes: ServerToken: type: apiKey in: header name: MailPace-Server-Token description: Per-domain server token used to authenticate send requests. OrganizationToken: type: apiKey in: header name: MailPace-Organization-Token description: Organization token used to authenticate domain and token management.