InformlyInformly
Contacts
PUT
/contacts/{id}

Updates an existing contact's fields. If segmentIds is provided, it replaces all existing segment assignments.

Authorization

BearerAuth
AuthorizationBearer <token>

API token obtained from the Informly dashboard

In: header

Path Parameters

id*string

Unique identifier of the resource

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "http://api.informly.co/api/v1/contacts/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "email": "string",
    "phone": "string",
    "contact": {
      "firstname": "string",
      "lastname": "string",
      "jobtitle": "string",
      "company": "string"
    },
    "segments": [
      {
        "segmentId": "f2f864fb-5d15-4f35-b9aa-83491924c4db",
        "assignedAt": "2019-08-24T14:15:22Z"
      }
    ],
    "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "string",
    "details": [
      {
        "path": "string",
        "message": "string"
      }
    ]
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "string",
    "details": [
      {
        "path": "string",
        "message": "string"
      }
    ]
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "string",
    "details": [
      {
        "path": "string",
        "message": "string"
      }
    ]
  }
}

SDK

import { Informly } from "@informly/sdk";

const client = new Informly.Client({
  token: "YOUR_API_TOKEN",
});

const response = await client.contacts.updateContact({
  id: "id",
  email: "jane@example.com",
  phone: "+1234567890",
  firstname: "Jane",
  lastname: "Doe",
  jobtitle: "Engineer",
  company: "Acme Inc",
  segmentIds: "segmentIds",
});

console.log(response);