Skip to content
V2 (Legacy) API ReferenceGet started

Setup contact card

client.ContactCard.New(ctx, body) (*SetContactCard, error)
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
body ContactCardNewParams
FirstName param.Field[string]

First name for the contact card. Required.

PhoneNumber param.Field[string]

E.164 phone number to associate the contact card with

ImageURL param.Field[string]Optional

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

LastName param.Field[string]Optional

Last name for the contact card. Optional.

ReturnsExpand Collapse
type SetContactCard struct{…}
FirstName string

First name on the contact card

IsActive bool

Whether the contact card was successfully applied to the device

PhoneNumber string

The phone number the contact card is associated with

ImageURL stringOptional

Image URL on the contact card

LastName stringOptional

Last name on the contact card

Setup contact card

package main

import (
  "context"
  "fmt"

  "github.com/linq-team/linq-go"
  "github.com/linq-team/linq-go/option"
)

func main() {
  client := linqgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  setContactCard, err := client.ContactCard.New(context.TODO(), linqgo.ContactCardNewParams{
    FirstName: "John",
    PhoneNumber: "+15551234567",
    ImageURL: linqgo.String("https://cdn.linqapp.com/contact-card/example.jpg"),
    LastName: linqgo.String("Doe"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", setContactCard.FirstName)
}
{
  "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
}