đź“‘ Table of Contents
- What are MyOperator Outgoing APIs?
- What Are the Use Cases & Campaign Types?
- What are the Prerequisites for Using Outgoing APIs?
- What Parameters Are Required for the APIs?
- How Do Peer-to-Peer and IVR-Based Campaigns Work?
- How to Test the Outgoing APIs?
- Common Errors & Troubleshooting
- Frequently Asked Questions (FAQs)
1. What are MyOperator Outgoing APIs?
MyOperator provides APIs that allow businesses to automate and manage outgoing calls. These APIs support two main types of campaigns:
- Peer-to-Peer Campaigns: Allows businesses to connect an agent directly with a customer.
- IVR-Based Campaigns: Enables bulk dialing via an IVR system where calls are queued until an agent becomes available.
These calls are triggered via HTTP APIs and configured through the MyOperator Campaign Dashboard.
⬆️ Back to Top
2. What Are the Use Cases & Campaign Types?
MyOperator offers two primary campaign types for initiating outgoing calls:
- Peer-to-Peer Campaign:
- User Dial: Connects a specific agent to a specific customer.
- Anonymous Dial: Both numbers are passed directly to the API for the call connection.
- IVR-Based Campaign:
- Bulk dial customers, with calls queued until an available agent can take the call.
⬆️ Back to Top
3. What are the Prerequisites for Using Outgoing APIs?
Before using the MyOperator Outgoing APIs, ensure the following:
- MyOperator Account: Create an account at myoperator.co.
- Campaign Feature Access: Contact your account manager to enable the Campaigns feature.
- API Credentials: You will need the following for API authentication:
- x-api-key
- secret_token
- company_id
- Public IVR ID: This ID is required for IVR-based campaigns and can be retrieved from your MyOperator Campaign Dashboard.
⬆️ Back to Top
4. What Parameters Are Required for the APIs?
Here are the required parameters for the Peer-to-Peer API:
Parameter | Required | Description |
x-api-key | âś… | Header key for authentication |
secret_token | âś… | Account-specific secret |
public_ivr_id | âś… | Identifies the campaign |
company_id | âś… | Your MyOperator company ID |
region | Optional | Used for DID-based routing |
group | Optional | Select group within region for DIDs |
caller_id | Optional | Custom outbound caller ID (DID) |
⬆️ Back to Top
5. How Do Peer-to-Peer and IVR-Based Campaigns Work?
- Peer-to-Peer Campaign:
- User Dial: Uses the user_id to dial the agent and connects to the customer.
- Anonymous Dial: No user ID is needed, and both numbers are passed directly to initiate the call.
- IVR-Based Campaign:
- Bulk dials to customers and routes them through the IVR system.
- Calls are queued until an agent is available to answer.
Sample API Call for IVR-Based Campaign:
curl --request POST 'https://obd-api.myoperator.co/obd-api-v1' \--header 'x-api-key: ' \--data-raw '{ "company_id": "", "secret_token": "", "type": "2", "number": "+919876543210", "public_ivr_id": "", "reference_id": "req_002"}'
⬆️ Back to Top
6. How to Test the Outgoing APIs?
To test the outgoing APIs, follow these steps using Postman:
- Create a New Request:
- Open Postman, click “New” > “Request”, and name it (e.g., "Test Outgoing API").
- Set Up the Request:
- Method: POST
- URL: Enter the API endpoint (e.g.,
https://obd-api.myoperator.co/obd-api-v1).
- Add Request Body:
- Go to the Body tab, select raw, and set the format to JSON.
- Paste a sample payload:{ "company_id": "", "secret_token": "", "type": "2", "number": "+919876543210", "public_ivr_id": "", "reference_id": "req_001"}
- Send the Request:
- Click “Send” to test the webhook.
- Check the response to confirm the request was processed successfully.
⬆️ Back to Top
7. Common Errors & Troubleshooting
Here are some common errors and how to troubleshoot them:
- 400 Invalid Number Format: Ensure the number follows the E.164 format (e.g.,
+919876543210). - 403 Invalid API Key: Check the x-api-key in the headers for correctness.
- 403 Anonymous Feature Not Enabled: Contact MyOperator support to enable the anonymous feature.
- 403 Duplicate Reference ID: Use unique reference_ids or adjust TTL.
- 500 Company Config Missing: Verify your MyOperator account is properly configured.
⬆️ Back to Top
8. Frequently Asked Questions (FAQs)
Q1. Can I initiate an anonymous dial without specifying a user ID?
- Yes, Anonymous Dial does not require a user_id. Both numbers are passed directly to the API for the call initiation.
Q2. How do I ensure the correct routing of calls in an IVR campaign?
- Use the public_ivr_id to route calls to the appropriate department or agent. Ensure the IVR configuration is properly set up in your MyOperator Campaign Dashboard.
Q3. What should I do if the API returns a 403 error?
- A 403 error usually indicates a problem with authentication. Ensure the x-api-key and secret_token are correct. Also, verify if the anonymous feature is enabled for your account.
⬆️ Back to Top
📌 Keywords:
MyOperator, Outgoing APIs, Peer-to-Peer, IVR, API integration, call campaigns, troubleshooting, webhook, API credentials, E.164 format.