Skip to content
Market Monolith

Your first authenticated request

Use your first key to confirm its account and application. Authentication checks are free; business access is not enabled.

On this page

Get your key: enter your email, verify the eight-digit code, then copy your first key.

1. Make a request

Use your server or local development environment, with the key supplied through a protected environment variable. Never put the secret in a URL, frontend bundle or conversation.

cURL

curl --request GET --max-time 15 \
  --url https://api.marketmonolith.com/v1/me \
  --header "X-Market-Monolith-Key: $MARKET_MONOLITH_API_KEY"

Read the cURL guide

JavaScript / TypeScript

const key = process.env.MARKET_MONOLITH_API_KEY;
if (!key) throw new Error("A server-side API key is required");

const response = await fetch("https://api.marketmonolith.com/v1/me", {
  headers: { "X-Market-Monolith-Key": key, Accept: "application/json" },
  redirect: "error",
  signal: AbortSignal.timeout(10_000),
});

if (!response.ok) {
  throw new Error("Authentication check returned HTTP " + response.status);
}
const identity = await response.json();
console.log({
  accountRef: identity.accountRef,
  applicationRef: identity.applicationRef,
  businessAccess: identity.businessAccess,
  billable: identity.billable,
});

Read the JavaScript / TypeScript guide

Python

import json
import os
import urllib.error
import urllib.request

class NoRedirect(urllib.request.HTTPRedirectHandler):
    def redirect_request(self, req, fp, code, msg, headers, newurl):
        return None

key = os.environ.get("MARKET_MONOLITH_API_KEY")
if not key:
    raise RuntimeError("A server-side API key is required")

request = urllib.request.Request(
    "https://api.marketmonolith.com/v1/me",
    headers={"X-Market-Monolith-Key": key, "Accept": "application/json"},
)
opener = urllib.request.build_opener(NoRedirect())
try:
    with opener.open(request, timeout=10) as response:
        identity = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(
        "Authentication check returned HTTP " + str(error.code)
    ) from None

print({
    "accountRef": identity.get("accountRef"),
    "applicationRef": identity.get("applicationRef"),
    "businessAccess": identity.get("businessAccess"),
    "billable": identity.get("billable"),
})

Read the Python guide

Ruby

require "net/http"
require "json"

key = ENV.fetch("MARKET_MONOLITH_API_KEY")
uri = URI("https://api.marketmonolith.com/v1/me")
request = Net::HTTP::Get.new(uri)
request["X-Market-Monolith-Key"] = key
request["Accept"] = "application/json"

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.open_timeout = 5
http.read_timeout = 10
http.max_retries = 0
response = http.request(request)

unless response.is_a?(Net::HTTPSuccess)
  raise "Authentication check returned HTTP #{response.code}"
end
identity = JSON.parse(response.body)
puts identity.slice("accountRef", "applicationRef", "businessAccess", "billable")

Read the Ruby guide

2. Check the response

Expected response with illustrative identifiers, not an executed request:

{
  "accountRef": "acct_example",
  "applicationRef": "app_example",
  "keyId": "key_example",
  "scopes": ["identity:read"],
  "businessAccess": "not_enabled",
  "billable": false
}

Match the account and application references to your console. “Waiting for your first request” changes only when the server records a successful check for the selected credential. Copying a key or opening an example is not verification.

Next steps

Read API-key security and authentication troubleshooting. If key creation completed but the secret was lost, inspect its safe metadata and explicitly replace it. Do not restart signup or expect a refresh to reveal the original key.

This response proves credential authentication only—not workspace permissions, funding, provider readiness or an agent connection.

Ownership and permissions

Accounts own applications and data. Workspaces control access to business work. Understand ownership.