Postman Collection GuideΒΆ

Get started quickly with our comprehensive Postman collection for the ReputeAPI. This guide will help you import, configure, and use the collection to explore all API endpoints interactively.


Download CollectionΒΆ

Download our official Postman collection:

⬇️ Download ReputeAPI Postman Collection

Or use the Run in Postman button for one-click import:

Run in Postman


Quick SetupΒΆ

Step 1: Import CollectionΒΆ

  1. Open Postman
  2. Click Import in the top left
  3. Select Link tab
  4. Paste the collection URL:
    https://raw.githubusercontent.com/gorillatechrepo/dkim-api/main/postman/ReputeAPI.postman_collection.json
    
  5. Click Continue β†’ Import

Step 2: Configure EnvironmentΒΆ

  1. Click the gear icon βš™οΈ in the top right
  2. Click Add to create a new environment
  3. Name it "ReputeAPI"
  4. Add these variables:
Variable Initial Value Current Value
base_url https://api.reputeapi.com https://api.reputeapi.com
api_key your-api-key-here your-actual-api-key
test_domain example.com your-test-domain.com
  1. Click Save
  2. Select "ReputeAPI" from the environment dropdown

Step 3: Test Your SetupΒΆ

  1. Open the collection
  2. Select Check Endpoint β†’ Basic Check
  3. Click Send
  4. You should see a 200 OK response with validation results

Collection StructureΒΆ

The collection is organized into logical folders:

ReputeAPI/
β”œβ”€β”€ πŸ“ Authentication
β”‚   └── Test API Key
β”œβ”€β”€ πŸ“ Mailflow Check
β”‚   β”œβ”€β”€ Basic Check
β”‚   β”œβ”€β”€ Check with DKIM Selector
β”‚   └── Check with All Options
β”œβ”€β”€ πŸ“ Security Score
β”‚   β”œβ”€β”€ Quick Score Check
β”‚   └── Score with History
β”œβ”€β”€ πŸ“ Recommendations
β”‚   β”œβ”€β”€ Get Recommendations
β”‚   └── Recommendations with Filters
β”œβ”€β”€ πŸ“ History
β”‚   β”œβ”€β”€ Get Domain History
β”‚   └── History with Date Range
β”œβ”€β”€ πŸ“ Legacy Endpoints
β”‚   β”œβ”€β”€ Validate Domain
β”‚   └── Bulk Validate
β”œβ”€β”€ πŸ“ Usage & Monitoring
β”‚   β”œβ”€β”€ Get Usage Stats
β”‚   └── Usage with Date Range
└── πŸ“ Error Scenarios
    β”œβ”€β”€ Invalid Domain
    β”œβ”€β”€ Missing API Key
    └── Rate Limit Test

Using the CollectionΒΆ

Making Your First RequestΒΆ

Example: Check Endpoint

  1. Navigate to Mailflow Check β†’ Basic Check
  2. Notice the request is pre-configured:
  3. Method: GET
  4. URL: {{base_url}}/api/v1/check?domain={{test_domain}}
  5. Headers: X-API-Key: {{api_key}}
  6. Click Send
  7. View the response in the Body tab

Response:

{
  "domain": "example.com",
  "score": 85,
  "spf": {...},
  "dkim": {...},
  "dmarc": {...},
  "issues": [...]
}

Customizing RequestsΒΆ

Change the domain:

1. Update the {{test_domain}} variable in your environment
   OR
2. Edit the domain parameter directly in the request

Add DKIM selector:

?domain={{test_domain}}&dkim_selector=default


Pre-Request ScriptsΒΆ

The collection includes helpful pre-request scripts:

Auto-TimestampΒΆ

Some requests automatically add timestamps:

// Available in History requests
pm.environment.set("start_date",
  new Date(Date.now() - 30*24*60*60*1000).toISOString()
);
pm.environment.set("end_date",
  new Date().toISOString()
);

Request CounterΒΆ

Track how many requests you've made:

let requestCount = pm.environment.get("request_count") || 0;
pm.environment.set("request_count", requestCount + 1);
console.log(`Request #${requestCount + 1}`);

Tests & AssertionsΒΆ

Each request includes built-in tests:

Status Code TestsΒΆ

pm.test("Status code is 200", function () {
    pm.response.to.have.status(200);
});

Response Structure TestsΒΆ

pm.test("Response has score", function () {
    var jsonData = pm.response.json();
    pm.expect(jsonData).to.have.property('score');
    pm.expect(jsonData.score).to.be.a('number');
});

Score Validation TestsΒΆ

pm.test("Score is between 0 and 100", function () {
    var jsonData = pm.response.json();
    pm.expect(jsonData.score).to.be.at.least(0);
    pm.expect(jsonData.score).to.be.at.most(100);
});

View Test ResultsΒΆ

After sending a request, check the Test Results tab to see which tests passed.


Collection VariablesΒΆ

The collection uses variables for flexibility:

Environment VariablesΒΆ

Variable Description Example
{{base_url}} API base URL https://api.reputeapi.com
{{api_key}} Your API key sk_live_abc123...
{{test_domain}} Domain for testing example.com
{{dkim_selector}} DKIM selector default

Dynamic VariablesΒΆ

Postman provides built-in dynamic variables:

  • {{$timestamp}} - Current Unix timestamp
  • {{$randomInt}} - Random integer
  • {{$guid}} - GUID string

Example usage:

?domain=test-{{$randomInt}}.example.com


Advanced FeaturesΒΆ

Bulk Domain TestingΒΆ

Use Postman's Collection Runner:

  1. Create a CSV file (domains.csv):

    domain
    example.com
    google.com
    github.com
    

  2. Click Runner button

  3. Select the "ReputeAPI" collection
  4. Click Select File and choose your CSV
  5. Click Run ReputeAPI

Postman will iterate through all domains in your CSV.

Environment SwitchingΒΆ

Create multiple environments for different scenarios:

Production Environment:

base_url: https://api.reputeapi.com
api_key: sk_live_abc123...

Staging Environment:

base_url: https://staging-api.reputeapi.com
api_key: sk_test_xyz789...

Switch between them using the environment dropdown.


Code GenerationΒΆ

Generate code snippets for your application:

  1. Select any request
  2. Click Code button (</> icon) on the right
  3. Choose your language:
  4. Python (Requests)
  5. JavaScript (Fetch)
  6. cURL
  7. PHP
  8. Go
  9. And many more!

Example Python Code:

import requests

url = "https://api.reputeapi.com/api/v1/check"
querystring = {"domain":"example.com"}
headers = {"X-API-Key": "your-api-key"}

response = requests.get(url, headers=headers, params=querystring)
print(response.json())


Monitoring & TestingΒΆ

Setup Collection MonitorΒΆ

Monitor your API endpoints automatically:

  1. Click ... on the collection
  2. Select Monitor Collection
  3. Configure:
  4. Name: "ReputeAPI Health Check"
  5. Environment: ReputeAPI
  6. Frequency: Every hour
  7. Click Create

Postman will run your collection periodically and alert you to failures.

Newman (CLI Runner)ΒΆ

Run the collection from the command line:

# Install Newman
npm install -g newman

# Run collection
newman run ReputeAPI.postman_collection.json \
  --environment ReputeAPI.postman_environment.json \
  --reporters cli,html \
  --reporter-html-export report.html

CI/CD Integration:

# .github/workflows/api-test.yml
name: API Tests

on: [push]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Install Newman
        run: npm install -g newman
      - name: Run API Tests
        run: |
          newman run postman/ReputeAPI.postman_collection.json \
            --env-var "api_key=${{ secrets.API_KEY }}"


Example WorkflowsΒΆ

1. Domain Audit WorkflowΒΆ

Test a domain comprehensively:

  1. Check β†’ Basic Check (get overall score)
  2. Score β†’ Quick Score Check (confirm score)
  3. Recommendations β†’ Get Recommendations (get fixes)
  4. History β†’ Get Domain History (check trends)
  5. Usage β†’ Get Usage Stats (monitor quota)

2. Bulk Domain TestingΒΆ

Test multiple domains efficiently:

  1. Create CSV with domains
  2. Use Collection Runner
  3. Export results
  4. Analyze in spreadsheet

3. API Key TestingΒΆ

Verify API key permissions:

  1. Authentication β†’ Test API Key
  2. Check response for tier and limits
  3. Verify rate limits match your tier
  4. Test usage endpoint access

TroubleshootingΒΆ

Common IssuesΒΆ

"Could not get any response" - Check your internet connection - Verify base_url in environment variables - Ensure the API is not experiencing downtime

401 Unauthorized - Verify your api_key is correct - Check that the key is in "Current Value", not just "Initial Value" - Ensure there are no extra spaces in the key

429 Too Many Requests - You've hit rate limits - Wait for the retry period (check response headers) - Consider adding delays between requests in Collection Runner

Invalid Domain Error - Ensure domain format is correct (no http://, no trailing /) - Check that test_domain variable is set properly


Tips & TricksΒΆ

1. Save Responses as ExamplesΒΆ

Save successful responses as examples for documentation:

  1. Send a request
  2. Click Save Response
  3. Click Save as Example

2. Organize with FoldersΒΆ

Create custom folders for your specific use cases:

My Custom Tests/
β”œβ”€β”€ Production Domains
β”œβ”€β”€ Staging Domains
└── Test Scenarios

3. Use Console for DebuggingΒΆ

Open Postman Console (View β†’ Show Postman Console) to see: - All request/response details - Console.log output from scripts - Error messages

4. Chain RequestsΒΆ

Use response data from one request in another:

// In first request's Tests tab
var jsonData = pm.response.json();
pm.environment.set("domain_score", jsonData.score);

// In second request, use {{domain_score}}

Next StepsΒΆ

  1. Explore all endpoints in the collection
  2. Create custom requests for your use cases
  3. Setup monitoring for production domains
  4. Integrate with CI/CD using Newman

Additional ResourcesΒΆ


SupportΒΆ

Need help with the Postman collection?