Skip to content
V2 (Legacy) API ReferenceGet started

Update contact card

contact_card.update(ContactCardUpdateParams**kwargs) -> SetContactCard
PATCH/v3/contact_card

Partially updates an existing active contact card for a phone number.

Fetches the current active contact card and merges the provided fields. Only fields present in the request body are updated; omitted fields retain their existing values.

Requires an active contact card to exist for the phone number.

ParametersExpand Collapse
phone_number: str

E.164 phone number of the contact card to update

first_name: Optional[str]

Updated first name. If omitted, the existing value is kept.

image_url: Optional[str]

Updated profile image URL. If omitted, the existing image is kept.

last_name: Optional[str]

Updated last name. If omitted, the existing value is kept.

ReturnsExpand Collapse
class SetContactCard: โ€ฆ
first_name: str

First name on the contact card

is_active: bool

Whether the contact card was successfully applied to the device

phone_number: str

The phone number the contact card is associated with

image_url: Optional[str]

Image URL on the contact card

last_name: Optional[str]

Last name on the contact card

Update contact card

import os
from linq import LinqAPIV3

client = LinqAPIV3(
    api_key=os.environ.get("LINQ_API_V3_API_KEY"),  # This is the default and can be omitted
)
set_contact_card = client.contact_card.update(
    phone_number="+15551234567",
    first_name="John",
    image_url="https://cdn.linqapp.com/contact-card/example.jpg",
    last_name="Doe",
)
print(set_contact_card.first_name)
{
  "phone_number": "+15551234567",
  "first_name": "John",
  "last_name": "Doe",
  "image_url": "https://cdn.linqapp.com/contact-card/example.jpg",
  "is_active": true
}
{
  "error": {
    "status": 400,
    "code": 1002,
    "message": "Phone number must be in E.164 format"
  },
  "success": false
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token"
  },
  "success": false
}
{
  "error": {
    "status": 403,
    "code": 2005,
    "message": "Access denied - insufficient permissions for this resource"
  },
  "success": false
}
{
  "error": {
    "status": 404,
    "code": 2001,
    "message": "Resource not found"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error"
  },
  "success": false
}
{
  "error": {
    "status": 503,
    "code": 4004,
    "message": "RCS capability check is temporarily unavailable."
  },
  "success": false
}
Returns Examples
{
  "phone_number": "+15551234567",
  "first_name": "John",
  "last_name": "Doe",
  "image_url": "https://cdn.linqapp.com/contact-card/example.jpg",
  "is_active": true
}
{
  "error": {
    "status": 400,
    "code": 1002,
    "message": "Phone number must be in E.164 format"
  },
  "success": false
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token"
  },
  "success": false
}
{
  "error": {
    "status": 403,
    "code": 2005,
    "message": "Access denied - insufficient permissions for this resource"
  },
  "success": false
}
{
  "error": {
    "status": 404,
    "code": 2001,
    "message": "Resource not found"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error"
  },
  "success": false
}
{
  "error": {
    "status": 503,
    "code": 4004,
    "message": "RCS capability check is temporarily unavailable."
  },
  "success": false
}