# ContextSMS Webex Bot API # Overview **Build powerful customer-facing Webex integrations with enterprise messaging capabilities.** ## Key Features - **Enterprise Authentication** - Secure Bearer token authentication - **Enterprise Management** - Create and manage customer organizations - **Phone Number Mapping** - Link phone numbers to Webex identities - **Real-time Webhooks** - Instant message event notifications - **Multi-environment** - Separate development and production environments ## Quick Integration Flow 1. **Authenticate** → Get your Bearer token via login 2. **Create Enterprise** → Set up customer organization with CSP ID 3. **Add Mapping** → Link phone number to Webex identity 4. **Handle Events** → Process incoming webhook notifications ## Base URLs - **Production**: `https://webex-backend.sabrhub.com/v1` - **Authentication**: `https://usermanagement.sabrhub.com/v1` **Note:** Parameters marked with * are required. Version: 1.0.0 License: MIT ## Servers Production Environment (live) ``` https://context-webex.sabrhub.com/api/v1 ``` Authentication Server (production) ``` https://usermanagement.sabrhub.com/v1 ``` ## Security ### BearerAuth Use Bearer token authentication for all requests. **How to get your API token:** 1. Contact Sabrhub Support at support@sabrhub.com 2. Provide your use case and integration requirements 3. Receive your API token securely 4. Include in requests: `Authorization: Bearer YOUR_TOKEN` **Important Security Notes:** - Never expose tokens in client-side code - Store tokens securely in environment variables - Tokens expire - implement refresh logic Type: http Scheme: bearer Bearer Format: JWT ## Download OpenAPI description [ContextSMS Webex Bot API](https://context-docs.sabrhub.com/_bundle/specs/contextsms-webex.external.yaml) ## Authentication Endpoints for user login and token management to securely access the API. ### Authenticate user and return access and refresh tokens - [POST /auth/login](https://context-docs.sabrhub.com/specs/contextsms-webex.external/authentication/loginuser.md): Authenticate user with credentials and return an accessToken (JWT), refreshToken, and user info on success. ### Exchange refresh token and return a new access token - [POST /auth/getaccesstoken](https://context-docs.sabrhub.com/specs/contextsms-webex.external/authentication/getaccesstoken.md): Use the provided refreshToken to obtain a new accessToken. Returns accessToken, refreshToken and expiration details. ## Enterprise Management APIs for creating, retrieving, and deleting enterprises. ### Create a new enterprise for a given CSP and return details - [POST /enterprise/{cspId}](https://context-docs.sabrhub.com/specs/contextsms-webex.external/enterprise-management/createenterprise.md): Create a new enterprise record under the specified CSP. Returns the created enterprise object. ### Read Single Enterprise - [GET /enterprise/getenterprise/{enterpriseId}](https://context-docs.sabrhub.com/specs/contextsms-webex.external/enterprise-management/getenterprisebyid.md): Retrieve enterprise details by enterpriseId. Returns enterprise object or 404. ### List enterprises for a specified CSP (supports pagination). - [GET /csp/enterprises/{cspId}](https://context-docs.sabrhub.com/specs/contextsms-webex.external/enterprise-management/listenterprisesbycsp.md): List enterprises for a specified CSP with pagination support ### Delete an enterprise by ID and return operation result - [DELETE /enterprise/deleteenterprise/{enterpriseId}](https://context-docs.sabrhub.com/specs/contextsms-webex.external/enterprise-management/deleteenterprise.md): Delete the enterprise identified by enterpriseId. Returns 204 on success or 404 if not found. ## Mapping Management APIs for creating, retrieving and deleting number-to-message-app mappings. ### Create mapping for enterprise and return created mapping - [POST /mapping/add/{enterpriseId}](https://context-docs.sabrhub.com/specs/contextsms-webex.external/mapping-management/addmapping.md): Create a mapping record associated with enterpriseId. Returns the newly created mapping. ### Retrieve mappings for a specific CSP with optional filters - [GET /mappings/csp/{cspId}](https://context-docs.sabrhub.com/specs/contextsms-webex.external/mapping-management/getmappingsbycsp.md): Return all mapping records associated with the specified CSP (cspId). Supports pagination and optional filters such as page, size and status. ### Retrieve mappings for a specific enterprise with optional filters - [GET /mappings/enterprise/{enterpriseId}](https://context-docs.sabrhub.com/specs/contextsms-webex.external/mapping-management/getmappingsbyenterprise.md): Return all mapping records associated with the given enterprise (enterpriseId). ### Delete mapping by mappingId and return operation status - [DELETE /mapping/{mappingId}](https://context-docs.sabrhub.com/specs/contextsms-webex.external/mapping-management/deletemapping.md): Delete mapping identified by mappingId. Returns 204 on success or 404 if not found. ## CSP-User-Management Operations for creating, removing, and managing CSP users in ContextSMS. ### Create a new CSP user and return the created user profile - [POST /users/create](https://context-docs.sabrhub.com/specs/contextsms-webex.external/csp-user-management/createcspuser.md): Create a new CSP user using provided payload. Returns the created user object on success.