> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.askelephant.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.askelephant.ai/_mcp/server.

# Set engagement CRM association

PUT https://app.askelephant.ai/api/v2/engagements/{engagement_id}/crm_association
Content-Type: application/json

Replaces the single CRM association linked to an engagement. Requires the `engagements:write` scope. Updating a private engagement also requires `engagements:private:write`. When the credential can also read the updated engagement, the response returns the engagement payload. Otherwise the update succeeds with `204 No Content`.

Reference: https://docs.askelephant.ai/api-reference/engagements/set-engagement-crm-association

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: AskElephant Public API
  version: 1.0.0
paths:
  /v2/engagements/{engagement_id}/crm_association:
    put:
      operationId: set-engagement-crm-association
      summary: Set engagement CRM association
      description: >-
        Replaces the single CRM association linked to an engagement. Requires
        the `engagements:write` scope. Updating a private engagement also
        requires `engagements:private:write`. When the credential can also read
        the updated engagement, the response returns the engagement payload.
        Otherwise the update succeeds with `204 No Content`.
      tags:
        - subpackage_engagements
      parameters:
        - name: engagement_id
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Updated engagement response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/engagement'
        '401':
          description: Authentication is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '403':
          description: Authenticated but missing required scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: The requested resource does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '422':
          description: Request body validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '429':
          description: Too many requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/engagement_crm_association_request'
servers:
  - url: https://app.askelephant.ai/api
    description: Production
  - url: https://app-staging.askelephant.ai/api
    description: Staging
components:
  schemas:
    EngagementCrmAssociationRequestObjectType:
      type: string
      enum:
        - contact
        - company
        - deal
        - opportunity
        - account
      title: EngagementCrmAssociationRequestObjectType
    engagement_crm_association_request:
      type: object
      properties:
        object_type:
          $ref: '#/components/schemas/EngagementCrmAssociationRequestObjectType'
        crm_object_id:
          type: string
        source:
          type: string
          description: Normalized to uppercase on write (e.g. HUBSPOT, SALESFORCE).
      required:
        - object_type
        - crm_object_id
        - source
      title: engagement_crm_association_request
    EngagementObject:
      type: string
      enum:
        - engagement
      title: EngagementObject
    EngagementEngagementType:
      type: string
      enum:
        - MEETING
        - CALL
        - EMAIL
        - TASK
        - NOTE
        - CALENDAR_EVENT
        - DOCUMENT
      title: EngagementEngagementType
    EngagementProcessingStatus:
      type: string
      enum:
        - PENDING
        - PROCESSING
        - COMPLETED
        - FAILED
      title: EngagementProcessingStatus
    crm_association:
      type: object
      properties:
        object_type:
          type: string
          description: CRM object type.
        crm_object_id:
          type: string
          description: The record ID in the source CRM system.
        source:
          type: string
          description: CRM source system.
      required:
        - object_type
        - crm_object_id
        - source
      title: crm_association
    EngagementCompanyObject:
      type: string
      enum:
        - engagement_company
      title: EngagementCompanyObject
    engagement_company:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/EngagementCompanyObject'
        id:
          type: string
        name:
          type: string
        crm_association:
          $ref: '#/components/schemas/crm_association'
          description: >-
            CRM record linked to this company. Present when the company has been
            matched to a CRM record via integration or API.
        domains:
          type: array
          items:
            type: string
      required:
        - object
        - id
        - name
        - domains
      title: engagement_company
    ContactObject:
      type: string
      enum:
        - contact
      description: Resource discriminator for contact payloads.
      title: ContactObject
    resource_ref:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
      required:
        - id
        - object
      title: resource_ref
    ContactEmailsItems:
      type: object
      properties:
        email:
          type: string
          format: email
          description: Contact email address.
        is_primary:
          type: boolean
          description: Indicates whether this is the primary email address.
      required:
        - email
        - is_primary
      title: ContactEmailsItems
    ContactPhoneNumbersItems:
      type: object
      properties:
        phone_number:
          type: string
          description: Contact phone number in the source-system format.
        is_primary:
          type: boolean
          description: Indicates whether this is the primary phone number.
      required:
        - phone_number
        - is_primary
      title: ContactPhoneNumbersItems
    contact:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/ContactObject'
          description: Resource discriminator for contact payloads.
        id:
          type: string
          description: Stable AskElephant contact identifier.
        first_name:
          type:
            - string
            - 'null'
          description: Contact given name.
        last_name:
          type:
            - string
            - 'null'
          description: Contact family name.
        description:
          type: string
          description: Free-form contact summary or notes visible through the public API.
        company:
          $ref: '#/components/schemas/resource_ref'
          description: >-
            Lightweight reference to the contact's associated company when one
            exists.
        emails:
          type: array
          items:
            $ref: '#/components/schemas/ContactEmailsItems'
          description: Email addresses associated with the contact.
        phone_numbers:
          type: array
          items:
            $ref: '#/components/schemas/ContactPhoneNumbersItems'
          description: Phone numbers associated with the contact.
        crm_association:
          $ref: '#/components/schemas/crm_association'
          description: >-
            CRM record linked to this contact. Present when the contact has been
            matched to a CRM record via integration or API.
        time_zone:
          type: string
          description: IANA time zone identifier for the contact.
        created_at:
          type: string
          format: date-time
          description: Timestamp when the contact was first created in AskElephant.
        updated_at:
          type: string
          format: date-time
          description: Timestamp when the contact was most recently updated in AskElephant.
      required:
        - object
        - id
        - created_at
        - updated_at
      description: Public representation of a workspace contact.
      title: contact
    UserObject:
      type: string
      enum:
        - user
      title: UserObject
    UserRole:
      type: string
      enum:
        - OWNER
        - MANAGER
        - USER
        - INACTIVE
        - NOT_INVITED
      title: UserRole
    UserEmailsItems:
      type: object
      properties:
        email:
          type: string
          format: email
        is_primary:
          type: boolean
      required:
        - email
        - is_primary
      title: UserEmailsItems
    user:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/UserObject'
        id:
          type: string
        first_name:
          type:
            - string
            - 'null'
        last_name:
          type:
            - string
            - 'null'
        job_title:
          type: string
        role:
          $ref: '#/components/schemas/UserRole'
        emails:
          type: array
          items:
            $ref: '#/components/schemas/UserEmailsItems'
        time_zone:
          type: string
        last_activity_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - object
        - id
        - role
        - created_at
        - updated_at
      title: user
    EngagementActionItemObject:
      type: string
      enum:
        - engagement_action_item
      title: EngagementActionItemObject
    engagement_action_item:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/EngagementActionItemObject'
        id:
          type: string
        title:
          type: string
        description:
          type: string
        due_on:
          type:
            - string
            - 'null'
        assigned_to_user_id:
          type:
            - string
            - 'null'
        assigned_to_user_name:
          type:
            - string
            - 'null'
        assigned_to_user_email:
          type:
            - string
            - 'null'
          format: email
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - object
        - id
        - title
        - description
        - created_at
        - updated_at
      title: engagement_action_item
    EngagementSignalObject:
      type: string
      enum:
        - engagement_signal
      title: EngagementSignalObject
    engagement_signal:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/EngagementSignalObject'
        id:
          type: string
        annotation_definition_id:
          type: string
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        data_type:
          type: string
        value:
          description: Any type
      required:
        - object
        - id
        - annotation_definition_id
        - name
        - data_type
        - value
      title: engagement_signal
    TagObject:
      type: string
      enum:
        - tag
      title: TagObject
    tag:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/TagObject'
        id:
          type: string
        name:
          type: string
        hex_color:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        auto_tagging_enabled:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - object
        - id
        - name
        - created_at
        - updated_at
      title: tag
    engagement:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/EngagementObject'
        id:
          type: string
        title:
          type: string
        description:
          type: string
        engagement_type:
          $ref: '#/components/schemas/EngagementEngagementType'
        data_source:
          type: string
        processing_status:
          $ref: '#/components/schemas/EngagementProcessingStatus'
        is_internal:
          type: boolean
        is_private:
          type: boolean
          description: Indicates whether the engagement is marked private in AskElephant.
        engagement_at:
          type: string
          format: date-time
        start_at:
          type: string
          format: date-time
        end_at:
          type: string
          format: date-time
        duration_seconds:
          type: integer
        meeting_url:
          type: string
          format: uri
        external_url:
          type: string
          description: >-
            URL linking back to this engagement in the originating external
            system (e.g. a dialer's call detail page). Accepts `https://`,
            `http://`, and custom app deep-link schemes such as
            `wavv://call/123`. Present only when the engagement was created with
            an `external_url` value.
        crm_association:
          $ref: '#/components/schemas/crm_association'
          description: >-
            CRM record linked to this engagement. Present when the engagement
            has been matched to a CRM record via integration or API.
        owner_user_id:
          type: string
        host_user_id:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        transcript:
          type:
            - string
            - 'null'
          description: >-
            Full text transcript of the engagement. Only included when `expand`
            contains `transcript`.
        media_url:
          type:
            - string
            - 'null'
          format: uri
          description: >-
            Temporary signed URL for downloading the engagement recording media.
            Only included when `expand` contains `media_url`. The URL expires
            after a short period.
        companies:
          type: array
          items:
            $ref: '#/components/schemas/engagement_company'
          description: >-
            Companies associated with this engagement. Only included when
            `expand` contains `companies`.
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/contact'
          description: >-
            Contact participants associated with this engagement. Only included
            when `expand` contains `contacts`.
        owner:
          oneOf:
            - $ref: '#/components/schemas/user'
            - type: 'null'
          description: >-
            Workspace user who owns this engagement. Only included when `expand`
            contains `owner`.
        action_items:
          type: array
          items:
            $ref: '#/components/schemas/engagement_action_item'
          description: >-
            Action items created from this engagement. Only included when
            `expand` contains `action_items`.
        signals:
          type: array
          items:
            $ref: '#/components/schemas/engagement_signal'
          description: >-
            Signals (annotations) extracted from this engagement. Only included
            when `expand` contains `signals`.
        tags:
          type: array
          items:
            $ref: '#/components/schemas/tag'
          description: >-
            Tags applied to this engagement. Only included when `expand`
            contains `tags`.
      required:
        - object
        - id
        - title
        - engagement_type
        - processing_status
        - is_private
        - created_at
        - updated_at
      title: engagement
    error_item:
      type: object
      properties:
        field:
          type: string
          description: Request field or parameter associated with the error.
        code:
          type: string
          description: Stable machine-readable error code.
        message:
          type: string
          description: Human-readable explanation of the error.
      required:
        - code
        - message
      description: Structured validation or field-level error detail.
      title: error_item
    error:
      type: object
      properties:
        type:
          type: string
          format: uri
          description: Stable URI identifying the error category.
        title:
          type: string
          description: Short human-readable summary of the error.
        status:
          type: integer
          description: HTTP status code for this error response.
        detail:
          type: string
          description: Human-readable explanation specific to this request.
        request_id:
          type: string
          description: Correlation identifier for support and debugging.
        errors:
          type: array
          items:
            $ref: '#/components/schemas/error_item'
          description: Optional field-level validation errors.
      required:
        - type
        - title
        - status
        - detail
        - request_id
      description: RFC 9457 problem details response returned for client-visible failures.
      title: error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

```

## Examples

### Example 1



**Request**

```json
{
  "object_type": "contact",
  "crm_object_id": "cnt_1234567890abcdef",
  "source": "HUBSPOT"
}
```

**Response**

```json
{
  "object": "engagement",
  "id": "ngmt_9a8b7c6d5e4f3g2h1i",
  "title": "Quarterly Business Review",
  "engagement_type": "MEETING",
  "processing_status": "COMPLETED",
  "is_private": true,
  "created_at": "2024-01-10T14:00:00Z",
  "updated_at": "2024-01-15T11:00:00Z",
  "description": "Discussed Q1 results and upcoming initiatives.",
  "data_source": "HUBSPOT",
  "is_internal": false,
  "engagement_at": "2024-01-15T09:30:00Z",
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T10:15:00Z",
  "duration_seconds": 2700,
  "meeting_url": "https://meetings.askelephant.ai/meeting/123456789",
  "external_url": "https://hubspot.com/call/987654321",
  "crm_association": {
    "object_type": "contact",
    "crm_object_id": "cnt_1234567890abcdef",
    "source": "HUBSPOT"
  },
  "owner_user_id": "usr_abcdef1234567890",
  "host_user_id": "usr_1234567890abcdef",
  "transcript": "Welcome to the quarterly business review. Today we will cover the sales performance and marketing strategies...",
  "media_url": "https://media.askelephant.ai/recordings/ngmt_9a8b7c6d5e4f3g2h1i.mp3?token=abc123",
  "companies": [
    {
      "object": "engagement_company",
      "id": "cmp_1234abcd5678efgh",
      "name": "Acme Corporation",
      "domains": [
        "acme.com",
        "acmecorp.com"
      ],
      "crm_association": {
        "object_type": "company",
        "crm_object_id": "cmp_1234abcd5678efgh",
        "source": "HUBSPOT"
      }
    }
  ],
  "contacts": [
    {
      "object": "contact",
      "id": "cnt_01HQY3JMS2QAXJGX6X7CH7CM6X",
      "created_at": "2026-03-01T12:00:00Z",
      "updated_at": "2026-03-04T18:25:00Z",
      "first_name": "Ada",
      "last_name": "Lovelace",
      "description": "Primary customer contact for analytical projects.",
      "company": {
        "id": "cmp_1234abcd5678efgh",
        "object": "engagement_company"
      },
      "emails": [
        {
          "email": "ada@analytical.engine",
          "is_primary": true
        }
      ],
      "phone_numbers": [
        {
          "phone_number": "+1-555-0100",
          "is_primary": true
        }
      ],
      "crm_association": {
        "object_type": "contact",
        "crm_object_id": "cnt_01HQY3JMS2QAXJGX6X7CH7CM6X",
        "source": "HUBSPOT"
      },
      "time_zone": "America/Los_Angeles"
    }
  ],
  "owner": {
    "object": "user",
    "id": "usr_abcdef1234567890",
    "role": "OWNER",
    "created_at": "2023-01-01T08:00:00Z",
    "updated_at": "2024-01-10T15:00:00Z",
    "first_name": "John",
    "last_name": "Doe",
    "job_title": "Sales Manager",
    "emails": [
      {
        "email": "john.doe@askelephant.ai",
        "is_primary": true
      }
    ],
    "time_zone": "America/New_York",
    "last_activity_at": "2024-01-15T09:00:00Z"
  },
  "action_items": [
    {
      "object": "engagement_action_item",
      "id": "act_1234567890abcdef",
      "title": "Follow up with Acme Corp",
      "description": "Send updated proposal and schedule next meeting.",
      "created_at": "2024-01-15T10:00:00Z",
      "updated_at": "2024-01-15T10:05:00Z",
      "due_on": "2024-01-20",
      "assigned_to_user_id": "usr_abcdef1234567890",
      "assigned_to_user_name": "John Doe",
      "assigned_to_user_email": "john.doe@askelephant.ai"
    }
  ],
  "signals": [
    {
      "object": "engagement_signal",
      "id": "sig_9876543210fedcba",
      "annotation_definition_id": "ann_1234567890abcdef",
      "name": "Positive Sentiment",
      "data_type": "boolean",
      "description": "Indicates positive sentiment detected in the conversation."
    }
  ],
  "tags": [
    {
      "object": "tag",
      "id": "tag_1234abcd5678efgh",
      "name": "Q1 Review",
      "created_at": "2023-12-01T09:00:00Z",
      "updated_at": "2024-01-01T09:00:00Z",
      "hex_color": "#1E90FF",
      "description": "Tag for first quarter business reviews.",
      "auto_tagging_enabled": false
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://app.askelephant.ai/api/v2/engagements/engagement_id/crm_association"

payload = {
    "object_type": "contact",
    "crm_object_id": "cnt_1234567890abcdef",
    "source": "HUBSPOT"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.askelephant.ai/api/v2/engagements/engagement_id/crm_association';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"object_type":"contact","crm_object_id":"cnt_1234567890abcdef","source":"HUBSPOT"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.askelephant.ai/api/v2/engagements/engagement_id/crm_association"

	payload := strings.NewReader("{\n  \"object_type\": \"contact\",\n  \"crm_object_id\": \"cnt_1234567890abcdef\",\n  \"source\": \"HUBSPOT\"\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.askelephant.ai/api/v2/engagements/engagement_id/crm_association")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"object_type\": \"contact\",\n  \"crm_object_id\": \"cnt_1234567890abcdef\",\n  \"source\": \"HUBSPOT\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://app.askelephant.ai/api/v2/engagements/engagement_id/crm_association")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"object_type\": \"contact\",\n  \"crm_object_id\": \"cnt_1234567890abcdef\",\n  \"source\": \"HUBSPOT\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://app.askelephant.ai/api/v2/engagements/engagement_id/crm_association', [
  'body' => '{
  "object_type": "contact",
  "crm_object_id": "cnt_1234567890abcdef",
  "source": "HUBSPOT"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.askelephant.ai/api/v2/engagements/engagement_id/crm_association");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"object_type\": \"contact\",\n  \"crm_object_id\": \"cnt_1234567890abcdef\",\n  \"source\": \"HUBSPOT\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "object_type": "contact",
  "crm_object_id": "cnt_1234567890abcdef",
  "source": "HUBSPOT"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.askelephant.ai/api/v2/engagements/engagement_id/crm_association")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Example 2



**Request**

```json
{
  "object_type": "contact",
  "crm_object_id": "cnt_1234567890abcdef",
  "source": "HUBSPOT"
}
```

**Response**

```json
{
  "object": "engagement",
  "id": "ngmt_9a8b7c6d5e4f3g2h1i",
  "title": "Quarterly Business Review",
  "engagement_type": "MEETING",
  "processing_status": "COMPLETED",
  "is_private": true,
  "created_at": "2024-01-10T14:00:00Z",
  "updated_at": "2024-01-15T11:00:00Z",
  "description": "Discussed Q1 results and upcoming initiatives.",
  "data_source": "HUBSPOT",
  "is_internal": false,
  "engagement_at": "2024-01-15T09:30:00Z",
  "start_at": "2024-01-15T09:30:00Z",
  "end_at": "2024-01-15T10:15:00Z",
  "duration_seconds": 2700,
  "meeting_url": "https://meetings.askelephant.ai/meeting/123456789",
  "external_url": "https://hubspot.com/call/987654321",
  "crm_association": {
    "object_type": "contact",
    "crm_object_id": "cnt_1234567890abcdef",
    "source": "HUBSPOT"
  },
  "owner_user_id": "usr_abcdef1234567890",
  "host_user_id": "usr_1234567890abcdef",
  "transcript": "Welcome to the quarterly business review. Today we will cover the sales performance and marketing strategies...",
  "media_url": "https://media.askelephant.ai/recordings/ngmt_9a8b7c6d5e4f3g2h1i.mp3?token=abc123",
  "companies": [
    {
      "object": "engagement_company",
      "id": "cmp_1234abcd5678efgh",
      "name": "Acme Corporation",
      "domains": [
        "acme.com",
        "acmecorp.com"
      ],
      "crm_association": {
        "object_type": "company",
        "crm_object_id": "cmp_1234abcd5678efgh",
        "source": "HUBSPOT"
      }
    }
  ],
  "contacts": [
    {
      "object": "contact",
      "id": "cnt_01HQY3JMS2QAXJGX6X7CH7CM6X",
      "created_at": "2026-03-01T12:00:00Z",
      "updated_at": "2026-03-04T18:25:00Z",
      "first_name": "Ada",
      "last_name": "Lovelace",
      "description": "Primary customer contact for analytical projects.",
      "company": {
        "id": "cmp_1234abcd5678efgh",
        "object": "engagement_company"
      },
      "emails": [
        {
          "email": "ada@analytical.engine",
          "is_primary": true
        }
      ],
      "phone_numbers": [
        {
          "phone_number": "+1-555-0100",
          "is_primary": true
        }
      ],
      "crm_association": {
        "object_type": "contact",
        "crm_object_id": "cnt_01HQY3JMS2QAXJGX6X7CH7CM6X",
        "source": "HUBSPOT"
      },
      "time_zone": "America/Los_Angeles"
    }
  ],
  "owner": {
    "object": "user",
    "id": "usr_abcdef1234567890",
    "role": "OWNER",
    "created_at": "2023-01-01T08:00:00Z",
    "updated_at": "2024-01-10T15:00:00Z",
    "first_name": "John",
    "last_name": "Doe",
    "job_title": "Sales Manager",
    "emails": [
      {
        "email": "john.doe@askelephant.ai",
        "is_primary": true
      }
    ],
    "time_zone": "America/New_York",
    "last_activity_at": "2024-01-15T09:00:00Z"
  },
  "action_items": [
    {
      "object": "engagement_action_item",
      "id": "act_1234567890abcdef",
      "title": "Follow up with Acme Corp",
      "description": "Send updated proposal and schedule next meeting.",
      "created_at": "2024-01-15T10:00:00Z",
      "updated_at": "2024-01-15T10:05:00Z",
      "due_on": "2024-01-20",
      "assigned_to_user_id": "usr_abcdef1234567890",
      "assigned_to_user_name": "John Doe",
      "assigned_to_user_email": "john.doe@askelephant.ai"
    }
  ],
  "signals": [
    {
      "object": "engagement_signal",
      "id": "sig_9876543210fedcba",
      "annotation_definition_id": "ann_1234567890abcdef",
      "name": "Positive Sentiment",
      "data_type": "boolean",
      "description": "Indicates positive sentiment detected in the conversation."
    }
  ],
  "tags": [
    {
      "object": "tag",
      "id": "tag_1234abcd5678efgh",
      "name": "Q1 Review",
      "created_at": "2023-12-01T09:00:00Z",
      "updated_at": "2024-01-01T09:00:00Z",
      "hex_color": "#1E90FF",
      "description": "Tag for first quarter business reviews.",
      "auto_tagging_enabled": false
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://app.askelephant.ai/api/v2/engagements/engagement_id/crm_association"

payload = {
    "object_type": "contact",
    "crm_object_id": "cnt_1234567890abcdef",
    "source": "HUBSPOT"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.askelephant.ai/api/v2/engagements/engagement_id/crm_association';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"object_type":"contact","crm_object_id":"cnt_1234567890abcdef","source":"HUBSPOT"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.askelephant.ai/api/v2/engagements/engagement_id/crm_association"

	payload := strings.NewReader("{\n  \"object_type\": \"contact\",\n  \"crm_object_id\": \"cnt_1234567890abcdef\",\n  \"source\": \"HUBSPOT\"\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.askelephant.ai/api/v2/engagements/engagement_id/crm_association")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"object_type\": \"contact\",\n  \"crm_object_id\": \"cnt_1234567890abcdef\",\n  \"source\": \"HUBSPOT\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://app.askelephant.ai/api/v2/engagements/engagement_id/crm_association")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"object_type\": \"contact\",\n  \"crm_object_id\": \"cnt_1234567890abcdef\",\n  \"source\": \"HUBSPOT\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://app.askelephant.ai/api/v2/engagements/engagement_id/crm_association', [
  'body' => '{
  "object_type": "contact",
  "crm_object_id": "cnt_1234567890abcdef",
  "source": "HUBSPOT"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.askelephant.ai/api/v2/engagements/engagement_id/crm_association");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"object_type\": \"contact\",\n  \"crm_object_id\": \"cnt_1234567890abcdef\",\n  \"source\": \"HUBSPOT\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "object_type": "contact",
  "crm_object_id": "cnt_1234567890abcdef",
  "source": "HUBSPOT"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.askelephant.ai/api/v2/engagements/engagement_id/crm_association")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```