---
title: "Create/edit signing link for doc group"
url: "https://docs.signnow.com/docs/signing-link/operations/post-v2-document-group-document_group_id-signing-links"
type: "endpoint"
section: "signing-link"
slug: "signing-link/operations/post-v2-document-group-document_group_id-signing-links"
method: "POST"
path: "/v2/document-groups/{document_group_id}/signing-links"
operation_id: "post-v2-document-group-document_group_id-signing-links"
authorization: "bearer"
---

# Create/edit signing link for doc group

`POST /v2/document-groups/{document_group_id}/signing-links`

Allows users to update a short link to a document group, if one already exists, or create a short link, if there isn't any for the specified document group.

This endpoint can be used only:
* by the owner of the document group
* when there are no documents within the document group that have Viewers in the routing details
* all the roles specified in the documents are mapped with recipients of the signing link
* when there are no roles with Viewer level of access to all documents
* at least one of the documents has active fields

## Authorization

bearer

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `document_group_id` | string | Yes | ID of the document group. |

## Responses

### 200

OK

**Example** (`data`)

```json
{
  "id": "2aXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "url": "https://example.com/dispatch?route=document_group_signing_link&signing_link_id=84XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "hash": "rXXXXXXX",
  "created": 1625239864,
  "short_url": "shorturl.at/wXXXXX"
}
```

### 400

* Request without headers
* There are no fields on the documents
* Document group has active invite
* There is no recipient on the document group
* There is no guest signer on the first signing step.
* There is more than one guest signer on the document group.
* Documents should not be deleted.
* Not all signers mapped to recipients.
* There cannot exist view only recipient on the document group.
* `Require Login to Sign` organization setting is enabled.
* `Invites Must Use Two Factor Authentication` organization setting is enabled. 
* At least one recipient contain email group



**Example** (`Request without headers`)

```json
{
  "code": 1537,
  "error": "invalid_token"
}
```

**Example** (`Document group has active invite`)

```json
{
  "errors": [
    {
      "code": 19040003,
      "message": "Document group has active invite."
    }
  ]
}
```

**Example** (`Documents should not be deleted.`)

```json
{
  "errors": [
    {
      "code": 19040007,
      "message": "Documents should not be deleted."
    }
  ]
}
```

**Example** (`Not all signers mapped to recipients.`)

```json
{
  "errors": [
    {
      "code": 19040008,
      "message": "Not all signers mapped to recipients."
    }
  ]
}
```

**Example** (`There are no fields on the documents.`)

```json
{
  "errors": [
    {
      "code": 19040002,
      "message": "There are no fields on the documents."
    }
  ]
}
```

**Example** (`At least one recipient contain email group`)

```json
{
  "errors": [
    {
      "code": 190400012,
      "message": "At least one recipient contains email group."
    }
  ]
}
```

**Example** (`There is no recipient on the document group.`)

```json
{
  "errors": [
    {
      "code": 19040004,
      "message": "There is no recipient on the document group."
    }
  ]
}
```

**Example** (`There is no guest signer on the first signing step.`)

```json
{
  "errors": [
    {
      "code": 19040005,
      "message": "There is no guest signer on the first signing step."
    }
  ]
}
```

**Example** (``Require Login to Sign` organization setting is enabled.`)

```json
{
  "errors": [
    {
      "code": 190400011,
      "message": "Require Login to Sign organization setting is enabled."
    }
  ]
}
```

**Example** (`There is more than one guest signer on the document group.`)

```json
{
  "errors": [
    {
      "code": 19040006,
      "message": "There is more than one guest signer on the document group."
    }
  ]
}
```

**Example** (`There cannot exist view only recipient on the document group.`)

```json
{
  "errors": [
    {
      "code": 190400010,
      "message": "There cannot exist view only recipient on the document group."
    }
  ]
}
```

**Example** (``Invites Must Use Two Factor Authentication` organization setting is enabled`)

```json
{
  "errors": [
    {
      "code": 190400012,
      "message": "`Invites Must Use Two Factor Authentication` organization setting is enabled."
    }
  ]
}
```

### 403

Current user is not document group owner.

**Example** (`Current user is not document group owner.`)

```json
{
  "errors": [
    {
      "code": 19040001,
      "message": "Current user is not document group owner."
    }
  ]
}
```

## Code Examples

> Replace `$SIGNNOW_ACCESS_TOKEN` and any `{placeholder}` values before running.

### cURL

```bash
curl -X POST \
  "https://api.signnow.com/v2/document-groups/{document_group_id}/signing-links" \
  -H "Authorization: Bearer $SIGNNOW_ACCESS_TOKEN" \
  -H "Content-Type: application/json"
```

---
*Full reference: https://docs.signnow.com/docs/signing-link/operations/post-v2-document-group-document_group_id-signing-links*
