> ## Documentation Index
> Fetch the complete documentation index at: https://sendforsign.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create placeholder

> Add a placeholder to a contract or template with the Sendforsign API, and choose who fills it in.

One way to add placeholders to a contract is when you create a new contract.
[See this page](https://sendforsign.com/docs/api-reference/contract/create-fill.md) to learn more.

If a contract already exists, use the request below.

### Body parameters

**data** `object` *required*

**child attribute**

**action** `string` *required*

Action type.

**clientKey** `string` *required*

Key of the client.

**contractKey** `string` *required*

Key of the contract.

**placeholder** `object` *required*

Structure, add the fields that need to be updated and ignore the rest.

**child attribute**

**name** `string` *required*

Name of the placeholder

**value** `string`

Value of the placeholder.

**fillingType** `number`

Who fills in this placeholder when the contract is shared ("Who fills in this field" in the editor):
`1` — nobody (default), `2` — the contract owner, `3` — any recipient, `4` — a specific recipient set in `externalRecipientKey`.
[See the use case.](https://sendforsign.com/docs/usecase/placeholder-filler.md)

**externalRecipientKey** `string`

`recipientKey` of the recipient who fills in this placeholder. Required when `fillingType` is `4`.
Get it from the [list of recipients](https://sendforsign.com/docs/api-reference/recipient/list.md). Leave it out (or `null`) for any other `fillingType`.

### Response

**placeholder** `string`

Placeholder structure.

**child attribute**

**createTime** `string`

Create time.

**changeTime** `string`

Change time.

**code** `string`

The code of the answer.

**message** `string`

The message of the answer.

```bash cURL theme={null}
curl -X POST 'https://api.sendforsign.com/api/placeholder' \
     -H 'X-Sendforsign-Key: YOUR_API_KEY' \
     -H 'Content-Type: application/json' \
     -d '{
    "data": {
        "action": "create",
        "clientKey": "YOUR_CLIENT_KEY",
        "contractKey": "CONTRACT_KEY",
        "placeholder": {
            "name": "Placeholder name",
            "value": "Placeholder value",
            "fillingType": 4,
            "externalRecipientKey": "RECIPIENT_KEY"
        }
    }
}'
```

```json Response theme={null}
{
    "placeholder": {
        "id": "3",
        "createTime": "2024-11-22T11:11:24.000Z",
        "changeTime": "2024-11-22T11:11:24.000Z",
        "name": "1",
        "value": "hello",
        "type": "1",
        "placeholderKey": "PLACEHOLDER_KEY",
        "position": "3"
    },
    "code": 201,
    "message": "Placeholder created"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.