# Create a Collection Tag Rule **POST /collection_tag_rules** Creates a new tag rule for automatically segmenting collections. Type of matching rule to apply. Valid values: * `exact_match`: Creates separate collection lists only for shipments with tags that exactly match the specified pattern * `pattern_match`: Uses wildcard matching to create separate collections for tags matching the pattern (supports `*` wildcard) **Notes:** * Tag rules automatically apply to new shipments and collections; existing collections are not retroactively affected * Wildcard patterns in `pattern_match` rules only support the `*` character for matching any sequence of characters * Only one of `tag_id` or `pattern` should be provided. ## Servers - https://api.arta.io: https://api.arta.io () ## Parameters ### Headers - **Authorization** (string) Authorize your API calls with an Arta API token ### Body: application/json (object) - **collection_tag_rule** (object) ## Responses ### 201 The created collection tag rule #### Headers - **content-type** (string) - **x-arta-request-id** (string) A unique identifier for the Arta API call #### Body: application/json (object) - **created_at** (string(date-time)) A NaiveDatetime-formatted timestamp describing when the resource was created with microsecond precision - **id** (string(uuid)) The ID of the collection tag rule in UUID format - **pattern** (string) The pattern to match against shipment tags. For exact match, this should be the exact tag name. For pattern_match, supports * wildcard. - **tag_id** (uuid) The ID of the Tag this rule applies to. If provided, the rule will only apply to shipments with this tag. - **updated_at** (string(date-time)) A NaiveDatetime-formatted timestamp describing when the resource was last updated with microsecond precision ### 400 Bad Request #### Headers - **content-type** (string) - **x-arta-request-id** (string) A unique identifier for the Arta API call #### Body: application/json (object) - **errors** (object) ### 403 Forbidden ### 422 Unprocessable entity #### Body: application/json (object) - **errors** (object) [Powered by Bump.sh](https://bump.sh)