---
title: "Create a custom framework"
method: POST
path: "/api/v2/cloud_security_management/custom_frameworks"
tags: ["Security Monitoring"]
---

# Create a custom framework

`POST /api/v2/cloud_security_management/custom_frameworks`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/cloud_security_management/custom_frameworks`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `security_monitoring_rules_read`, `security_monitoring_rules_write`

Create a custom framework.

## Request body

- CreateCustomFrameworkRequest: Request object to create a custom framework.
  - `data` CustomFrameworkData, required: Contains type and attributes for custom frameworks.
    - `attributes` CustomFrameworkDataAttributes, required: Framework Data Attributes.
      - `description` string: Framework Description
      - `handle` string, required: Framework Handle
      - `icon_url` string: Framework Icon URL
      - `name` string, required: Framework Name
      - `requirements` CustomFrameworkRequirement[], required: Framework Requirements
        - `controls` CustomFrameworkControl[], required: Requirement Controls.
          - `name` string, required: Control Name.
          - `rules_id` string[], required: Rule IDs.
        - `name` string, required: Requirement Name.
      - `version` string, required: Framework Version
    - `type` 'custom_framework', required: The type of the resource. The value must be `custom_framework`.

## Response `200`

OK

- CreateCustomFrameworkResponse: Response object to create a custom framework.
  - `data` FrameworkHandleAndVersionResponseData, required: Contains type and attributes for custom frameworks.
    - `attributes` CustomFrameworkDataHandleAndVersion, required: Framework Handle and Version.
      - `handle` string: Framework Handle
      - `version` string: Framework Version
    - `id` string, required: The ID of the custom framework.
    - `type` 'custom_framework', required: The type of the resource. The value must be `custom_framework`.

## Other responses

- `400`: Bad Request
- `409`: Conflict
- `429`: Too many requests
- `500`: Bad Request

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
