Updated on 2025-10-30 GMT+08:00

Deleting Instances

Function

The prerequisite for calling this API is that the tenant has purchased an instance.

Tenants can call this open API to unsubscribe from yearly/monthly instances, but cannot unsubscribe from pay-per-use instances.

URI

POST /v1/instances/delete

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

x-auth-token

Yes

String

User token.

Content-Type

Yes

String

The default value is application/json, indicating that the request body is in JSON format.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

instanceIdList

Yes

Array of strings

Unsubscribed instance ID list. A single instance can contain a maximum of 32 characters and the list can contain a maximum of 100 columns.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

data

String

Returned information.

error_code

String

Error code. The value 0 indicates a success.

error_msg

String

Error information. OK indicates that the operation is successful.

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

0: successful.

KOOPHONE.API.1000: The request parameter is incorrect.

KOOPHONE.API.1001: Insufficient instance permissions.

KOOPHONE.API.5001: Pay-per-use instances cannot be deleted.

KOOPHONE.API.1012: The instances do not belong to the same tenant.

KOOPHONE.API.9999: Internal service error.

error_msg

String

Error message.

Example Requests

/instances/delete

{
  "instanceIdList" : [ "XvH39QVW" ]
}

Example Responses

Status code: 200

Instance deletion response.

{
  "data" : null,
  "error_code" : "0",
  "error_msg" : "OK"
}

Status Codes

Status Code

Description

200

Instance deletion response.

400

Errors.

Error Codes

See Error Codes.