id: api-mailgun

info:
  name: Mailgun API Test
  author: zzeitlin
  severity: info
  description: Email Service
  reference:
    - https://documentation.mailgun.com/en/latest/api-intro.html
    - https://github.com/daffainfo/all-about-apikey/tree/main/mailgun
  metadata:
    max-request: 1
  tags: token-spray,mailgun

self-contained: true

http:
  - method: GET
    path:
      - "https://api.mailgun.net/v3/domains"

    headers:
      Authorization: Basic {{base64('api:' + token)}}
    matchers:
      - type: word
        part: body
        words:
          - '"total_count":'
          - '"items":'
          - '"created_at":'
        condition: and

# digest: 490a00463044022017959a95e024fcff4806de7f1fdb66380733e2cbd2d6769373fe14805ba0525902206f514f2f93928486eb249ff9b41d2f9ab0583e9f54a55b0d804cf31a9f0e61e5:922c64590222798bb761d5b6d8e72950
