# Create a signing link (https://docs-ecmrhub-v2.lucaspiera.com/docs/api/signing-links/create_sign_grant)

## POST /rest/v1/rpc/create_sign_grant

Create a signing link

Creates a signing link for one party of an issued document, valid for 7 days. Reuse the idempotency key on retry. May need a person's approval.

```json
{
  "operationId": "create_sign_grant",
  "parameters": [
    {
      "$ref": "#/components/parameters/Approval"
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "document_id": {
              "type": "string",
              "format": "uuid"
            },
            "role": {
              "type": "string",
              "enum": [
                "sender",
                "carrier",
                "consignee"
              ]
            },
            "idempotency_key": {
              "type": "string"
            }
          },
          "required": [
            "document_id",
            "role",
            "idempotency_key"
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "additionalProperties": {}
          }
        }
      }
    },
    "428": {
      "$ref": "#/components/responses/ApprovalRefused"
    },
    "default": {
      "$ref": "#/components/responses/Problem"
    }
  }
}
```

Schemas referenced as `#/components/...` are in the full contract: https://docs-ecmrhub-v2.lucaspiera.com/openapi.json