GET
/
contacts
/
{id}
JavaScript
import Surge from '@surgeapi/node';

const client = new Surge({
  apiKey: 'My API Key',
});

const contact = await client.contacts.retrieve('ctc_01j9dy8mdzfn3r0e8x1tbdrdrf');

console.log(contact.id);
{
  "email": "dom@toretto.family",
  "first_name": "Dominic",
  "id": "ctc_01j9dy8mdzfn3r0e8x1tbdrdrf",
  "last_name": "Toretto",
  "metadata": {
    "car": "1970 Dodge Charger R/T"
  },
  "phone_number": "+18015551234"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The ID of the contact to retrieve.

Example:

"ctc_01j9dy8mdzfn3r0e8x1tbdrdrf"

Response

Contact

A contact who has consented to receive messages

id
string
required

Unique identifier for the object.

phone_number
string<phone-number>
required

The contact's phone number in E.164 format.

Example:

"+18015551234"

email
string<email>

The contact's email address.

first_name
string

The contact's first name.

last_name
string

The contact's last name.

metadata
object

Set of key-value pairs that will be stored with the object.