**Source URL:** https://limited.veevavault.dev/safety/vault-api/api-reference/25.3/authentication/delegated-access/initiate-delegated-session

# Initiate Delegated Session

Generate a delegated session ID. This allows you to call Vault API on behalf of a user who granted you delegate access. To find which users have granted you delegate access, [Retrieve Delegations](/safety/vault-api/api-reference/25.3/authentication/delegated-access/retrieve-delegations).

<Endpoint path="/api/{version}/delegation/login" method="POST" />

## Headers

<FieldTable>
| Name | Description |
| --- | --- |
| `Authorization` | The `sessionId` of the currently authenticated user who will initiate the delegated session. Cannot be a `delegated_sessionid`. |
| `Accept` | `application/json` (default) or `application/xml` |
</FieldTable>

## Body Parameters

<FieldTable>
| Name | Description |
| --- | --- |
| `vault_id`<Requiredness type="required" /> | The `id` value of the Vault to initiate the delegated session. |
| `delegator_userid`<Requiredness type="required" /> | The ID of the user who granted the authenticated user delegate access in this Vault. |
</FieldTable>

## Request

<CodeExample title="">
```bash
curl -X POST -H "Authorization: {SESSION_ID}" \
-d "vault_id=5791" \
-d "delegator_userid=67899" \
https://myvault.veevavault.com/api/v22.3/delegation/login
```
</CodeExample>

## Response

<CodeExample title="">
```json
{
   "responseStatus": "SUCCESS",
   "delegated_sessionid": "1C8DBD593EDCEAD647E5E4C97A438F1F43A25C8679BB8431BDC789BC0BAAE76E0DC42D478721624765A2BA2E923852"
}
```
</CodeExample>

## Response Details

On `SUCCESS`, Vault returns a `delegated_sessionid`. To execute Vault API calls with this delegated session, use this `delegated_sessionid` value as the `Authorization` header value.

---

**Previous:** [Retrieve Delegations](/safety/vault-api/api-reference/25.3/authentication/delegated-access/retrieve-delegations)  
**Next:** [Direct Data](/safety/vault-api/api-reference/25.3/direct-data)