> ## Documentation Index
> Fetch the complete documentation index at: https://docs.groovin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Turn message sync on or off

> Start or stop logging a person's LinkedIn conversation in your CRM, for a batch of contacts.

> [!CAUTION]
>
> This changes your real CRM. **Turning sync off deletes the conversation notes Groovin wrote** on Attio and HubSpot. Turning it on reads LinkedIn live, then writes properties, notes and the chat history.

## What this call does

| | |
| - | - |
| **LinkedIn** | On: live network lists once per batch, up to 10 profile lookups, and an inbox refresh. Off: none, unless you send URLs |
| **Your CRM** | On: properties, notes, chat history. Off: **deletes conversation notes** |
| **Repeating it** | Safe: the contact ends up in the state you asked for. Wait several minutes between On batches. Off: a note that failed to delete stays in your CRM, and repeating will not remove it. |

## Good to know

* An HTTP 200 can hold failures: check `status` on each item.
* Affinity logs interactions rather than notes, so turning sync off deletes nothing there.

Your AI assistant reaches the same action through the MCP tool `toggle_linkedin_sync`.


## OpenAPI

````yaml reference/openapi.json POST /crm/contacts/sync-toggle
openapi: 3.1.0
info:
  title: Groovin API
  version: 1.0.0
  description: >-
    Connect LinkedIn and your CRM. Every call acts on your real LinkedIn account
    and CRM: there is no test mode.
servers:
  - url: https://api.groovin.ai/functions/v1/api/v1
security:
  - apiKey: []
tags:
  - name: LinkedIn
  - name: CRM contacts and companies
  - name: LinkedIn connections import
paths:
  /crm/contacts/sync-toggle:
    post:
      tags:
        - CRM contacts and companies
      summary: Turn message sync on or off
      description: >-
        Start or stop logging a person's LinkedIn conversation in your CRM, for
        a batch of contacts.
      operationId: toggle_linkedin_sync
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                crm_contact_ids:
                  type: array
                  items:
                    type: string
                  description: >-
                    The contacts: up to 25 to turn on, 200 to turn off. Always
                    send ids as text: numbers are silently dropped.
                enabled:
                  type: boolean
                  description: >-
                    `true` turns sync on. `false` turns it off and deletes the
                    notes.
                linkedin_profile_urls:
                  type: array
                  items:
                    type: object
                    properties:
                      crm_contact_id:
                        type: string
                        description: The contact. It must also be in `crm_contact_ids`.
                      linkedin_profile_url:
                        type: string
                        description: >-
                          Their LinkedIn URL. Never guess one: a wrong URL syncs
                          someone else's messages onto this contact.
                    required:
                      - crm_contact_id
                      - linkedin_profile_url
                  description: >-
                    LinkedIn URLs for contacts Groovin cannot match on its own,
                    up to 25. The URL is saved on the contact only if that field
                    is empty.
                org_linkedin_account_id:
                  type: integer
                  description: >-
                    Leave this out to use your own LinkedIn account. Another
                    person's account is refused with a 403.
              required:
                - crm_contact_ids
                - enabled
            examples:
              placeholder:
                summary: Replace every value
                value:
                  crm_contact_ids:
                    - REPLACE_WITH_CRM_CONTACT_ID
                  enabled: true
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToggleLinkedinSyncResult'
              example:
                org_linkedin_account_id: 4821
                enabled: true
                total: 1
                succeeded: 1
                failed: 0
                results:
                  - crm_contact_id: example-crm-contact-id
                    relocated_to_crm_contact_id: null
                    linkedin_profile_id: ACoAAExampleLinkedinProfileId
                    enabled: true
                    status: toggled
                    history_import_triggered: true
                    connection_state: connected
                    conversation_notes_deleted: 0
                    pair_created: false
                    crm_linkedin_url_write_status: null
                    crm_linkedin_url_write_error: null
                    error: null
                    error_status: null
                retry_guidance: null
        '400':
          description: 'Something in the request is wrong: `error` says what.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: The API key is missing, wrong or revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Your account cannot do this: no CRM connected, inactive
            subscription, Billing admin role, or a teammate's LinkedIn account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            What you asked for does not exist, or your LinkedIn account is not
            connected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: LinkedIn or your CRM is slowing you down. Wait at least 5 minutes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Something failed on our side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: >-
            LinkedIn or your CRM could not be reached or gave an unreadable
            answer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ToggleLinkedinSyncResult:
      type: object
      description: >-
        The result of a batch. HTTP 200 does not mean every contact succeeded:
        check each item.
      required:
        - org_linkedin_account_id
        - enabled
        - total
        - succeeded
        - failed
        - results
        - retry_guidance
      properties:
        org_linkedin_account_id:
          type: integer
          description: Groovin's id for the LinkedIn account this answer is about.
        enabled:
          type: boolean
          description: The state you asked for.
        total:
          type: integer
          description: Items in `results`.
        succeeded:
          type: integer
          description: Items toggled.
        failed:
          type: integer
          description: Items that failed.
        results:
          type: array
          items:
            $ref: '#/components/schemas/ToggleLinkedinSyncItemResult'
          description: One item per profile.
        retry_guidance:
          type:
            - string
            - 'null'
          description: >-
            Plain-text advice when some items failed for a temporary reason,
            otherwise `null`. Follow it: it says when to retry, and which items.
    Error:
      type: object
      description: >-
        What every failed request answers, with an HTTP status. The text can
        change: decide what to do from the status, and show the text to a
        person.
      required:
        - error
      properties:
        error:
          type: string
          description: What went wrong, and sometimes what to do next.
    ToggleLinkedinSyncItemResult:
      type: object
      description: >-
        What happened for one contact. A contact linked to several LinkedIn
        profiles gets one item per profile.
      required:
        - crm_contact_id
        - relocated_to_crm_contact_id
        - linkedin_profile_id
        - enabled
        - status
        - history_import_triggered
        - connection_state
        - conversation_notes_deleted
        - pair_created
        - crm_linkedin_url_write_status
        - crm_linkedin_url_write_error
        - error
        - error_status
      properties:
        crm_contact_id:
          type: string
          description: The contact you asked about.
        relocated_to_crm_contact_id:
          type:
            - string
            - 'null'
          description: >-
            Set when that record was merged away and Groovin moved the link to
            the surviving record.
        linkedin_profile_id:
          type:
            - string
            - 'null'
          description: The LinkedIn profile that was toggled.
        enabled:
          type: boolean
          description: The state you asked for.
        status:
          type: string
          enum:
            - toggled
            - skipped
            - error
          description: >-
            `skipped` usually means no LinkedIn profile could be linked: `error`
            says why.
        history_import_triggered:
          type: boolean
          description: 'On only: `true` when a first history import started.'
        connection_state:
          type:
            - string
            - 'null'
          enum:
            - connected
            - invitation_pending
            - not_connected
            - unknown
            - null
          description: >-
            On only: how your LinkedIn network sees this person. With `unknown`,
            nothing was recorded.
        conversation_notes_deleted:
          type: integer
          description: >-
            Off only: how many CRM notes Groovin tried to delete. This is the
            number attempted, not confirmed.
        pair_created:
          type: boolean
          description: '`true` when this call linked the contact to a LinkedIn profile.'
        crm_linkedin_url_write_status:
          type:
            - string
            - 'null'
          enum:
            - written
            - already_present
            - skipped
            - failed
            - null
          description: >-
            What happened to the URL you sent on the CRM record. `null` when you
            sent none.
        crm_linkedin_url_write_error:
          type:
            - string
            - 'null'
          description: Why that URL was not written.
        error:
          type:
            - string
            - 'null'
          description: >-
            What went wrong for this item, or `null`. Always read it: the rest
            of the batch can still have succeeded.
        error_status:
          type:
            - integer
            - 'null'
          description: >-
            HTTP status behind `error`. `429` means rate limited and `5xx`
            usually means temporary: retry later. `null` when there is no error.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        Your Groovin API key (`gv_live_…`), created in the extension under
        Settings, MCP and API.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.