Antbuddy.us
  • AntBuddy Inc Documents
    • Guide to Register and Payment
      • Register and Login
        • 1. Register
        • 2. Log in
      • Payment
    • AntCrm Customer Management
      • Settings
        • Create users
        • Create group
        • Invite users to the company
        • View permissions
        • Activity permissions
        • What is Ticket? How to create Ticket?
      • Conversation
        • Omni Facebook user guide
          • 1. Facebook integration
          • 2. Setting Up Facebook Fan page
          • 3. Message Management
            • 3.1. Sending Message
            • 3.2. Viewing Conversation History
          • 4. Comment Management
            • 4.1. Customer Support Commenting
            • 4.2. Hiding comments
            • 4.3. Editing comments
            • 4.4. Delete Comments
            • 4.5. Liking/Unliking Comments
          • 5. Post Management
          • 6. Changing the Session Owner
          • 7. Adding support user
          • 8. Tagging session
          • 9. Sending images
          • 10. Marking done
          • 11. Adding message template
            • 11.1. Add/Edit/Delete templates
            • 11.2. Using message template
          • 12. Setting Up Session Timeout
          • 13. Configuring the Timeout
          • 14. Setting Up Auto-Reply and Sending Messages
          • 15. Setting Up Response Time and Pre-Expiration Warnings
          • 16. Customer operations
          • 17. Marking unread
          • 18. Setting up Omnichannel chat Categories
          • 19. Configuring layout
        • Instagram use guide
          • 1. Instagram integration
          • 2. Using Instagram Omni conversations
            • 2.1 Guide to setting up Instagram on AntCRM
              • 2.1.1 Adding support
              • 2.1.2 Assignment configuration
              • 2.1.3 Interactive Configuration
          • 3. Manage chat with customers
            • 3.1 Send message to customer
            • 3.2 View session history
          • 4. Comment Manager
            • 4.1 Hide comment
            • 4.2 Delete comment
          • 5. Change the person assign to session
          • 6. Adding user support
          • 7. Tags for session
          • 8. Send image
          • 9. Mark as done
          • 10. Adding message template
            • 10.1 Add/Edit/Delete template
            • 10.2 Using messenger template
          • 11. Setting up session timeout)
          • 12. Setting Up Response Time and Pre-Expiration Warnings
        • Whatsapp use guide
          • 1. Integrate whatsapp on CRM
          • 2. Setting whatsapp on CRM
            • 2.1 Adding user support
            • 2.2 Setting close session
            • 2.3 ssignment Configuration
            • 2.4 Interaction Configuration
          • 3. Managing Chats with Whatsapp Customers
            • 3.1 Send message
            • 3.2 Viewing Conversation History
            • 3.3 Changing the Session's Assigned Agent
          • 4. Adding a Support User
          • 5. Tagging a Session
          • 6. Sending image
          • 7. Marking a Session as Completed
          • 8. Adding, Edit and Delete omni message template
          • 9. Session Closure Time
          • 10. Configuring the wait time
          • 11. Setting response Time and Pre-expiration Alerts
          • 12. Creating Whatsapp SMS campaign
          • 13. Sending Whatsapp SMS Campaign
          • 14. Sending the Product Carousel
          • 15. Cross-Channel Campaign Guide
          • 16. Create WhatsApp Template via Meta Business Suite
          • 17. Run Template in AntCRM platform
        • Shopee use guide
        • Live chat use guide
        • Lazada use guide
      • Report
        • View Omnichannel conversation report
      • Customer Experience Management
        • 1. Customer survey setting
          • 1.1 Conversations
          • 1.2 Call Center
          • 1.3 Rating criteria setting
          • 1.4 Setting landing page
        • 2. How to use the Agent interface
        • 3. Satisfaction Report
    • WhatsApp User Guide
      • Guide to Setting Up WhatsApp on AntCRM
      • Guide to Managing Chats with Whatsapp Customers
      • How to Add and Use Omni Message Templates?
      • Guide to Setting Session
      • Guide to Creating and sending Whatsapp SMS campaign
      • Guide to Sending the Product Carousel
      • Cross-Channel Campaign Guide
      • Guide to sending Product Sample Messages on WhatsApp (Product Catalog)
    • User manual for AntBot ChatBot
      • Integrate Omni-channel messaging with Chatbot AntBot
      • The basic features of AntBot Chatbot
      • Use Cases of AntBot Chatbot
      • Detailed explanation of the Chatbot node
      • How to create a google cloud bot
  • Integration Document Guide
    • AntRing
      • API Registration
      • Use API
      • API List
      • Error Code
    • AntBot
      • AntBot API
      • Voice OTP
      • HTTP Response
    • AntCrm
      • ApiRing AntCrm apis description
Powered by GitBook
On this page
  1. Integration Document Guide
  2. AntBot

AntBot API

PreviousAntBotNextVoice OTP

Last updated 3 months ago

Ant BOT API Integration and Usage from Third-Party Applications

Purpose

  • Allows the use of Alice from third-party applications. It is a mandatory requirement that Alice is registered and has a trial period through AntBuddy onboarding.

  • Allows running campaigns from third-party applications.

  • Creates alarms for a contact (appointments).

API Details

All API requests to the Alice system:

  • Endpoint:

Authorization Header (required):

  • Authorization: Bearer {access token}

Get Access Token

  • Endpoint: /get-token/

  • Method: POST

  • Body:

jsonCopyEdit{
  "username": "username",
  "password": "password"
}
  • Description:

    • Username: The username or email created on AntBuddy.

    • Password: The password.

Campaigns

Check existing campaigns

  • Survey Template: /rest-api/campaigns/

  • Method: GET

  • Params:

jsonCopyEdit{
  "name": "NESHB",
  "phonebook": "732",
  "status": "1"
}
  • Description:

    • name: Search by name.

    • phonebook: Search by phonebook.

    • status: Search by campaign status. 1: Started 2: Waiting 3: Paused 4: Ended 5: Completed

Configure call flow for campaigns

Survey Create Survey Template

  • Endpoint: /rest-api/survey-template/

  • Method: POST

  • Body:

jsonCopyEdit{
  "name": "Survey Name",
  "tts_language": "vi",
  "description": "anything"
}
  • Description:

    • name: The name of the survey template.

    • tts_language: The language of the survey template. vi: Vietnamese en: English

    • description: Description of the survey template.

Check existing survey templates

  • Survey Template: /rest-api/survey-template/

  • Method: GET

  • Params:

jsonCopyEdit{
  "search": "template name",
  "description": "description",
  "is_onboarding": "true",
  "user": "203"
}
  • Description:

    • search: Search by name.

    • description: Search by description.

    • is_onboarding: (Not specified in the document, but could refer to whether it's part of the onboarding process)

    • user: Search by user ID.

Create Section Template

  • Endpoint: /rest-api/section-template/

  • Method: POST

  • Body:

jsonCopyEdit{
  "type": 1,
  "survey": "survey ID",
  "question": "Section Name",
  "script": "IVR Content"
}

Update Section

  • Endpoint: /rest-api/section-template/{id}/

  • Method: PUT

  • Body:

jsonCopyEdit{
  "script": "Please wait a moment."
}

Phonebook & Contact

Check existing phonebook

  • Phonebook: /rest-api/phonebook/{id}

  • Method: GET

  • Params:

jsonCopyEdit{
  "search": "name"
}
  • Description:

    • search: Search by phonebook name.

Check existing contact

  • Contact: /rest-api/contact/{id}

  • Method: GET

  • Params:

jsonCopyEdit{
  "phonebook": "732",
  "search": "0934523423"
}
  • Description:

    • phonebook: Search by phonebook ID.

    • search: Search by phone number or name.

Create Phonebook

  • Create Phonebook: /rest-api/phonebook/

  • Method: POST

  • Body:

jsonCopyEdit{
  "name": "Phonebook Name",
  "description": "Phonebook Description" (optional)
}
  • Description:

    • name: The name of the phonebook.

    • description: The description of the phonebook (optional).

Update Phonebook

  • Update Phonebook: /rest-api/phonebook/{id}/

  • Method: PUT

  • Body:

jsonCopyEdit{
  "name": "Changed Name",
  "description": "Updated Description"
}
  • Description:

    • name: Change the name of the phonebook.

    • description: Change the description of the phonebook.

Create Contact

  • Create single contact

    • Create: /rest-api/contact/

    • Method: POST

    • Body:

      jsonCopyEdit{
        "phonebook": {phonebook_id} (required),
        "contact": "0934890883" (required),
        "email": "linh.huynh@htklabs.com" (optional),
        "last_name": "Huynh" (optional),
        "first_name": "Linh" (optional),
        "description": "ABC customer" (optional),
        "status": 1 or 0 (1: active, 0: inactive) (required),
        "additional_vars": "{\"params_1\":\"123456\",\"params_2\":\"123456\"}" (optional)
      }
  • Update contact based on ID

    • Update: /rest-api/contact/{id}/

    • Method: PUT

    • Body:

      jsonCopyEdit{
        "contact": "0934890884",
        "status": 1,
        "country": "VN",
        "first_name": "A",
        "last_name": "B"
      }
  • Create multiple contacts

    • Endpoint: /rest-api/bulkcontact/

    • Method: POST

    • Body:

      jsonCopyEdit{
        "phonebook": 293,
        "contacts": [
          {
            "contact": "0934890883",
            "email": "linh.huynh@htklabs.com",
            "last_name": "Huynh",
            "first_name": "Linh",
            "status": 1
          },
          {
            "contact": "0934890881",
            "email": "linh.huynh@htklabs.com",
            "last_name": "Huynh",
            "first_name": "Linh",
            "status": 1
          }
        ]
      }

Create Call Campaign

  • Check available gateways

    • Gateway List: /rest-api/gateway/

    • Method: GET

    • Response:

      jsonCopyEdit{
        "results": [
          {
            "id": 23,
            "name": "AliceDevGateway",
            "status": 1,
            "description": "AliceDevGateway",
            "addprefix": "",
            "removeprefix": "",
            "gateways": "sofia/gateway/AliceDevGateway/",
            "subdomain": "company",
            "gateway_codecs": "",
            "gateway_timeouts": "10",
            "gateway_retries": "",
            "originate_dial_string": "",
            "secondused": null,
            "created_date": "2019-12-26T04:17:12.673711Z",
            "updated_date": "2020-01-14T03:12:27.079710Z",
            "addparameter": "",
            "count_call": 0,
            "count_in_use": null,
            "maximum_call": null,
            "is_trial": true,
            "failover": null
          }
        ]
      }
  • Create Campaign

    • Endpoint: /rest-api/campaigns/

    • Method: POST

    • Body Example:

      jsonCopyEdit{
        "name": "rest-api-cp-2",
        "description": "rest api for campaign",
        "callerid": "lh",
        "phonebook": [
          293
        ],
        "aleg_gateway": 23,
        "object_id": 351,
        "frequency": 10,
        "startingdate": "2020-02-11T02:36:39.045000Z",
        "expirationdate": "2020-02-12T02:36:39.045000Z",
        "daily_start_time": "08:00:00",
        "daily_stop_time": "21:00:00"
      }
    • Description:

      • name: required

      • description: rest API for campaign (optional)

      • callerid: caller name when calling out (optional)

      • phonebook: phone book IDs list (required)

      • aleg_gateway: gateway dial-out (required)

      • object_id: survey template application (required)

      • frequency: calls per minute (required)

      • startingdate: starting date for the campaign (required)

      • expirationdate: stopping date for the campaign (required)

      • daily_start_time: daily start time (required)

      • daily_stop_time: daily stop time (required)


Update Call Campaign

  • Update Campaign

    • Endpoint: /rest-api/campaigns/{id}/

    • Method: PUT

    • Body:

      jsonCopyEdit{
        "name": "rest-api-cp-2",
        "description": "rest API for campaign",
        "callerid": "rest_api",
        "phonebook": [
          293
        ],
        "frequency": 3,
        "startingdate": "2020-02-11T02:36:39.045000Z",
        "expirationdate": "2020-02-12T02:36:39.045000Z",
        "daily_start_time": "09:00:00",
        "daily_stop_time": "18:00:00"
      }
      

Change Status of Call Campaign

  • Endpoint: /rest-api/campaigns/{id}/status/

  • Method: POST

  • Body:

    jsonCopyEdit{
      "status": 1
    }
  • Description:

    • START = 1

    • PAUSE = 2

    • ABORT = 3

    • END = 4


Delete Call Campaign

  • Endpoint: /rest-api/campaigns/{id}

  • Method: DELETE


Appointment

Survey List

  • Check the list of surveys

    • Endpoint: /rest-api/survey-list/

    • Method: GET

    • Params:

      jsonCopyEdit{
        "search": "test",
        "tts_language": "vi",
        "description": "Test",
        "campaign": 1243
      }
  • Description:

    • search: Search by name

    • tts_language: Search by language

      • vi: Vietnamese

      • en: English

    • description: Search by description

    • campaign: Search by campaign ID

DNC (Do Not Call)

  • Check DNC List

    • Endpoint: /rest-api/dnc-list/

    • Method: GET

  • Check DNC Contact

    • Endpoint: /rest-api/dnc-contact/

    • Method: GET

  • Add to DNC List

    • Endpoint: /rest-api/dnc-list/

    • Method: POST

    • Body:

      jsonCopyEdit{
        "name": "name dnc",
        "description": "test"
      }
  • Description:

    • name: DNC name

    • description: Description

  • Add to DNC Contact

    • Endpoint: /rest-api/dnc-contact/

    • Method: POST

    • Body:

      jsonCopyEdit{
        "phone_number": "0324324343",
        "dnc": "343"
      }
  • Description:

    • phone_number: Phone number

    • dnc: DNC list ID

Report

  • Check Report

    • Endpoint: /rest-api/cdr/

    • Method: GET

    • Params:

      jsonCopyEdit{
        "callid": "res232-fsf3-sfdsf",
        "callerid": "admin",
        "phone_number": "094343434",
        "from_date": "2023-04-06T10:52:56.162517Z",
        "to_date": "2023-03-28T08:05:07.495988Z",
        "duration": 34,
        "billsec": 3,
        "disposition": "FAILED",
        "hangup_cause": "UNALLOCATED_NUMBER",
        "sip_term_status": 404,
        "sip_term_cause": 2,
        "endpoint_disposition": "ANSWER",
        "campaign": 23,
        "alarm": false,
        "otp": true
      }
  • Description:

    • callid: Call ID

    • callerid: Caller ID

    • phone_number: Phone number

    • from_date: Start time

    • to_date: End time

    • duration: Call duration

    • billsec:

    • disposition:

    • hangup_cause: Reason for call termination

    • sip_term_status:

    • sip_term_cause:

    • endpoint_disposition:

    • campaign: Campaign ID

    • alarm: Reminder calls

      • true: Reminder calls

      • false: Non-reminder calls

    • otp: OTP calls

      • true: OTP calls

      • false: Non-OTP calls


Subscribers

  • View campaign members

    • Get Subscribers: /rest-api/subscriber-list/

    • Method: GET

    • Params:

      jsonCopyEdit{
        "campaign": 2323,
        "contact": "094344334",
        "status": 2,
        "duration": 43,
        "billsec": 23
      }
  • Description:

    • campaign: Campaign ID

    • contact: Phone number

    • status: Status

    • duration: Call duration

    • billsec:


Calendar

Set up Calendar

  • Endpoint: /rest-api/calendar-setting/

  • Method: POST

  • Body:

    jsonCopyEdit{
      "label": "rest-api-cp-2",
      "callerid": "mantest_calendarsettings",
      "caller_name": "",
      "call_timeout": 60,
      "survey": 953,
      "aleg_gateway": 23
    }
  • Description:

    • label: Name (required)

    • callerid: Caller display (optional)

    • caller_name: Caller name (optional)

    • call_timeout: Timeout duration in seconds (required)

    • survey: Survey ID (required) - Get from Survey List API

    • aleg_gateway: Outbound gateway (required) - Get from Gateway List API

Calendar User

  • Endpoint: /rest-api/calendar-user/

  • Method: POST

  • Body:

    jsonCopyEdit{
      "username": "cal-rest-user-resp2",
      "password": "12345678",  // required
      "calendar_setting": 4   // required
    }
  • Description:

    • username: User login (required)

    • calendar_setting: Calendar setting, Get from calendar-setting API

Create Calendar

  • Endpoint: /rest-api/calendar/

  • Method: POST

  • Body:

    jsonCopyEdit{
      "name": "linh-calendar-rest",
      "user": 5  // required
    }
  • Description:

    • name: required

    • user: Calendar User List, Get from calendar-user API

Create Event

  • Endpoint: /rest-api/event/

  • Method: POST

  • Body:

    jsonCopyEdit{
      "title": "today-linhhv",
      "description": "",
      "start": "2020-02-15T09:30:39.177000Z",
      "end": "2020-02-15T10:13:39.177000Z",
      "creator": 115,
      "calendar": 7
    }
  • Description:

    • title: Event title (required)

    • start: Start time (required)

    • end: End time (required)

    • creator: Calendar user assigned to it, get from calendar-user API

    • calendar: Calendar assigned to the event, get from calendar API

Create Alarm

  • Endpoint: /rest-api/alarm/

  • Method: POST

  • Body:

    jsonCopyEdit{
      "alarm_phonenumber": "0934890883",
      "date_start_notice": "2020-02-12T02:49:33.572Z",
      "phonenumber_transfer": "",
      "event": 8
    }
  • Description:

    • alarm_phonenumber: Call to number (required)

    • date_start_notice: Starting date for alarm (optional - default is current time)

    • phonenumber_transfer: Transfer phone number (optional)

    • event: Related event (required), event list from event API, method GET

https://alice.antbuddy.com/rest-api