# Embedded Custom Field Create URL

{% post /%}
{% path text="/v1/customField/createEmbeddedCustomFieldUrl" /%}

This API enables users to generate an embedded custom field creation link, which can be seamlessly integrated into their applications through an iFrame or opened in a web browser to create, edit, or delete custom fields directly.

## Code snippet

{% codetab %}

cURL

```shell
curl -X 'POST' \
  'https://api.boldsign.com/v1/customField/createEmbeddedCustomFieldUrl?brandId={brandId}&linkValidTill=2023-05-06T09%3A12%3A28Z' \
  -H 'accept: application/json' \
  -H 'X-API-KEY: {your API key}' \
  -d ''
```

C#

```csharp
var apiClient = new ApiClient("https://api.boldsign.com", "Your_API_Key");

var customFieldClient = new CustomFieldClient(apiClient);

var embeddedCustomFieldDetails = new EmbeddedCustomFieldDetails()
{
    BrandId = "YOUR_BRAND_ID", 
};

var embeddedCustomFieldCreated = customFieldClient.CreateEmbeddedCustomFieldUrl(embeddedCustomFieldDetails);
```

Python

```python
import boldsign

configuration = boldsign.Configuration(host = "https://api.boldsign.com", api_key="YOUR_API_KEY")

with boldsign.ApiClient(configuration) as api_client:
    
    custom_field_api = boldsign.CustomFieldApi(api_client)
	
    embedded_custom_field_created = custom_field_api.embed_custom_field(brand_id="YOUR_BRAND_ID")
```

PHP

```php
<?php require_once "vendor/autoload.php";

use BoldSign\Configuration;
use BoldSign\Api\CustomFieldApi;

$config = new Configuration();
$config->setHost('https://api.boldsign.com');
$config->setApiKey('YOUR_API_KEY');

$custom_field_api = new CustomFieldApi($config);
$embedded_custom_field_created = $custom_field_api->embedCustomField($brand_id = 'YOUR_BRAND_ID');
```

Java

```java
ApiClient client = Configuration.getDefaultApiClient();
client.setBasePath("https://api.boldsign.com");
client.setApiKey("YOUR_API_KEY");

CustomFieldApi customFieldApi = new CustomFieldApi(client);

OffsetDateTime linkValidTill = OffsetDateTime.parse("VALID_DATE");
EmbeddedCustomFieldCreated embeddedCustomFieldCreated = customFieldApi.embedCustomField("YOUR_BRAND_ID", linkValidTill);
```

NodeJS

```js
import { CustomFieldApi } from "boldsign";

const customFieldApi = new CustomFieldApi("https://api.boldsign.com");
customFieldApi.setApiKey("YOUR_API_KEY");

const embeddedCustomFieldCreated = customFieldApi.embedCustomField("YOUR_BRAND_ID");
```

{% /codetab %}

## Query parameters

{% nestedtable %}

- {% arguments name="brandId" /%}{% batch datatype="string" /%}{% required /%}
- The brand ID needs to be passed to generate an embedded custom field URL.

---

- {% arguments name="linkValidTill" /%}{% batch datatype="string" /%}
- Configure the expiration for the generated URL. A maximum of 30 days can be assigned. The string should be in date-time format.

{% /nestedtable %}

## Example response

***200 Success***

```json
{
  "createUrl": "https://app.boldsign.com/document/configure-custom-field/?brandId=8e5da275-xxxx-xxxx-xxxx-e936d8619cac_hSWgo"
}
```
