# Delegations: Is there any possibility to add Delegations via Web Service?

**URL:** <https://discuss.workflowgen.com/t/delegations-is-there-any-possibility-to-add-delegations-via-web-service/312>\
**Category:** Web API\
**Created:** [July 28, 2013, 4:16am UTC](https://discuss.workflowgen.com/t/delegations-is-there-any-possibility-to-add-delegations-via-web-service/312 "2013-07-28T04:16:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wfg-admin](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/wfg-admin/32/714_2.png) [@wfg-admin](https://discuss.workflowgen.com/u/wfg-admin)\
**Post date:** [July 28, 2013, 4:16am UTC](https://discuss.workflowgen.com/t/delegations-is-there-any-possibility-to-add-delegations-via-web-service/312/1 "2013-07-28T04:16:28Z")

</div>

You can use the WorkflowGen Web Service API method to add a new delegation for the current connected user:

`http://server:port/wfgen/ws/processesruntime.asmx?op=AddDelegation`

If needed, you can specify a `BeginDate` and an `EndDate`. The same parameters could be used in HTTP GET and POST.

```auto
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soap:Header>
        <AddDelegationHeader xmlns="http://www.workflowgen.com/services">
            <BeginDate>dateTime</BeginDate>
            <EndDate>dateTime</EndDate>
            <NotifyDelegate>boolean</NotifyDelegate>
        </AddDelegationHeader>
    </soap:Header>
    <soap:Body>
        <AddDelegation xmlns="http://www.workflowgen.com/services">
            <processId>int</processId>
            <participantId>int</participantId>
            <delegateUserId>int</delegateUserId>
        </AddDelegation>
    </soap:Body>
</soap:Envelope>

```
