Strapi Content Types API

Endpoints for managing content-type definitions through the Content-Type Builder.

OpenAPI Specification

strapi-content-types-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Strapi Admin Panel Admin Authentication Content Types API
  description: The Strapi Admin Panel API powers the back-office interface used to manage content-types, content entries, media assets, and administrator accounts. It provides endpoints for the Content-Type Builder, Content Manager, Media Library, and role-based access control configuration. The API supports three default administrator roles (Super Admin, Editor, and Author) with granular permission management, allowing organizations to control which administrative functions each role can access.
  version: 5.0.0
  contact:
    name: Strapi Support
    url: https://strapi.io/support
  termsOfService: https://strapi.io/terms
servers:
- url: https://{host}
  description: Strapi Server
  variables:
    host:
      default: localhost:1337
      description: The hostname and port of your Strapi instance
security:
- adminBearerAuth: []
tags:
- name: Content Types
  description: Endpoints for managing content-type definitions through the Content-Type Builder.
paths:
  /admin/content-type-builder/content-types:
    get:
      operationId: listContentTypes
      summary: List content types
      description: Returns a list of all content-types defined in the Strapi application, including their schemas, attributes, and configuration.
      tags:
      - Content Types
      responses:
        '200':
          description: A list of content types
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ContentType'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /admin/content-type-builder/content-types/{uid}:
    get:
      operationId: getContentType
      summary: Get a content type
      description: Returns a single content-type definition by its UID, including its full schema with all attributes, relations, and configuration.
      tags:
      - Content Types
      parameters:
      - name: uid
        in: path
        required: true
        description: The unique identifier of the content-type (e.g., api::article.article)
        schema:
          type: string
      responses:
        '200':
          description: The content type definition
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentType'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    Forbidden:
      description: Forbidden - insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized - missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not found - the requested resource does not exist
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    ContentType:
      type: object
      properties:
        uid:
          type: string
          description: The unique identifier of the content-type (e.g., api::article.article)
        plugin:
          type: string
          nullable: true
          description: The plugin that owns this content-type, if applicable
        apiID:
          type: string
          description: The API identifier used in REST endpoints
        schema:
          type: object
          description: The full schema definition of the content-type
          properties:
            displayName:
              type: string
              description: The human-readable display name
            singularName:
              type: string
              description: The singular name used in the API
            pluralName:
              type: string
              description: The plural name used in REST API routes
            kind:
              type: string
              enum:
              - collectionType
              - singleType
              description: Whether this is a collection type or single type
            attributes:
              type: object
              description: The attribute definitions for the content-type fields
              additionalProperties: true
    Error:
      type: object
      properties:
        data:
          nullable: true
        error:
          type: object
          properties:
            status:
              type: integer
              description: The HTTP status code
            name:
              type: string
              description: The error name
            message:
              type: string
              description: A human-readable error message
            details:
              type: object
              description: Additional error details
  securitySchemes:
    adminBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Admin JWT token obtained from the /admin/login endpoint. Include as Authorization: Bearer {token}.'
externalDocs:
  description: Strapi Admin Panel Documentation
  url: https://docs.strapi.io/cms/features/admin-panel