API Documentation

The MIR API allows partners to submit verified events and query neutral history signals. All endpoints return JSON responses.

Quick Start

Get up and running in 5 minutes. Here's the typical integration flow:

Step 1: Become a partner

Submit your application at /partners/apply. Once approved, you'll receive your API key. Store it immediately—it cannot be retrieved later.

Step 2: Submit your first event

When a user completes an action on your platform, tell MIR about it:

curl
curl -X POST https://myinternetreputation.org/events \
  -H "Content-Type: application/json" \
  -H "x-api-key: mir_your_api_key" \
  -d '{
    "userExternalId": "your-user-123",
    "eventType": "transaction.completed",
    "weight": 1.0
  }'

MIR automatically creates a user record and links it to your platform using your userExternalId.

Step 3: Look up a user's history

Before making decisions, check if they have verified history:

curl
curl "https://myinternetreputation.org/resolve?userExternalId=your-user-123" \
  -H "x-api-key: mir_your_api_key"

Returns neutral history signals: how many events, how many partners, and recency. Use this as context, not a verdict.

Step 4: Enable cross-platform reputation (optional)

To let users bring reputation from other platforms, implement the account linking flow. This allows users to prove they have history elsewhere.

That's it! Submit events when users do things. Query history signals when you need context for decisions. The more partners participate, the more complete the history picture becomes.
Base URL
https://myinternetreputation.org

Authentication

Partner endpoints require authentication via API key. Include your API key in the x-api-key header with each request.

x-api-key: mir_your_api_key_here

You receive your API key when registering as a partner. Store it securely — it cannot be retrieved later.

Partners

POST /partners

Register a new partner and receive an API key.

Request Body
Parameter Type Description
name* string Display name for your platform
slug* string Unique identifier (lowercase alphanumeric with hyphens)
Example Request
{
  "name": "My Marketplace",
  "slug": "my-marketplace"
}
Example Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "My Marketplace",
  "slug": "my-marketplace",
  "apiKey": "mir_abc123...",
  "message": "Save your API key - it cannot be retrieved later"
}
The API key is only shown once. Store it securely.
GET /partners

List all active partners (public information only).

Example Response
{
  "partners": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "My Marketplace",
      "slug": "my-marketplace",
      "createdAt": "2025-01-15T10:30:00.000Z"
    }
  ]
}
GET /partners/:slug

Get a partner by their unique slug.

Path Parameters
Parameter Type Description
slug* string The partner's unique slug
Example Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "My Marketplace",
  "slug": "my-marketplace",
  "status": "ACTIVE",
  "createdAt": "2025-01-15T10:30:00.000Z"
}

Events

POST /events Requires API Key

Submit a reputation event for a user. If the user doesn't exist, they will be created automatically.

Request Body
Parameter Type Description
userExternalId* string Your platform's unique identifier for this user
eventType* string Type of event (see Event Types)
weight number Event weight/significance (default: 1.0)
occurredAt string ISO 8601 timestamp (default: now)
meta object Additional event metadata
Example Request
{
  "userExternalId": "user_12345",
  "eventType": "transaction.completed",
  "weight": 1.0,
  "occurredAt": "2025-01-15T14:30:00.000Z",
  "meta": {
    "amount": 149.99,
    "currency": "USD"
  }
}
Example Response
{
  "id": "event_abc123",
  "userId": "550e8400-e29b-41d4-a716-446655440000",
  "eventType": "transaction.completed",
  "weight": 1.0,
  "occurredAt": "2025-01-15T14:30:00.000Z",
  "createdAt": "2025-01-15T14:30:05.000Z"
}
GET /events Requires API Key

List events submitted by your partner account.

Query Parameters
Parameter Type Description
limit number Max results to return (default: 50, max: 100)
offset number Number of results to skip (default: 0)
Example Response
{
  "events": [
    {
      "id": "event_abc123",
      "eventType": "transaction.completed",
      "weight": 1.0,
      "occurredAt": "2025-01-15T14:30:00.000Z",
      "user": {
        "id": "550e8400-...",
        "displayName": null
      }
    }
  ]
}

Users

GET /users/:userId

Get user profile and linked accounts. For history signals, use /resolve instead.

Path Parameters
Parameter Type Description
userId* string The MIR user ID (UUID)
Example Response (User Auth)
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "displayName": null,
  "status": "ACTIVE",
  "createdAt": "2025-01-10T08:00:00.000Z",
  "linkedAccounts": [
    {
      "id": "la_123",
      "provider": "my-marketplace",
      "providerUserId": "user_12345",
      "createdAt": "2025-01-10T08:00:00.000Z"
    }
  ]
}
Example Response (Partner Auth)
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "displayName": null,
  "status": "ACTIVE",
  "createdAt": "2025-01-10T08:00:00.000Z",
  "linkedAccount": {
    "provider": "my-marketplace",
    "providerUserId": "user_12345",
    "createdAt": "2025-01-10T08:00:00.000Z"
  }
}
Partners only see their own linked account. Users see all their linked accounts. Neither sees scores—use /resolve for neutral history signals.

Account Linking

Account linking lets users connect their MIR identity across multiple partner platforms, enabling cross-platform reputation portability.

GET /resolve Requires API Key

Resolve a partner-linked user to neutral history signals. Returns factual data about history depth—not scores, ratings, or judgments.

Query Parameters
Parameter Type Description
userExternalId* string Your platform's unique identifier for this user
Example Request
curl "https://myinternetreputation.org/resolve?userExternalId=user_12345" \
  -H "x-api-key: mir_your_api_key"
Example Response
{
  "mirUserId": "550e8400-e29b-41d4-a716-446655440000",
  "partnerLinkedAt": "2025-01-10T08:00:00.000Z",
  "history": {
    "hasHistory": true,
    "tier": "established",
    "tierBasis": "eventCount",
    "evidenceConfidence": 0.65,
    "signals": {
      "eventCount": 23,
      "distinctPartners": 3,
      "accountAgeDays": 142,
      "firstEventDaysAgo": 138,
      "lastEventDaysAgo": 2
    },
    "noticeCode": "HISTORY_VOLUME_ONLY",
    "notice": "History tiers reflect volume of verified events only, not user quality."
  }
}
Response Fields
Field Type Description
mirUserId string MIR's internal user identifier
partnerLinkedAt string When this user was linked to your platform
history.hasHistory boolean True if eventCount > 0
history.tier string Neutral band: none | limited | established | extensive
history.tierBasis string Always "eventCount" (documents the invariant)
history.evidenceConfidence number MIR's confidence in evidence completeness (0–1). Not a trust score.
history.signals object Factual counts and timing only
history.noticeCode string Machine-readable notice identifier for compliance logging
history.notice string Human-readable notice to display in UI
Tier Thresholds (based on eventCount)
Tier Event Count Meaning
none 0 No verified events recorded
limited 1–4 Some history exists, but early
established 5–49 Meaningful history volume
extensive 50+ Large history volume
404 Response: User not found or not resolvable. This means no events have been submitted for this userExternalId yet.

Understanding /resolve

What /resolve tells you: A user's verified MIR history depth—a neutral summary of how much recorded activity exists across participating platforms.

What it does NOT do: MIR does not rate users, assign risk scores, or label anyone trustworthy/untrustworthy. The returned tier is based on event volume only, not user quality or intent.

How to interpret the response

Use MIR data as context, not a verdict:

Recommended UI language

Display this notice where you show MIR history:

"History tiers reflect volume of verified events only, not user quality."

Displaying history by tier

Tier Label Helper Text
none No verified history This user has no verified MIR events yet. A blank history isn't negative—it just means there's no recorded activity to reference.
limited Limited history Some verified history exists, but it's early. Consider signals like recency and partner count for context.
established Established history A meaningful amount of verified history exists. This reflects participation volume only.
extensive Extensive history A large amount of verified history exists. This reflects volume only, not user quality.
Evidence confidence display: Instead of showing a percentage, use: "Evidence coverage: Low" (< 0.35), "Medium" (0.35–0.7), or "High" (> 0.7). Add tooltip: "Coverage reflects how much data MIR has available—not user quality."

Cross-Platform Linking Flow

To enable users to bring their reputation from other platforms, implement this OAuth-style flow:

POST /partners/link/invite Requires API Key

Step 1: Generate an invite link for your user. Send them to MIR to authenticate.

Request
curl -X POST https://myinternetreputation.org/partners/link/invite \
  -H "Content-Type: application/json" \
  -H "x-api-key: mir_your_api_key" \
  -d '{
    "userExternalId": "your-user-456",
    "callbackUrl": "https://yoursite.com/mir-callback"
  }'
Response
{
  "inviteUrl": "https://myinternetreputation.org/link?token=abc123...",
  "expiresAt": "2025-01-15T15:00:00.000Z"
}

Redirect your user to inviteUrl. They'll log into MIR (or create an account), then be redirected back to your callbackUrl with a success/failure status.

POST /partners/link/code Requires API Key

Alternative: Generate a short code for users to enter manually (useful for mobile apps or TVs).

Request
curl -X POST https://myinternetreputation.org/partners/link/code \
  -H "Content-Type: application/json" \
  -H "x-api-key: mir_your_api_key" \
  -d '{
    "userExternalId": "your-user-456"
  }'
Response
{
  "code": "ABCD-1234",
  "expiresAt": "2025-01-15T15:10:00.000Z",
  "instructions": "Visit myinternetreputation.org/link and enter this code"
}

Display the code to your user. They visit MIR, log in, and enter the code to link their account.

What Linking Enables

Once a user links their account on your platform to their MIR identity:

Event Types

Events represent verified actions from your platform. Use consistent event types across your integration for accurate history tracking.

Commerce Events

Event Type Impact Description
transaction.completed Positive User completed a successful transaction
transaction.chargeback Negative User initiated a chargeback
transaction.disputed Negative User disputed a transaction

Community Events

Event Type Impact Description
review.posted Positive User posted a legitimate review
review.flagged Negative User's review was flagged as inappropriate
account.verified Positive User verified their identity