---
updatedAt: 2026-09-04T12:59:39.000Z
agentTools:
  projectIndex: https://developers.apicbase.com/llms.txt
---

# Create Critical Control Point

Creates a new critical control point.

Requires permission to manage compliance tasks. `supervisor` has to be a user of the library.

The possible values of `type` and `mitigation_policy` are listed on the [Reference Values](https://developers.apicbase.com/docs/compliance-task-reference-values) guide.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "apicbase",
    "version": "2"
  },
  "servers": [
    {
      "url": "https://api.apicbase.com/api/v2/"
    }
  ],
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/compliance/tasks/ccps/": {
      "post": {
        "summary": "Create Critical Control Point",
        "description": "Creates a critical control point (CCP) in the library.",
        "operationId": "create-ccp",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "type"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 150,
                    "example": "Fridge #1",
                    "description": "The name of the critical control point."
                  },
                  "code": {
                    "type": "string",
                    "maxLength": 15,
                    "example": "CCP-01",
                    "description": "A short code identifying the CCP. Can be empty."
                  },
                  "description": {
                    "type": "string",
                    "example": "Storage temperature control",
                    "description": "The description of the CCP. Defaults to an empty string."
                  },
                  "type": {
                    "type": "integer",
                    "enum": [
                      1,
                      2,
                      3,
                      4,
                      5,
                      6,
                      7,
                      8,
                      9,
                      10,
                      11
                    ],
                    "example": 2,
                    "description": "The CCP type. See [CCP types](https://developers.apicbase.com/docs/compliance-task-reference-values#ccp-types). The set is open: new values may be added without it counting as a breaking change."
                  },
                  "supervisor": {
                    "type": "string",
                    "nullable": true,
                    "example": "100000000000045",
                    "description": "The ID of the user supervising this CCP."
                  },
                  "mitigation_policy": {
                    "type": "integer",
                    "enum": [
                      0,
                      1,
                      2
                    ],
                    "example": 2,
                    "description": "Whether a corrective action is required when a related task fails. See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy). Defaults to 0."
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "name": "Fridge #1",
                    "code": "CCP-01",
                    "description": "Storage temperature control",
                    "type": 2,
                    "supervisor": "100000000000045",
                    "mitigation_policy": 2
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "id": "100000000000001",
                      "name": "Fridge #1",
                      "code": "CCP-01",
                      "description": "Storage temperature control",
                      "type": 2,
                      "supervisor": {
                        "id": "100000000000045",
                        "username": "chef@restaurant.com",
                        "first_name": "John",
                        "last_name": "Doe",
                        "url": "https://app.apicbase.com/api/v2/accounts/users/100000000000045/"
                      },
                      "mitigation_policy": 2,
                      "created": "2026-07-01T09:30:00Z",
                      "modified": "2026-07-02T10:15:00Z"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "100000000000001",
                      "description": "The ID of the critical control point."
                    },
                    "name": {
                      "type": "string",
                      "example": "Fridge #1",
                      "description": "The name of the critical control point."
                    },
                    "code": {
                      "type": "string",
                      "example": "CCP-01",
                      "description": "A short code identifying the CCP. Can be empty."
                    },
                    "description": {
                      "type": "string",
                      "example": "Storage temperature control",
                      "description": "The description of the CCP. Can be empty."
                    },
                    "type": {
                      "type": "integer",
                      "example": 2,
                      "description": "The CCP type. See [CCP types](https://developers.apicbase.com/docs/compliance-task-reference-values#ccp-types). The set is open: new values may be added without it counting as a breaking change."
                    },
                    "supervisor": {
                      "type": "object",
                      "nullable": true,
                      "description": "The user supervising this CCP.",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "100000000000045",
                          "description": "The ID of the user."
                        },
                        "username": {
                          "type": "string",
                          "example": "chef@restaurant.com",
                          "description": "The email address of the user."
                        },
                        "first_name": {
                          "type": "string",
                          "example": "John",
                          "description": "The first name of the user."
                        },
                        "last_name": {
                          "type": "string",
                          "example": "Doe",
                          "description": "The last name of the user."
                        },
                        "url": {
                          "type": "string",
                          "example": "https://app.apicbase.com/api/v2/accounts/users/100000000000045/",
                          "description": "The URL of the user's detail endpoint."
                        }
                      }
                    },
                    "mitigation_policy": {
                      "type": "integer",
                      "enum": [
                        0,
                        1,
                        2
                      ],
                      "example": 2,
                      "description": "Whether a corrective action is required when a related task fails. See [Mitigation policy](https://developers.apicbase.com/docs/compliance-task-reference-values#mitigation-policy)."
                    },
                    "created": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "example": "2026-07-01T09:30:00Z",
                      "description": "When the CCP was created."
                    },
                    "modified": {
                      "type": "string",
                      "format": "date-time",
                      "nullable": true,
                      "example": "2026-07-02T10:15:00Z",
                      "description": "When the CCP was last modified."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request — the payload failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "missing_field": {
                    "summary": "A required field was left out",
                    "value": {
                      "name": [
                        "This field is required."
                      ]
                    }
                  },
                  "supervisor_is_an_outlet_user": {
                    "summary": "An outlet user cannot supervise a CCP",
                    "value": {
                      "supervisor": [
                        "An outlet user cannot be a supervisor."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden — the Tasks module is off, or the user lacks the permission needed.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "detail": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "module_disabled": {
                    "summary": "The Tasks module is not enabled for the library",
                    "value": {
                      "detail": "Your library does not have Compliance Tasks module active."
                    }
                  },
                  "no_permission": {
                    "summary": "The user lacks the permission this endpoint needs",
                    "value": {
                      "message": "You have no permission to perform that action. If you think you should be allowed please contact your library admin"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://app.apicbase.com/oauth/authorize/",
            "tokenUrl": "https://api.apicbase.com/oauth/token/",
            "refreshUrl": "https://api.apicbase.com/oauth/token/",
            "scopes": {
              "accounts": "Access to user, library, and outlet endpoints.",
              "library": "Access to library content (recipes, ingredients, menus, packages).",
              "inventory": "Access to inventory events and stock data.",
              "procurement": "Access to purchase orders, deliveries, and supplier ordering.",
              "sales": "Access to POS, sales, and sales analytics endpoints.",
              "media": "Access to media (images, files)."
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```