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:
Quick SetupΒΆ
Step 1: Import CollectionΒΆ
- Open Postman
- Click Import in the top left
- Select Link tab
- Paste the collection URL:
- Click Continue β Import
Step 2: Configure EnvironmentΒΆ
- Click the gear icon βοΈ in the top right
- Click Add to create a new environment
- Name it "ReputeAPI"
- 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 |
- Click Save
- Select "ReputeAPI" from the environment dropdown
Step 3: Test Your SetupΒΆ
- Open the collection
- Select Check Endpoint β Basic Check
- Click Send
- 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
- Navigate to Mailflow Check β Basic Check
- Notice the request is pre-configured:
- Method: GET
- URL:
{{base_url}}/api/v1/check?domain={{test_domain}} - Headers:
X-API-Key: {{api_key}} - Click Send
- 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:
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ΒΆ
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:
Advanced FeaturesΒΆ
Bulk Domain TestingΒΆ
Use Postman's Collection Runner:
-
Create a CSV file (
domains.csv): -
Click Runner button
- Select the "ReputeAPI" collection
- Click Select File and choose your CSV
- Click Run ReputeAPI
Postman will iterate through all domains in your CSV.
Environment SwitchingΒΆ
Create multiple environments for different scenarios:
Production Environment:
Staging Environment:
Switch between them using the environment dropdown.
Code GenerationΒΆ
Generate code snippets for your application:
- Select any request
- Click Code button (</> icon) on the right
- Choose your language:
- Python (Requests)
- JavaScript (Fetch)
- cURL
- PHP
- Go
- 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:
- Click ... on the collection
- Select Monitor Collection
- Configure:
- Name: "ReputeAPI Health Check"
- Environment: ReputeAPI
- Frequency: Every hour
- 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:
- Check β Basic Check (get overall score)
- Score β Quick Score Check (confirm score)
- Recommendations β Get Recommendations (get fixes)
- History β Get Domain History (check trends)
- Usage β Get Usage Stats (monitor quota)
2. Bulk Domain TestingΒΆ
Test multiple domains efficiently:
- Create CSV with domains
- Use Collection Runner
- Export results
- Analyze in spreadsheet
3. API Key TestingΒΆ
Verify API key permissions:
- Authentication β Test API Key
- Check response for tier and limits
- Verify rate limits match your tier
- 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:
- Send a request
- Click Save Response
- Click Save as Example
2. Organize with FoldersΒΆ
Create custom folders for your specific use cases:
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ΒΆ
- Explore all endpoints in the collection
- Create custom requests for your use cases
- Setup monitoring for production domains
- Integrate with CI/CD using Newman
Additional ResourcesΒΆ
- API Reference - Full endpoint documentation
- Python Guide - Transition to Python SDK
- Best Practices - Optimization tips
- Postman Learning Center - Official Postman docs
SupportΒΆ
Need help with the Postman collection?