Quickstart Guide
Get started with the Matchstra API in under 5 minutes. This guide will walk you through making your first API call.
Prerequisites
Before you begin, ensure you have:
- ✅ A Matchstra account (sign up at app.matchstra.ca)
- ✅ An active API key (generate one in your dashboard)
- ✅ A valid license plan with available request quota
Step 1: Get Your API Key
- Log in to your Matchstra Dashboard
- Navigate to Settings → API Keys
- Click Create New API Key
- Give it a descriptive name (e.g., "Production API Key")
- Copy and securely store your API key
Security Warning
Never expose your API key in client-side code, public repositories, or logs. Treat it like a password.
Step 2: Make Your First Request
Let's perform a PEP & Sanctions screening check.
Using cURL
curl -X POST https://api.matchstra.ca/api/Screening/screen \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "John Smith",
"entityType": "Individual",
"minScore": 70
}'
Using JavaScript (fetch)
const response = await fetch('https://api.matchstra.ca/api/Screening/screen', {
method: 'POST',
headers: {
'X-API-Key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'John Smith',
entityType: 'Individual',
minScore: 70
})
});
const data = await response.json();
console.log(data);
Using C# (.NET)
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Text.Json;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "your_api_key_here");
var payload = new
{
name = "John Smith",
entityType = "Individual",
minScore = 70
};
var content = new StringContent(
JsonSerializer.Serialize(payload),
Encoding.UTF8,
"application/json"
);
var response = await client.PostAsync(
"https://api.matchstra.ca/api/Screening/screen",
content
);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
Step 3: Understanding the Response
A successful response will look like this:
{
"success": true,
"message": "Screening completed successfully",
"data": {
"id": 12345,
"hasMatch": false,
"matchCount": 0,
"highestScore": 0,
"matches": [],
"remainingRequests": 485
},
"errors": null
}
Response Fields:
success: Boolean indicating if the request was successfulmessage: Human-readable status messagedata: The screening result objectid: Unique ID for this screening (use to retrieve later)hasMatch: Boolean indicating if matches were foundmatchCount: Number of potential matcheshighestScore: Confidence score of the best match (0-100)matches: Array of matched entities (empty if no matches)remainingRequests: Your remaining API quota
errors: Array of error messages (null on success)
Step 4: Try ID Verification
Upload an ID card and selfie for verification:
curl -X POST https://api.matchstra.ca/api/IdVerification/verify \
-H "X-API-Key: your_api_key_here" \
-F "IdCardImage=@/path/to/id-card.jpg" \
-F "SelfieImage=@/path/to/selfie.jpg"
Common Response Codes
| Code | Meaning | Action |
|---|---|---|
| 200 | Success | Request completed successfully |
| 400 | Bad Request | Check your request payload |
| 401 | Unauthorized | Verify your API key |
| 404 | Not Found | Check the endpoint URL |
| 429 | Too Many Requests | Slow down, respect rate limits |
| 500 | Server Error | Contact support if persists |
Next Steps
Now that you've made your first API call:
- 📖 Read the Authentication Guide to learn about API key management
- 🔍 Explore the Screening Guide for advanced screening techniques
- 🆔 Check out the ID Verification Guide for verification best practices
- 🧪 Use the API Explorer to test endpoints interactively
- 📚 Browse the API Reference for complete endpoint documentation
Need Help?
- Check our Error Handling Guide for troubleshooting
- Visit the Support page to contact our team
- Review Rate Limits to optimize your usage