×

Add users under specific applications; users who can use the calling facility.

POST

https:/<sub_domain>/v2/integrations/usermapping

  • Replace <subdomain> with the region of your account
    1. <subdomain> of Singapore cluster is @api.exotel.com

You can use our official postman collection to try out the APIs.

 

The following are the POST parameters:

Header:

Parameter

Type

Required

Description

Authorization

String

Yes

Token provided by https://integrationscore.mum1.exotel.com/v2/integrations/token

entity=app

 

Body:

List of users

Parameter

Type

Required

Description

AppUserId

string

Yes

ID of the application user

AppUsername

string

Yes

Name of the application user

'FirstName LastName', both length should be grater than 3.

Email

string

Yes

Email of the application user

ExotelAccountSid

string

Yes

Account Sid of the Exotel Account

ExotelUserName

string

Yes

Name of the application user

'FirstName LastName', both length should be grater than 3.

AgentNumber

string

Yes

Agent Number of the Exotel Account User

VirtualNumber

string

Yes

Virtual Number associated with the Exotel Account

 

curl --location --request POST 'https://integrationscore.us3.qaexotel.com/v2/integrations/usermapping' \
--header 'Authorization: {{AuthCode}}' \
--header 'Content-Type: application/json' \
--data-raw '[
   {
       "AppUserId": "123",
       "AppUsername": "ABC",
       "Email": "xyz@exotel.in",
       "ExotelAccountSid": {{ExotelAccountSid}},
       "ExotelUserName": "ABC XYZ",
       "AgentNumber": "956190****",
       "VirtualNumber": "0113512****"
   } 
{
    "RequestId": "5002f634-05d9-45b9-9faf-431f980a25d5",
    "Status": "Success",
    "Code": 200,
    "Error": "",
    "Data": [
        {
            "CustomerId": "99fa98a1-2ce0-457c-9371-0d3a01eb6ef0",
            "AppID": "2e6440ed-ff62-49d7-bb00-5494b313a863",
            "AppUserId": "1",
            "ExotelAccountSid": "exoteldemo",
            "ExotelUserId": "fasdfdsf",
            "AppUsername": "user1 name",
            "ExotelUserName": "Temp Name",
            "AgentNumber": "9234567890",
            "ActiveDeviceId": "",
            "PhoneDeviceID": "057",
            "SipDeviceID": "9012",
            "VirtualNumber": "9876543210"
            "Email": "user@example.com",
            "OutboundActive": false,
            "Role": "admin",
            "SipId": "sip:a4343j",
            "SipSecret": "werewrweff",
            "IsActive": true,
            "UserDetail": null,
            "CreatedAt": "0001-01-01T00:00:00Z",
            "UpdatedAt": "0001-01-01T00:00:00Z"
        },
        {
            "CustomerId": "99fa98a1-2ce0-457c-9371-0d3a01eb6ef0",
            "AppID": "2e6440ed-ff62-49d7-bb00-5494b313a863",
            "AppUserId": "2",
            "ExotelAccountSid": "exoteldemo",
            "ExotelUserId": "fasdfdsf",
            "AppUsername": "user2 name",
            "ExotelUserName": "Temp Name",
            "AgentNumber": "9234567890",
            "ActiveDeviceId": "",
            "PhoneDeviceID": "057",
            "SipDeviceID": "9012",
            "VirtualNumber": "9876543210"
            "Email": "user@example.com",
            "OutboundActive": false,
            "Role": "admin",
            "SipId": "sip:a4343j",
            "SipSecret": "werewrweff",
            "IsActive": true,
            "UserDetail": null,
            "CreatedAt": "0001-01-01T00:00:00Z",
            "UpdatedAt": "0001-01-01T00:00:00Z"
        }
    ]
}

Status Codes

 

Status codes are as follows - 

Status Code

Description

200

App users added successfully.

401

Unauthorized. Check the entity id and secret.

400

Invalid parameters.

500

Internal server error. There was an issue adding users.

 

 

 

Get User details

Get specific user.

GET

https:/<sub_domain>/v2/integrations/usermapping

  • Replace <subdomain> with the region of your account
    1. <subdomain> of Singapore cluster is @api.exotel.com

You can use our official postman collection to try out the APIs.

 

The following are the parameters:

Header:

Parameter

Type

Required

Description

Authorization

String

Yes

Token provided by https://integrationscore.mum1.exotel.com/v2/integrations/token

entity=app

 

Query params:

Parameter

Type

Required

Description

user_id

String

Yes

User Id

 

curl --location -g --request GET 'https://integrationscore.us3.qaexotel.com/v2/integrations/usermapping?user_id={{userId}}' \
--header 'Authorization: {{AuthCode}}'
{
    "RequestId": "5002f634-05d9-45b9-9faf-431f980a25d5",
    "Status": "Success",
    "Code": 200,
    "Error": "",
    "Data": {
            "CustomerId": "99fa98a1-2ce0-457c-9371-0d3a01eb6ef0",
            "AppID": "2e6440ed-ff62-49d7-bb00-5494b313a863",
            "AppUserId": "1",
            "ExotelAccountSid": "ACXXXXXXXXXXX",
            "ExotelUserId": "fasdfdsf",
            ""AppUsername": "example user",
            "ExotelUserName": "Temp Name",
            "AgentNumber": "1234567890",
            "ActiveDeviceId": "",
            "PhoneDeviceID": "057",
            "SipDeviceID": "9012",
            "VirtualNumber": "9876543210"
            "Email": "user@example.com",
            "OutboundActive": false,
            "Role": "admin",
            "SipId": "sip:a4343j",
            "SipSecret": "*****",
            "IsActive": true,
            "UserDetail": null,
            "CreatedAt": "0001-01-01T00:00:00Z",
            "UpdatedAt": "0001-01-01T00:00:00Z"
        }
}

Status Codes

Status codes are as follows - 

Status Code

Description

200

App users get successfully.

401

Unauthorized. Check the entity id and secret.

400

Invalid parameters.

500

Internal server error. There was an issue getting users.

 

 

Delete users under applications

Delete all users under application

DELETE

https:/<sub_domain>/v2/integrations/usermapping

  • Replace <subdomain> with the region of your account
    1. <subdomain> of Singapore cluster is @api.exotel.com

You can use our official postman collection to try out the APIs.

 

The following are the parameters:

Header:

Parameter

Type

Required

Description

Authorization

String

Yes

Token provided by https://integrationscore.mum1.exotel.com/v2/integrations/token

entity=app

 

curl --location --request DELETE 'https://integrationscore.us3.qaexotel.com/v2/integrations/usermapping' \
--header 'Authorization: {{AuthCode}}'
{
    "RequestId": "5002f634-05d9-45b9-9faf-431f980a25d5",
    "Status": "Success",
    "Code": 200,
    "Error": "",
    "Data": "Deleted Successfuly"
}

Status Codes

Status codes are as follows - 

Status Code

Description

200

App users deleted successfully.

401

Unauthorized. Check the entity id and secret.

400

Invalid parameters.

500

Internal server error. There was an issue deleting users.

 

 

Get users detail with pagination

Get specific users under application using pagination.

GET

https:/<sub_domain>/v2/integrations/usermapping

  • Replace <subdomain> with the region of your account
    1. <subdomain> of Singapore cluster is @api.exotel.com

You can use our official postman collection to try out the APIs.

 

The following are the parameters:

Header:

Parameter

Type

Required

Description

Authorization

String

Yes

Token provided by https://integrationscore.mum1.exotel.com/v2/integrations/token

entity=app

 

Query params:

Parameter

Type

Required

Description

last_value

integer

Optional

It required for next page value, gather from previous page.

Default value: 0

page_size

integer

Optional

Default size 20.

 

curl --location -g --request GET 'https://integrationscore.us3.qaexotel.com/v2/integrations/usermapping?last_value={{optional}}&page_size={{optional}}' \
--header 'Authorization: {{AuthCode}}'
{
    "RequestId": "875cf137-90f9-4ed2-93ef-6be226d0af85",
    "Status": "Success",
    "Code": 200,
    "Error": "",
    "Data": {
        "Users": [
                {
            "CustomerId": "99fa98a1-2ce0-457c-9371-0d3a01eb6ef0",
            "AppID": "2e6440ed-ff62-49d7-bb00-5494b313a863",
            "AppUserId": "1",
            "ExotelAccountSid": "abc",
            "ExotelUserId": "fasdfdsf",
            "AppUsername": "Temp Name",
            "ExotelUserName": "Temp Name",
            "AgentNumber": "+0000000000",
            "ActiveDeviceId": "",
            "PhoneDeviceID": "057",
            "SipDeviceID": "9012",
            "VirtualNumber": "01135124165",
            "Email": "temp.user@company.in",
            "OutboundActive": false,
            "Role": "admin",
            "SipId": "sip:a4343j",
            "SipSecret": "b*5#TGC$2!r&s#X2H1Rt",
            "IsActive": true,
            "UserDetail": null,
            "CreatedAt": "0001-01-01T00:00:00Z",
            "UpdatedAt": "0001-01-01T00:00:00Z"
        },
        {
                ....
        },
               ....
        ],
        "PageSize": 20,
        "LastEvaluatedValue": "21"
    }
}

Status Codes

Status codes are as follows - 

Status Code

Description

200

App users get successfully.

401

Unauthorized. Check the entity id and secret.

400

Invalid parameters.

500

Internal server error. There was an issue getting users.

 

 

Update device

It allows agents to turn off phones or sip devices to not receive any new calls. It also allows you to toggle between both sip and phone device.

PUT

https:/<sub_domain>/v2/integrations/device

  • Replace <subdomain> with the region of your account
    1. <subdomain> of Singapore cluster is @api.exotel.com

You can use our official postman collection to try out the APIs.

 

The following are the parameters:

Header:

Parameter

Type

Required

Description

Authorization

String

Yes

Token provided by https://integrationscore.mum1.exotel.com/v2/integrations/token

entity=app

 

Body:

Parameter

Type

Required

Description

UserId

String

Required

UserId

DeviceName

String

Optional

Device name required while turning on device.

phone: turn on phone to receive call on phone.

sip: receive call on web.

DeviceStatus

boolean

Optional

true, false

 

curl --location --request PUT 'https://integrationscore.us3.qaexotel.com/v2/integrations/device' \
--header 'Authorization: {{AuthCode}}' \
--header 'Content-Type: application/json' \
--data-raw '{
   "UserId": "1",
   "DeviceName": "phone",
   "DeviceStatus": true
}'
{
    "RequestId": "ebf58ac4-fea1-4cd3-bf88-ffae7b8539a4",
    "Status": "Success",
    "Code": 200,
    "Error": "",
    "Data":         {
            "CustomerId": "99fa98a1-2ce0-457c-9371-0d3a01eb6ef0",
            "AppID": "2e6440ed-ff62-49d7-bb00-5494b313a863",
            "AppUserId": "1",
            "ExotelAccountSid": "abc",
            "ExotelUserId": "fasdfdsf",
            "AppUsername": "Temp Name",
            "ExotelUserName": "Temp Name",
            "AgentNumber": "+0000000000",
            "ActiveDeviceId": "",
            "PhoneDeviceID": "057",
            "SipDeviceID": "9012",
            "VirtualNumber": "01135124165",
            "Email": "temp.user@company.in",
            "OutboundActive": false,
            "Role": "admin",
            "SipId": "sip:a4343j",
            "SipSecret": "b*5#TGC$2!r&s#X2H1Rt",
            "IsActive": true,
            "UserDetail": null,
            "CreatedAt": "0001-01-01T00:00:00Z",
            "UpdatedAt": "0001-01-01T00:00:00Z"
        }
}

Status Codes

Status codes are as follows - 

Status Code

Description

200

App users get successfully.

401

Unauthorized. Check the entity id and secret.

400

Invalid parameters.

500

Internal server error. There was an issue getting users.