**Source URL:** https://limited.veevavault.dev/quality/vault-api/api-reference/24.3/logs/sdk-request-profiler/create-profiling-session.md

# Create Profiling Session



Create a new SDK request profiling session. Profiling sessions allow developers to troubleshoot custom code and improve code quality by analyzing results at the SDK request level.

Vault starts the profiling session immediately on creation. Profiling sessions run for either 20 minutes or up to 10,000 SDK requests, whichever comes first. To end a session early, use the [End Profiling Session](/vault-api/api-reference/24.3/logs/sdk-request-profiler/end-profiling-session) endpoint. Once ended, a session’s `status` is `processing__sys` while Vault prepares the data, which may take about 15 minutes. Once the `status` is `complete__sys`, the data is available for download with the [Download Profiling Session Results](/vault-api/api-reference/24.3/logs/sdk-request-profiler/download-profiling-session-results) endpoint.

Only one profiling session can be active at a time. Because sessions begin immediately on creation, you cannot create a new session until the current session becomes inactive. Additionally, each Vault can only retain profiling session data for up to 10 sessions. If your Vault already has 10 profiling sessions, you must [Delete a Profiling Session](/vault-api/api-reference/24.3/logs/sdk-request-profiler/delete-profiling-session) before creating a new one.

<Endpoint path="/api/{version}/code/profiler" method="POST"></Endpoint>

## Headers {#headers}

<FieldTable>
| Name | Description |
| --- | --- |
| `Content-Type` | `application/x-www-form-urlencoded` |
| `Accept` | `application/json` |
</FieldTable>

## Body Parameters {#body-parameters}

<FieldTable>
| Name | Description |
| --- | --- |
| `label` | The UI label for this request. |
| `user_id` | The user ID of the user to associate with this session. When specified, this SDK profiling session runs only for this user. If omitted, defaults to `null` which runs the session for all users. |
| `description` | An Admin-facing description of the session. |
</FieldTable>

## Request {#request}

<CodeExample title="">
```
curl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "label=Integration User Dry Run" \
https://myvault.veevavault.com/api/v24.3/code/profiler

```
</CodeExample>

## Response {#response}

<CodeExample title="">
```
{
   "responseStatus": "SUCCESS",
   "data": {
       "id": "0LS000000003003",
       "name": "hotfix_dry_run_01__c"
   }
}

```
</CodeExample>

## Response Details {#response-details}

On `SUCCESS`, Vault starts the profiling session immediately and returns the session `id` and `name`.



---

**Previous:** [Retrieve Profiling Session](/quality/vault-api/api-reference/24.3/logs/sdk-request-profiler/retrieve-profiling-session)  
**Next:** [End Profiling Session](/quality/vault-api/api-reference/24.3/logs/sdk-request-profiler/end-profiling-session)