Skip to content
V2 (Legacy) API ReferenceGet started

Get contact cards

contact_card.retrieve(ContactCardRetrieveParams**kwargs) -> ContactCardRetrieveResponse
GET/v3/contact_card

Returns the contact card for a specific phone number, or all contact cards for the authenticated partner if no phone_number is provided.

ParametersExpand Collapse
phone_number: Optional[str]

E.164 phone number to filter by. If omitted, all my cards for the partner are returned.

ReturnsExpand Collapse
class ContactCardRetrieveResponse:
contact_cards: List[ContactCard]
first_name: str
is_active: bool
phone_number: str
image_url: Optional[str]
last_name: Optional[str]

Get contact cards

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
)
contact_card = client.contact_card.retrieve()
print(contact_card.contact_cards)
{
  "contact_cards": [
    {
      "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": 500,
    "code": 3006,
    "message": "Internal server error"
  },
  "success": false
}
Returns Examples
{
  "contact_cards": [
    {
      "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": 500,
    "code": 3006,
    "message": "Internal server error"
  },
  "success": false
}