- [HTTP request](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.contentHub.contentPacks/add#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.contentHub.contentPacks/add#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.contentHub.contentPacks/add#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.contentHub.contentPacks/add#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.contentHub.contentPacks/add#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.contentHub.contentPacks/add#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.contentHub.contentPacks/add#body.aspect_1)

**Full name**: projects.locations.instances.contentHub.contentPacks.add

Creates a new custom ContentPack. Use this method to group locally defined playbooks, test cases and connectors into a shareable package.

### HTTP request

`POST https://{endpoint}/v1alpha/{parent}/contentPacks:add`

Where `{endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/chronicle/docs/reference/rest#rest_endpoints).

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent, which owns this collection of content packs. Format: projects/{project}/locations/{location}/instances/{instance}/contentHub/contentPacks |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "title": string, "categories": [ string ], "connectorDefinitions": [ string ], "connectorInstances": [ string ], "testCases": [ string ], "playbooks": [ string ], "description": string, "videoUri": string } ``` |

| Fields ||
|---|---|
| `title` | `string` Required. The title of the content pack, limited to 200 characters. |
| `categories[]` | `string` Required. Categories used for filtering. Each category name is limited to 50 characters. Max number of categories will be 20 |
| `connectorDefinitions[]` | `string` Optional. The connectors definitions of the content pack Max length of connectorDefinitions be 50. |
| `connectorInstances[]` | `string` Optional. The connectors instances of the content pack Max length of connectors_instances be 50. |
| `testCases[]` | `string` Optional. The test cases of the content pack Max length of testCases be 50. |
| `playbooks[]` | `string` Optional. The playbooks of the content pack Max length of playbooks be 50. |
| `description` | `string` Required. Provides a detailed description of the content-pack, suitable for display in a list view. Limited to 200 characters. |
| `videoUri` | `string` Optional. URL of the video associated with this content pack. Must be a valid URL with a maximum length of 2048 characters. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.contentHub.contentPacks#ContentPack`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/chronicle`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `chronicle.contentPacks.create`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).