Prepare a user key
In MCP → + Generate token, create a User key — bound to my account withorganization.write. Add organization.read if your script will list or inspect clients. Store the issued value as ALIGNR_API_KEY in your secret manager or local environment; do not put it in source code.
The key works only while its owner is active, is not required to change their password, and retains organization.write. A Service key cannot perform these client writes, even if it has that scope. The server checks the key and owner on each request. Authentication explains the wider key boundary.
Create a client
Choose a unique, stable slug in your workspace. The following fictional example sends a real write if you run it:id. Save that ID for later requests. A slug conflict returns an error; a lost response does not prove creation failed. Check for the slug through a read-authorised key or in the app before retrying a create request, because the POST is not an idempotent “get or create” operation.
Update the intended client
Replace the illustrative UUID with the ID returned by creation. PATCH changes only the fields you send; this example updates the display name and a PSA reference used for client matching:Archive after review
DELETE /organizations/{organization_id} archives the client. Confirm the ID and your intended downstream workflow before sending it:
organization:write scope. Check the live schema for the contract available on your deployment.