---
title: "Convert content ids to content types"
method: POST
path: "/content/convert-ids-to-types"
tags: ["Content"]
---

# Convert content ids to content types

`POST /content/convert-ids-to-types`

Converts a list of content ids into their associated content types. This is useful for users migrating from v1 to v2
who may have stored just content ids without their associated type. This will return types as they should be used in v2.
Notably, this will return `inline-comment` for inline comments and `footer-comment` for footer comments, which is distinct from them
both being represented by `comment` in v1.

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
Permission to view the requested content. Any content that the user does not have permission to view or does not exist will map to `null` in the response.

## Request body

- object
  - `contentIds` union[], required — The content ids to convert. They may be provided as strings or numbers.
    - union
      - string
      - number

## Response `200`

Returned if the requested content ids are successfully converted to their content types

- ContentIdToContentTypeResponse
  - `results` object — JSON object containing all requested content ids as keys and their associated content types as the values. Duplicate content ids in the request will be returned under a single key in the response. For built-in content types, the enumerations are as specified. Custom content ids will be mapped to their associated type.

## Other responses

- `400` — Returned if an invalid request is provided.
- `401` — Returned if the authentication credentials are incorrect or missing from the request.

---

[API](https://skmtc.dev/atlassian/apis/the-confluence-cloud-rest-api-v2.md) · [All operations](https://skmtc.dev/atlassian/apis/the-confluence-cloud-rest-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/atlassian/the-confluence-cloud-rest-api-v2/revisions/451377c5a598/schema)
