---
title: "Apply one operation to up to 1,000 domains in a single request"
method: POST
path: "/api/domains/bulk/{op}"
---

# Apply one operation to up to 1,000 domains in a single request

`POST /api/domains/bulk/{op}`

## Request

- Base URL: `https://name.ai`
- URL: `https://name.ai/api/domains/bulk/{op}`
- Auth: API key in cookie `next-auth.session-token`

Requires a signed-in session and ownership of the domains. Free ops (lock, unlock, setNameservers, setFolder, setContacts) fan out asynchronously and return a bulkOpId to track; setAutoRenew updates locally; renew/restore add all items to the cart for one checkout.

## Path parameters

- `op` 'lock' | 'unlock' | 'setNameservers' | 'setFolder' | 'setContacts' | 'setAutoRenew' | 'renew' | 'restore', required

## Request body

- object
  - `domains` string[], required
  - `payload` object: Op-specific params, e.g. {"nameservers": [...]}, {"years": 1}, {"reason": "..."}.
  - `options` object
    - `skip_on_error` boolean
    - `dry_run` boolean

## Response `200`

Accepted for processing (free ops), applied (setAutoRenew), or added to cart (renew/restore). Deprecation/Sunset/Link headers appear only once the operation is deprecated (see x-deprecation-policy).

- union
  - object
    - `bulkOpId` string, required
    - `total` integer, required
    - `op` string, required
  - object
    - `updated` boolean, required
    - `count` integer, required
  - object
    - `addedToCart` boolean, required
    - `cartItemIds` string[]
    - `totalCents` integer
    - `checkoutPath` string

## Other responses

- `400`: Bad op, empty/oversized domains list, or invalid payload.
- `401`: Not signed in.

---

[API](https://skmtc.dev/name/apis/name-ai-api-public-rest-api-openapi-3-1.md) · [All operations](https://skmtc.dev/name/apis/name-ai-api-public-rest-api-openapi-3-1/llms.txt) · [OpenAPI document](https://skmtc.dev/name/apis/name-ai-api-public-rest-api-openapi-3-1/revisions/e04300069786?raw)
