Skip to content
V2 (Legacy) API ReferenceGet started

Setup contact card

contact_card.create(ContactCardCreateParams**kwargs) -> SetContactCard
POST/v3/contact_card

Creates a contact card for a phone number. This endpoint is intended for initial, one-time setup only.

The contact card is stored in an inactive state first. Once it’s applied successfully, it is activated and is_active is returned as true. On failure, is_active is false.

Note: To update an existing contact card after setup, use PATCH /v3/contact_card instead.

ParametersExpand Collapse
first_name: str

First name for the contact card. Required.

phone_number: str

E.164 phone number to associate the contact card with

image_url: Optional[str]

URL of the profile image to rehost on the CDN. Only re-uploaded when a new value is provided.

last_name: Optional[str]

Last name for the contact card. Optional.

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

Setup 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.create(
    first_name="John",
    phone_number="+15551234567",
    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": 500,
    "code": 3006,
    "message": "Internal server error"
  },
  "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": 500,
    "code": 3006,
    "message": "Internal server error"
  },
  "success": false
}