Create new target
POST
/accounts/{account_id}/infrastructure/targets https://api.cloudflare.com/client/v4
Parameters
path Path Parameters
| Name | Type |
|---|---|
account_id
required
| type InfraAccountTag = string |
Request Body
application/json
required
{ hostname: string;ip: InfraIPInfo ; }
Responses
200 application/json
Successfully created the target
type InfraApiResponseSingle = interface InfraApiResponseCommon {
errors:InfraMessages ;
messages:InfraMessages ;
success: true;
} & {} & { result?:InfraTarget ; }
errors:
messages:
success: true;
} & {} & { result?:
Client Errors
4XX application/json
Failed to create the target
interface InfraApiResponseCommonFailure {
errors:InfraMessages ;
messages:InfraMessages ;
result: null;
success: false;
}
errors:
messages:
result: null;
success: false;
}