

# StartPentestJob


Starts a new pentest job for a pentest configuration. The job executes the security tests defined in the pentest.

## Request Syntax


```
POST /StartPentestJob HTTP/1.1
Content-type: application/json

{
   "agentSpaceId": "string",
   "pentestId": "string"
}
```

## URI Request Parameters


The request does not use any URI parameters.

## Request Body


The request accepts the following data in JSON format.

 ** [agentSpaceId](#API_StartPentestJob_RequestSyntax) **   <a name="securityagent-StartPentestJob-request-agentSpaceId"></a>
The unique identifier of the agent space.  
Type: String  
Required: Yes

 ** [pentestId](#API_StartPentestJob_RequestSyntax) **   <a name="securityagent-StartPentestJob-request-pentestId"></a>
The unique identifier of the pentest to start a job for.  
Type: String  
Required: Yes

## Response Syntax


```
HTTP/1.1 200
Content-type: application/json

{
   "agentSpaceId": "string",
   "createdAt": "string",
   "pentestId": "string",
   "pentestJobId": "string",
   "status": "string",
   "title": "string",
   "updatedAt": "string"
}
```

## Response Elements


If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [agentSpaceId](#API_StartPentestJob_ResponseSyntax) **   <a name="securityagent-StartPentestJob-response-agentSpaceId"></a>
The unique identifier of the agent space.  
Type: String

 ** [createdAt](#API_StartPentestJob_ResponseSyntax) **   <a name="securityagent-StartPentestJob-response-createdAt"></a>
The date and time the pentest job was created, in UTC format.  
Type: Timestamp

 ** [pentestId](#API_StartPentestJob_ResponseSyntax) **   <a name="securityagent-StartPentestJob-response-pentestId"></a>
The unique identifier of the pentest.  
Type: String

 ** [pentestJobId](#API_StartPentestJob_ResponseSyntax) **   <a name="securityagent-StartPentestJob-response-pentestJobId"></a>
The unique identifier of the started pentest job.  
Type: String

 ** [status](#API_StartPentestJob_ResponseSyntax) **   <a name="securityagent-StartPentestJob-response-status"></a>
The current status of the pentest job.  
Type: String  
Valid Values: `IN_PROGRESS | STOPPING | STOPPED | FAILED | COMPLETED` 

 ** [title](#API_StartPentestJob_ResponseSyntax) **   <a name="securityagent-StartPentestJob-response-title"></a>
The title of the pentest job.  
Type: String

 ** [updatedAt](#API_StartPentestJob_ResponseSyntax) **   <a name="securityagent-StartPentestJob-response-updatedAt"></a>
The date and time the pentest job was last updated, in UTC format.  
Type: Timestamp

## Errors


For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

## See Also


For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/securityagent-2025-09-06/StartPentestJob) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/securityagent-2025-09-06/StartPentestJob) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/securityagent-2025-09-06/StartPentestJob) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/securityagent-2025-09-06/StartPentestJob) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/securityagent-2025-09-06/StartPentestJob) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/securityagent-2025-09-06/StartPentestJob) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/securityagent-2025-09-06/StartPentestJob) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/securityagent-2025-09-06/StartPentestJob) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/securityagent-2025-09-06/StartPentestJob) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/securityagent-2025-09-06/StartPentestJob) 