Skip to main content

Me

Endpoints Summary

Method Path Swagger GET /me/organization/ Swagger ↗

The MeUser Organization API provides endpointsaccess to organization information for retrievingthe informationauthenticated user. This endpoint allows users to retrieve details about thetheir currentlyorganization authenticatedmembership, usersettings, and their associated organization.metadata. ThisIt's iscommonly essentialused for user profile management,displaying organization context,context in applications and buildingimplementing personalizedorganization-based applicationaccess experiences.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:

    User Organization Context: Each authenticated usersuser withbelongs to one or more organizations, and this API provides access to theirthat ownorganizational profiledata Organization Metadata: Includes details like organization name, settings, subscription status, and user permissions within the organization Access Control: The information returned is filtered based on the user's permissions and organizationalrole context.within the organization

    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:

      Displaying user profile information in application headers Determining organizational context for data filtering Validating user permissions and access levels Personalizingconfigure the userapplication interface based on organization settings

      Key concepts:accordingly.

        All endpoints return data specific to the authenticated user's token Organization information includes metadata, settings, and user's role within the organization This API is read-only and focused on retrieving current state information

        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
        Display organization brandingsettings and information in the UIbranding Determine user's permissions and role within thetheir organization FilterDisplay dataorganization-specific dashboard elements and featuresnavigation basedValidate onorganization organizationalsubscription status and feature access Configure organization-specific integrations and settings

        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 APIauthentication token
        403 Forbidden - User does not have permission to view organization details
        404429 NotToo FoundMany Requests - UserRate islimit notexceeded
        associated withany500 organizationInternal Server Error - Server encountered an error processing the request

        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 permissions arraydata 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 subscription.featuresstatistics, arraycurrent 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 organizationOrganization dataData: Since organizationalOrganization information changes infrequently, considerso cachingcache thisthe data locallyresponse for athe reasonableduration periodof (e.g.,the 1user hour)session to reduce API calls and improve performance.

        • Handle missingPermission organizations gracefullyChanges: SomeUser permissions can be modified by organization administrators, so refresh organization data when users mightreport notaccess beissues associatedor withafter ansignificant organizationtime yet,periods.

          so implement appropriate fallbacks for 404 responses
        • RespectGraceful permission boundariesDegradation: Always checkhandle 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

        Use timezoneorganization information: Applyin theclient-side organization'scode timezoneor settinglogs. forAlways displayingvalidate datesuser andpermissions timesserver-side consistentlybefore acrossperforming yourprivileged applicationoperations. Implement proper error handling: Handle authentication errors gracefully and redirect users to re-authenticate when receiving 401 responses