API Reference

Complete API documentation for creator endpoints.

Authentication

All API requests require authentication via API key in the Authorization header:

Authorization: Bearer mg_live_your_api_key

Sandbox keys start with mg_sandbox_ and work only in sandbox mode.
Production keys start with mg_live_ and work in production.

Base URL

Production:

https://api.meridianground.com/v1

Sandbox:

https://sandbox.meridianground.com/v1

Endpoints

GET/services

List your services.

Query Parameters:

  • status — Filter by status (draft, active, paused, archived)
  • limit — Max results (default: 20, max: 100)
  • cursor — Pagination cursor

Response:

{
  "data": [
    {
      "id": "uuid",
      "job_type": "competitor_monitoring",
      "title": { "en": "...", "es": "..." },
      "status": "active",
      "price_amount_cents": 29900,
      "price_currency": "EUR",
      "rating": 4.8,
      "jobs_completed": 42
    }
  ],
  "cursor": "next_page_cursor"
}
POST/services

Create a new service.

Request Body:

{
  "job_type": "competitor_monitoring",
  "title": { "en": "Weekly Report", "es": "Informe Semanal" },
  "description": { "en": "..." },
  "category": "monitoring",
  "contract_json": { ... },
  "price_amount_cents": 29900,
  "price_currency": "EUR",
  "billing_model": "subscription",
  "billing_period": "monthly"
}

Response (201):

{
  "data": {
    "id": "uuid",
    "status": "draft",
    "created_at": "2026-01-15T10:30:00Z"
  }
}
GET/jobs

List jobs assigned to you.

Query Parameters:

  • status — Filter by status (queued, processing, completed, failed)
  • service_id — Filter by service

Response:

{
  "data": [
    {
      "id": "uuid",
      "job_type": "competitor_monitoring",
      "status": "queued",
      "inputs": { "companies": ["Acme", "Beta"] },
      "sla_deadline": "2026-01-18T10:30:00Z",
      "created_at": "2026-01-15T10:30:00Z"
    }
  ]
}
POST/jobs/:id/complete

Submit job output (webhook callback).

Request Body:

{
  "status": "completed",
  "output": {
    "report_url": "https://...",
    "summary": "Executive summary...",
    "changes_detected": 12
  },
  "metadata": {
    "processing_time_seconds": 45
  }
}

Note: This endpoint is called by your handler, not directly. The SDK sends this automatically when you return from your handler function.

GET/earnings

Get earnings breakdown.

Response:

{
  "data": {
    "total_earnings": 1250000,
    "pending_payout": 250000,
    "paid_payout": 1000000,
    "by_service": [
      {
        "service_id": "uuid",
        "service_name": "Weekly Report",
        "earnings": 750000
      }
    ],
    "by_period": [
      {
        "period": "2026-01",
        "earnings": 500000
      }
    ]
  }
}

Error Codes

CodeHTTPDescription
INVALID_API_KEY401API key is missing or invalid
SERVICE_NOT_FOUND404Service ID doesn't exist
INVALID_CONTRACT422Contract validation failed
RATE_LIMIT_EXCEEDED429Too many requests
INTERNAL_ERROR500Server error

Rate Limits

EndpointLimitWindow
All endpoints100 requests1 minute
POST /jobs/:id/complete1000 requests1 minute