openapi: 3.2.0 info: title: Gtm Linkedin Account Sync Runs API version: '1.0' contact: name: GTM API url: https://gtm-api.com email: support@gtm-api.com license: name: Proprietary url: https://gtm-api.com/license description: 'Operations tagged linkedin_account_sync_runs across 2 of this provider''s published API definitions: gtm-api-openapi-openapi.yml, gtm-api-linkedin-openapi.yaml. Each path carries the servers of the definition it was published in.' servers: - url: https://app.gtm-api.com/linkedin/v4 description: Production, through the app.gtm-api.com gateway security: - BearerJwt: [] TeamSid: [] tags: - name: linkedin_account_sync_runs description: Registry package `mcp.linkedin/linkedin_account_sync_runs`, served on MCP mount `linkedin.account-monitor`. paths: /api/linkedin-account-sync-runs/metrics: post: operationId: get_linkedin_account_sync_runs_metrics summary: LinkedIn account sync-run metrics description: 'Aggregate sync-run counters for dashboards: a counts block (total + per-status: pending, in_progress, completed, cancelled) plus avg_completed_duration_seconds, with an optional group_by axis (status | sync_type | triggered_by) that repeats the same block per group. Required period {from,to} bounds the window. Contract: - MCP tool `get_linkedin_account_sync_runs_metrics`, registry package `mcp.linkedin/linkedin_account_sync_runs`, mount `linkedin.account-monitor`. - Operation `metrics`, response envelope `metrics`. - Flags: read only.' tags: - linkedin_account_sync_runs requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GetLinkedinAccountSyncRunsMetricsRequest' responses: '200': description: '`metrics` success envelope.' content: application/json: schema: $ref: '#/components/schemas/GetLinkedinAccountSyncRunsMetricsResponse' 4XX: $ref: '#/components/responses/McpClientError' 5XX: $ref: '#/components/responses/McpServerError' x-gtm-mcp-tool: get_linkedin_account_sync_runs_metrics x-gtm-mcp-mount: linkedin.account-monitor x-gtm-entity: linkedin_account_sync_runs x-gtm-operation: metrics x-gtm-envelope: metrics x-gtm-availability: ga x-gtm-dangerous: false x-gtm-mass-action: false x-gtm-step-eligible: false x-gtm-schedule-required: false x-gtm-tool-class: typical servers: - url: https://app.gtm-api.com/linkedin/v4 description: Production, through the app.gtm-api.com gateway /api/linkedin-account-sync-runs/search: post: operationId: search_linkedin_account_sync_runs summary: Search LinkedIn account sync runs description: 'List sync runs: the backend-owned progress tracker for one paginated sync of one data surface (connections, connection_requests, connection_invitations, conversations, sales_navigator_conversations, followers) or a §5.7 composition (snapshot, premium_check). Use for: "is account X fully synced / how far along" (filter linkedin_account_sid + status in [pending, in_progress]), "which accounts are stuck mid-sync" (status in_progress, sort last_progress_at), "how fresh is the connection data" (latest completed connections run → finished_at). Runs are not created here; the write surface is linkedin-accounts.reset-sync / .sync. No q. Sort: created_at (default desc) | started_at | finished_at | last_progress_at | next_attempt_at | items_saved. include[]: linkedin_account, activity_log_pages, limit (default). Contract: - MCP tool `search_linkedin_account_sync_runs`, registry package `mcp.linkedin/linkedin_account_sync_runs`, mount `linkedin.account-monitor`. - Operation `search`, response envelope `search`. - Flags: read only.' tags: - linkedin_account_sync_runs requestBody: required: false content: application/json: schema: $ref: '#/components/schemas/SearchLinkedinAccountSyncRunsRequest' responses: '200': description: '`search` success envelope.' content: application/json: schema: $ref: '#/components/schemas/SearchLinkedinAccountSyncRunsResponse' 4XX: $ref: '#/components/responses/McpClientError' 5XX: $ref: '#/components/responses/McpServerError' x-gtm-mcp-tool: search_linkedin_account_sync_runs x-gtm-mcp-mount: linkedin.account-monitor x-gtm-entity: linkedin_account_sync_runs x-gtm-operation: search x-gtm-envelope: search x-gtm-availability: ga x-gtm-dangerous: false x-gtm-mass-action: false x-gtm-step-eligible: false x-gtm-schedule-required: false x-gtm-tool-class: typical servers: - url: https://app.gtm-api.com/linkedin/v4 description: Production, through the app.gtm-api.com gateway /api/linkedin-account-sync-runs/{sid}: get: operationId: get_linkedin_account_sync_run summary: Get LinkedIn account sync run description: 'Fetch one sync run by sid, with includes (linkedin_account; activity_log_pages for the per-page fetch log; limit for the gating smart-limit bucket, always resolved). Use to drill into a single run''s progress, resume-cursor state, and per-page audit. Contract: - MCP tool `get_linkedin_account_sync_run`, registry package `mcp.linkedin/linkedin_account_sync_runs`, mount `linkedin.account-monitor`. - Operation `get`, response envelope `get`. - Flags: read only.' tags: - linkedin_account_sync_runs parameters: - name: sid in: path required: true description: Path segment `{sid}`. schema: type: string minLength: 18 maxLength: 18 pattern: ^ln_sy_ - name: include[] in: query required: false description: Query parameter `include`. style: form explode: true schema: type: array items: type: string enum: - linkedin_account - activity_log_pages - limit responses: '200': description: '`get` success envelope.' content: application/json: schema: $ref: '#/components/schemas/GetLinkedinAccountSyncRunResponse' 4XX: $ref: '#/components/responses/McpClientError' 5XX: $ref: '#/components/responses/McpServerError' x-gtm-mcp-tool: get_linkedin_account_sync_run x-gtm-mcp-mount: linkedin.account-monitor x-gtm-entity: linkedin_account_sync_runs x-gtm-operation: get x-gtm-envelope: get x-gtm-availability: ga x-gtm-dangerous: false x-gtm-mass-action: false x-gtm-step-eligible: false x-gtm-schedule-required: false x-gtm-tool-class: trivial servers: - url: https://app.gtm-api.com/linkedin/v4 description: Production, through the app.gtm-api.com gateway components: schemas: McpError: type: object properties: success: type: boolean enum: - false error: type: object properties: code: type: string enum: - validation_failed - nothing_to_update - not_found - relation_not_found - invalid_transition - limit_exceeded - payment_required - duplicate_rejected - conflict - delete_blocked - unauthorized - forbidden - rate_limited - internal_error - service_unavailable - not_implemented message: type: string recoverable: type: boolean suggestion: type: string field_errors: type: object additionalProperties: type: array items: type: object properties: rule: type: string message: type: string required: - rule - message blockers: type: array items: type: object properties: type: type: string description: Machine-readable blocker type (active_flow, pending_tasks, …). severity: type: string enum: - hard - soft description: hard = external action required; soft = acknowledge is enough. description: type: string entity_sid: type: - string - 'null' count: type: integer resolution: type: string description: 'Hard: tool name to call. Soft: code for acknowledge[].' resolution_hint: type: string required: - type - severity - description - entity_sid - resolution - resolution_hint context: type: object additionalProperties: {} required: - code - message - recoverable meta: type: object properties: trace_id: type: string description: UUID v7; same 128-bit value as the X-Trace-Id header. span_id: type: string pattern: ^[0-9a-f]{16}$ description: 16 hex chars, root span of this request. timestamp: type: string description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time. duration_ms: type: integer minimum: 0 description: Server-side wall clock. team_sid: type: - string - 'null' description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends. actor_type: type: - string - 'null' description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends. required: - trace_id - span_id - timestamp - duration_ms required: - success - error GetLinkedinAccountSyncRunResponse: type: object properties: success: type: boolean enum: - true operation: type: string enum: - get item: type: object properties: sid: type: string team_sid: type: string linkedin_account_sid: type: string sync_type: type: string enum: - connections - connection_requests - connection_invitations - conversations - sales_navigator_conversations - recruiter_conversations - messages - sales_navigator_messages - followers - following - snapshot - premium_check sync_mode: type: string enum: - initial - incremental scope_sid: type: - string - 'null' triggered_by: type: string enum: - scheduler - account_created - reset_sync - event_handler next_cursor: type: - string - 'null' status: type: string enum: - pending - in_progress - completed - cancelled description: 'No failed state: dispatch failure is a browser problem, run is deferred.' items_saved: type: number items_deleted: type: number pages_fetched: type: number last_progress_at: type: - string - 'null' attempt_count: type: number next_attempt_at: type: - string - 'null' wait_reason: type: - string - 'null' started_at: type: - string - 'null' finished_at: type: - string - 'null' error_message: type: - string - 'null' created_by: type: object properties: actor_type: type: string enum: - user - support - api_key - system - agent actor_sid: type: - string - 'null' team_sid: type: string actor_name: type: - string - 'null' description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job. oauth_client_sid: type: - string - 'null' description: The acting OAuth client (id_oc_*); null off the OAuth path. reason: type: - string - 'null' description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise. permissions: type: object additionalProperties: {} description: 'Internal audit context: the grant set the actor held at write time. Not a contract.' cluster_id: type: - integer - 'null' description: 'Internal audit context: the cluster that served the write.' trace_id: type: - string - 'null' description: 'Internal audit context: the trace id of the request that wrote the row.' required: - actor_type - actor_sid - team_sid - permissions created_at: type: string updated_at: type: string required: - sid - team_sid - linkedin_account_sid - sync_type - sync_mode - scope_sid - triggered_by - next_cursor - status - items_saved - items_deleted - pages_fetched - last_progress_at - attempt_count - next_attempt_at - wait_reason - started_at - finished_at - error_message - created_by - created_at - updated_at included: type: object additionalProperties: {} includes: type: array items: type: string meta: type: object properties: trace_id: type: string description: UUID v7; same 128-bit value as the X-Trace-Id header. span_id: type: string pattern: ^[0-9a-f]{16}$ description: 16 hex chars, root span of this request. timestamp: type: string description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time. duration_ms: type: integer minimum: 0 description: Server-side wall clock. team_sid: type: - string - 'null' description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends. actor_type: type: - string - 'null' description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends. required: - trace_id - span_id - timestamp - duration_ms required: - success - operation - item - included - includes - meta GetLinkedinAccountSyncRunsMetricsResponse: type: object properties: success: type: boolean enum: - true operation: type: string enum: - metrics metrics: type: object properties: filter: type: object additionalProperties: {} period: type: object properties: from: type: string to: type: string required: - from - to aggregated: type: object properties: counts: type: object additionalProperties: {} metrics: type: object properties: avg_completed_duration_seconds: type: - number - 'null' required: - avg_completed_duration_seconds metrics: type: object properties: avg_completed_duration_seconds: type: - number - 'null' required: - avg_completed_duration_seconds applied_filters: type: object additionalProperties: {} meta: type: object properties: trace_id: type: string description: UUID v7; same 128-bit value as the X-Trace-Id header. span_id: type: string pattern: ^[0-9a-f]{16}$ description: 16 hex chars, root span of this request. timestamp: type: string description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time. duration_ms: type: integer minimum: 0 description: Server-side wall clock. team_sid: type: - string - 'null' description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends. actor_type: type: - string - 'null' description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends. required: - trace_id - span_id - timestamp - duration_ms required: - success - operation - metrics - meta SearchLinkedinAccountSyncRunsResponse: type: object properties: success: type: boolean enum: - true operation: type: string enum: - search items: type: array items: type: object properties: item: type: object properties: sid: type: string team_sid: type: string linkedin_account_sid: type: string sync_type: type: string enum: - connections - connection_requests - connection_invitations - conversations - sales_navigator_conversations - recruiter_conversations - messages - sales_navigator_messages - followers - following - snapshot - premium_check sync_mode: type: string enum: - initial - incremental scope_sid: type: - string - 'null' triggered_by: type: string enum: - scheduler - account_created - reset_sync - event_handler next_cursor: type: - string - 'null' status: type: string enum: - pending - in_progress - completed - cancelled description: 'No failed state: dispatch failure is a browser problem, run is deferred.' items_saved: type: number items_deleted: type: number pages_fetched: type: number last_progress_at: type: - string - 'null' attempt_count: type: number next_attempt_at: type: - string - 'null' wait_reason: type: - string - 'null' started_at: type: - string - 'null' finished_at: type: - string - 'null' error_message: type: - string - 'null' created_by: type: object properties: actor_type: type: string enum: - user - support - api_key - system - agent actor_sid: type: - string - 'null' team_sid: type: string actor_name: type: - string - 'null' description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job. oauth_client_sid: type: - string - 'null' description: The acting OAuth client (id_oc_*); null off the OAuth path. reason: type: - string - 'null' description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise. permissions: type: object additionalProperties: {} description: 'Internal audit context: the grant set the actor held at write time. Not a contract.' cluster_id: type: - integer - 'null' description: 'Internal audit context: the cluster that served the write.' trace_id: type: - string - 'null' description: 'Internal audit context: the trace id of the request that wrote the row.' required: - actor_type - actor_sid - team_sid - permissions created_at: type: string updated_at: type: string required: - sid - team_sid - linkedin_account_sid - sync_type - sync_mode - scope_sid - triggered_by - next_cursor - status - items_saved - items_deleted - pages_fetched - last_progress_at - attempt_count - next_attempt_at - wait_reason - started_at - finished_at - error_message - created_by - created_at - updated_at included: type: object additionalProperties: {} required: - item - included pagination: type: object properties: next_cursor: type: - string - 'null' has_more: type: boolean total_count: type: - integer - 'null' required: - next_cursor - has_more - total_count applied_filters: type: object additionalProperties: {} includes: type: array items: type: string meta: type: object properties: trace_id: type: string description: UUID v7; same 128-bit value as the X-Trace-Id header. span_id: type: string pattern: ^[0-9a-f]{16}$ description: 16 hex chars, root span of this request. timestamp: type: string description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time. duration_ms: type: integer minimum: 0 description: Server-side wall clock. team_sid: type: - string - 'null' description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends. actor_type: type: - string - 'null' description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends. required: - trace_id - span_id - timestamp - duration_ms counts: type: object properties: {} required: - success - operation - items - pagination - applied_filters - includes - meta GetLinkedinAccountSyncRunsMetricsRequest: type: object description: Request body of `get_linkedin_account_sync_runs_metrics`. properties: period: type: object properties: from: type: string description: ISO 8601 UTC window start (inclusive). to: type: string description: ISO 8601 UTC window end (exclusive); must be after from. required: - from - to description: Required metrics window [from, to). group_by: type: string enum: - status - sync_type - triggered_by description: Optional single split axis. required: - period SearchLinkedinAccountSyncRunsRequest: type: object description: Request body of `search_linkedin_account_sync_runs`. properties: filter: type: object properties: sid: type: object properties: eq: type: string in: type: array items: type: string additionalProperties: false linkedin_account_sid: type: object properties: eq: type: string in: type: array items: type: string additionalProperties: false sync_type: type: object properties: eq: type: string in: type: array items: type: string additionalProperties: false sync_mode: type: object properties: eq: type: string additionalProperties: false scope_sid: type: object properties: eq: type: string in: type: array items: type: string additionalProperties: false triggered_by: type: object properties: eq: type: string in: type: array items: type: string additionalProperties: false status: type: object properties: eq: type: string in: type: array items: type: string additionalProperties: false description: 'Dominant query: { status: { in: ["pending","in_progress"] } }.' next_attempt_at: type: object properties: gte: type: string lte: type: string is_null: type: boolean additionalProperties: false wait_reason: type: object properties: eq: type: string in: type: array items: type: string is_null: type: boolean additionalProperties: false started_at: type: object properties: gte: type: string lte: type: string additionalProperties: false finished_at: type: object properties: gte: type: string lte: type: string is_null: type: boolean additionalProperties: false archived_at: type: object properties: gte: type: string lte: type: string is_null: type: boolean additionalProperties: false created_at: type: object properties: gte: type: string lte: type: string additionalProperties: false include: type: array items: type: string enum: - linkedin_account - activity_log_pages - limit description: Relations to eager-load (see entity Includes). sort: type: object properties: field: type: string enum: - created_at - started_at - finished_at - last_progress_at - next_attempt_at - items_saved direction: type: string enum: - asc - desc description: Default desc. required: - field page_size: type: integer minimum: 0 maximum: 200 description: 0..200, default 50. page_size=0 = count-only, page_size=1 = getFirst. cursor: type: - string - 'null' description: Opaque forward cursor from a previous response pagination.next_cursor. responses: McpServerError: description: MCP error envelope with `error.code` internal_error or service_unavailable. content: application/json: schema: $ref: '#/components/schemas/McpError' McpClientError: description: MCP error envelope. `error.code` is one of validation_failed, nothing_to_update, not_found, relation_not_found, invalid_transition, limit_exceeded, payment_required, duplicate_rejected, conflict, delete_blocked, unauthorized, forbidden, rate_limited, not_implemented. content: application/json: schema: $ref: '#/components/schemas/McpError' securitySchemes: BearerJwt: type: http scheme: bearer bearerFormat: JWT description: Access token issued by gtm.service.id. Its `access_identity` claim carries `team_sid`, `actor_sid` and `actor_type`, and that team scope is authoritative. TeamSid: type: apiKey in: header name: Team-SID description: Team scope for tokens that do not carry one. Ignored when the token already names a team. x-refined-from: - gtm-api-openapi-openapi.yml - gtm-api-linkedin-openapi.yaml