# Unregister device DELETE https://api-sandbox.payabli.com/api/Cloud/register/{entry}/{deviceId} Remove a cloud device from an entrypoint. Reference: https://docs.payabli.com/developers/api-reference/cloud/unregister-cloud-device ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Unregister cloud device version: endpoint_cloud.RemoveDevice paths: /Cloud/register/{entry}/{deviceId}: delete: operationId: remove-device summary: Unregister cloud device description: Remove a cloud device from an entrypoint. tags: - - subpackage_cloud parameters: - name: entry in: path description: >- The paypoint's entrypoint identifier. [Learn more](/developers/api-reference/api-overview#entrypoint-vs-entry) required: true schema: type: string - name: deviceId in: path description: 'ID of the cloud device. ' required: true schema: type: string - name: requestToken in: header required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/type_cloud:RemoveDeviceResponse' '400': description: Bad request/ invalid data content: {} '401': description: Unauthorized request. content: {} '500': description: Internal API Error content: {} '503': description: Database connection error content: {} components: schemas: type_:IsSuccess: type: boolean type_:ResponseText: type: string type_:PageIdentifier: type: string type_cloud:RemoveDeviceResponse: type: object properties: isSuccess: $ref: '#/components/schemas/type_:IsSuccess' responseText: $ref: '#/components/schemas/type_:ResponseText' pageIdentifier: $ref: '#/components/schemas/type_:PageIdentifier' responseData: type: string description: |- If `isSuccess` = true, this contains the device identifier. If `isSuccess` = false, this contains the reason for the error. required: - responseText ``` ## SDK Code Examples ```python Unregister from payabli import payabli client = payabli( api_key="YOUR_API_KEY", ) client.cloud.remove_device( device_id="6c361c7d-674c-44cc-b790-382b75d1xxx", entry="8cfec329267", ) ``` ```typescript Unregister import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.cloud.removeDevice("8cfec329267", "6c361c7d-674c-44cc-b790-382b75d1xxx"); ``` ```go Unregister import ( context "context" option "github.com/payabli/sdk-go/option" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.Cloud.RemoveDevice( context.TODO(), "6c361c7d-674c-44cc-b790-382b75d1xxx", "8cfec329267", ) ``` ```csharp Unregister using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.Cloud.RemoveDeviceAsync("6c361c7d-674c-44cc-b790-382b75d1xxx", "8cfec329267"); ``` ```ruby Unregister require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267/6c361c7d-674c-44cc-b790-382b75d1xxx") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Delete.new(url) request["requestToken"] = '' response = http.request(request) puts response.read_body ``` ```java Unregister HttpResponse response = Unirest.delete("https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267/6c361c7d-674c-44cc-b790-382b75d1xxx") .header("requestToken", "") .asString(); ``` ```php Unregister request('DELETE', 'https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267/6c361c7d-674c-44cc-b790-382b75d1xxx', [ 'headers' => [ 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift Unregister import Foundation let headers = ["requestToken": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Cloud/register/8cfec329267/6c361c7d-674c-44cc-b790-382b75d1xxx")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "DELETE" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```