---
title: "Reorder custom allocation rules"
method: POST
path: "/api/v2/cost/arbitrary_rule/reorder"
tags: ["Cloud Cost Management"]
---

# Reorder custom allocation rules

`POST /api/v2/cost/arbitrary_rule/reorder`

Reorder custom allocation rules - Change the execution order of custom allocation rules.

**Important**: You must provide the **complete list** of all rule IDs in the desired execution order. The API will reorder ALL rules according to the provided sequence.

Rules are executed in the order specified, with lower indices (earlier in the array) having higher priority.

**Example**: If you have rules with IDs [123, 456, 789] and want to change order from 123→456→789 to 456→123→789, send: [{"id": "456"}, {"id": "123"}, {"id": "789"}]

## Request body

- ReorderRuleResourceArray — The definition of `ReorderRuleResourceArray` object.
  - `data` ReorderRuleResourceData[], required — The `ReorderRuleResourceArray` `data`.
    - `id` string — The `ReorderRuleResourceData` `id`.
    - `type` 'arbitrary_rule', required — Arbitrary rule resource type.

## Response `204`

Successfully reordered rules

## Other responses

- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
