Smart Links

Change a link

Any subset of the create shape; omitted fields keep their stored value. Renaming slug moves the web address and nothing else. expires_at: null clears an expiry. A plan_id is dropped when the destination stops being a plan. Emits link.updated with the fields that moved.

patch/v1/projects/{project}/links/{smartLink}

Request

  • Base URL: https://api.subscriby.net
  • URL: https://api.subscriby.net/v1/projects/{project}/links/{smartLink}
  • Auth: HTTP bearer

Path parameters

projectstring uuid required

The project, resolved by the route binder.

smartLinkstring uuid required

The link, resolved within the project by the route binder.

Headers

Idempotency-Keystring uuid required

A key unique to this operation, such as a fresh UUID. The same key replays the original 2xx response for 24 hours (with Idempotent-Replay: true), so a retry after a timeout never repeats the write; the same key with a different body is refused with 409.

Request body

namestring

A new label, 2 to 120 characters.

slugstring

A new address segment, 2 to 32 letters, digits and hyphens, lowercased before the uniqueness check against the project's other links; the old address stops answering.

destination'portal' | 'plan' | 'bot'

Where a Smart Link sends the person who follows it. The destination decides the redirect and the bot payload: the portal's plan list, the checkout of one plan, or a conversation with the project's bot. The click and the attribution are recorded the same way whichever it is, so a creator can move a link between destinations without losing its figures.

plan_idstring nullable

The plan a plan destination opens; one of this project's plans. Ignored when the destination is not, or stops being, a plan.

expires_atstring date-time nullable

When the link stops counting, ISO 8601 and in the future, or null to run until archived.

Response

The link as it now reads.

Example response

{
  "data": {
    "id": "1e2a4c6b-3d5f-4a7b-9c1d-2e3f4a5b6c7d",
    "project_id": "7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13",
    "name": "YouTube description",
    "slug": "youtube",
    "code": "TUBE234",
    "destination": {
      "type": "plan",
      "plan_id": "0c9d8e7f-6a5b-4c3d-8e2f-1a2b3c4d5e6f",
      "plan_name": "Premium"
    },
    "urls": {
      "web": "https://my.subscriby.net/research-premium/go/youtube",
      "bot": "https://t.me/ResearchPremiumBot?start=via_TUBE234",
      "embed": "https://my.subscriby.net/research-premium/embed/plans?via=TUBE234"
    },
    "state": "live",
    "clicks": {
      "total": 42,
      "last_at": "2026-10-10T08:00:00+00:00"
    },
    "created_at": "2026-10-01T09:00:00+00:00",
    "updated_at": "2026-10-10T08:00:00+00:00"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.