---
title: "Delete subject"
method: DELETE
path: "/subjects/{key}"
tags: ["subjects"]
---

# Delete subject

`DELETE /subjects/{key}`

Delete the specified subject. You will not be allowed to delete a subject if it has any children subjects under it. Beware! Deleting a subject also deletes all the samples associated with this subject.

## Path parameters

- `key` string, required

## Response `200`

Success, returns deleted subject.

- SubjectsResponse — A resource under observation.
  - `absolutePath` string — The absolute path of the subject. This is automatically set based on the name and hierarchy.
  - `children` SubjectsResponse[]
  - `description` string — A description of the subject. A lens may choose to display this information to the user.
  - `helpEmail` string — The email address where a user can go to get more help about the subject. A lens may choose to display this information to the user e.g. if the user clicks a “help” icon attached to the subject.
  - `helpUrl` string — The url where a user can go to get more help about the subject. A lens may choose to display this information to the user e.g. if the user clicks a “help” icon attached to the subject.
  - `id` string
  - `imageUrl` string — Optional icon to represent the subject.
  - `isPublished` boolean — Default false. When set to true, the subject is readable by other users; when set to false, the subject is only readable by its owner.
  - `name` string — Max 60 characters; case insensitive; allows alpha-numeric characters, underscore (_) and dash (-).
  - `sortBy` string — The sortBy string can be used to define the sort order of subjects which a lens developer can choose to honor when rendering the data. The attribute is defaulted to an empty string when the user does not provide any string value. Max 254 characters; case insensitive; allows alpha-numeric characters, + underscore (_) and dash (-). Filter by sortBy; asterisk (*) wildcards ok. Max 254 characters; case insensitive; allows alpha-numeric characters, underscore (_) and dash (-).
  - `parentId` string — The id of the subject's parent, empty if this subject is at the root of the hierarchy.
  - `parentAbsolutePath` string — The absolute path of the subject's parent, empty if this subject is at the root of the hierarchy.
  - `createdBy` string — Id of the User who created this Aspect.
  - `createdAt` string — TODO
  - `updatedAt` string — TODO
  - `tags` string[] — Array of tag names. Tag name: Max 60 characters; case insensitive; allows alpha-numeric characters, underscore (_) and dash (-). Tag names cannot start with a dash (-).
  - `samples` object[] — TODO
  - `relatedLinks` RelatedLinkResponse[] — RelatedLinks associated with this model.
    - `name` string — Name of the related link.
    - `url` string — The relatedLink url. For example, a related link associated with a sample can have a link to the source from which that sample information is obtained.
  - `apiLinks` HATEOAS[] — Hypertext As The Engine Of Application State.
    - `href` string, required — URL of the related HATEOAS link you can use for subsequent calls.
    - `rel` string, required — Link relation that describes how this link relates to the previous call.
    - `method` string, required — The HTTP method required for the related call.
  - `hierarchyLevel` integer — The depth of the subject starting from the root. The root always has a hierarchy level of 1

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `404` — Resource Not Found
- `default` — Error

---

[API](https://skmtc.net/salesforce/apis/refocus-api.md) · [All operations](https://skmtc.net/salesforce/apis/refocus-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/salesforce/refocus-api/versions/42c2153b047e/schema)
