openapi: 3.1.0
info:
  title: DMARCinator API
  description: |-
    # Authentication

    At least the first API credential must be generated in the web application
    under

    Settings -> API credentials -> Manage API credentials -> New API credential.

    The full credential can only be viewed directly after creating it. If you
    lose the credential, you cannot retrieve it again.

    To authenticate, provide the credential in the `Authorization` HTTP header
    after the word "Bearer" followed by a space:

    ```http request
    Authorization: Bearer dru_vS8No5Sb8EJRV1he2FEXAMPLEHiJMt5UAYMtZT4qdYpStqLMt8
    ```

    API credentials have a length of 54 characters and consist of a prefix, separator and secret.

    The following credential types are available:

    | prefix | type                                |
    |--------|-------------------------------------|
    | `dru`  | User credential                     |
    | `drc`  | Child credential of user credential |
    | `drt`  | Team credential                     |
    | `drg`  | Child credential of team credential |

    User credentials are bound to and derive their access rights from a single
    user. Team credentials can also access the team and all users assigned to it.

    User and Team credentials can be used to create further credentials. These
    automatically become "children" of the credential used to create them.

    Child credentials behave different from normal credentials:

    - They cannot be used to create other credentials
    - They inherit their parent credentials restrictions
    - Their inherited restriction allowlists may only leave out entries -
    changing or adding them is not possible
    - They get invalidated if their parent credential gets invalidated

    Child credentials can be used to hand out short-lived credentials
    for single jobs using some kind of automated secret management service. 

    # Pagination
    
    The API uses a cursor-style pagination on list methods through the `starting_after` parameter.
    The parameter accepts an existing object ID. All lists return objects in reverse order.
    
    Example (with a page size of three and abbreviated IDs):
    
    |  ID   |
    |-------|
    | rdm_K |
    | rdm_J |
    | rdm_I |
    | rdm_H |
    | rdm_G |
    | rdm_F |
    | rdm_E |
    | rdm_D |
    | rdm_C |
    | rdm_B |
    | rdm_A |
    
    Not providing `starting_after` will return:
    
    |  ID   |
    |-------|
    | rdm_K |
    | rdm_J |
    | rdm_I |
    
    Setting `starting_after` to `rdm_I` will return:
    
    |  ID   |
    |-------|
    | rdm_H |
    | rdm_G |
    | rdm_F |
    
    Setting `starting_after` to `rdm_A` will return an empty list:
    
    |  ID   |
    |-------|
    |       |
    
    # Limits
    
    The API limits usage to:

    - 3600 requests per IP per hour (averages 1 request per second)
    - 3600 requests per API credential per hour (averages 1 request per second)
    - a very small amount of requests per IP per hour with authentication failures
    
    Running into one of the limits will result in `429 Too many requests` errors.
    When encountering this error, clients need to back off immediately.
    
    Constantly being rate-limited will result in automatic revocation of API credentials,
    automatic blocking of IP addresses and IP ranges,
    automatic suspension of all present and future API access and finally suspension of offending user accounts.
    
    # Versioning
    
    The document available at [api.dmarcinator.com](https://api.dmarcinator.com) always refers to the latest version of the API.
    Earlier OpenAPI specifications are available at `https: //api.dmarcinator.com/v{VERSION}` as long as the API version itself is available.
    
    Selecting an API version works via `Dmarcinator-Version` HTTP header. Leaving out the header will select the latest API version.
    
    A list of versions with support information can be found in the handbook.
  termsOfService: https://asdasd
  version: 1.0.0-alpha
  contact:
    name: DMARCinator Support
    url: https://dmarcinator.com
    email: support@dmarcinator.com
  license:
    name: Copyright by DMARCinator
servers:
  - url: https://api.dmarcinator.com
#  - url: http://api.dmarcinator.test:3000
tags:
  - name: API credentials
  - name: Domains
  - name: Reporters
  - name: Providers
  - name: Email Inputs
  - name: DMARC Reports
  - name: DMARC Report Emails
  - name: IP Addresses
  - name: IP Address Reports
  - name: Miscellaneous
  - name: System
paths:
  /current-api-credential:
    get:
      summary: Inspect API credential used for current request
      tags:
        - API credentials
      security:
        - bearer: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_credential:
                    $ref: '#/components/schemas/apiCredential'
        '401':
          $ref: '#/components/responses/unauthorized'
  /api-credentials:
    get:
      summary: List API credentials
      tags:
        - API credentials
      security:
        - bearer: []
      parameters:
        - name: starting_after
          in: query
          description: API credential ID
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_credentials:
                    type: array
                    readOnly: true
                    items:
                      $ref: '#/components/schemas/apiCredential'
        '401':
          $ref: '#/components/responses/unauthorized'
    post:
      summary: Create API credential
      tags:
        - API credentials
      security:
        - bearer: []
      description: Only parent credentials may create child credentials.
      parameters: []
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_credential:
                    $ref: '#/components/schemas/apiCredential'
        '401':
          $ref: '#/components/responses/unauthorized'
        '400':
          $ref: '#/components/responses/badRequest'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                api_credential:
                  $ref: '#/components/schemas/apiCredential'
  /api-credentials/{id}:
    get:
      summary: Show API credential identified by id
      tags:
        - API credentials
      security:
        - bearer: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: If-None-Match
          in: header
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_credential:
                    $ref: '#/components/schemas/apiCredential'
        '304':
          $ref: '#/components/responses/notModified'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
    delete:
      summary: Invalidate API credential identified by id
      tags:
        - API credentials
      security:
        - bearer: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_credential:
                    $ref: '#/components/schemas/apiCredential'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
  /overview:
    get:
      summary: General data and statistics
      tags:
        - Miscellaneous
      security:
        - bearer: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/overview'
  /domains:
    get:
      summary: List domains
      tags:
        - Domains
      security:
        - bearer: []
      parameters:
        - name: starting_after
          in: query
          description: Domain ID
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  domains:
                    type: array
                    readOnly: true
                    items:
                      $ref: '#/components/schemas/domain'
  /domains/{id}:
    get:
      summary: Show domain indentified by ID
      tags:
        - Domains
      security:
        - bearer: [ ]
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  domain:
                    $ref: '#/components/schemas/domain'
  /reporters:
    get:
      summary: List reporters
      tags:
        - Reporters
      security:
        - bearer: [ ]
      parameters:
        - name: starting_after
          in: query
          description: Reporter ID
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  reporters:
                    type: array
                    readOnly: true
                    items:
                      $ref: '#/components/schemas/reporter'

  /reporters/{id}:
    get:
      summary: Show report by ID
      tags:
        - Reporters
      security:
        - bearer: [ ]
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  reporter:
                    $ref: '#/components/schemas/reporter'
  /providers:
    get:
      summary: List providers
      tags:
        - Providers
      security:
        - bearer: []
      parameters:
        - name: starting_after
          in: query
          description: Provider ID
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  providers:
                    type: array
                    readOnly: true
                    items:
                      $ref: '#/components/schemas/provider'
  /providers/{id}:
    get:
      summary: Show provider by ID
      tags:
        - Providers
      security:
        - bearer: [ ]
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  provider:
                    $ref: '#/components/schemas/provider'
  /dmarc-report-emails:
    get:
      summary: List DMARC report emails
      tags:
        - DMARC Report Emails
      security:
        - bearer: []
      parameters:
        - name: starting_after
          in: query
          description: DMARC report email ID
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  dmarc_report_emails:
                    type: array
                    readOnly: true
                    items:
                      $ref: '#/components/schemas/dmarcReportEmail'
        '401':
          $ref: '#/components/responses/unauthorized'
  /dmarc-report-emails/{id}:
    get:
      summary: Show DMARC report email identified by ID
      tags:
        - DMARC Report Emails
      security:
        - bearer: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: If-None-Match
          in: header
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  dmarc_report_email:
                    $ref: '#/components/schemas/dmarcReportEmail'
        '304':
          $ref: '#/components/responses/notModified'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
  /dmarc-report-emails/{id}/raw:
    get:
      summary: Show original DMARC report email EML identified by ID
      tags:
        - DMARC Report Emails
      security:
        - bearer: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: If-None-Match
          in: header
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            message/rfc822:
              examples:
                default:
                  $ref: '#/components/examples/dmarcReportEmailsIdRawDefault'
              schema:
                type: string
        '304':
          $ref: '#/components/responses/notModified'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
  /dmarc-reports:
    get:
      summary: List DMARC reports
      tags:
        - DMARC Reports
      security:
        - bearer: []
      parameters:
        - name: starting_after
          in: query
          description: DMARC report ID
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  dmarc_reports:
                    type: array
                    readOnly: true
                    items:
                      $ref: '#/components/schemas/dmarcReport'
        '401':
          $ref: '#/components/responses/unauthorized'
  /dmarc-reports/{id}:
    get:
      summary: Show DMARC report identified by ID
      tags:
        - DMARC Reports
      security:
        - bearer: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: If-None-Match
          in: header
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  dmarc_report:
                    $ref: '#/components/schemas/dmarcReport'
        '304':
          $ref: '#/components/responses/notModified'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
  /dmarc-reports/{id}/raw:
    get:
      summary: Show original DMARC report XML identified by ID
      tags:
        - DMARC Reports
      security:
        - bearer: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: If-None-Match
          in: header
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/xml:
              schema:
                type: string
        '304':
          $ref: '#/components/responses/notModified'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
  /email-inputs:
    get:
      summary: List email based DMARC record inputs
      tags:
        - Email Inputs
      security:
        - bearer: []
      parameters:
        - name: starting_after
          in: query
          description: Email input ID
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  email_inputs:
                    type: array
                    readOnly: true
                    items:
                      $ref: '#/components/schemas/emailInput'
        '401':
          $ref: '#/components/responses/unauthorized'
    post:
      summary: Create email based DMARC record input
      tags:
        - Email Inputs
      security:
        - bearer: []
      parameters: []
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  email_input:
                    $ref: '#/components/schemas/emailInput'
        '401':
          $ref: '#/components/responses/unauthorized'
        '400':
          $ref: '#/components/responses/badRequest'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email_input:
                  $ref: '#/components/schemas/emailInput'
              required:
                - email_input
  /email-inputs/{id}:
    get:
      summary: Show email based DMARC record input identified by ID
      tags:
        - Email Inputs
      security:
        - bearer: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: If-None-Match
          in: header
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  email_input:
                    $ref: '#/components/schemas/emailInput'
        '304':
          $ref: '#/components/responses/notModified'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
    patch:
      summary: Update email based DMARC record input
      tags:
        - Email Inputs
      security:
        - bearer: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  email_input:
                    $ref: '#/components/schemas/emailInput'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
        '400':
          $ref: '#/components/responses/badRequest'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email_input:
                  $ref: '#/components/schemas/emailInput'
              required:
                - email_input
    delete:
      summary: Delete email based DMARC record input
      tags:
        - Email Inputs
      security:
        - bearer: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  email_input:
                    $ref: '#/components/schemas/emailInput'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
        '400':
          $ref: '#/components/responses/badRequest'
  /ip-address-reports:
    get:
      summary: List IP address reports
      tags:
        - IP Address Reports
      security:
        - bearer: []
      parameters:
        - name: starting_after
          in: query
          description: IP address report ID
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  ip_address_reports:
                    type: array
                    readOnly: true
                    items:
                      $ref: '#/components/schemas/ipAddressReport'
        '401':
          $ref: '#/components/responses/unauthorized'
  /ip-address-reports/{id}:
    get:
      summary: Show IP address report identified by ID
      tags:
        - IP Address Reports
      security:
        - bearer: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: If-None-Match
          in: header
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  ip_address_report:
                    $ref: '#/components/schemas/ipAddressReport'
        '304':
          $ref: '#/components/responses/notModified'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
  /ip-addresses:
    get:
      summary: List IP addresses
      tags:
        - IP Addresses
      security:
        - bearer: []
      parameters:
        - name: starting_after
          in: query
          description: IP address ID
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  ip_addresses:
                    type: array
                    readOnly: true
                    items:
                      $ref: '#/components/schemas/ipAddress'
        '401':
          $ref: '#/components/responses/unauthorized'
  /ip-addresses/{id}:
    get:
      summary: Show IP address identified by ID
      tags:
        - IP Addresses
      security:
        - bearer: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: If-None-Match
          in: header
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  ip_address:
                    $ref: '#/components/schemas/ipAddress'
        '304':
          $ref: '#/components/responses/notModified'
        '401':
          $ref: '#/components/responses/unauthorized'
        '404':
          $ref: '#/components/responses/notFound'
  /system/status:
    get:
      summary: System status
      tags:
        - System
      security:
        - bearer: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              examples:
                default:
                  $ref: '#/components/examples/systemStatusGetDefault'
              schema:
                type: object
                properties:
                  status:
                    type: string
                    readOnly: true
                    enum:
                      - ok
        '401':
          $ref: '#/components/responses/unauthorized'
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
  schemas:
    errorTitle:
      type: string
      readOnly: true
      enum:
        - "Unauthorized"
        - "HTTP Token: Access denied"
        - "Unsupported API version requested"
        - "Not Found"
        - "Not Implemented"
        - "Request Method Not Allowed"
        - "Unsupported Media Type"
        - "Bad Request Body"
        - "Bad Query Parameter"
        - "Bad Request Header"
        - "Bad Request Path"
        - "Bad Request Cookie"
        - "Unprocessable Entity"
        - "Too Many Requests"
    validationError:
      type: object
      readOnly: true
      properties:
        message:
          $ref: '#/components/schemas/errorTitle'
        pointer:
          type: string
          readOnly: true
        code:
          type: string
          readOnly: true
    errorResponse:
      type: object
      readOnly: true
      properties:
        title:
          $ref: '#/components/schemas/errorTitle'
        status:
          type: integer
          readOnly: true
        errors:
          type: array
          readOnly: true
          items:
            anyOf:
              - $ref: '#/components/schemas/validationError'
              - $ref: '#/components/schemas/errorTitle'
    counts:
      type: object
      readOnly: true
      properties:
        dmarc:
          type: object
          readOnly: true
          properties:
            all:
              type:
                - integer
                - 'null'
              readOnly: true
            passed:
              type:
                - integer
                - 'null'
              readOnly: true
            quarantined:
              type:
                - integer
                - 'null'
              readOnly: true
            rejected:
              type:
                - integer
                - 'null'
              readOnly: true
        dkim:
          type: object
          readOnly: true
          properties:
            all:
              type:
                - integer
                - 'null'
              readOnly: true
            passed:
              type:
                - integer
                - 'null'
              readOnly: true
            failed:
              type:
                - integer
                - 'null'
              readOnly: true
        spf:
          type: object
          readOnly: true
          properties:
            all:
              type:
                - integer
                - 'null'
              readOnly: true
            passed:
              type:
                - integer
                - 'null'
              readOnly: true
            failed:
              type:
                - integer
                - 'null'
              readOnly: true
    apiCredential:
      type: object
      properties:
        id:
          type:
            - string
            - 'null'
          readOnly: true
        parent_id:
          type:
            - string
            - 'null'
          readOnly: true
        children_ids:
          type: array
          readOnly: true
          items:
            type: string
        token:
          type:
            - string
            - 'null'
          readOnly: true
          description: Always null, except during credential creation
        valid_from:
          type: string
          format: date-time
          description: Must **not** be in the past
        valid_until:
          type: string
          format: date-time
          description: Must be in the future
        restricted_by_ip:
          type: boolean
          default: false
        allowed_ips:
          type: array
          maxItems: 50
          minItems: 0
          items:
            type: string
        path_restriction_type:
          type:
            - string
            - 'null'
          enum:
            - restricted_by_paths
            - restricted_by_path_prefixes
          writeOnly: true
        restricted_by_paths:
          type: boolean
          default: false
          readOnly: true
        allowed_paths:
          type: array
          maxItems: 50
          minItems: 0
          items:
            type: string
        restricted_by_path_prefixes:
          type: boolean
          default: false
          readOnly: true
        allowed_path_prefixes:
          type: array
          maxItems: 50
          minItems: 0
          items:
            type: string
        description:
          type:
            - string
            - 'null'
          maxLength: 500
        created_at:
          type: string
          readOnly: true
          format: date-time
        last_used_at:
          type:
            - string
            - 'null'
          readOnly: true
          format: date-time
      required:
        - valid_from
        - valid_until
    emailInput:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        email:
          type: string
          readOnly: true
        description:
          type:
            - string
            - 'null'
          maxLength: 500
        created_at:
          type: string
          readOnly: true
          format: date-time

    dmarcReport:
      type: object
      readOnly: true
      properties:
        id:
          type: string
          readOnly: true
        report_id:
          type: string
          readOnly: true
        status:
          type: string
          readOnly: true
          enum:
            - pending
            - processing
            - succeeded
            - failed
        dmarc_report_email_id:
          type:
            - string
            - 'null'
          readOnly: true
        organization:
          type: object
          readOnly: true
          properties:
            name:
              type: string
              readOnly: true
            email:
              type: string
              readOnly: true
            contact_information:
              type:
                - string
                - 'null'
              readOnly: true
        date_range:
          type: object
          readOnly: true
          properties:
            from:
              type: string
              readOnly: true
              format: date-time
            to:
              type: string
              readOnly: true
              format: date-time
        counts:
          type: object
          readOnly: true
          properties:
            dmarc:
              type: object
              readOnly: true
              properties:
                all:
                  type:
                    - integer
                    - 'null'
                  readOnly: true
                passed:
                  type:
                    - integer
                    - 'null'
                  readOnly: true
                quarantined:
                  type:
                    - integer
                    - 'null'
                  readOnly: true
                rejected:
                  type:
                    - integer
                    - 'null'
                  readOnly: true
            dkim:
              type: object
              readOnly: true
              properties:
                all:
                  type:
                    - integer
                    - 'null'
                  readOnly: true
                passed:
                  type:
                    - integer
                    - 'null'
                  readOnly: true
                failed:
                  type:
                    - integer
                    - 'null'
                  readOnly: true
            spf:
              type: object
              readOnly: true
              properties:
                all:
                  type:
                    - integer
                    - 'null'
                  readOnly: true
                passed:
                  type:
                    - integer
                    - 'null'
                  readOnly: true
                failed:
                  type:
                    - integer
                    - 'null'
                  readOnly: true
        created_at:
          type: string
          readOnly: true
          format: date-time
        updated_at:
          type: string
          readOnly: true
          format: date-time
    dmarcReportEmail:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        mail:
          type: object
          readOnly: true
          properties:
            id:
              type: string
              readOnly: true
            checksum_sha1_hex:
              type: string
              readOnly: true
            to:
              type: string
              readOnly: true
            from:
              type: string
              readOnly: true
            subject:
              type: string
              readOnly: true
        status:
          type: string
          readOnly: true
          enum:
            - pending
            - processing
            - delivered
            - failed
        input_id:
          type:
            - string
            - 'null'
          readOnly: true
        dmarc_report_id:
          type:
            - string
            - 'null'
          readOnly: true
        imported_at:
          type: string
          readOnly: true
          format: date-time
          description: Alias for created_at
        created_at:
          type: string
          readOnly: true
          format: date-time
        updated_at:
          type: string
          readOnly: true
          format: date-time
    ipAddress:
      type: object
      readOnly: true
      properties:
        id:
          type: string
          readOnly: true
        ip:
          type: string
          readOnly: true
        family:
          type: object
          readOnly: true
          properties:
            v4:
              type: boolean
              readOnly: true
            v6:
              type: boolean
              readOnly: true
        last_owner_name:
          type:
            - string
            - 'null'
          readOnly: true
        last_country_iso_code:
          type:
            - string
            - 'null'
          readOnly: true
        reputation:
          type: string
          readOnly: true
          enum:
            - good
            - warn
            - bad
        counts:
          $ref: '#/components/schemas/counts'
        discovered_at:
          type: string
          readOnly: true
          format: date-time
          description: Alias for created_at
        created_at:
          type: string
          readOnly: true
          format: date-time
        updated_at:
          type: string
          readOnly: true
          format: date-time
    ipAddressReport:
      type: object
      readOnly: true
      properties:
        id:
          type: string
          readOnly: true
        ip:
          type: string
          readOnly: true
        ip_address_id:
          type: string
          readOnly: true
        family:
          type: object
          readOnly: true
          properties:
            v4:
              type: boolean
              readOnly: true
            v6:
              type: boolean
              readOnly: true
        reputation:
          type: string
          readOnly: true
          enum:
            - good
            - warn
            - bad
        geo:
          type:
            - object
            - 'null'
          readOnly: true
          properties:
            country_iso_code:
              type:
                - string
                - 'null'
              readOnly: true
            latitude:
              type:
                - number
                - 'null'
              readOnly: true
            longitude:
              type:
                - number
                - 'null'
              readOnly: true
        asn:
          type:
            - object
            - 'null'
          readOnly: true
          properties:
            number:
              type:
                - string
                - 'null'
              readOnly: true
            name:
              type:
                - string
                - 'null'
              readOnly: true
        reported_at:
          type: string
          readOnly: true
          format: date-time
          description: Alias for created_at
        created_at:
          type: string
          readOnly: true
          format: date-time
        updated_at:
          type: string
          readOnly: true
          format: date-time
    domain:
      type: object
      readOnly: true
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
          readOnly: true
        parent_id:
          type:
            - string
            - 'null'
          readOnly: true
        counts:
          $ref: '#/components/schemas/counts'
        discovered_at:
          type: string
          readOnly: true
          format: date-time
          description: Alias for created_at
        created_at:
          type: string
          readOnly: true
          format: date-time
        updated_at:
          type: string
          readOnly: true
          format: date-time
    reporter:
      type: object
      readOnly: true
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
          readOnly: true
        contact:
          type: string
          readOnly: true
        counts:
          $ref: '#/components/schemas/counts'
        first_report_received_from_at:
          type: string
          readOnly: true
          format: date-time
          description: Alias for created_at
        created_at:
          type: string
          readOnly: true
          format: date-time
        updated_at:
          type: string
          readOnly: true
          format: date-time
    provider:
      type: object
      readOnly: true
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
          readOnly: true
        counts:
          $ref: '#/components/schemas/counts'
        discovered_at:
          type: string
          readOnly: true
          format: date-time
          description: Alias for created_at
        created_at:
          type: string
          readOnly: true
          format: date-time
        updated_at:
          type: string
          readOnly: true
          format: date-time
    overview:
      type: object
      readOnly: true
      properties:
        percentages:
          type: object
          readOnly: true
          properties:
            dmarc_compliance:
              type: number
              readOnly: true
            dkim_compliance:
              type: number
              readOnly: true
            spf_compliance:
              type: number
              readOnly: true
        counts:
          type: object
          readOnly: true
          properties:
            processed:
              type: integer
              readOnly: true
            monitored:
              type: integer
              readOnly: true
            quarantined:
              type: integer
              readOnly: true
            rejected:
              type: integer
              readOnly: true
  responses:
    notModified:
      description: Not modified
    notFound:
      description: Not found
      content:
        application/problem+json:
          example:
            title: "Not Found"
            status: 404
            errors: ["Not Found"]
          schema:
            $ref: '#/components/schemas/errorResponse'
    badRequest:
      description: Invalid request data provided
      content:
        application/problem+json:
          examples:
            validation_error:
              value:
                title: "Bad Request Body"
                status: 400
                errors:
                  - message: "value at `/data/name` is not a string"
                    pointer: "/data/name"
                    code: "string"
            simple_error:
              value:
                title: "Bad Request"
                status: 400
                errors: ["Bad Request"]
          schema:
            $ref: '#/components/schemas/errorResponse'
    unauthorized:
      description: Invalid authorization token provided
      content:
        application/problem+json:
          example:
            title: "Unauthorized"
            status: 401
            errors: ["Unauthorized"]
          schema:
            $ref: '#/components/schemas/errorResponse'
  examples:
    dmarcReportEmailsIdRawDefault:
      value: |-
        Return-Path: <noreply-dmarc-support@google.com>
        
        [...cut...]
        
        Date: Fri, 19 Jan 2024 15:59:59 -0800
        
        From: noreply-dmarc-support@google.com
        
        To: rua-123@dmarc.dmarcinator.com
        
        Message-ID: <123@google.com>
        
        Subject: Report domain: example.com Submitter: google.com
        Report-ID:
         123
        Mime-Version: 1.0
        
        Content-Type: application/zip;
         name=google.com!example.com!123!123.zip
        Content-Transfer-Encoding: base64
        
        Content-Disposition: attachment;
         filename=google.com!example.com!123!123.zip
        Envelope-to: rua-123@dmarc.dmarcinator.com
        
        [...cut...]
        
        Delivery-date: Sat, 20 Jan 2024 11:53:51 +0100
        
        
        UEsD[...cut...]AAAAA
    systemStatusGetDefault:
      value:
        status: ok
