---
title: "Register a list of hostnames to be scanned for risks"
method: POST
path: "/bulk/hostnames"
tags: ["bulk"]
---

# Register a list of hostnames to be scanned for risks

`POST /bulk/hostnames`

## Request

- Base URL: `https://cyber-risk.upguard.com/api/public`
- URL: `https://cyber-risk.upguard.com/api/public/bulk/hostnames`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/upguard/apis/upguard-cyberrisk-api/docs/bulk/hostnames/post.ts> (a function with typed inputs; its response is checked against the schema)

Register a list of hostnames to be scanned for risks. The provided hostnames must be fully qualified domain names
or IPv4 addresses. Currently, a maximum of 1000 hostnames in a single request is supported. This will always replace
the labels of currently registered hostnames and if the request has empty labels they will all be removed.

This is an add-on endpoint not available to all accounts. Please contact support for information about bulk endpoints and how to upgrade your account.

Required API key permissions: `Admin` (select when creating API key in Account Settings)

## Request body

- BulkRegisterHostnamesV1RequestBody
  - `hostnames` string[]: The hostnames to register. Currently, a maximum of 1000 hostnames in a single request is supported.
  - `labels` string[]: The labels to add to the registered hostnames. If they don't exist they will be created.

## Response `200`

Returns the number of newly registered hostnames as well as the number of remaining slots.

- BulkRegisterHostnamesV1ResponseBody
  - `registered` integer: The number of newly registered hostnames.
  - `remaining` integer: The number of remaining slots.

## Other responses

- `402`: The requested action would exceed the limits of your contract.
- `403`: Your API key does not have permission to perform this action.
- `422`: An invalid parameter was supplied or a mandatory parameter was missing
- `429`: Too many requests have been made to this endpoint.
- `500`: An internal system error occurred

---

[API](https://skmtc.dev/upguard/apis/upguard-cyberrisk-api.md) - [All operations](https://skmtc.dev/upguard/apis/upguard-cyberrisk-api/llms.txt) - [OpenAPI document](https://skmtc.dev/upguard/apis/upguard-cyberrisk-api/revisions/d044bf6dc61e?raw)
