Search + K

Command Palette

Search for a command to run...

Sign In

Create new targets

PUT /accounts/{account_id}/infrastructure/targets/batch
Copy endpoint
https://api.cloudflare.com/client/v4

Adds one or more targets.

Parameters

path Path Parameters

Name Type
account_id required
type InfraAccountTag = string

Request Body

application/json required
{ hostname: string;ip: InfraIPInfo

The IPv4/IPv6 address that identifies where to reach a target

interface InfraIPInfo {
ipv4?: { ip_addr?: string;virtual_network_id?: string; };
ipv6?: { ip_addr?: string;virtual_network_id?: string; };
}
; }
[]

Responses

200 application/json

Successfully created the targets

type InfraApiResponseSingle = interface InfraApiResponseCommon {
errors: InfraMessages
type InfraMessages = {
code: number;
documentation_url?: string;
message: string;
source?: { pointer?: string; };
}
[]
;
messages: InfraMessages
type InfraMessages = {
code: number;
documentation_url?: string;
message: string;
source?: { pointer?: string; };
}
[]
;
success: true;
}
& {}
& { result?: InfraTargetArray
type InfraTargetArray = InfraTarget[]
; }

Client Errors

4XX application/json

Failed to create the targets

interface InfraApiResponseCommonFailure {
errors: InfraMessages
type InfraMessages = {
code: number;
documentation_url?: string;
message: string;
source?: { pointer?: string; };
}
[]
;
messages: InfraMessages
type InfraMessages = {
code: number;
documentation_url?: string;
message: string;
source?: { pointer?: string; };
}
[]
;
result: null;
success: false;
}