manage_organization
Changes data
Create and change organizations and manage their people. Admins only, except create, open to anyone.
Set action to one of these:
create(needsbody): Create an organization with its first product, for a new company (to add a product to an existing organization:manage_productwith actioncreate). The person becomes its Admin. It also starts the product's knowledge base read:meta.ingestionRun, or null when it could not start (thenmanage_knowledge_basewith actionstart_read). The read takes minutes: checkread_knowledge_basewith actionreadevery 30 seconds; it is done when its status is completed, failed or stopped. Not safe to retry: each call creates another organization. Counts toward the lower limit on calls that start AI runs or knowledge base reads.update(needsorganizationId,body): Sendname,reportingCurrency(what ARR is shown in: EUR or a code fromread_crmwith actioncurrencies) or both. The same values again change nothing, so a retry is safe. ClearingallowKeysWithoutExpirywhile keys without expiry exist can't be undone, so Heuristic asks the person first then (seeconfirm).invite(needsorganizationId,body): Invite up to 20 email addresses with one role (trimmed, lower-cased, repeats merged). One after another, each is emailed an invitation link valid for 7 days, or added at once when it has a Heuristic account, with its ownoutcome: invited, added, already_member, or not_sent (the email failed; nothing saved for it). Any other error stops the call; addresses handled before it stay done.update_member(needsorganizationId,userId,body): Change another member'srole(admin or user),status(active or disabled), or both; never the person's own. At least one active Admin must stay (last_admin). A disabled member can't sign in until enabled. Product access stays stored: an Admin made a User again keeps the access they had. The same values again change nothing, so a retry is safe.remove_member(needsorganizationId,userId): Remove another member, active or disabled: ends their membership and their access to every product of the organization, and their apps lose it at once; only a new invitation brings them back. What they made stays, shown as by a former member. To pause someone, disable them withmanage_organizationwith actionupdate_member. Not the person themselves (forbidden): they leave withupdate_mewith actionleave_organization. A non-member is not found. This can't be undone, so Heuristic asks the person first (seeconfirm).resend_invitation(needsorganizationId,invitationId): Send an open invitation again: a new link valid for 7 days, same role; the old link stops working. An address with a Heuristic account by now is added (outcomeadded), a member answersalready_member, an accepted, cancelled or unknown invitation is not found, and when the email can't be sent nothing changes (service_unavailable).cancel_invitation(needsorganizationId,invitationId): Cancel an open invitation: its link stops working at once. The person can be invited again.revoke_api_key(needsorganizationId,keyId): Revoke any API key in the organization, a member's or an organization key: anything using it stops at once. Not found: already revoked or expired. This can't be undone, so Heuristic asks the person first (seeconfirm).
Actions (set action)
create
- Who can use it
- Anyone signed in
- Hints
- Changes dataReaches outside Heuristic
- Runs
create_organization- Inputs
bodyobject, requiredThe organization and its first product.
namestring, requiredThe organization's name, usually the company's, 1 to 100 characters.
productobject, requiredIts first product.
namestring, requiredThe product's name, 1 to 100 characters, on one line.
knowledgeBaseUrlstring, requiredThe product's public documentation site, an http or https address such as https://docs.example.com; never a local or private address. Heuristic reads it to find the product's features.
descriptionstringWhat the product is, up to 500 characters. Empty when left out.
update
- Who can use it
- Admins
- Hints
- Changes dataCan remove dataSafe to repeatAsks the person to confirm
- Runs
update_organization- Inputs
organizationIdstring, requiredFrom
get_me.bodyobject, requiredSend the fields to change. Fields left out stay as they are.
namestringThe organization's new name, 1 to 100 characters.
reportingCurrencystringThe currency ARR is shown in: EUR or a three-letter code from
read_crmwith actioncurrencies, in any case.allowKeysWithoutExpirybooleanWhether members' own API keys may never expire (organization keys always may). False gives each such key without expiry an expiry 90 days from now (true doesn't undo it).
confirmbooleanTrue only after the person said yes to the question a first call answered with
confirmation_required. Ignored when your app can show the person questions: Heuristic then asks them itself.
invite
- Who can use it
- Admins
- Hints
- Changes dataReaches outside Heuristic
- Runs
invite_members- Inputs
organizationIdstring, requiredFrom
get_me.bodyobject, requiredUp to 20 distinct addresses with one role; each is handled as a single invite.
emailsarray of string, requiredThe email addresses to invite: up to 20 distinct ones (at most 100 entries before repeats merge).
rolestring, requiredThe role for all of them.
adminmanages the organization and owns every product;useropens only the products they are given.Allowed values:admin,userproductsarray of objectsProducts of this organization the person gets when they join (Users only; Admins own every product).
productIdstring, requiredAn id (a uuid), from an earlier result.
accessstring, requiredownerreads and changes the product's data;vieweronly reads it.Allowed values:owner,viewer
update_member
- Who can use it
- Admins
- Hints
- Changes dataSafe to repeat
- Runs
update_member- Inputs
organizationIdstring, requiredFrom
get_me.userIdstring, requiredThe member's user id, from
read_organizationwith actionmembersorread_productwith actionaccess.bodyobject, requiredSend a role, a status, or both. The organization must keep at least one active Admin.
rolestringadminmanages the organization and owns every product;useropens only the products they are given.Allowed values:admin,userstatusstringdisabledstops the member from signing in, keeping their access for later;activelets them in again.Allowed values:active,disabled
remove_member
- Who can use it
- Admins
- Hints
- Changes dataCan remove dataAsks the person to confirm
- Runs
remove_member- Inputs
organizationIdstring, requiredFrom
get_me.userIdstring, requiredThe member's user id, from
read_organizationwith actionmembersorread_productwith actionaccess.confirmbooleanTrue only after the person said yes to the question a first call answered with
confirmation_required. Ignored when your app can show the person questions: Heuristic then asks them itself.
resend_invitation
- Who can use it
- Admins
- Hints
- Changes dataReaches outside Heuristic
- Runs
resend_invitation- Inputs
organizationIdstring, requiredFrom
get_me.invitationIdstring, requiredThe invitation's id, from
read_organizationwith actioninvitations.
cancel_invitation
- Who can use it
- Admins
- Hints
- Changes data
- Runs
cancel_invitation- Inputs
organizationIdstring, requiredFrom
get_me.invitationIdstring, requiredThe invitation's id, from
read_organizationwith actioninvitations.
revoke_api_key
- Who can use it
- Admins
- Hints
- Changes dataCan remove dataAsks the person to confirm
- Runs
revoke_organization_api_key- Inputs
organizationIdstring, requiredFrom
get_me.keyIdstring, requiredThe API key's id, from
read_organization'sapi_keysaction.confirmbooleanTrue only after the person said yes to the question a first call answered with
confirmation_required. Ignored when your app can show the person questions: Heuristic then asks them itself.