Skip to main content

Quickstart

This guide walks you through creating an API key and making your first call to the NexSpace API.

Step 1: Get an API Key

  1. Log in to NexSpace
  2. Navigate to Settings → API Keys
  3. Click Create Key
  4. Choose your scopes (start with shifts:read, staff:read, facilities:read)
  5. Copy the key — it’s shown only once
Your key looks like: nex_live_aBcDeFgHiJkLmNoPqRsT...
For isolated testing, create a nex_test_… key instead — same API host (https://api.nexspace365.com), sandbox rows only.
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 key>. There is no separate sandbox URL and no shared demo credential — use your own key from Settings → API Keys.

Step 2: Make Your First Call

curl -H "Authorization: Bearer nex_live_YOUR_KEY" \
     https://api.nexspace365.com/api/facilities

Step 3: Try an MCP Tool Call

AI agents interact via the MCP protocol. Here’s how to call a tool directly:
curl -X POST https://mcp.nexspace365.com/mcp \
  -H "Authorization: Bearer nex_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list",
    "params": {}
  }'
This returns all 16 available tools. To invoke one:
curl -X POST https://mcp.nexspace365.com/mcp \
  -H "Authorization: Bearer nex_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "listFacilities",
      "arguments": {}
    }
  }'

Step 4: Set Up Webhooks (Optional)

Receive real-time events when things happen in NexSpace:
curl -X POST https://api.nexspace365.com/api/webhooks \
  -H "Authorization: Bearer nex_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Integration",
    "url": "https://your-app.com/webhooks/nexspace",
    "events": ["shift_filled", "credential_expired"]
  }'
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.