# Remove authentication from the document

{% patch /%}
{% path text="/v1/document/RemoveAuthentication" /%}

Removes authentication from the signature request document, and the recipient is no longer required to provide a secure code when accessing the signing page.

## Code snippet

The following sample code snippet requests for the removal of authentication for a particular recipient in the document signing process.

{% codetab  id="codetab1" %}

cURL

```shell
curl -X PATCH "https://api.boldsign.com/v1/document/RemoveAuthentication?documentId={documentId}"
     -H 'X-API-KEY: {your API key}'
     -H "Content-Type: application/json"
     -d "{\"EmailId\": \"alexgayle@cubeflakes.com\"}"
```

C#

```csharp
var apiClient = new ApiClient("https://api.boldsign.com", "Your_API_Key");

var documentClient = new DocumentClient(apiClient);
documentClient.RemoveAuthentication("YOUR_DOCUMENT_ID", "alexgayle@cubeflakes.com");
```

Python

```python
import boldsign

configuration = boldsign.Configuration(host = "https://api.boldsign.com", api_key="YOUR_API_KEY")

with boldsign.ApiClient(configuration) as api_client:
    
    document_api = boldsign.DocumentApi(api_client)
	
    remove_authentication = boldsign.RemoveAuthentication(emailId="david@cubeflakes.com")
    
    document_api.remove_authentication(document_id="YOUR_DOCUMENT_ID", remove_authentication =remove_authentication)
```

PHP

```php
<?php require_once "vendor/autoload.php";

use BoldSign\Configuration;
use BoldSign\Api\DocumentApi;
use BoldSign\Model\RemoveAuthentication;

$config = new Configuration();
$config->setHost('https://api.boldsign.com');
$config->setApiKey('YOUR_API_KEY');

$document_api = new DocumentApi($config);

$remove_authentication = new RemoveAuthentication();
$remove_authentication->setEmailId('alexgayle@cubeflakes.com');

$document_api->removeAuthentication($document_id = 'YOUR_DOCUMENT_ID', $remove_authentication);
```

Java

```java
ApiClient client = Configuration.getDefaultApiClient();
client.setBasePath("https://api.boldsign.com");
client.setApiKey("YOUR_API_KEY");
			
DocumentApi documentApi = new DocumentApi(client);

RemoveAuthentication removeAuthentication = new RemoveAuthentication();
removeAuthentication.setEmailId("alexgayle@cubeflakes.com"); 

documentApi.removeAuthentication("YOUR_DOCUMENT_ID", removeAuthentication);
```

NodeJS

```js
import { DocumentApi, RemoveAuthentication } from "boldsign";

const documentApi = new DocumentApi("https://api.boldsign.com");
documentApi.setApiKey("YOUR_API_KEY");

const removeAuthentication = new RemoveAuthentication();
removeAuthentication.emailId = "alexgayle@boldsign.dev";

documentApi.removeAuthentication("YOUR_DOCUMENT_ID", removeAuthentication);
```

{% /codetab %}

If a document contains repeated signers with signing order, in that case, the recipient's signing order can be specified along with the signer's email in the remove authentication request, as shown in the following code snippet.

{% codetab id="codetab2" %}

cURL

```shell
curl -X PATCH "https://api.boldsign.com/v1/document/RemoveAuthentication?documentId={documentId}"
     -H 'X-API-KEY: {your API key}'
     -H "Content-Type: application/json"
     -d "{\"EmailId\": \"alexgayle@cubeflakes.com\", \"zOrder\": 2}"
```

C#

```csharp
var apiClient = new ApiClient("https://api.boldsign.com", "Your_API_Key");

var documentClient = new DocumentClient(apiClient);
documentClient.RemoveAuthentication("YOUR_DOCUMENT_ID", "alexgayle@cubeflakes.com", 1);
```

Python

```python
import boldsign

configuration = boldsign.Configuration(host = "https://api.boldsign.com", api_key="YOUR_API_KEY")

with boldsign.ApiClient(configuration) as api_client:
    
    document_api = boldsign.DocumentApi(api_client)
	
    remove_authentication = boldsign.RemoveAuthentication(emailId="david@cubeflakes.com", zOrder=1)
    
    document_api.remove_authentication(document_id="YOUR_DOCUMENT_ID", remove_authentication =remove_authentication)
```

PHP

```php
<?php require_once "vendor/autoload.php";

use BoldSign\Configuration;
use BoldSign\Api\DocumentApi;
use BoldSign\Model\RemoveAuthentication;

$config = new Configuration();
$config->setHost('https://api.boldsign.com');
$config->setApiKey('YOUR_API_KEY');

$document_api = new DocumentApi($config);

$remove_authentication = new RemoveAuthentication();
$remove_authentication->setEmailId('alexgayle@cubeflakes.com');
$remove_authentication->setZOrder(1);

$document_api->removeAuthentication($document_id = 'YOUR_DOCUMENT_ID', $remove_authentication);
```

Java

```java
ApiClient client = Configuration.getDefaultApiClient();
client.setBasePath("https://api.boldsign.com");
client.setApiKey("YOUR_API_KEY");
			
DocumentApi documentApi = new DocumentApi(client);

RemoveAuthentication removeAuthentication = new RemoveAuthentication();
removeAuthentication.setEmailId("alexgayle@cubeflakes.com"); 
removeAuthentication.setzOrder(1);

documentApi.removeAuthentication("YOUR_DOCUMENT_ID", removeAuthentication);
```

NodeJS

```js
import { DocumentApi, RemoveAuthentication } from "boldsign";

const documentApi = new DocumentApi("https://api.boldsign.com");
documentApi.setApiKey("YOUR_API_KEY");

const removeAuthentication = new RemoveAuthentication();
removeAuthentication.emailId = "alexgayle@cubeflakes.com";
removeAuthentication.zOrder = 1;

documentApi.removeAuthentication("YOUR_DOCUMENT_ID", removeAuthentication);
```

{% /codetab %}

## Query parameters

{% nestedtable %}

- {% arguments name="documentId" /%}{% batch datatype="string" /%}{% required /%}
- ID of the requested document

{% /nestedtable %}

## Request body

{% nestedtable %}

- {% arguments name="EmailId" /%}{% batch datatype="string" /%}{% required /%}
- Email address of the signer.

---

- {% arguments name="OnBehalfOf" /%}{% batch datatype="string" /%}
- If the document is created on behalf of the sender, the sender's identity email address must be specified.

---

- {% arguments name="zOrder" /%}{% batch datatype="Int" /%}
- A number that denotes the signer's order, which targets the given email address present in the recipient list.

{% /nestedtable %}

## Example response

***204 No Content***
