Connect n8n to Prima.Law with an API Key

What is the Prima.Law API? The Prima.Law API is a secure “door” that lets other programs work with your firm’s data without opening the app. Through it, an automation tool like n8n (similar to Zapier) can find contacts, create cases, notes and tasks, upload files, or react when something happens in Prima.Law. To use this door, you need an API key: a secret key that identifies your firm. You create it inside Prima.Law.



The most important points

  • /me only checks the connection. /me means “Who am I?”. It doesn’t create or change anything. It only answers which user, firm and key are connected. If it responds, everything works.
  • Save your key once in n8n and reuse it. In the video, the key is pasted directly into the step to keep it short. The recommended way is to save it in n8n Credentials (type Header Auth: name Authorization, value Bearer + your key). After that, you pick it from a list in any workflow, and it stays hidden.
  • The documentation is not public. It only opens when you’re signed in to Prima.Law (View API documentation button) or with a valid API key.
  • An AI can build your workflows. An AI assistant (ChatGPT, Claude, or n8n’s assistant) can read the always up-to-date documentation at https://api.prima.law/v1/openapi.md using a valid API key. Describe the workflow in plain words, and it will propose one. Always test it before using it for real.
  • Your API key is like a password. Never share it. If it leaks, revoke it in Admin Console → API Keys → Revoke.

You’ll test the connection twice: first from the API documentation (no installation needed), then from n8n. Both use /me, and both return the same answer.


Step 1: Create an API key

In Prima.Law, go to Admin Console → API Keys → Generate API Key.

  • Enter a Name (for example, n8n prod).
  • Choose the Expiration.
  • Choose the Permissions: Read, Write, Webhooks.
  • Leave Sensitive data (SSN, A-number, passports) off, unless you really need it.

Click Generate.


Step 2: Copy and save your key

Your key is shown only once. Click Copy, store it somewhere safe, then click I saved my key.

If you lose it, revoke it and create a new one.


Step 3: Open the API documentation

Click View API documentation. It only works while you’re signed in to Prima.Law, or with a valid API key.


Step 4: Paste your key and choose /me

Click Authorize, paste your key, and click Authorize again to test from the documentation. Then open GET /me (“Who am I?”).


Step 5: Test /me

Click Try it out, then Execute. /me doesn’t change anything. It only answers which user, firm and key are connected, so it’s always the first test.

Step 6: Check the response

Code 200 means everything works. The response includes the user, the firm, and the name of your key (for example, n8n prod).



Step 7: Run the test workflow in n8n

The test workflow has two steps:

  1. Run test: the button that starts the workflow.
  2. Prima.Law API – Who am I: an HTTP Request to /me.
    • Method: GET
    • URL: https://api.prima.law/v1/me
    • Send Headers: on
    • Header: Name Authorization, Value Bearer YOUR_API_KEY (Bearer, a space, then your key)

Click Execute workflow.

Tip: If n8n shows “Problem saving workflow”, that message is about saving the test workflow, not about your connection.

Step 8: Result in n8n

On the right, under Output, you’ll see the same answer as in the documentation: success: true. n8n is now connected to Prima.Law.



What’s next?

  • Save your key once in n8n Credentials. Choose type Header Auth, with Name Authorization and Value Bearer + your key. Then pick it from the list in every workflow.
  • Let an AI assistant build workflows for you. It can read the always up-to-date documentation at https://api.prima.law/v1/openapi.md with a valid API key. Always test the workflow before using it for real.
  • Treat your API key like a password. Never share it. Revoke it anytime in Admin Console → API Keys.

🎥 Video tutorial: Connect n8n to Prima.Law with an API key