# Delete a Twin

This endpoint terminates a given Twin. The termination of a Twin cannot be undone. Only the owner of the Twin can terminate a Twin.

IMPORTANT NOTE

The termination of a Twin is permanent and cannot be undone. After the termination of the Twin, the owner of the Twin will not be able to update the "description" of the Twin. Ledger Entries, Identities, and Docs can be attached to terminated Twins by all Users involved in the process.

Method Path Operation*
DELETE /twins/{twin} terminate_twin

*

In order for a user to perform the "deleteTwin" operation, the "deleteTwin" permission must be included in the list of allowed actions in the statement of the user's role.

# Request

Parameter Type In Description
{twin}
required
string path Twin UUID of the Twin to be terminated.

In our example, we want to terminate the Twin with the Twin UUID "f63ce1df-4643-49b2-9d34-38f4b35b9c7a".

# Response

Attribute Type Description
owner string Account UUID of the account which is the current owner of the Twin.
status string, value is "alive" or "terminated" The status of a Twin can be "alive" or "terminated". In case of alive Twins, the "description" can be updated by the owner of the Twin. In case of terminated Twins, the "description" cannot be updated. Ledger Entries, Identities, and Docs can be attached to alive and terminated Twins by all Users involved in the process.
updated_ts timestamp Time at which the Twin was last updated. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch (opens new window).
description dictionary Attributes of the Twin defined by the owner in form of key-value pairs:
- key: It must match the regular expression (opens new window) ^[a-z_][0-9a-z_]{0,63}$.
- value: JSON compliant value. Only the owner of the Twin can update the "description" of the Twin.
For more details consult the description section.
creation_certificate dictionary
Certificate generated automatically by the system upon creation of the Twin. It cannot be modified after it has been generated.
Attribute Type Description
uuid string Twin UUID. It is generated automatically when the Twin is created and stored in the "uuid" field of the creation certificate.
creator string Account UUID of the account creating the Twin.
created_ts timestamp Time at which the Twin was created. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch (opens new window).
termination_certificate object
Certificate generated automatically by the system when the Twin is terminated. It cannot be modified after it has been generated.
Attribute Type Description
issuer string Account UUID of the account terminating the Twin.
terminated_ts timestamp Time at which the Twin was terminated. Measured in seconds (to three decimal places) that have elapsed since the Unix epoch (opens new window).

# Status codes

Requests to this endpoint result in generic status codes. For a comprehensive list of status codes, please consult the Status Codes section.