markaDocs

Getting started

Create an API key and make your first authenticated call in about two minutes.

1. Create an API key

Open Settings → API keys in Marka. If you are not signed in, Marka asks you to sign in first and then brings you back to that page.

Your account's email address has to be confirmed before it can create a key. If it is not, the page says so and offers to resend the confirmation email, instead of showing the form. Confirm it from the email and reload the page.

Give the key a name (up to 32 characters), choose an expiry, and create it.

The key is shown once

Marka stores a hash, not the key. The full mk_… value appears exactly once, on the screen that created it. If you lose it, revoke the key and create another — there is no way to read it back. The keys list afterwards shows only the first 10 characters, as a way to tell your keys apart.

The expiry choices are 30 days, 90 days, 1 year, and never expires. The default is 1 year, so a key forgotten in an abandoned config stops working on its own.

You can revoke any key from the same page. Key management is a signed-in-browser surface only: requests authenticated by an API key are refused there, so a leaked key cannot mint successors that survive revoking it.

2. Make a call

GET /api/v1/me is the cheapest way to prove a key works — it needs no arguments and tells you which account the key belongs to and what its plan allows.

curl https://joinmarka.com/api/v1/me \
  -H "x-api-key: mk_YOUR_KEY_HERE"

A working key answers 200 with your account and plan:

{
  "user": {
    "id": "usr_…",
    "email": "you@example.com",
    "name": "Your Name"
  },
  "plan": {
    "tier": "pro",
    "entitlements": ["api_write", "cross_post_oneway", "ai_unlimited"],
    "limits": {
      "maxActiveListings": null,
      "aiCopilotRunsPerMonth": null,
      "apiRequestsPerMonth": 5000
    }
  }
}

null means unlimited — JSON has no way to write infinity. entitlements is the list to check before attempting a write: without api_write, a key-authenticated write answers 402.

A missing, malformed, revoked, or expired key answers 401:

{ "error": "unauthorized" }

3. Read the catalogue

curl "https://joinmarka.com/api/v1/search?q=bike&limit=5" \
  -H "x-api-key: mk_YOUR_KEY_HERE"

Prices come back as integer minor units of the accompanying currency — 4500 with "currency": "CAD" is CA$45.00. The search reference lists every filter it takes.

4. Create a draft listing

Writes need the api_write entitlement (Pro or Business). POST /api/v1/listings creates a draft; drafts are not visible to buyers until they are published.

curl -X POST https://joinmarka.com/api/v1/listings \
  -H "x-api-key: mk_YOUR_KEY_HERE" \
  -H "content-type: application/json" \
  -d '{
    "title": "Vintage road bike",
    "description": "Steel frame, recently serviced.",
    "price": 45000,
    "currency": "CAD",
    "pickupEnabled": true,
    "directEnabled": true
  }'

Only title, description and price are required; everything else has a server-side default (categoryPath defaults to general, condition to good, quantityTotal to 1). The body is strict — an unknown or misspelled key is a 400, not a silently dropped field.

If your plan does not carry api_write, the same call answers 402:

{
  "error": "Programmatic writes require the api_write entitlement (Pro plan or higher).",
  "code": "entitlement_required"
}

Your drafts come back from GET /api/v1/listings, alongside your live listings, and PATCH /api/v1/listings/{id} changes a draft's fields.

Publishing is a separate call — POST /api/v1/listings/{id}/publish — which runs the same activation guards the web app does. A listing must offer at least one fulfilment option (pickup or shipping) and at least one order rail (in-person handoff or card checkout) before it can go live.

Where to next

Once buyers order, GET /api/v1/orders lists the orders on your listings. Every operation is in the API reference.

On this page