Last updated 2 years ago
DELETE https://api2.ourpass.co/v1/business/subaccounts/:subAccountId
DELETE
https://api2.ourpass.co/v1/business/subaccounts/:subAccountId
{ "success": true, "message": "Business Subaccount deleted" }
curl --location --request DELETE 'https://user-api2-staging.ourpass.co/v1/business/subaccounts/1303' \ --header 'apiKey: {{apikey}}' \ --data-raw ''
var axios = require('axios'); var data = ''; var config = { method: 'delete', url: 'https://api2.ourpass.co/v1/business/subaccounts/1303', headers: { 'apiKey': '{{apikey}}' }, data : data }; axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); }) .catch(function (error) { console.log(error); });
<?php require_once 'HTTP/Request2.php'; $request = new HTTP_Request2(); $request->setUrl('https://api2.ourpass.co/v1/business/subaccounts/1303'); $request->setMethod(HTTP_Request2::METHOD_DELETE); $request->setConfig(array( 'follow_redirects' => TRUE )); $request->setHeader(array( 'apiKey' => '{{apikey}}' )); $request->setBody(''); try { $response = $request->send(); if ($response->getStatus() == 200) { echo $response->getBody(); } else { echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' . $response->getReasonPhrase(); } } catch(HTTP_Request2_Exception $e) { echo 'Error: ' . $e->getMessage(); }require "uri" require "net/http" url = URI("https://api2.ourpass.co/v1/business/subaccounts/1303") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Delete.new(url) request["apiKey"] = "{{apikey}}" response = https.request(request) puts response.read_body
require "uri" require "net/http" url = URI("https://api2.ourpass.co/v1/business/subaccounts/1303") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Delete.new(url) request["apiKey"] = "{{apikey}}" response = https.request(request) puts response.read_body
import requests url = "https://api2.ourpass.co/v1/business/subaccounts/1303" payload = "" headers = { 'apiKey': '{{apikey}}' } response = requests.request("DELETE", url, headers=headers, data=payload) print(response.text)
subAccountId*
String
This is the unique ID of the connected account to be deleted.
apiKey*
Pass your api key in the request header to authorise the call