Skip to main content
GET
Organization endpoints are dashboard endpoints for team workspaces. They use the signed-in app session, not X-NearIQ-Key. Owners and admins can manage members, invites, usage visibility, API key ownership, and activity logs according to their organization permissions.
Public v1 API keys can be scoped to an organization, but organization management itself is controlled through the signed-in dashboard session.

GET /api/orgs

Returns organizations owned by the signed-in user, organizations where the user is a member, and compatibility fields used by Settings.

POST /api/orgs

Creates an organization and starts organization billing checkout for supported team plans.
string
required
Organization name.
string
required
Team plan. Supported values are enforced by the API.

PATCH /api/orgs/:id

Renames an organization or changes its plan. Only the organization owner can update it.
For plan changes, send { "plan": "enterprise" }. The API blocks changes that would exceed seat limits.

DELETE /api/orgs/:id

Soft-deletes an organization and immediately revokes memberships, pending invites, and organization-scoped API keys. Only the owner can delete the organization.

POST /api/orgs/invites

Creates or refreshes an invitation for a team member. Owners and admins with invite permission can send invites.

DELETE /api/orgs/invites/:id

Cancels a pending invitation in the signed-in user’s organization. Owners and admins can cancel invites.

GET /api/orgs/invites/me

Returns pending organization invitations for the signed-in user’s email address.

PATCH /api/orgs/members/:userId

Changes a member role or permission set. Owners and admins can update members, but the owner role cannot be changed.

DELETE /api/orgs/members/:userId

Removes a member from the organization or lets a member leave. Removing a member also revokes their organization-scoped API keys.

GET /api/orgs/keys

Lists organization-scoped API keys visible to permitted team managers.

DELETE /api/orgs/keys

Compatibility route for revoking an organization-scoped API key by request body.

DELETE /api/orgs/api-keys/:keyId

Revokes an organization-scoped member API key by path parameter.

GET /api/orgs/usage

Returns organization limits, total usage, and per-member usage for owners and admins.

GET /api/orgs/activity

Returns schema-backed team activity for owners and admins. Results are no-store and paginated.
number
Page size from 1 to 100. Defaults to 50.
number
Offset for pagination.
string
Optional user ID filter.
string
Optional action filter. Group aliases such as api_key, content, and competitor expand to related events.

Errors