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

# 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/26.1/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/26.1/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/26.1/logs/sdk-request-profiler/delete-profiling-session) before creating a new one.

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

## Headers

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

## Body Parameters

<FieldTable>
| Name | Description |
| --- | --- |
| `label`<Requiredness type="required" /> | The UI label for this request. |
| `user_id`<Requiredness type="optional" /> | 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`<Requiredness type="optional" /> | An Admin-facing description of the session. |
</FieldTable>

## Request

<CodeExample title="">
```bash
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

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

## Response Details

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

---

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