- Common Error Responses
- Authentication
- Filtering Data
- Getting Started
- Authentication
- User Confirmation
- User Invitation
- Password Reset
- Impersonation
- MFA
- Sign in authenticationPOST
- Sign in with recovery codePOST
- Sign out authenticationDELETE
- Advanced Reports
- Audit
- Notifications
- Exceptions
- Hosts
- Organizations
- Whitelabel Settings
- Port Lists
- Reports
- Scanners
- Scans
- Schedules
- Targets
- User
- User 2FA
- User Preferences
- Get current user
- Update current user
- Change current user password
- Get current user active plans (Not implemented yet)
- Get organization members
- Get current user products
- Get current organization
- Update current organization
- Get subscriptions history
- Change users product
- Checks if authorization token is valid
- Get current user permissions
- Check if the user can be deleted
- Delete my account
- Generates a new access token
- Revokes the current access token
- (Admin) Transfers all the resources from the user to another user
- Users
- Vulnerabilities
- Webhooks
Create Target
POST
/v2/targets
Targets
Last modified:2025-04-24 10:59:46
Request
Body Params application/json
target
objectÂ
required
name
stringÂ
required
Example:
target test
hosts
stringÂ
required
hosts (Ex: An IP: 192.168.1.1 or a range of IPs: 192.168.1.0/24)
Example:
155.168.1.0/24
exclude_hosts
string  | nullÂ
optional
Example:
155.168.1.55
comment
string  | nullÂ
optional
Example:
my comment
Example
{
"target": {
"name": "target test",
"hosts": "155.168.1.0/24",
"exclude_hosts": "155.168.1.55",
"comment": "my comment"
}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/v2/targets' \
--header 'Content-Type: application/json' \
--data-raw '{
"target": {
"name": "target test",
"hosts": "155.168.1.0/24",
"exclude_hosts": "155.168.1.55",
"comment": "my comment"
}
}'
Responses
đŸŸ¢201Created
This response does not have a body.
đŸŸ 401Unauthorized
đŸŸ 422Parameter Error
Modified at 2025-04-24 10:59:46