Skip to main content
PUT
/
contacts
/
{id}
curl -X PUT https://api.guayaba.ai/contacts/550e8400-e29b-41d4-a716-446655440000 \
  -H "Content-Type: application/json" \
  -H "X-API-Key: gua_a1b2c3d4_your-api-key-here" \
  -d '{
    "status": "paused",
    "customVariables": {
      "email": "new@example.com"
    }
  }'
{
  "success": true,
  "message": "Contact updated successfully",
  "contact": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "phoneNumber": "+11234567890",
    "name": "John Doe",
    "status": "paused",
    "campaignId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "customVariables": {
      "email": "new@example.com"
    },
    "updatedAt": "2026-01-20T15:00:00.000Z"
  }
}
Updates a contact identified by their unique ID. At least one field must be provided in the request body.

Path Parameters

id
string (UUID)
required
The unique identifier of the contact to update.

Request Body

name
string
Contact name. Maximum 255 characters.
phoneNumber
string
New phone number in E.164 format (e.g., +11234567890). Validates the number and checks for duplicates.
timezone
string
IANA timezone string (e.g., America/New_York).
status
string
New status for the contact. Use List Statuses to retrieve valid values.
campaignId
string (UUID)
New campaign to move the contact to.
customVariables
object
Custom key-value data. Replaces the entire existing object — merge client-side if you need to preserve existing keys.

Behavior Notes

Changing timezone or campaignId on an active contact will cancel and reschedule all pending calls and SMS.
Changing phoneNumber validates the new number and checks for duplicates across your team.
customVariables replaces the entire object. If you need to update a single key, read the current values first, merge them client-side, and send the full object.

Response

success
boolean
Always true on a successful request.
message
string
Human-readable confirmation message.
contact
object
The updated contact object.
curl -X PUT https://api.guayaba.ai/contacts/550e8400-e29b-41d4-a716-446655440000 \
  -H "Content-Type: application/json" \
  -H "X-API-Key: gua_a1b2c3d4_your-api-key-here" \
  -d '{
    "status": "paused",
    "customVariables": {
      "email": "new@example.com"
    }
  }'
{
  "success": true,
  "message": "Contact updated successfully",
  "contact": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "phoneNumber": "+11234567890",
    "name": "John Doe",
    "status": "paused",
    "campaignId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "customVariables": {
      "email": "new@example.com"
    },
    "updatedAt": "2026-01-20T15:00:00.000Z"
  }
}