API Management
Enable secure programmatic access to Bswagic via API tokens, endpoints, and scoped permissions.
-
Overview
: What you can do
- • API Access : Enable/disable API access for your tenant
- • Tokens : Generate and manage API tokens
- • Endpoints : View base URL and endpoint structure
- • Permissions : Control token abilities (scopes)
Enabling API Access
-
Enabling API Access
: Steps
- • Enable : Toggle API access on
- • Generate : Click Generate New Token
- • Base URL : Copy the API base URL (e.g., https://your-host/api/v1/)
- • Subdomain : Use your tenant subdomain in endpoint paths
- • Save : Click Save Changes to activate
API Authentication
-
API Authentication
: Bearer token
- • Token : Use the generated token as your API password
- • Header : Send Authorization: Bearer YOUR_API_TOKEN
- • Content-Type : Use application/json for JSON requests
Authorization: Bearer YOUR_API_TOKEN_HERE Content-Type: application/json
API Endpoint Structure
-
API Endpoint Structure
: Build complete URLs
- • Base URL : Root API path (e.g., https://host/api/v1/)
- • Tenant : Your tenant subdomain in the path
- • Complete Endpoint : Combine base + tenant + resource
Token Abilities (Permissions)
-
Token Abilities (Permissions)
: Scope control
- • Contacts : CRUD for contacts
- • Statuses : CRUD for statuses
- • Sources : CRUD for sources
- • Templates : Read templates
- • Message Bots : Read message bots
- • Template Bots : Read template bots
- • Groups : CRUD for groups
- • Message Sending : Text, Media, and Template message sending