Get a contact

SDK platic.clients.get()

Read a contact's profile and moderation by ID, phone number or email. It searches the credential's workspace. If you can access several, choose one with ?workspace=.

Example

const contact = await platic.clients.get("5215512345678");

Path parameters

ParameterTypeDescriptionRequired
idstringThe contact's ID, their phone number in E.164 format without +, or their email. If two contacts have that email, it answers 409 MULTIPLE_CONTACTS_MATCH: use the ID✓

Query parameters

ParameterTypeDescriptionRequired
workspacestringWorkspace to look in. Required if your credential covers several workspaces; without it the API answers 400. A workspace the credential does not cover also answers 400—

Response

{
  "status": "success",
  "data": {
    "id": "274fc73cb7d84a17955914fdc1a1f9d0",
    "phoneNumber": "524491255844",
    "name": "Ana Smith",
    "firstname": "Ana",
    "lastname": "Smith",
    "email": "ana@example.com",
    "birthdate": null,
    "gender": "female",
    "company": "Acme",
    "country": "MX",
    "state": "Jalisco",
    "city": "Guadalajara",
    "address": null,
    "postalCode": null,
    "status": "active",
    "moderation": {
      "totalStrikes": 0,
      "lastAction": null,
      "lastSource": null,
      "lastSeverity": null,
      "lastFlaggedAt": null,
      "lastCategories": [],
      "lastMatchedTerms": [],
      "blockedAt": null,
      "blockedBy": null,
      "blockedReason": null
    },
    "tags": [],
    "owners": ["user1@acme.com", "user2@acme.com"],
    "customFields": {
      "plate": "ABC123",
      "reception_id": "REC001",
      "claim_date": "2025-02-01"
    },
    "creationDate": "2025-02-06T16:45:50.146Z",
    "lastUpdate": "2025-02-06T16:45:50.146Z"
  }
}

data contains the contact. creationDate and lastUpdate can be null.

FieldDescription
idInternal ID of the contact
phoneNumberContact's phone number without the + prefix
nameFull name of the contact
firstnameContact's first name
lastnameContact's last name
emailEmail address
birthdateDate of birth
genderGender
companyCompany name
countryCountry of residence
stateState of residence
cityCity of residence
addressFull address
postalCodePostal code
statusContact status: active or blocked
moderationModeration history, see below
tagsTags on the contact
ownersList of the responsible users' emails
customFieldsThe contact's custom fields
creationDateCreation date in ISO 8601 format
lastUpdateLast update date in ISO 8601 format

The moderation object

The object is always complete. With no incidents, it has totalStrikes: 0 and the other fields are null or empty.

FieldDescription
totalStrikesModeration strikes accumulated by the contact
lastActionAction taken on the last offense: warn, assist or spam
lastSourceWhat detected it: lexicon, openai, llm_guardrail or supervisor
lastSeveritySeverity of the last offense: low, medium or high
lastFlaggedAtWhen the last offense was recorded, in ISO 8601
lastCategoriesCategories reported by the moderator
lastMatchedTermsTerms that triggered the detection
blockedAtWhen the contact was blocked, in ISO 8601. null if active
blockedByWho blocked it. null if the block was automatic
blockedReasonReason for the block: guardrails_threshold_reached, manual_dashboard, conversation_spam, api_request, or the free-form reason you sent when you blocked it

Errors

Statusdetails.codeWhen it happens
400INVALID_REQUESTThe credential covers several workspaces and ?workspace= is missing, or the supplied workspace is not authorized. details.available lists the available ones and details.requested shows the one you sent
401UNAUTHENTICATEDThe credential is missing or invalid
403FORBIDDENThe credential does not have the Contacts module (Missing contacts permission)
404CLIENT_NOT_FOUNDNo contact in that workspace has that identifier, it was deleted, or it is outside the reach of the user's role
409MULTIPLE_CONTACTS_MATCHTwo contacts have that email: use the ID. details.clientIds lists them
{
  "code": 404,
  "error": "Not Found - The resource doesn't exist",
  "details": {
    "code": "CLIENT_NOT_FOUND",
    "message": "Client not found"
  }
}

The general error format is in Errors.