---
title: "Add Static Assets"
method: POST
path: "/projects/{project_id}/rules/_bulk_static_assets"
tags: ["Rules"]
---

# Add Static Assets

`POST /projects/{project_id}/rules/_bulk_static_assets`

Allows you to perform bulk operations on static asset rules for your project. Rules can either be added or removed in bulk, with a maximum of 1000 rules per request.

To update a rule, applies for both add and remove operations, the asset name, membership and static type is required.

In case one or several static asset rules fail, those rules will be returned in the `errors` field of the response. The response will still be a `200 OK` response as long as the request was processed successfully.

NOTE: This is an asynchronous operation, and even if the request is handled successfully, the changes may not be immediately reflected in the system. You can check the status of the operation using the `get_static_assets` endpoint.

## Path parameters

- `project_id` string, required — The ID of the project

## Request body

- UpdateStaticAssetsRequest
  - `static_assets` StaticAssetsOperations, required
    - `add_rules` StaticAssetRule[] — List of new static asset rules to add
      - `asset` string, required
      - `membership_type` 'include' | 'exclude', required
      - `static_type` 'ipv4' | 'hostname' | 'wildcard', required
    - `remove_rules` StaticAssetRule[] — List of static asset rules to remove
      - `asset` string, required
      - `membership_type` 'include' | 'exclude', required
      - `static_type` 'ipv4' | 'hostname' | 'wildcard', required

## Response `200`

Successful Response

- UpdateStaticAssetsResponse
  - `data` StaticAssetsResult, required
    - `added` StaticAssetRule[] — List of static asset rules that were added
      - `asset` string, required
      - `membership_type` 'include' | 'exclude', required
      - `static_type` 'ipv4' | 'hostname' | 'wildcard', required
    - `removed` StaticAssetRule[] — List of static asset rules that were removed
      - `asset` string, required
      - `membership_type` 'include' | 'exclude', required
      - `static_type` 'ipv4' | 'hostname' | 'wildcard', required
    - `errors` StaticAssetRuleError[] — List of errors encountered during the operation
      - `rule` StaticAssetRule
        - `asset` string, required
        - `membership_type` 'include' | 'exclude', required
        - `static_type` 'ipv4' | 'hostname' | 'wildcard', required
      - `failed` boolean, nullable — Indicates if this is a warning or if the operation failed
      - `messages` string[], nullable — List of errors & warnings encountered during the operation
  - `meta` ApiMeta
    - `params` object, nullable
    - `counts` ApiCount
      - `total` integer, nullable
      - `returned` integer, required
    - `pagination` PaginationResponse
      - `next_cursor` string, nullable — An opaque value which should be passed as the `cursor` to retrieve the next page of results. If None or not present there are no remaining pages. This value should not be interpreted by the client.
      - `limit` integer — The number of items returned
      - `total` integer, nullable
      - `sort` array[], nullable — The sort order of the results
        - unknown[]
          - unknown
    - `request_id` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/securitytrails/apis/securitytrails-api.md) · [All operations](https://skmtc.dev/securitytrails/apis/securitytrails-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/securitytrails/securitytrails-api/revisions/13cd180c20ab/schema)
