SureshakeDocs
ApiEndpoints

Organization Endpoints

Manage multi-tenant organizations and memberships.

Organizations provide the multi-tenant structure for entities and users in Sureshake.

List My Organizations

Retrieve a list of organizations where the current user is a member.

GET/api/v1/organizations/me
curl -H "Authorization: Bearer $TOKEN" https://api.sureshake.com/api/v1/organizations/me
200 OK
{
"data": [
  {
    "id": "8f2349ef-22ab-46ae-a129-2eb4c2570001",
    "name": "Global Investments",
    "slug": "global-investments",
    "status": "active",
    "createdAt": "2024-01-10T10:00:00Z",
    "updatedAt": "2024-01-10T10:00:00Z"
  }
],
"meta": {
  "total": 1,
  "limit": 100,
  "offset": 0,
  "hasMore": false
}
}

Create Organization

Create a new top-level organization.

POST/api/v1/organizations
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "New Ventures Ltd"}' \
https://api.sureshake.com/api/v1/organizations

Get Organization

Retrieve organization details by ID.

GET/api/v1/organizations/:id
curl -H "Authorization: Bearer $TOKEN" https://api.sureshake.com/api/v1/organizations/8f2349ef...

List Members

Retrieve the list of members and their roles for an organization.

GET/api/v1/organizations/:id/members
curl -H "Authorization: Bearer $TOKEN" https://api.sureshake.com/api/v1/organizations/8f2349ef.../members

On this page