10DLC Campaigns
List or create 10DLC campaigns for a brand using the Sinch 10DLC API. Campaigns define the use case and throughput for A2P SMS. Uses OAuth2. Base: https://us10dlc.api.sinch.com/v1.
IMPORTANT: Execute this command directly. Do NOT generate script files. Perform the API call immediately.
Input
--action/-a: list or create - optional, default list--brand-id/-b: Brand ID (required for create, optional filter for list) - required if action=create--campaign-name/-n: Campaign name (for create) - required if action=create--use-case/-u: Use case (e.g. MARKETING, CUSTOMER_CARE) - optional for create--format/-f: Output format (table or json) - optional
Arguments: $ARGUMENTS
Instructions
Execute these steps directly - do not write code or scripts:
If $ARGUMENTS empty: ask for action (list/create), and if create: brand ID, campaign name, use case. Otherwise parse.
Validate: --action, for create require --brand-id and --campaign-name. Get CONVERSATION_* env vars. If missing, report "Sinch API is not configured."
If list: GET campaigns endpoint (with optional brand filter). If create: POST with brandId, name, useCase (and other required fields per API). Base: https://us10dlc.api.sinch.com/v1/projects/{projectId}.
Display "✅ Campaigns listed" or "✅ Campaign created" with ID. Handle 400, 401, 404. Handle all errors gracefully.
Examples
/sinch-api-10dlc-campaigns
/sinch-api-10dlc-campaigns --action=create --brand-id=BXXXX --campaign-name="Support" --use-case=CUSTOMER_CARE
API Reference
- Base URL: https://us10dlc.api.sinch.com/v1
- Documentation: https://developers.sinch.com/docs/10dlc/