Skip to content
KnockDevelopers
Magic links

Update a magic link

Chat with a Developer
PATCH
/v1/magic-links/{magicLinkId}

Changes the fields you send and returns the link. The link's type and messagingApp cannot be changed. An empty body changes nothing.

Only chat and scheduling links can be created and changed here. A field of the other type fails validation and names the field, and so does an opening message the messaging app cannot show: welcomeMessage needs slack or telegram, and prefilledMessage whatsapp or linkedin.

A link made with an API key is recorded in Knock as created by that API key; one made through a connected AI assistant is made as the signed-in member. Send Content-Type: application/json. Unknown fields are ignored.

Authorization

ApiKeyAuth
headerx-api-key<token>

Your Knock API key. Ask your Knock account team for one: a key with the Enrichment API role to enrich and route leads and find warm intros, the Viewer role to read chats, meetings, routing rules, FAQs, analytics, magic links, meeting routing rules, marketing cards and members, the Admin, Editor or AI Manager role to change FAQs, the Admin, Editor or Partner Contributor role to create marketing cards and wrap chat links, or the Admin role to set the working hours of your members.

Path Parameters

magicLinkId*string

The magicLinkId of one of your links: 6 letters or digits, case-sensitive.

Match^[0-9A-Za-z]{6}$

Request Body

application/json
  1. body

The fields to change. A field you leave out keeps its value. Only prefilledMessage, welcomeMessage, title and subtitle can be null, which goes back to Knock's default. A field of the other link type, or for another messaging app, fails validation.

name?string

Name of the link in Knock. Names need not be unique, but Meeting flow - no slots found is reserved by Knock. Leading and trailing whitespace is removed.

Length1 <= length <= 200
channel?enum<string>

Where the link is shared. qr_code, marketing_card and the *_ads channels cannot be set here:

  • website: Your website.
  • offline_event: An in-person event, such as a conference, trade show or meetup.
  • virtual_event: An online event, such as a webinar or virtual summit.
  • email: An email, such as a newsletter, a campaign or a signature.
  • linkedin: LinkedIn.
  • facebook: Facebook.
  • google_ads: Google ads.
  • tiktok: TikTok.
  • instagram: Instagram.
  • twitter: X (Twitter).
  • threads: Threads.
  • reddit: Reddit.
  • youtube: YouTube.
  • vimeo: Vimeo.
  • medium: Medium.
  • docs: Your product documentation.
  • product: Inside your product.
  • discord: Discord.
  • slack: Slack.
  • slack_community: A Slack community.
  • whatsapp: WhatsApp.
  • telegram: Telegram.
  • g2: G2.
  • capterra: Capterra.
  • trustpilot: Trustpilot.
  • product_hunt: Product Hunt.
  • crunchbase: Crunchbase.
  • merchandise: Printed material or merchandise.
  • aws_marketplace: AWS Marketplace.
  • azure_marketplace: Azure Marketplace.
  • google_cloud_marketplace: Google Cloud Marketplace.
  • atlassian_marketplace: Atlassian Marketplace.
  • salesforce_appexchange: Salesforce AppExchange.
  • hubspot_marketplace: HubSpot Marketplace.
  • slack_app_directory: Slack App Directory.
  • microsoft_appsource: Microsoft AppSource.
  • github_marketplace: GitHub Marketplace.
  • gitlab_marketplace: GitLab Marketplace.
  • snowflake_marketplace: Snowflake Marketplace.
  • hashicorp_marketplace: HashiCorp Marketplace.
  • webflow_marketplace: Webflow Marketplace.
  • other_marketplace: Another marketplace.
  • other: Anywhere else, including channels Knock no longer offers.
Show 43 valuesHide values
websiteoffline_eventvirtual_eventemaillinkedinfacebookgoogle_adstiktokinstagramtwitterthreadsreddityoutubevimeomediumdocsproductdiscordslackslack_communitywhatsapptelegramg2capterratrustpilotproduct_huntcrunchbasemerchandiseaws_marketplaceazure_marketplacegoogle_cloud_marketplaceatlassian_marketplacesalesforce_appexchangehubspot_marketplaceslack_app_directorymicrosoft_appsourcegithub_marketplacegitlab_marketplacesnowflake_marketplacehashicorp_marketplacewebflow_marketplaceother_marketplaceother
chatRoutingId?string

Only on a chat link. The chat routing rule that assigns its chats, from GET /v1/chat-routing-rules.

Formatuuid
prefilledMessage?|

Only on a chat link. The contact's first message, prefilled in the app. Only when messagingApp is whatsapp or linkedin. Null goes back to Knock's default.

Length2 <= length <= 1000
welcomeMessage?|

Only on a chat link. The first message the contact gets. Only when messagingApp is slack or telegram. Null goes back to Knock's default.

Length2 <= length <= 1000
meetingRoutingId?string

Only on a scheduling link. One of your meeting routing rules, from GET /v1/meeting-routing-rules.

Formatuuid
meetingTitle?string

Only on a scheduling link. Title of the meeting in the calendar event.

Length1 <= length <= 200
meetingType?enum<string>

Only on a scheduling link. Kind of meeting.

Show 8 valuesHide values
demodiscovery_callconsultationpricingfollow_up_callonboarding_calltrainingsupport
durationMinutes?integer

Only on a scheduling link. Length of the meeting, in minutes.

Range5 <= value <= 480
title?|

Only on a scheduling link. Title of the booking window. Null goes back to Knock's default.

Length1 <= length <= 50
subtitle?|

Only on a scheduling link. Subtitle of the booking window. Null goes back to Knock's default.

Length1 <= length <= 120

Response Body

The magic link after the change.

application/json
  1. response

A link your team shares, with its traffic and settings.

magicLinkId*string

ID of the link: 6 letters or digits, case-sensitive.

Match^[0-9A-Za-z]{6}$
name*string

Name of the link in Knock.

type*enum<string>

What the link opens:

  • chat: Opens a chat with your team on one messaging app.
  • scheduling: Opens a booking window for a meeting with your team.
  • modal: Opens a window that lets the contact choose how to reach your team. Read-only here.
  • marketing_card: The link of a marketing card. Read-only here: change it through its card.
  • personal: A team member's personal link. Read-only here.
Show 5 valuesHide values
chatschedulingmodalmarketing_cardpersonal
channel*enum<string>

Where the link is shared:

  • website: Your website.
  • offline_event: An in-person event, such as a conference, trade show or meetup.
  • virtual_event: An online event, such as a webinar or virtual summit.
  • email: An email, such as a newsletter, a campaign or a signature.
  • linkedin: LinkedIn.
  • linkedin_ads: LinkedIn ads.
  • facebook: Facebook.
  • facebook_ads: Facebook ads.
  • google_ads: Google ads.
  • tiktok: TikTok.
  • tiktok_ads: TikTok ads.
  • instagram: Instagram.
  • twitter: X (Twitter).
  • threads: Threads.
  • reddit: Reddit.
  • youtube: YouTube.
  • vimeo: Vimeo.
  • medium: Medium.
  • docs: Your product documentation.
  • product: Inside your product.
  • discord: Discord.
  • slack: Slack.
  • slack_community: A Slack community.
  • whatsapp: WhatsApp.
  • telegram: Telegram.
  • g2: G2.
  • capterra: Capterra.
  • trustpilot: Trustpilot.
  • product_hunt: Product Hunt.
  • crunchbase: Crunchbase.
  • merchandise: Printed material or merchandise.
  • qr_code: A QR code.
  • aws_marketplace: AWS Marketplace.
  • azure_marketplace: Azure Marketplace.
  • google_cloud_marketplace: Google Cloud Marketplace.
  • atlassian_marketplace: Atlassian Marketplace.
  • salesforce_appexchange: Salesforce AppExchange.
  • hubspot_marketplace: HubSpot Marketplace.
  • slack_app_directory: Slack App Directory.
  • microsoft_appsource: Microsoft AppSource.
  • github_marketplace: GitHub Marketplace.
  • gitlab_marketplace: GitLab Marketplace.
  • snowflake_marketplace: Snowflake Marketplace.
  • hashicorp_marketplace: HashiCorp Marketplace.
  • webflow_marketplace: Webflow Marketplace.
  • other_marketplace: Another marketplace.
  • marketing_card: The link of a marketing card. Read-only: it is never accepted on a write.
  • other: Anywhere else, including channels Knock no longer offers.
Show 48 valuesHide values
websiteoffline_eventvirtual_eventemaillinkedinlinkedin_adsfacebookfacebook_adsgoogle_adstiktoktiktok_adsinstagramtwitterthreadsreddityoutubevimeomediumdocsproductdiscordslackslack_communitywhatsapptelegramg2capterratrustpilotproduct_huntcrunchbasemerchandiseqr_codeaws_marketplaceazure_marketplacegoogle_cloud_marketplaceatlassian_marketplacesalesforce_appexchangehubspot_marketplaceslack_app_directorymicrosoft_appsourcegithub_marketplacegitlab_marketplacesnowflake_marketplacehashicorp_marketplacewebflow_marketplaceother_marketplacemarketing_cardother
messagingApps*array<>

Messaging apps the link opens. Empty for a scheduling link:

  • slack: Slack.
  • whatsapp: WhatsApp.
  • linkedin: LinkedIn.
  • telegram: Telegram.
Show 4 valuesHide values
slackwhatsapplinkedintelegram
chatRoutingId*|

ID of the chat routing rule that assigns its chats, from GET /v1/chat-routing-rules. Null unless the link is a chat or modal link.

Formatuuid
url*|

The link to share. Null for a marketing_card or personal link, and for a modal link that has no window set up.

traffic*

Traffic of the link.

hasTraffic*boolean

Whether any of clicks, chats or opportunities is above zero. A link with traffic cannot be deleted.

createdAt*string

When the link was created.

Formatdate-time
chatSettings*|null

Settings of a chat link. Null for every other type.

schedulingSettings*|null

Settings of a scheduling link. Null for every other type.

Example Request
curl -X PATCH 'https://app.knock-ai.com/v1/magic-links/aB3dE9' \  -H 'x-api-key: <YOUR_API_KEY>' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "magicLinkId": "aB3dE9",  "name": "Webinar",  "type": "chat",  "channel": "website",  "messagingApps": [    "slack"  ],  "chatRoutingId": "3c5e7a9b-1d2f-4a6b-8c0d-2e4f6a8b0c1d",  "url": "https://start-chat.com/slack/yourcompany/aB3dE9",  "traffic": {    "clicks": 120,    "chats": 14,    "opportunities": 3  },  "hasTraffic": true,  "createdAt": "2026-11-02T12:00:00.000Z",  "chatSettings": {    "prefilledMessage": "Hi, I would like to see a demo.",    "welcomeMessage": "Thanks for reaching out! How can we help?"  },  "schedulingSettings": {    "meetingRoutingId": "7d9f1b3c-5e7a-4b6c-9d0e-1f2a3b4c5d6e",    "meetingTitle": "Product demo",    "meetingType": "demo",    "durationMinutes": 30,    "title": "Book a demo",    "subtitle": "Pick a time that works for you."  }}