Skip to main content
POST
/
workspaces
/
{workspace}
/
contacts
/
{contact}
Update a contact
curl --request POST \
  --url https://lancepilot.com/api/v3/workspaces/{workspace}/contacts/{contact} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "John Smith",
  "email": "[email protected]",
  "gender": "male",
  "status": true
}'
{
  "status": 200,
  "message": "Resource updated successfully.",
  "data": {}
}

JSON Example

{
  "name": "John Smith",
  "email": "[email protected]",
  "gender": "male",
  "status": true
}

Multipart Form Data Example

PUT /contacts/123
Content-Type: multipart/form-data

name=John Smith
[email protected]
gender=male
status=1
avatar=@/path/to/avatar.png
contact_groups[]=10
contact_groups[]=12

📝 Field Requirements for Update

FieldTypeRequiredNotes
namestring (max 50)YesContact’s display name
emailstring (email)NoContact email
genderenum(male,female,other)NoGender of contact
statusbooleanNoContact active status
avatarfile (image ≤2MB)NoUpload new avatar (form-data only)
contact_groupsarray of integersNoAssign contact groups (form-data only, workspace scoped)

Authorizations

Authorization
string
header
required

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

Path Parameters

workspace
string<uuid>
required

ID of the workspace.

contact
integer
required

The ID of the contact to update

Body

application/json
name
string
required
Maximum length: 50
Example:

"John Doe"

email
string<email>
gender
enum<string>
Available options:
male,
female,
other
Example:

"male"

status
boolean
Example:

true

Response

status
integer
required
Example:

200

message
string
required
Example:

"Resource updated successfully."

data
object
required

Updated resource data.