# IRPCObjectTypesAdmin.RemoveObjectType

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Administration API](https://developer.m-files.com/APIs/gRPC-API/admin/index.md) > [Object type administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/RemoveObjectType/

Badges: `Administration API / specialized` `admin` `session`

Removes an object type or value list together with its items, classes and dependent views.

- **Service:** [Object type administration](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/index.md) `MFiles.IRPCObjectTypesAdmin`
- **gRPC method:** `/MFiles.IRPCObjectTypesAdmin/RemoveObjectType`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/remove-object-type`
- **Request:** [`RemoveObjectTypeRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/RemoveObjectType/index.md#request)
- **Response:** [`RemoveObjectTypeResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/RemoveObjectType/index.md#response)
- **Book and level:** Administration API, specialized
- **Kind:** admin
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** no
- **Returns metadata structure version:** no
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Destroys the list's items, the classes of the object type, the views and similar elements that
  use it, the external locations that create objects of the type, and the type's owner, default
  and conflict property definitions. This cannot be undone.
- Requires `change_metadata_structure` and `license_allows_modifications`.
- Fails for built-in object types and value lists, for a type or list that owns another one, for
  a real object type that still has objects (destroy them first), and when other property
  definitions are based on the list (the error names them).
- For an external object type only the cached items are removed; the external database is not
  touched.
- Increments the metadata structure version.

<a id="request"></a>

## Request: RemoveObjectTypeRequest

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `object_type` | `int32` | The ID of the object type to remove. |

<a id="response"></a>

## Response: RemoveObjectTypeResponse

No fields.

<a id="related"></a>

## Related methods

- [RemoveObjectTypeItem](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/RemoveObjectTypeItem/index.md): Deletes an item of a value list as an administrator.
