ANABOX smart
API Guide

Your First Requests

Verify a Memo API credential, discover an organization, and list its users with cURL or JavaScript.

The following sequence is read-only. It verifies authentication and discovers the IDs needed by most other API calls.

1. Verify the credential

curl --fail-with-body \
  "https://api.memo.wirewire.de/v1/accounts/current" \
  --header "Accept: application/json" \
  --header "x-api-key: $MEMO_API_KEY"

A successful response is the current account object. A 401 means the key is missing or invalid.

2. List organizations

curl --fail-with-body \
  "https://api.memo.wirewire.de/v1/organizations/?limit=20" \
  --header "Accept: application/json" \
  --header "x-api-key: $MEMO_API_KEY"

Choose the organization you intend to integrate and copy its id. Keep that organization ID attached to your integration configuration rather than discovering it by name on every request.

3. List users and patients

curl --fail-with-body --get \
  "https://api.memo.wirewire.de/v1/users/" \
  --header "Accept: application/json" \
  --header "x-api-key: $MEMO_API_KEY" \
  --data-urlencode "organization=$ORGANIZATION_ID" \
  --data-urlencode "limit=50"

Use the returned id of a user whose category or role identifies them as the intended patient.

JavaScript example

Keep this code on a trusted server, not in browser-delivered JavaScript.

const baseUrl = "https://api.memo.wirewire.de/v1";

async function memoRequest<T>(path: string): Promise<T> {
  const response = await fetch(`${baseUrl}${path}`, {
    headers: {
      Accept: "application/json",
      "x-api-key": process.env.MEMO_API_KEY!,
    },
  });

  if (!response.ok) {
    const problem = await response.text();
    throw new Error(`Memo API ${response.status}: ${problem}`);
  }

  return response.json() as Promise<T>;
}

const organizationId = process.env.MEMO_ORGANIZATION_ID!;
const users = await memoRequest(
  `/users/?organization=${encodeURIComponent(organizationId)}&limit=50`,
);

Next step

Once these requests work, continue with Create a Medication Schedule or inspect an operation in the API Reference.