Get the referral link
well_get_referral_codeReturn the workspace's referral link and how many people joined Well with it. Use it when the user asks for their referral link, their sponsorship link ("mon lien de parrainage"), or how many people signed up through it.
Reads only. has_link: false means the workspace has no referral link yet: make it with well_create_referral_code, then answer. people_joined counts people, not workspaces, and last_joined_at dates the latest. A demo workspace has no link (refusal: DEMO_WORKSPACE).
The referral link lets someone open their OWN account on Well and counts them for this workspace; it gives no access to the workspace. For a link that lets someone join this workspace, use well_get_workspace_invite_link.
When the token authorizes one workspace, call this directly — no workspace call is needed first. When it authorizes several, this read will not guess which one you mean: pass workspace_id on the call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | No | Target workspace. Omit when the token authorizes one workspace. Required when it authorizes several: this read reports one workspace's own figures and will not choose which. | |
| conversation_id | No | The conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation. | |
| workspace_scope | No | Restrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| refusal | No | Present only when the call did nothing. DEMO_WORKSPACE: the workspace holds sample data, so it has no referral link. INSUFFICIENT_PERMISSIONS: only an owner or admin, or the member who made the link, may stop it. | |
| success | Yes | ||
| has_link | No | False when the workspace has no referral link yet: make it with well_create_referral_code. | |
| workspace_id | No | ||
| people_joined | No | How many people joined Well with this link: the people in the workspaces it brought in. Derived on each call; 0 when nobody did yet. Null when the count could not be read in time: give the link and say the count is not available right now, never 0. | |
| referral_link | No | The workspace's referral link. Anyone who opens it and signs up to Well counts for this workspace; it gives no access to the workspace. Give it to the user exactly as returned, alone on its line. | |
| last_joined_at | No | When the latest person joined with the link (ISO 8601), or null when nobody did yet. | |
| conversation_id | No | The conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation. | |
| newly_connected | No | Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: "<name> is connected.". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later. | |
| resolved_workspace | No | The workspace that answered, when the caller named none and the token authorizes several. | |
| conversation_id_note | No | Present only when the server opened a fresh lane, stating that no choice recorded earlier was read. | |
| people_joined_capped | No | True when the link brought in more workspaces than one count reads, so people_joined is a floor. | |
| conversation_id_source | No | Where the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened. |