# ContextSMS Teams Platform API # Overview **Build unified Microsoft Teams integrations with enterprise messaging capabilities.** ## Platform Capabilities - Unified Teams Integration - Connect Teams with external messaging systems - Multi-tenant Support - Manage multiple customer organizations efficiently - Advanced Routing - Intelligent message routing and delivery - Real-time Messaging - Instant message delivery and notifications ## Integration Workflow 1. **Authenticate** → Secure login with Bearer token 2. **Configure Team** → Set up organization settings 3. **Manage Channels** → Create and configure team channels 4. **Route Messages** → Handle message routing and delivery 5. **Process Webhooks** → Real-time event notifications Version: 1.0.0 License: MIT ## Servers Teams Backend Server (production) ``` https://teams-backend.sabrhub.com/ ``` Authentication Server (production) ``` https://usermanagement.sabrhub.com/v1/ ``` ## Security ### BearerAuth JWT Bearer token for API authentication. Include as: Authorization: Bearer {token} Type: http Scheme: bearer Bearer Format: JWT ## Download OpenAPI description [ContextSMS Teams Platform API](https://context-docs.sabrhub.com/_bundle/specs/contextsms-teams.external.yaml) ## Authentication Endpoints related to user authentication and token management ### Authenticate Teams user and issue tokens - [POST /teams-auth/login](https://context-docs.sabrhub.com/specs/contextsms-teams.external/authentication/teamsauthlogin.md): Authenticate Teams user with username and password to obtain access tokens. This endpoint is specifically for Teams authentication and does not support service fallback. ### Create a new Teams user - [POST /teams-auth/createuser](https://context-docs.sabrhub.com/specs/contextsms-teams.external/authentication/teamsauthcreateuser.md): Creates a new user in the Teams user pool. Requires authentication and proper role permissions. The user must have permission to create users with the specified roles. ## Enterprise Management APIs for creating, retrieving, listing, and deleting enterprises ### Create enterprise - [POST /enterprise/{cspId}](https://context-docs.sabrhub.com/specs/contextsms-teams.external/enterprise-management/createenterprise.md): Create a new enterprise. Returns enterprise metadata, created/update timestamps and status. ### Fetch single enterprise by ID - [GET /enterprise/getenterprise/{enterpriseId}](https://context-docs.sabrhub.com/specs/contextsms-teams.external/enterprise-management/readsingleenterprise.md): Retrieve full enterprise details (name, contact, number, email, deleted flag, timestamps) for the specified enterpriseId. ### Update enterprise by ID - [PUT /enterprise/{enterpriseId}](https://context-docs.sabrhub.com/specs/contextsms-teams.external/enterprise-management/updateenterprise.md): Update an existing enterprise with provided details including enterprise features. Use applyToMappings flags in enterpriseFeatures to control whether feature changes should be applied to all existing mappings. Returns the updated enterprise metadata. ### Delete enterprise by ID - [DELETE /enterprise/deleteenterprise/{enterpriseId}](https://context-docs.sabrhub.com/specs/contextsms-teams.external/enterprise-management/deleteenterprise.md): Remove the enterprise identified by enterpriseId. Returns a deletion confirmation or 404 if not found. ## Mapping Management Manage phone number-to-messaging app mappings across enterprises ### Add phone-to-app mapping - [POST /mapping/add/{enterpriseId}](https://context-docs.sabrhub.com/specs/contextsms-teams.external/mapping-management/addmapping.md): Create a number→messaging-app mapping for the specified enterprise. Returns the mapping id and mapping details. ### List enterprise mappings by ID - [GET /numbertomessageappmapping/enterprise/{enterpriseId}](https://context-docs.sabrhub.com/specs/contextsms-teams.external/mapping-management/getenterprisemappings.md): Return mappings for the specified enterprise (phoneNumber, messagingAppType, messagingAppId, name). ### Update mapping details by ID - [PUT /mapping/{numberToMessageAppMapId}](https://context-docs.sabrhub.com/specs/contextsms-teams.external/mapping-management/updatemapping.md): Update mapping details (messagingAppId, phoneNumber, name, mmsEnabled, mappingFeatures, notifyUser, emailNotifyMap) for the specified mapping ID and return the updated mapping. ### Delete mapping by its ID - [DELETE /mapping/{numberToMessageAppMapId}](https://context-docs.sabrhub.com/specs/contextsms-teams.external/mapping-management/deletemappingbyid.md): Delete the mapping identified by numberToMessageAppMapId. Returns 200 on success or 404 if the mapping is not found. ### Retrieve mapping by app ID - [POST /mapping/messagingAppId](https://context-docs.sabrhub.com/specs/contextsms-teams.external/mapping-management/readmappingbymessagingappid.md): Lookup and return mapping details using messagingAppId (phone, app type, mapping id, name).