Delete Operation
Delete Enterprise
Delete Enterprise will delete the underlying Enterprise if it doesn’t have any corresponding mapping.
Request Parameters
Parameter |
Description |
EnterpriseId |
Enterprise SID that was generated by calling create Enterprise API |
Response Body
Response Body will carry Code, corresponding message and data of Enterprise if it was successfully deleted ,HTTP response will be 200 OK.
Code |
Description |
code |
Sub-error code for response |
message |
Message describing error if error occured or success message |
data |
Enterprise data as explained in Enterprise Data Parameter |
Response Parameters
Create Enterprise API will return Error Code and corresponding HTTP Error as mentioned in Common Response Error Code. In addition below are the Error that it can return
Error Code |
HTTP Status |
Error Message |
Description |
Category |
482 |
409 |
Enterprise has mappings |
Delete Enterprise API is called for enterprise name that has Mappings associated. |
Update Enterprise |
467 |
409 |
Enterprise not found |
Enterprise is not found. |
Create Mapping, Update Mapping, Update Enterprise, Search Enterprise, Delete Enterprise |
Example:
From the bash terminal you can run the command below:
curl -X DELETE \ https://cloud.restcomm.com/messageexchange/enterprise/EN263d95d2bafa4e4a9e6a5563851cd283 \ --user ' \{your_account_SID}:\{your_account_token}' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \
If delete of Enterprise is successful, below is the response returned:
{ "code":200, { "data": { "sid": "EN263d95d2bafa4e4a9e6a5563851cd283", "dateUpdated": "2019-10-11T11:12:24+0000", "dateCreated": "2019-10-11T11:11:01+0000", "accountSid": "ACa91f3a070d55122d9ec0069b0be27758", "accountEmail": "subhahu.reddy@telestax.com", "uri": "/messageexchange/enterprise/search/EN263d95d2bafa4e4a9e6a5563851cd283", "name": "Kohl", "mappingsCount": 0 }, "code": 200, "message": "OK" }
If delete fails, below response is returned with corresponding HTTP Error Code
{ "code":482, "message":"Enterprise has mappings", “data”: { “sid":"MXEb6eb071d21124dbab20b095c25f1274f", “name” :”Kohl” } }
Delete MX Mappings
Delete MX Mapping will delete mapping between Jabber Address and SMS enabled number.
Request Parameters
Parameter |
Description |
mappingId |
Unique MX vs SMS enabled number mapping id that was generated by calling Add Mapping API |
Response Body
Response Body will carry Code, corresponding message and data of Mapping that is deleted .if it was successfully deleted, HTTP response will be 200 OK.
Code |
Description |
code |
Sub-error code for response |
message |
Message describing error if error occured or success message |
data |
Mapping data as explained in Mapping Data Parameter |
Response Parameters
Delete MX mapping API will return Error Code and corresponding HTTP Error as mentioned in Common Response Error Code
Error Code |
HTTP Status |
Error Message |
Description |
Category |
478 |
409 |
Mapping not found |
MappingId is not found for give Organisation |
Update Mapping, Delete Mapping, Search Mapping |
Example:
From the bash terminal you can run the command below:
curl -X DELETE \ https://cloud.restcomm.com/messageexchange/mappings/XM00009e272d9047dc858549485b0d0e1f \ --user ' \{your_account_SID}:\{your_account_token}' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \
If delete mapping is successful, below is the response returned:
{ "data": { "sid": "XM04f7959a96c34814ba163a4f5c8c7fc1", "dateUpdated": "2019-10-11T11:19:55+0000", "dateCreated": "2019-10-11T11:16:03+0000", "accountSid": "ACa91f3a070d55122d9ec0069b0be27758", "accountEmail": "subhahu.reddy@telestax.com", "uri": "/messageexchange/mappings/search/XM04f7959a96c34814ba163a4f5c8c7fc1", "jabberAddress": "jane.doe@yourcompany.com", "externalAddress": "157133169432", "enterpriseSid": "EN38d48bc7dea7470090c8fc809a69a620", "name": "Amit Bhayani New", "enterpriseName": "testing" }, "code": 200, "message": "OK" }
If delete of mapping fails, corresponding error code and message will be returned with HTTP Error code.
{ "errorCode": "478", "message": "Mapping not found", "data": { "sid": "XM04f7959a96c3814ba163a4f5c8c7fc1" } }
Delete Domain
Delete Domain will delete the underlying Domain
Request Parameters
Parameter |
Description |
domainId |
Domain Id that was generated by calling create Domain API |
Response Body
Response Body will carry Code, corresponding message and data of domain that is deleted.if it was successfully deleted, HTTP response will be 200 OK.
Code |
Description |
code |
Sub-error code for response |
message |
Message describing error if error occured or success message |
data |
domain data as explained in the Domain Data Parameter |
Response Parameters
Delete Domain API will return Error Code and corresponding HTTP Error as mentioned in Common Response Error Code. In addition below are the Error that it can return
Error Code |
HTTP Status |
Error Message |
Description |
Category |
474 |
409 |
Domain Id not found |
Domain is not found. |
Update Domain, Delete Domain |
483 |
409 |
Domains assigned to mappings |
Delete Domain API is called for Domain that is still used by Mappings |
Delete Domain |
Example:
From the bash terminal you can run the command below:
curl -X DELETE \ https://cloud.restcomm.com/messageexchange/domains/DO11488d772bab489d9369cae29c8a6803 \ --user ' \{your_account_SID}:\{your_account_token}' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \
If delete of Domain is successful, below is the response returned:
{ "data": { "sid": "DOe334d1141af84ae6b7e44858d1745609", "dateUpdated": "2019-10-11T11:28:17+0000", "dateCreated": "2019-10-11T11:25:16+0000", "accountSid": "ACa91f3a070d55122d9ec0069b0be27758", "accountEmail": "subhahu.reddy@telestax.com", "uri": "/messageexchange/domains/search/DOe334d1141af84ae6b7e44858d1745609", "name": "mycompanynew.com", "certificate": " -----BEGIN CERTIFICATE----------END CERTIFICATE-----", "mappingsCount": 0 }, "code": 200, "message": "OK" }
If deletion of domain fails, below is the response returned. Exact error code and message will depend on error occurred
{ "errorCode": "474", "message": "Domain Id not found", "data": { "sid": "DOe334d1141af4ae6b7e44858d1745609" } }
Request Parameters
Parameter |
Description |
whitelistId |
Whitelist Id that was generated by calling create Whitelist IP API |
Response Body
Response Body will carry Code, corresponding message and data of Whitelist IP if it was successfully deleted. HTTP response will be 200 OK.
Code |
Description |
code |
Sub-error code for response |
message |
Message describing error if error occured or success message |
data |
Whitelist IP data as explained in IP Whitelist Data Parameter |
Response Parameters
Delete Whitelist IP API will return Error Code and corresponding HTTP Error as mentioned in Common Response Error Code. In addition below are the Error that it can return
Error Code |
HTTP Status |
Error Message |
Description |
Category |
475 |
400 |
Whitelist Id not found |
API is called passing Whitelist IP Id that is not present in system |
Update Whitelist IP, Delete Whitelist IP |
Example
From the bash terminal you can run the command below:
curl -X DELETE \ https://cloud.restcomm.com/messageexchange/whitelist/WL9fc6143123d048579f7d5b5d76572e1d \ --user ' \{your_account_SID}:\{your_account_token}' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \
If delete of Whitelist IP is successful, below is the response returned:
{ "data": { "sid": "WL98fbe024c1c34794a4034646db503627", "dateUpdated": "2019-10-11T11:07:16+0000", "dateCreated": "2019-10-11T11:06:35+0000", "accountSid": "ACa91f3a070d55122d9ec0069b0be27758", "accountEmail": "subhahu.reddy@telestax.com", "uri": "/messageexchange/whitelist/search/WL98fbe024c1c34794a4034646db503627", "ipAddress": "4.3.2.1" }, "code": 200, "message": "OK" }
If delete of whitelist IP fails, below is the response returned. Exact error code and message will depend on error occurred
{ "errorCode": "474", "message": "Domain Id not found", "data": { "sid": "DOe334d1141af4ae6be44858d1745609" } }