Overview
With the Telink webhook it is possible for an external provider to create an independent middleware between Telink and any kind of CRM system(s). The middleware must handle the request and response formats described below.
Number Lookup
Automatic caller identification for incoming calls, number searches, and call log items.
Custom ID Lookup
Look up callers by a custom numeric ID entered via an Input Collector.
Call Logging
Automatic logging of call data to your CRM when call log items are created.
How it works
Number Lookup
Telink calls the lookup endpoint when:
- The customer receives an incoming call
- A number search is made (contact search or dialer)
- Presenting items in a call log
Number Lookup Flow
Telink calls the lookup endpoint when:
- The customer receives an incoming call
- A number search is made (contact search or dialer)
- Presenting items in a call log

Custom ID Lookup
The custom ID endpoint is called when:
- A caller enters a numeric ID via an Input Collector in an Answer Group
- Displaying a related call log item (incl. dashboards)
If the request returns a match, Telink presents "Caller Insights" accessible from the dialer, call log items, or contact pages.

Automatic Call Logging
When enabled, the call logging endpoint is called each time a call ends and a call log item is created. The middleware syncs this with the CRM. Customers can configure which call types trigger requests (v2).

Webhook Setup
Any customer with the Insights add-on can have a webhook integration. The setup requires Superadmin permission and is handled by Customer Care.


Webhook integrations can be prioritized alongside other Insights integrations:

Details & Limitations
- Lookup data is cached for
2 hours - Webhook request timeout:
3 seconds - Response times depend on the middleware implementation
Implementation Notes
If a middleware serves multiple customers, include a unique customer ID in the endpoint URL:
https://middleware.provider.com/unique-customer-id
Number & Custom ID Lookup
GETRequest
A HTTP GET request with authorization header (v2). Query parameters:
| Field | Type | Description |
|---|---|---|
| fromNumber | string | The caller's phone number |
| toNumber | string | The dialed number (when applicable) |
| customIdentifier | string | Format: customId:customValue (when custom ID is enabled) |
app.get('/middleware/lookup', async (req, res) => {
const { authorization } = req.headers;
if (authorization !== 'Bearer YOUR_SECRET_HERE') {
return res.status(403).json({ message: 'Invalid secret' });
}
const { fromNumber, toNumber, customIdentifier } = req.query;
// Parse custom ID if provided
const [customId, customValue] = customIdentifier?.split(':') || [];
const result = await queryForContact(fromNumber, toNumber, customId, customValue);
return res.status(200).json(result);
});user object is included if "Send user info" is enabled (experimental, requires Superadmin).User Object (Experimental)
| Field | Type | Description |
|---|---|---|
| firstName | string | First name of the user |
| lastName | string | Last name of the user |
| displayName | string | Display name of the user |
| userIds | UserId[] | Login IDs and types |
| id | string | Unique identifier |
UserId Object
| Field | Type | Description |
|---|---|---|
| type | string | 'email' or 'mobilePhone' |
| username | string | ID used for user login |
Response
Return a JSON object with the following fields:
| Field | Type | Description |
|---|---|---|
| displayName | string | Contact's display name |
| firstName | string | First name |
| lastName | string | Last name |
| avatarUrl | string | Custom avatar image URL |
| coverPhotoUrl | string | Custom cover photo |
| emails | Email[] | Contact's email addresses |
| phoneNumbers | PhoneNumber[] | Contact's phone numbers |
| companyInfo | Object | Company information |
| fields | Field[] | Additional contact fields |
| activities | Activity[] | Note, Task, Call, Ticket, Deal, Appointment |
| createActivityUrls | CreateUrl[] | Shortcut URLs for creating activities |
| moreInfoUrl | string | URL to contact in external CRM |
| acceptAction | string | URL opened on call accept |
{
"displayName": "Jane Doe",
"firstName": "Jane",
"lastName": "Doe",
"emails": [{ "id": "jane@company.com", "comment": "Work" }],
"phoneNumbers": [{ "id": "+46701234567", "comment": "Mobile" }],
"companyInfo": { "name": "ACME Corp", "title": "CTO" },
"fields": [{ "comment": "Customer since", "title": "2023" }],
"moreInfoUrl": "https://crm.example.com/contacts/123"
}
Response Sub-Types
| Field | Type | Description |
|---|---|---|
| id | string | The email address |
| comment | string | e.g. Work / Personal |
PhoneNumber
| Field | Type | Description |
|---|---|---|
| id | string | The phone number |
| comment | string | e.g. Work / Personal |
CompanyInfo
| Field | Type | Description |
|---|---|---|
| name | string | Company name |
| title | string | Contact's title at company |
Field
| Field | Type | Description |
|---|---|---|
| comment | string | Label text |
| title | string | Value text |
Activities
Up to 10 activities per type. Sorted by timestamp, newest first. Set markdown: true to enable markdown rendering in body fields.
NoteNOTE
| Field | Type | Description |
|---|---|---|
| type | string | NOTE |
| body | string | Note body text |
| timestamp | number | Unix timestamp (ms) |
| header | string | Appended: Note - "header" |
| customHeader | string | Override entire header |
| associatedUser | string | |
| link | string | URL – header as link |
| markdown | boolean | Parse body as markdown |
TaskTASK
| Field | Type | Description |
|---|---|---|
| type | string | TASK |
| body | string | Task body text |
| timestamp | number | Unix timestamp (ms) |
| dueDate | number | Unix timestamp (ms) |
| header | string | Appended: Task - "header" |
| customHeader | string | Override header |
| status | string | Status text (hidden if done) |
| done | boolean | Green checkmark |
| assignedUser | string | |
| link | string | URL – header as link |
| markdown | boolean | Parse body as markdown |
CallCALL
| Field | Type | Description |
|---|---|---|
| type | string | CALL |
| body | string | Call body text |
| timestamp | number | Unix timestamp (ms) |
| toNumber | string | Callee |
| fromNumber | string | Caller |
| duration | number | Duration (ms) |
| startTime | number | Unix timestamp (ms) |
| customHeader | string | Override header |
| link | string | URL – header as link |
| markdown | boolean | Parse body as markdown |
TicketTICKET
| Field | Type | Description |
|---|---|---|
| type | string | TICKET |
| body | string | Ticket body text |
| timestamp | number | Unix timestamp (ms) |
| createdDate | number | Unix timestamp (ms) |
| priority | string | HIGH, MEDIUM, or LOW |
| header | string | Appended to default header |
| customHeader | string | Override header |
| pipeline | string | Pipeline header |
| pipelineStage | string | Pipeline stage text |
| link | string | URL – header as link |
| markdown | boolean | Parse body as markdown |
DealDEAL
| Field | Type | Description |
|---|---|---|
| type | string | DEAL |
| body | string | Deal body text |
| timestamp | number | Unix timestamp (ms) |
| closeDate | number | Unix timestamp (ms) |
| currency | string | Currency string |
| amount | number | Deal value |
| done | boolean | Checkmark |
| pipeline | string | Pipeline header |
| pipelineStage | string | Pipeline stage text |
| link | string | URL – header as link |
| markdown | boolean | Parse body as markdown |
AppointmentAPPOINTMENT
| Field | Type | Description |
|---|---|---|
| type | string | APPOINTMENT |
| timestamp | number | Unix timestamp (ms) |
| startDate | number | Start time (ms) |
| endDate | number | End time (ms) |
| allDay | boolean | Full-day appointment |
| body | string | Body text |
| venue | string | Location |
| header | string | Header text |
| status | string | Status text |
| link | string | URL – header as link |
| markdown | boolean | Parse body as markdown |
createActivityUrl
Shortcut to create an activity of the specified type for the looked-up contact.
| Field | Type | Description |
|---|---|---|
| name | string | Button label |
| url | string | Target URL |
{
"type": "NOTE",
"body": "**Important:** Follow up next week",
"timestamp": 1709294400000,
"markdown": true
}Automatic Call Logging
When enabled, Telink sends a HTTP POST with Content-Type: application/json for each call log item created.
POSTRequest Body
| Field | Type | Description |
|---|---|---|
| fromNumber | string | The caller's number |
| toNumber | string | The dialed number |
| duration | number | Call length (ms) |
| startTime | number | Unix timestamp (ms) |
| callType | string | Inbound | Outbound |
| body | string | Call details text |
| userId | string | User's unique ID (v2) |
{
"fromNumber": "+46701234567",
"toNumber": "+46812345678",
"duration": 185000,
"startTime": 1709294400000,
"callType": "Inbound",
"body": "Call from: +46701234567\nCall type: Inbound",
"userId": "user-abc-123"
}Body Format Conditions
| Format | Condition |
|---|---|
| referred to: {phoneNumber} | Participant transferred the call |
| referred by: {phoneNumber} | Caller was transferred by someone |
| Call to user: {username} ({phoneNumber}) | CRM user → Telink user |
| Call from user: {username} ({phoneNumber}) | Telink user → CRM user |
| Call to answer group: {agName} ({phoneNumber}) | CRM user → answer group |
| Telink agent: {username} | Agent name for AG calls |
| Call type: {callType} | Always present |
| Summary (appended) | Recording + CI enabled (v2) |