openapi: 3.1.0 info: title: Zesty Accounts Apps Content Models API description: The Zesty.io Accounts API is used to manage users, roles, instances, teams, tokens, ecosystems, webhooks, and apps. It provides administrative control over the organizational structure of a Zesty.io account. All endpoints require authentication via a session token obtained from the Auth API. version: 1.0.0 contact: name: Zesty.io url: https://www.zesty.io/ license: name: Proprietary url: https://www.zesty.io/ servers: - url: https://accounts.api.zesty.io/v1 description: Zesty Accounts API Production Server tags: - name: Content Models description: Manage content model schemas. paths: /content/models: get: operationId: getModels summary: Zesty List all content models description: Returns a list of all content models defined in the instance. tags: - Content Models security: - sessionToken: [] responses: '200': description: A list of content models. content: application/json: schema: type: object properties: code: type: integer data: type: array items: $ref: '#/components/schemas/ContentModel' '401': description: Unauthorized. post: operationId: createModel summary: Zesty Create a content model description: Creates a new content model in the instance. tags: - Content Models security: - sessionToken: [] requestBody: required: true content: application/json: schema: type: object required: - name - label - type properties: name: type: string description: The reference name for the model. label: type: string description: The display label for the model. type: type: string enum: - templateset - pageset - dataset description: The type of content model. responses: '201': description: Content model created successfully. content: application/json: schema: type: object properties: code: type: integer data: $ref: '#/components/schemas/ContentModel' '400': description: Invalid request. '401': description: Unauthorized. /content/models/{modelZUID}: get: operationId: getModel summary: Zesty Get a content model description: Returns details for a specific content model including its fields. tags: - Content Models security: - sessionToken: [] parameters: - name: modelZUID in: path required: true schema: type: string description: The ZUID of the content model. responses: '200': description: Content model details. content: application/json: schema: type: object properties: code: type: integer data: $ref: '#/components/schemas/ContentModel' '401': description: Unauthorized. '404': description: Content model not found. put: operationId: updateModel summary: Zesty Update a content model description: Updates the details of a specific content model. tags: - Content Models security: - sessionToken: [] parameters: - name: modelZUID in: path required: true schema: type: string description: The ZUID of the content model. requestBody: required: true content: application/json: schema: type: object properties: label: type: string description: The updated display label. responses: '200': description: Content model updated successfully. '401': description: Unauthorized. '404': description: Content model not found. delete: operationId: deleteModel summary: Zesty Delete a content model description: Deletes a specific content model and its associated data. tags: - Content Models security: - sessionToken: [] parameters: - name: modelZUID in: path required: true schema: type: string description: The ZUID of the content model. responses: '200': description: Content model deleted successfully. '401': description: Unauthorized. '404': description: Content model not found. components: schemas: ContentModel: type: object properties: ZUID: type: string description: The Zesty Universal Identifier for the content model. name: type: string description: The reference name. label: type: string description: The display label. type: type: string enum: - templateset - pageset - dataset description: The model type. createdAt: type: string format: date-time updatedAt: type: string format: date-time securitySchemes: sessionToken: type: apiKey in: header name: Authorization description: A session token obtained from the Auth API login endpoint. externalDocs: description: Zesty Accounts API Documentation url: https://docs.zesty.io/docs/accounts