Documentation menuAPI: Organizations and teams

API

Organization and teams endpoints

These endpoints work on a whole organization. Reading needs org:read. Changing members and teams needs org:write and an admin or an owner.

Last updated . This guide belongs to API access and data export.

Which endpoints are there?

RequestResult
GET /organizations/:organizationId/sitesThe sites you can open, with sessions in the last 24 hours and the plan's event limit
POST /organizations/:organizationId/sitesAdds a site from domain and name. Status 201. Needs sites:write
GET /organizations/:organizationId/membersThe members with role, site access and teams
GET /organizations/:organizationId/teamsThe teams with their members and sites
POST /organizations/:organizationId/teamsCreates a team from name, memberUserIds and siteIds. Status 201
PUT /organizations/:organizationId/teams/:teamIdChanges a team. A list you send replaces the stored one
DELETE /organizations/:organizationId/teams/:teamIdDeletes a team

A member sees only the sites and teams they belong to. An admin, an owner and an organization key see all of them.

How many sites can you add?

PlanWebsites
Starter5
Business50
Agency500

A request over the limit returns status 403.

What does the members list return?

{ "success": true, "data": [ { "id": "Mb3k", "role": "member", "userId": "usr_2q", "user": { "name": "Kari Nordmann", "email": "[email protected]" }, "siteAccess": { "hasRestrictedSiteAccess": true, "siteIds": [42] }, "teams": [] } ] }

role is owner, admin or member.