Configure Mureka API account

January 19, 2026 (July 21, 2026)

Table of contents

  1. Request Headers
  2. Request Body
  3. Responses
  4. Model
  5. Examples
  6. Try It

Configure a Mureka account for API access. There are two ways to connect, differing in what happens when Mureka ends the session:

  • Email + password (recommended). Give the API a dedicated Mureka account’s email + password. When the session is revoked, the API logs back in automatically — the account never needs manual re-linking.
  • Session token. Give the API the token (access_token) + refresh_token copied from your browser after signing in. The API auto-refreshes them, but once fully revoked or expired the account must be re-linked by hand.

See Setup Mureka for step-by-step instructions on both.

https://api.useapi.net/v1/mureka/accounts

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
Request Body

Send one of the two bodies below.

Option 1 — email + password (recommended)

{
    "email": "you@example.com",
    "password": "your-mureka-password"
}
  • email — the dedicated Mureka account’s email address.
  • password — that account’s password. It’s stored so the API can re-login on your behalf whenever Mureka ends the session, and is never returned (masked in every response). Create the account through the guided Connect Mureka with email + password page. Accounts added this way report "authMode": "email".

Option 2 — token + refresh_token

{
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...secured...E7jlw8",
    "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...secured...hNvmuU"
}
  • tokenrequired for this option. The access_token from the Mureka.ai login response (a JWT starting with eyJ…, ~390 characters).
  • refresh_tokenoptional but recommended. The refresh_token from the same login response (a JWT starting with eyJ…, ~350 characters). With it, the API keeps your session alive automatically and the account reports "authMode": "token". Without it, the account works for about 30 days (until the token expires) and then must be re-added — no auto-refresh, and no authMode in the response.

When you add an account, the API validates it once — an email + password login (Option 1), or a token refresh (Option 2). This confirms the credentials work, takes the session over from your browser, and stores the API’s own token pair. It adds a few seconds to the request. If it fails, the account is not saved and the error explains why.

Responses
  • 200 OK

    Account configured successfully with browserless auto-refresh enabled. Secret values (token, refresh_token, password) are masked in the response.

    Option 1 (email + password) → authMode: "email":

    {
        "123456789012345": {
            "account": "123456789012345",
            "token": "eyJ…secured…",
            "refresh_token": "eyJ…secured…",
            "password": "…secured…",
            "authMode": "email",
            "token_expires": 1786579200000,
            "refresh_expires": 1789171200000,
            "updated": 1783987200000,
            "email": "you@example.com",
            "hasAutoRefresh": true,
            "tokenIssuedDaysAgo": 0,
            "updatedUTC": "2026-07-14T00:00:00.000Z",
            "tokenExpiresUTC": "2026-08-13T00:00:00.000Z",
            "refreshExpiresUTC": "2026-09-12T00:00:00.000Z"
        }
    }
    

    Option 2 (token + refresh_token) → authMode: "token" (identical shape, no password).

  • 400 Bad Request

    Option 1 — the email or password was rejected (finish Mureka’s email verification first if you just set the password):

    {
      "error": "Mureka login failed: incorrect email or password (9022)",
      "code": 400
    }
    

    Option 2 — the captured refresh token was rejected — re-capture a fresh one (and if the account is signed in on another browser or device, sign out there first):

    {
      "error": "Could not establish a refreshable Mureka session: Mureka refresh failed (code=2, msg=invalid refresh token). Re-capture a fresh session and try again — if this Mureka account is signed in on another browser or device, sign out of it there first.",
      "code": 400
    }
    
  • 429 Too Many Requests

    The onboarding login/refresh was rate-limited by Mureka. Wait ~20 seconds and try again.

    {
      "error": "Could not log in to Mureka right now — Mureka login rate-limited (9008) — retry shortly. Wait ~20 seconds and try again.",
      "code": 429
    }
    
  • 401 Unauthorized

    {
      "error": "Unauthorized",
      "code": 401
    }
    
Model
{ // TypeScript, all fields are optional
  [account: string]: {
    account: string
    token: string               // masked
    refresh_token: string       // masked
    password?: string           // masked — present only for email + password (authMode "email") accounts
    authMode: "email" | "token" // "email" = email + password (the API re-logs in automatically); "token" = session/refresh-token only (re-link on expiry)
    token_expires: number       // access-token expiry, epoch ms (~30 days out)
    refresh_expires: number     // refresh-token expiry, epoch ms (~60 days out)
    updated: number
    email?: string
    hasAutoRefresh: boolean
    tokenIssuedDaysAgo: number
    updatedUTC: string
    tokenExpiresUTC: string
    refreshExpiresUTC: string
  }
  error: string
  code: number
}
Examples

Examples use the recommended email + password body. For the session-token method, replace the body with { "token": "eyJ…", "refresh_token": "eyJ…" }.

  • curl -H "Accept: application/json" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer …" \
         -X POST https://api.useapi.net/v1/mureka/accounts \
         -d '{"email": "you@example.com", "password": "your-mureka-password"}'
    
  • const apiUrl = 'https://api.useapi.net/v1/mureka/accounts';
    const api_token = "API token";
    const email = "you@example.com";
    const password = "your-mureka-password";
    
    const response = await fetch(apiUrl, {
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${api_token}`,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({ email, password })
    });
    
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    
    apiUrl = "https://api.useapi.net/v1/mureka/accounts"
    api_token = "API token"
    email = "you@example.com"
    password = "your-mureka-password"
    
    headers = {
        "Content-Type": "application/json",
        "Authorization": f"Bearer {api_token}"
    }
    body = {
        "email": email,
        "password": password
    }
    
    response = requests.post(apiUrl, headers=headers, json=body)
    print(response, response.json())
    
Try It

Fill in either email + password (recommended) or token + refresh_token, then click Add account.