Documentation Index
Fetch the complete documentation index at: https://docs.wellapp.ai/llms.txt
Use this file to discover all available pages before exploring further.
A WebLink (table core_api.web_links) is an atomic contact-channel record that stores a URL together with its social/web platform classification. WebLinks are shared, reusable objects attached to both Companies and People through the company_web_links and person_web_links bridge tables, following the same pivot-entity pattern as emails and phones. The entity holds a nullable workspace FK added in Migration20260119180000 to scope enrichment-created links. It is a Supporting root in the records layer, surfaced in composite composite_web_links_list columns on company and person pages.
| Naming | Value |
|---|
| Object | Web Link |
Resource type (JSON:API type) | web_link |
| Collection / records root | web_links |
| REST base | /v1/web-links |
| Entity class | WebLink |
API operations
| Operation | Method & path | Status |
|---|
| List | GET /v1/web-links | โ
Implemented |
| List (nested) | GET /v1/people/{id}/web-links | โ
Implemented |
| Retrieve | GET /v1/web-links/{id} | โ
Implemented |
| Create (nested) | POST /v1/people/{id}/web-links | โ
Implemented |
| Update | PATCH /v1/web-links/{id} | ๐ก Planned |
| Delete (nested) | DELETE /v1/people/{id}/web-links/{subId} | โ
Implemented |
Data model
Attributes
| Field | Type | Required | Constraints | Allowed values | Description |
|---|
| social_link_id | string, UUID, ๐ system | โ
Yes | unique; default gen_random_uuid() | โ | Public stable identifier for the web link, safe to expose in API responses. Generated by the database on insert. |
| platform | string (PlatformEnum) | โ
Yes | native PostgreSQL enum core_api.platform_enum; original values twitter/linkedin/github created in Migration20250801141316; instagram/facebook/website/other added via ALTER TYPE โฆ ADD VALUE IF NOT EXISTS in Migration20260119180000 | twitter, linkedin, github, instagram, facebook, website, other | The social network or web platform the URL belongs to. Drives icon and renderer selection in the composite_web_links_list cell. |
| url | string | โ
Yes | varchar(255); NOT NULL; no uniqueness constraint (same URL may appear on multiple entities) | โ | The fully-qualified URL of the web presence (profile page, website, repository, etc.). |
| created_at | string (ISO 8601 datetime), ๐ system | โ
Yes | timestamptz; set by onCreate lifecycle hook; never null | โ | Timestamp when the web link record was first persisted. |
| updated_at | string (ISO 8601 datetime), ๐ system | โช No | timestamptz; nullable; set by onCreate and onUpdate lifecycle hooks | โ | Timestamp of the last update. Null if the record has never been modified after creation. |
| deleted_at | string (ISO 8601 datetime), ๐ system | โช No | timestamptz; nullable | โ | Soft-delete timestamp. When set, the web link is excluded from all active queries. Hard deletes do not occur on this entity. |
Relationships
| Name | Type | Required | Description |
|---|
| workspace | to-one (workspace) | โช No | The workspace that owns this web link. Added in Migration20260119180000 to scope enrichment-created links; nullable because web links pre-dating that migration have no workspace assignment. ON DELETE SET NULL. |
System-computed
- social_link_id is generated by gen_random_uuid() at the database level on INSERT; the application never supplies it.
- created_at is set by the MikroORM onCreate lifecycle hook (new Date()); never written by application code.
- updated_at is set by both onCreate and onUpdate lifecycle hooks; it may be null on records that have never been modified.
- deleted_at is set to a non-null timestamp on soft delete; active queries must always filter deleted_at: null. No hard-delete path exists on this entity.
- workspace_pk (FK) was added as nullable in Migration20260119180000; records created before that migration have workspace = null. Enrichment pipelines may create web links with a workspace scope; connector-synced links may have workspace = null.
- PlatformEnum values instagram, facebook, website, and other were added to the native PostgreSQL enum in Migration20260119180000 via ALTER TYPE โฆ ADD VALUE IF NOT EXISTS. The original enum (twitter, linkedin, github) was created in Migration20250801141316.
- The web_links table was created in Migration20250919154301, migrated from a legacy social_links table. The social_link_id public UUID field preserves backward-compatible identity across that rename.
Example
{
"data": {
"type": "web_link",
"id": "a3f7c812-09be-4d2a-b5e1-dc4a78f30c92",
"attributes": {
"social_link_id": "a3f7c812-09be-4d2a-b5e1-dc4a78f30c92",
"platform": "linkedin",
"url": "https://www.linkedin.com/in/marie-leblanc-cfo",
"created_at": "2025-11-14T09:22:05.000Z",
"updated_at": "2025-11-14T09:22:05.000Z",
"deleted_at": null
},
"relationships": {
"workspace": {
"data": { "type": "workspace", "id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890" }
}
}
}
}
Source: apps/api/src/database/entities/WebLink.ts ยท domain: financial-graph ยท tier: Supporting