> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# How to unpause a signature workflow

> This topic demonstrates how to resume an envelope workflow that has been paused.

eSignature REST API 2.1 only

This topic demonstrates how to resume an envelope workflow that has been paused. For information on creating an envelope with a paused workflow, see [How to pause a signature workflow](/docs/esign-rest-api/how-to/pause-workflow).

> **Note**
>
> Run this code example from our [Quickstart](/docs/esign-rest-api/quickstart) or launcher projects: [Bash](https://github.com/docusign/code-examples-bash), [C#](https://github.com/docusign/code-examples-csharp), [Java](https://github.com/docusign/code-examples-java), [Node.js](https://github.com/docusign/code-examples-node), [PHP](https://github.com/docusign/code-examples-php), [PowerShell](https://github.com/docusign/code-examples-powershell), [Python](https://github.com/docusign/code-examples-python), or [Ruby](https://github.com/docusign/code-examples-ruby).

## Required data

Running the code in this how-to requires this data:

| Data element      | Description                                                                                                                                                                                                                                                                                                            |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \{API_ACCOUNT_ID} | A [GUID](http://guid.one/) value that identifies your account. This value is automatically generated by Docusign for any account you create. Copy the value from the **API Account ID** field on the [Apps and Keys](https://admindemo.docusign.com/authenticate?goTo=appsAndKeys) page.                               |
| \{BASE_PATH}      | A string value that forms the root of the URL required to make API calls. The base path value in the example code is set to target the developer environment at https\://\<domain>/restapi Where \<domain> is demo.docusign.net for the developer environment and is the result of the GetUserInfo call in production. |
| \{ENVELOPE_ID}    | A [GUID](http://guid.one/) value that identifies a Docusign [envelope](/docs/esign-rest-api/esign101/concepts/envelopes). This value is automatically generated by Docusign when the envelope is created.                                                                                                              |

## Step 1. Obtain your OAuth token

To make the API call shown in this how-to, you need a valid OAuth access token. Docusign supports access tokens for three different recommended OAuth grant types: Public Authorization Code Grant, Confidential Authorization Code Grant, and JSON Web Token (JWT) Grant. Choose the OAuth grant type appropriate for your scenario.

> **Note**
>
> See [Confidential Authorization Code Grant](/platform/auth/authcode#confidential-authorization-code-grant) for guidance on your options to get an Confidential Authorization Code Grant  OAuth token.

![Three icons that represent the three methods a user can use to obtain an OAuth token: JSON Web Token (JWT), Public Authorization Code Grant (ACG), and Confidential Authorization Code grant](/_fern-files/_img/64f473773042ee439449a096bf7673292b1585b86a4ccc55f82ba0dda41f61a1.webp)

## Step 2. Construct your API headers

After you have a valid OAuth access token, you are ready to construct the API headers that you will pass to the API call. Construct your headers like this, but make sure to substitute your valid OAuth access token for \{ACCESS_TOKEN}.

**`Bash`**

```bash title="Bash"
declare -a Headers=('--header' "Authorization: Bearer $ACCESS_TOKEN"
    '--header' "Accept: application/json"
    '--header' "Content-Type: application/json")
```

**`C#`**

```csharp title="C#"
var docuSignClient = new DocuSignClient(basePath);
docuSignClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
```

**`Java`**

```java title="Java"
EnvelopesApi envelopesApi = createEnvelopesApi(session.getBasePath(), user.getAccessToken());
```

**`Node.js`**

```javascript title="Node.js"
let dsApiClient = new docusign.ApiClient();
dsApiClient.setBasePath(args.basePath);
dsApiClient.addDefaultHeader('Authorization', 'Bearer ' + args.accessToken);
```

**`PHP`**

```php title="PHP"
$config = new Configuration();
$config->setHost($args['base_path']);
$config->addDefaultHeader('Authorization', 'Bearer ' . $args['ds_access_token']);
$this->apiClient = new ApiClient($config);
```

**`PowerShell`**

```text title="PowerShell"
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.add("Authorization", "Bearer $oAuthAccessToken")
$headers.add("Accept", "application/json")
$headers.add("Content-Type", "application/json")
```

**`Python`**

```python title="Python"
api_client = create_api_client(
    base_path=args["base_path"], access_token=args["access_token"]
)
```

**`Ruby`**

```ruby title="Ruby"
configuration = DocuSign_eSign::Configuration.new
configuration.host = args[:basePath]

api_client = DocuSign_eSign::ApiClient.new configuration
api_client.set_default_header('Authorization', "Bearer #{args[:accessToken]}")
```

## Step 3. Construct the request body

To unpause your envelope workflow, make a resend request to update the envelope with the new workflow information. To do this, change the `workflowStatus` from `pause_before` to `in_progress`.

**`Bash`**

```bash title="Bash"
printf \
    '{
  "workflow":
    {
        "workflowStatus": "in_progress"
    }
}' >>$request_data
```

**`C#`**

```csharp title="C#"
private static Envelope MakeEnvelope()
{
    return new Envelope
    {
        Workflow = new Workflow()
        {
            WorkflowStatus = "in_progress",
        },
    };
}
```

**`Java`**

```java title="Java"
Workflow workflow = new Workflow();
workflow.setWorkflowStatus(EnvelopeHelpers.WORKFLOW_STATUS_IN_PROGRESS);

Envelope envelope = new Envelope();
envelope.setWorkflow(workflow);

EnvelopesApi.UpdateOptions updateOptions = envelopesApi.new UpdateOptions();
updateOptions.setResendEnvelope("true");
```

**`Node.js`**

```javascript title="Node.js"
const workflow = docusign.Workflow.constructFromObject({
  workflowStatus: 'in_progress',
});
const envelopeDefinition = docusign.EnvelopeDefinition.constructFromObject({
  workflow,
});
```

**`PHP`**

```php title="PHP"
$env = new EnvelopeDefinition([
    'workflow' => new Workflow(['workflow_status' => 'in_progress'])
]);
$envelope_api = $clientService->getEnvelopeApi();
$envelope_option = new UpdateOptions();

# Update resend envelope parameter
$envelope_option->setResendEnvelope('true');
```

**`PowerShell`**

```text title="PowerShell"
@{
    workflow =
    @{
        workflowStatus = "in_progress";
    };
} | ConvertTo-Json -Depth 32 > $requestData
```

**`Python`**

```python title="Python"
env = EnvelopeDefinition(workflow=Workflow(workflow_status="in_progress"))
```

**`Ruby`**

```ruby title="Ruby"
workflow = DocuSign_eSign::Workflow.new(status: args[:status])

envelope_definition = DocuSign_eSign::EnvelopeDefinition.new(workflow: workflow)
```

## Step 4. Call the eSignature API

Now that you have constructed your API headers and request body, you can make a request to the eSignature REST API endpoint to resume the workflow. Here’s how you make the call, but make sure to substitute your API account ID for \{ACCOUNT_ID}.

> **Note**
>
> View the source code for this how-to on GitHub: [Bash](https://github.com/docusign/code-examples-bash/blob/master/examples/eSignature/eg033UnpauseSignatureWorkflow.sh), [C#](https://github.com/docusign/code-examples-csharp/blob/master/launcher-csharp/eSignature/Examples/UnpauseSignatureWorkflow.cs), [Java](https://github.com/docusign/code-examples-java/blob/master/src/main/java/com/docusign/controller/eSignature/services/UnpauseSignatureWorkflowService.java), [Node.js](https://github.com/docusign/code-examples-node/blob/master/lib/eSignature/examples/unpauseSignatureWorkflow.js), [PHP](https://github.com/docusign/code-examples-php/blob/master/src/Services/Examples/eSignature/UnpauseSignatureWorkflowService.php), [PowerShell](https://github.com/docusign/code-examples-powershell/blob/main/examples/eSignature/eg033UnpauseSignatureWorkflow.ps1), [Python](https://github.com/docusign/code-examples-python/blob/master/app/eSignature/examples/eg033_unpause_signature_workflow.py), or [Ruby](https://github.com/docusign/code-examples-ruby/blob/main/app/services/e_sign/eg033_unpauses_signature_workflow_service.rb).

**`Bash`**

```bash title="Bash"
Status=$(curl --request PUT "${base_path}/v2.1/accounts/${account_id}/envelopes/${envelope_id}?resend_envelope=true" \
    "${Headers[@]}" \
    --data-binary @${request_data} \
    --output ${response})
```

**`C#`**

```csharp title="C#"
var updateOptions = new UpdateOptions() { resendEnvelope = "true" };
var response = envelopesApi.UpdateWithHttpInfo(accountId, pausedEnvelopeId, envelope, updateOptions);
response.Headers.TryGetValue("X-RateLimit-Remaining", out string remaining);
response.Headers.TryGetValue("X-RateLimit-Reset", out string reset);

if (reset != null && remaining != null)
{
    DateTime resetDate = DateTimeOffset.FromUnixTimeSeconds(long.Parse(reset)).UtcDateTime;
    Console.WriteLine("API calls remaining: " + remaining);
    Console.WriteLine("Next Reset: " + resetDate);
}

return response.Data;
```

**`Java`**

```java title="Java"
var updateEnvelopeResponse = envelopesApi.updateWithHttpInfo(
        accountId,
        envelopeId,
        envelope,
        updateOptions);
Map<String, List<String>> headers = updateEnvelopeResponse.getHeaders();
java.util.List<String> remaining = headers.get("X-RateLimit-Remaining");
java.util.List<String> reset = headers.get("X-RateLimit-Reset");

if (remaining != null & reset != null) {
    Instant resetInstant = Instant.ofEpochSecond(Long.parseLong(reset.get(0)));
    System.out.println("API calls remaining: " + remaining);
    System.out.println("Next Reset: " + resetInstant);
}
return updateEnvelopeResponse.getData();
```

**`Node.js`**

```javascript title="Node.js"
const envelopesApi = new docusign.EnvelopesApi(dsApiClient);
const result = await envelopesApi.update(args.accountId, args.envelopeId, {
  envelopeDefinition,
  resendEnvelope: true,
}, (error, data, response) => {
    const headers = response?.headers;

    const remaining = headers?.['x-ratelimit-remaining'];
    const reset = headers?.['x-ratelimit-reset'];

    if (remaining && reset) {
      const resetInstant = new Date(Number(reset) * 1000);

      console.log(`API calls remaining: ${remaining}`);
      console.log(`Next Reset: ${resetInstant.toISOString()}`);
    }
});
```

**`PHP`**

```php title="PHP"
$envelope = $envelope_api->updateWithHttpInfo(
    $args['account_id'],
    $args['pause_envelope_id'],
    $env,
    $envelope_option
);

$remaining = $envelope[2]['X-RateLimit-Remaining'] ?? null;
$reset =  $envelope[2]['X-RateLimit-Reset'] ?? null;

if ($remaining !== null && $reset !== null) {
    $resetInstant = (new DateTime())->setTimestamp((int)$reset);
    error_log("API calls remaining: $remaining");
    error_log("Next Reset: " . $resetInstant->format(\DateTime::ATOM));
}
```

**`PowerShell`**

```text title="PowerShell"
$uri = "https://demo.docusign.net/restapi/v2.1/accounts/${APIaccountId}/envelopes/${envelopeId}?resend_envelope=true"
Invoke-RestMethod `
    -Uri $uri `
    -Method 'PUT' `
    -Headers @{
    'Authorization' = "Bearer $oAuthAccessToken";
    'Accept'        = "application/json";
    'Content-Type'  = "application/json";
} `
    -InFile (Resolve-Path $requestData).Path `
    -OutFile $response
```

**`Python`**

```python title="Python"
envelopes_api = EnvelopesApi(api_client)
(results, status, headers) = envelopes_api.update_with_http_info(
    account_id=args["account_id"],
    envelope_id=args["envelope_id"],
    envelope=env,
    resend_envelope=True
)

remaining = headers.get("X-RateLimit-Remaining")
reset = headers.get("X-RateLimit-Reset")

if remaining is not None and reset is not None:
    reset_date = dt.fromtimestamp(int(reset), tz=timezone.utc)
    print(f"API calls remaining: {remaining}")
    print(f"Next Reset: {reset_date}")
```

**`Ruby`**

```ruby title="Ruby"
envelopes_api = DocuSign_eSign::EnvelopesApi.new(api_client)

update_options = DocuSign_eSign::UpdateOptions.new
update_options.resend_envelope = true

results, _status, headers = envelopes_api.update_with_http_info(
  args[:accountId],
  args[:envelopeId],
  envelope_definition,
  update_options
)

remaining = headers['X-RateLimit-Remaining']
reset = headers['X-RateLimit-Reset']

if remaining && reset
  reset_date = Time.at(reset.to_i).utc
  puts "API calls remaining: #{remaining}"
  puts "Next Reset: #{reset_date}"
end

results
  end
```

## Expected response

If you run this code example from our Quickstart or launcher projects, you should see a JSON response similar to the code shown.

**`Sample response`**

```json title="Sample response"
Request:

{
  "workflow":
  {
    "workflowStatus": "in_progress"
  }
}
{"envelopeId":"6909296e-xxxx-xxxx-xxxx-e02f22ea80ec"}
```

## Next steps

* Run this code example from our [Quickstart](/docs/esign-rest-api/quickstart) or launcher projects:    [Bash](https://github.com/docusign/code-examples-bash), [C#](https://github.com/docusign/code-examples-csharp), [Java](https://github.com/docusign/code-examples-java), [Node.js](https://github.com/docusign/code-examples-node), [PHP](https://github.com/docusign/code-examples-php), [PowerShell](https://github.com/docusign/code-examples-powershell), [Python](https://github.com/docusign/code-examples-python), or [Ruby](https://github.com/docusign/code-examples-ruby).
* Learn more about [Advanced Recipient Routing (ARR)](/docs/esign-rest-api/esign101/concepts/recipients/pause-unpause-workflow).
* See [How to pause a signature workflow](/docs/esign-rest-api/how-to/pause-workflow).
* See [How to use conditional recipients](/docs/esign-rest-api/how-to/use-conditional-recipients).
* See how to [Go-Live](/docs/esign-rest-api/go-live) with a completed app and find the base path for API calls in the production environment.