Skip to main content

Quickstart

This guide walks you through getting a credential and making your first call to the NexSpace API.

Step 1: Get a credential

Self-service API-key creation is restricted to NexSpace 365 operators. Every /api/api-keys route (create, list, revoke, rotate) requires a browser session or a device-code/OAuth token — never an API key — and either the super_admin role or an admin/manager role inside the platform-internal NexSpace 365 organization. If you are an admin at a customer organization, Settings → API Keys will return 403 FORBIDDEN — “API key management is restricted to the NexSpace 365 organization”. Pick a supported path below instead.
After an OAuth or device-code login you hold an access token that works everywhere a nex_ key does in the examples that follow — send it the same way, as Authorization: Bearer <token>.

If you can mint a key (NexSpace 365 operators)

  1. Log in to NexSpace
  2. Navigate to Settings → API Keys
  3. Click Create Key
  4. Choose your scopes. For this quickstart pick shifts:read, staff:read, facilities:read, and integrations:write (Step 4 needs that last one)
  5. Copy the key — it’s shown only once
Your key looks like: nex_live_aBcDeFgHiJkLmNoPqRsT...
You don’t choose the prefix. The instance decides: production mints nex_live_, and the only toggle on the create form is Personal access token, which mints nex_pat_. nex_test_ (sandbox) keys are issued only by non-production NexSpace deployments — you cannot obtain one from api.nexspace365.com. See Sandbox.
Store your API key securely. Never commit it to version control or share it in client-side code.

Mintlify Try-it

On API reference pages, open Try It and paste Bearer <your credential> — an API key or PAT issued to you, or an OAuth access token from the connector / device-code flow. There is no separate sandbox URL and no shared demo credential.

Step 2: Make Your First Call

Step 3: Try an MCP Tool Call

AI agents interact via the MCP protocol. Here’s how to call a tool directly:
This returns the full governed catalog — named workforce verbs and category tools (analytics, scheduling, CRM, and more) — regardless of what your credential is scoped for. tools/list is a discovery call, not an entitlement check; scope is enforced when you actually invoke a tool, and a call outside your scopes fails with Insufficient credential scope. The one per-caller part of the list is connected-app actions, which appear only when the credential’s bound user has an active connection to that app and the credential carries apps:read / apps:write. See MCP. To invoke one:

Step 4: Set Up Webhooks (Optional)

Receive real-time events when things happen in NexSpace.
This call needs the integrations:write scope. POST /api/webhooks is gated on the integrations.manage_webhooks permission, and for an API-key caller that permission resolves to the integrations:write scope (manage_webhooks is one of the write aliases). The read-only trio from Step 1 — shifts:read, staff:read, facilities:read — returns 403 INSUFFICIENT_SCOPE. Include integrations:write when you create the key, or create a second key with it. See Permission names are not scope names.
The response includes a signingSecret — use it to verify incoming webhook signatures.

Next Steps

Authentication Deep Dive

OAuth 2.1, scopes, key rotation, and device-code flow.

MCP Protocol

Full MCP integration guide for AI agents.

TypeScript SDK

Install and configure the TypeScript SDK.

CLI Reference

Automate NexSpace from the command line.