API keys are entity-scoped. The entity ID is part of the URL path: /v1/entities/{entity_id}/{resource}. Every request is automatically scoped to the entity that issued the key.
Your entity ID is a UUID that identifies your organization in Arcus. You need it for every API request.Easiest way: Go to Settings > Developers > API Keys. The Quick Reference panel at the top of the page shows your Entity ID with a copy button right next to it.
The Quick Reference panel also shows the correct API Base URL for your current mode (Test or Live). Toggle between modes using the Test / Live switcher at the top of the Developers page.
Once you have both values, set them as environment variables:
import Arcus from '@arcuserp/sdk-node';const arcus = new Arcus({ apiKey: process.env.ARCUS_API_KEY, entityId: process.env.ARCUS_ENTITY_ID,});const accounts = await arcus.accounts.list({ limit: 5 });console.log(accounts.data);
from arcuserp import Arcusimport osarcus = Arcus( api_key=os.environ['ARCUS_API_KEY'], entity_id=os.environ['ARCUS_ENTITY_ID'],)accounts = arcus.accounts.list(limit=5)for a in accounts.data: print(a.name)
Always include an Idempotency-Key on POST/PATCH/DELETE requests. If the request fails due to a network error, retrying with the same key returns the original response without creating a duplicate. See Idempotency.