Me
Endpoints Summary
GET
/me/organization/
Swagger ↗
The
MeUser Organization API providesendpointsaccess to organization information forretrievingtheinformationauthenticated user. This endpoint allows users to retrieve details aboutthetheircurrentlyorganizationauthenticatedmembership,usersettings, andtheirassociatedorganization.metadata.ThisIt'siscommonlyessentialused foruser profile management,displaying organizationcontext,context in applications andbuildingimplementingpersonalizedorganization-basedapplicationaccessexperiences.controls.
Base URL: https://gate.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The MeUser Organization API category focuses on retrieving organization-related information for the currently authenticated user. This API is designedessential for applications that need to provideunderstand the organizational context of their users, implement role-based access controls, or display organization-specific information in user interfaces.
Key concepts to understand:
This endpoint is typically onecalled ofduring theapplication first API calls made after authenticationinitialization to establish the user's identity and permissions within the system.
Common use cases include:
Key concepts:accordingly.
Endpoints
GET /me/organization/
Description: Retrieves comprehensive organization information about the organization associated withfor the currently authenticated user. This endpoint providesreturns essentialdetails organizational context including organization details,about the user's roleorganization membership, including organization metadata, user permissions, subscription status, and permissions,configuration andsettings. relevantUse this endpoint to establish organizational settings.context when a user logs into your application.
Use Cases:
- Initialize application with user's
organizational context
Full URL Example:
https://gate.zequenze.com/api/v1/me/organization/
Parameters:
This endpoint does not accept any query parameters.
cURL Example:
curl -X GET "https://gate.zequenze.com/api/v1/me/organization/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"id": 42,12345,
"name": "Acme Corporation",
"slug": "acme-corp",
"display_name": "Acme Corporation",
"description": "Leading provider of innovativeindustrial solutions",
"logo_url": "https://gate.zequenze.com/media/logos/acme-corp.png",
"website": "https://www.acmecorp.com",
"industry": "Manufacturing",
"size": "enterprise",
"created_at": "2023-05-03-15T08:30:00Z",
"updated_at": "2024-01-10T14:20T14:22:00Z",
"settings": {
"timezone": "America/New_York",
"date_format": "MM/DD/YYYY",
"currency": "USD",
"language": "en"en-US"
},
"subscription": {
"plan": "professional"enterprise",
"status": "active",
"expires_at": "2024-12-15T23:31T23:59:59Z",
"features": [
"advanced_analytics",
"api_access",
"custom_integrations",
"priority_support"
]
},
"user_role": {
"role": "admin",
"title": "System Administrator",
"permissions": [
"manage_users",
"manage_organization"manage_settings",
"view_analytics",
"api_access"manage_integrations"
],
"joined_at": "2023-06-04-01T09:00:15:00Z"
},
"statistics"limits": {
"total_users"max_users": 25,500,
"active_users"current_users": 18,127,
"total_projects"max_api_calls": 12,10000,
"storage_used_gb"current_api_calls": 15.7,2341
},
"storage_limit_gb"branding": 100.0{
"logo_url": "https://cdn.gate.zequenze.com/logos/acme-corp.png",
"primary_color": "#0066CC",
"secondary_color": "#F0F8FF"
}
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns the user's organization information |
| 401 | Unauthorized - Invalid or missing |
| 403 | Forbidden - User does not have permission to view organization details |
Common Use Cases
Use Case 1: Application Initialization
When a user logs into your application, call this endpoint to retrieve their organizational context. Use the organization name, logo,context and settings to personalizeconfigure the user interface andwith configureappropriate applicationbranding, defaults like timezonesettings, and dateavailable formats.features based on their subscription plan.
Use Case 2: Permission-Based Feature Access
CheckUse the user_role.returned user role and permissionsarraydata to dynamically show or hide features in your application.application, Forensuring example,users only displaysee thefunctionality userthey're managementauthorized sectionto if the user has the manage_users permission.access.
Use Case 3: SubscriptionOrganization Feature GatingDashboard
UseDisplay theorganization statistics, subscription.featuresarraycurrent tousage determineagainst whichlimits, advanced features are available to the organization. This allows you to implement feature gating based on the organization'sand subscription plan.information in an admin dashboard or settings page.
Use Case 4: ResourceMulti-Tenant Usage MonitoringConfiguration
DisplayIn storagemulti-tenant usageapplications, informationuse the organization settings (timezone, currency, language) to customize the user experience and otherformat statisticsdata appropriately for each organization.
Use Case 5: Subscription Management
Check the subscription status and available features to helpguide administratorsusers monitortoward theirappropriate organization'supgrade resourcepaths consumptionor andnotify planthem forof upgradesupcoming whensubscription approaching limits.renewals.
Best Practices
-
Cache
organizationOrganizationdataData:Since organizationalOrganization information changes infrequently,considersocachingcachethisthedata locallyresponse forathereasonabledurationperiodof(e.g.,the1userhour)session to reduce API calls and improve performance. -
Handle
missingPermissionorganizations gracefullyChanges:SomeUser permissions can be modified by organization administrators, so refresh organization data when usersmightreportnotaccessbeissuesassociatedorwithafteransignificantorganizationtimeyet,periods.so implement appropriate fallbacks for 404 responses -
RespectGracefulpermission boundariesDegradation: Alwayscheckhandle cases where certain organization features or settings might be unavailable, and provide sensible defaults in your application.
Rate Limiting: This endpoint is typically called once per session, but implement proper rate limiting and exponential backoff in case of errors to avoid hitting API limits.
Error Handling: Implement robust error handling, especially for 403 errors which might indicate the user's permissionsaccess beforehas displayingbeen administrative featuresrevoked or sensitivetheir informationorganization status has changed.
MonitorSecurity subscription statusConsiderations: RegularlyNever checkexpose thesensitive subscription status and provide appropriate warnings when approaching expiration