# Create a share link (/docs/api-reference/share-links/create)

> Creates a public, unguessable link to a rendered document that anyone can open without an API key, until it expires or is revoked.

`POST https://druckling-nine.vercel.app/v1/documents/{id}/share_links`

Creates a public, unguessable link to a rendered document that anyone can open without an API key, until it expires or is revoked. The link never outlives the file: `expires_at` is capped by the document's retention. The `url` is returned only here.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

## Request body (JSON Schema)

```json
{
  "type": "object",
  "properties": {
    "expires_in_days": {
      "type": "integer",
      "minimum": 1,
      "maximum": 30,
      "description": "Days until the link stops working (default 7, at most 30)."
    }
  }
}
```

## Response 201: OK

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "const": "share_link"
    },
    "document": {
      "type": "string"
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The public link. Returned only when the link is created: Druckling keeps a hash of it, not the link itself."
    },
    "hint": {
      "type": "string",
      "description": "Last four characters of the link, to tell links apart."
    },
    "status": {
      "enum": [
        "active",
        "expired",
        "revoked"
      ],
      "type": "string"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "revoked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "test_mode": {
      "type": "boolean"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "id",
    "object",
    "document",
    "url",
    "hint",
    "status",
    "expires_at",
    "revoked_at",
    "test_mode",
    "created_at"
  ]
}
```