Delete Connected Account
delete
https://api2.ourpass.co/v1/business/subaccounts/:subAccountId
Deleting a connected account
cURL
Node.js
PHP
Ruby
Python
1
curl --location --request DELETE 'https://user-api2-staging.ourpass.co/v1/business/subaccounts/1303' \
2
--header 'apiKey: {{apikey}}' \
3
--data-raw ''
Copied!
1
var axios = require('axios');
2
var data = '';
3
4
var config = {
5
method: 'delete',
6
url: 'https://api2.ourpass.co/v1/business/subaccounts/1303',
7
headers: {
8
'apiKey': '{{apikey}}'
9
},
10
data : data
11
};
12
13
axios(config)
14
.then(function (response) {
15
console.log(JSON.stringify(response.data));
16
})
17
.catch(function (error) {
18
console.log(error);
19
});
20
Copied!
1
<?php
2
require_once 'HTTP/Request2.php';
3
$request = new HTTP_Request2();
4
$request->setUrl('https://api2.ourpass.co/v1/business/subaccounts/1303');
5
$request->setMethod(HTTP_Request2::METHOD_DELETE);
6
$request->setConfig(array(
7
'follow_redirects' => TRUE
8
));
9
$request->setHeader(array(
10
'apiKey' => '{{apikey}}'
11
));
12
$request->setBody('');
13
try {
14
$response = $request->send();
15
if ($response->getStatus() == 200) {
16
echo $response->getBody();
17
}
18
else {
19
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
20
$response->getReasonPhrase();
21
}
22
}
23
catch(HTTP_Request2_Exception $e) {
24
echo 'Error: ' . $e->getMessage();
25
}require "uri"
26
require "net/http"
27
28
url = URI("https://api2.ourpass.co/v1/business/subaccounts/1303")
29
30
https = Net::HTTP.new(url.host, url.port)
31
https.use_ssl = true
32
33
request = Net::HTTP::Delete.new(url)
34
request["apiKey"] = "{{apikey}}"
35
36
response = https.request(request)
37
puts response.read_body
38
Copied!
1
require "uri"
2
require "net/http"
3
4
url = URI("https://api2.ourpass.co/v1/business/subaccounts/1303")
5
6
https = Net::HTTP.new(url.host, url.port)
7
https.use_ssl = true
8
9
request = Net::HTTP::Delete.new(url)
10
request["apiKey"] = "{{apikey}}"
11
12
response = https.request(request)
13
puts response.read_body
14
Copied!
1
import requests
2
3
url = "https://api2.ourpass.co/v1/business/subaccounts/1303"
4
5
payload = ""
6
headers = {
7
'apiKey': '{{apikey}}'
8
}
9
10
response = requests.request("DELETE", url, headers=headers, data=payload)
11
12
print(response.text)
13
Copied!