# Prompt Categories

## Retrieves a paginated list of prompt categories for the specified prompt.

> Retrieves a paginated list of prompt categories for the specified prompt, optionally prompted and sorted.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.Sorting.ItemSorting":{"enum":[0],"type":"integer","format":"int32"},"Jylo.Toolkit.API.Models.Container.Review.PromptCategoryReadModel":{"required":["name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"colour":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.ECategoryColour"},"objectIdentifier":{"type":"string","format":"uuid"},"colourHex":{"type":"string","nullable":true,"readOnly":true}},"additionalProperties":false},"Jylo.Toolkit.Constants.ECategoryColour":{"enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],"type":"integer","format":"int32"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/prompts/{promptObjectIdentifier}/categories":{"get":{"tags":["Prompt Categories"],"summary":"Retrieves a paginated list of prompt categories for the specified prompt.","description":"Retrieves a paginated list of prompt categories for the specified prompt, optionally prompted and sorted.","parameters":[{"name":"promptObjectIdentifier","in":"path","description":"The object identifier of the prompt.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"pageNumber","in":"query","description":"The page number to retrieve.","schema":{"type":"integer","format":"int32"}},{"name":"pageSize","in":"query","description":"The number of items per page.","schema":{"type":"integer","format":"int32"}},{"name":"searchText","in":"query","description":"Optional search text to prompt categories.","schema":{"type":"string"}},{"name":"sorting","in":"query","description":"The sorting option for the results.","schema":{"$ref":"#/components/schemas/Jylo.Toolkit.Sorting.ItemSorting"}},{"name":"desc","in":"query","description":"Whether to sort in descending order.","schema":{"type":"boolean","default":true}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.PromptCategoryReadModel"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.PromptCategoryReadModel"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.PromptCategoryReadModel"}}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Creates a new prompt category for the specified prompt.

> Creates a new prompt category for the specified prompt.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.Container.Review.PromptCategoryWriteModel":{"required":["name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"colour":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.ECategoryColour"}},"additionalProperties":false},"Jylo.Toolkit.Constants.ECategoryColour":{"enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],"type":"integer","format":"int32"},"Jylo.Toolkit.API.Models.Container.Review.PromptCategoryReadModel":{"required":["name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"colour":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.ECategoryColour"},"objectIdentifier":{"type":"string","format":"uuid"},"colourHex":{"type":"string","nullable":true,"readOnly":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/prompts/{promptObjectIdentifier}/categories":{"post":{"tags":["Prompt Categories"],"summary":"Creates a new prompt category for the specified prompt.","description":"Creates a new prompt category for the specified prompt.","parameters":[{"name":"promptObjectIdentifier","in":"path","description":"The object identifier of the prompt.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The prompt category data to create.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.PromptCategoryWriteModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.PromptCategoryWriteModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.PromptCategoryWriteModel"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.PromptCategoryReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.PromptCategoryReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.PromptCategoryReadModel"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Retrieves a prompt category by its object identifier.

> Retrieves a prompt category by its object identifier.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.Container.Review.PromptCategoryReadModel":{"required":["name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"colour":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.ECategoryColour"},"objectIdentifier":{"type":"string","format":"uuid"},"colourHex":{"type":"string","nullable":true,"readOnly":true}},"additionalProperties":false},"Jylo.Toolkit.Constants.ECategoryColour":{"enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],"type":"integer","format":"int32"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/prompts/{promptObjectIdentifier}/categories/{objectIdentifier}":{"get":{"tags":["Prompt Categories"],"summary":"Retrieves a prompt category by its object identifier.","description":"Retrieves a prompt category by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","description":"The unique identifier of the prompt category.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"promptObjectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.PromptCategoryReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.PromptCategoryReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.PromptCategoryReadModel"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Updates a prompt category by its object identifier.

> Updates a prompt category by its object identifier.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.Container.Review.PromptCategoryWriteModel":{"required":["name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"colour":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.ECategoryColour"}},"additionalProperties":false},"Jylo.Toolkit.Constants.ECategoryColour":{"enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18],"type":"integer","format":"int32"},"Jylo.Toolkit.API.Models.Container.Review.PromptCategoryReadModel":{"required":["name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"colour":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.ECategoryColour"},"objectIdentifier":{"type":"string","format":"uuid"},"colourHex":{"type":"string","nullable":true,"readOnly":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/prompts/{promptObjectIdentifier}/categories/{objectIdentifier}":{"put":{"tags":["Prompt Categories"],"summary":"Updates a prompt category by its object identifier.","description":"Updates a prompt category by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","description":"The unique identifier of the prompt category to update.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"promptObjectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The updated prompt category data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.PromptCategoryWriteModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.PromptCategoryWriteModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.PromptCategoryWriteModel"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.PromptCategoryReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.PromptCategoryReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Container.Review.PromptCategoryReadModel"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Deletes a prompt category by its object identifier.

> Deletes a prompt category by its object identifier.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/prompts/{promptObjectIdentifier}/categories/{objectIdentifier}":{"delete":{"tags":["Prompt Categories"],"summary":"Deletes a prompt category by its object identifier.","description":"Deletes a prompt category by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","description":"The unique identifier of the prompt category to delete.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}},{"name":"promptObjectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```
