Understanding the PUT Method in Webhooks: Full Guide with Examples

PUT Method in Webhook Block


When you’re building a bot that interacts with external systems, like Zoho Desk, a CRM, or any other support platform, you may need to update existing records, such as changing the status of a support ticket or updating a user’s contact details. That’s where the PUT method comes in handy.

In this guide, we’ll walk you through what the PUT method is, when to use it, and how it works.


Learn more about webhooks: Introduction to Webhook Block in GC 

What is PUT method?   

The PUT method is used to update fully the existing records in an external system via an API. PUT replaces or updates an existing record with new data. When you send a PUT request through a webhook block in your bot flow, you’re telling another system, “Here’s the updated version of this record; please use it instead of the old one.”



When should you use the PUT method?   

Use PUT when you want to replace fully or update something that already exists. For example:
  1. Updating all fields in a custom module in Zoho Desk
  2. Replacing time tracking data for a ticket
  3. Modifying the structure or metadata of a module
 If you’re only changing specific fields like ticket priority or status, PATCH is more appropriate. PUT is best when you’re replacing the full object. 
Example Use Case
Let’s say you’re editing a custom module in Zoho Desk with new details.


   "description": "Doctor informations", 
   "profileIds": [1000000029530, 1000000029533], 
   "pluralLabel": "Doctors", 
   "departmentIds": [1000000774623, 1000000025632], 
   "singularLabel": "Doctor" 
 }
 
https://api.yourapp.com/update-module/MOD123456
 
Expected Response:

{
  "module_id": "MOD123456",
  "status": "Updated"
}  

You can use this response to notify the user:
“Your Module ID MOD123456 has been updated. Our team will prioritize it right away.”

Body  

The PUT method requires a body in the request. This is typically in JSON format, but Form Data is also supported by some APIs.
You can:
  1. Manually type the JSON or Form Data into the Webhook block
  2. Use dynamic variables like @user.id or @ticket.priority to personalize each request
Form Data
Form Data
Some APIs (especially older ones or specific services) require Form Data instead of JSON. In such cases, you’ll enter key-value pairs like:
 
name = {{user.name}} 
 email = {{user.email}} 
 message = {{user.query}}   

 Always check the API documentation to see whether JSON or Form Data is required and what fields are mandatory.

Difference between PUT and PATCH Methods

PUT Vs PATCH Methods
PUT Vs PATCH Methods
Both PUT and PATCH are HTTP methods used to update existing data through APIs, but they work differently:

Feature
PUT Method
PATCH Method
Type of Update
Full update (replaces the entire record)
Partial update (modifies only specified fields)
Required Data
Usually requires the full object
Requires only the fields you want to update
Use Case
When you want to replace or refresh the record
When you want to tweak only specific values
API Behavior
Overwrites everything unless handled carefully
Preserves unmentioned fields
 
So, use PUT when you want to send a full update and PATCH when you’re changing only a small part of the record.
 
Example:
Updating with the PUT method
Let's say this is your original object is:

   "ticket_id": "TX12345", 
   "status": "Open", 
   "priority": "Normal", 
   "assignee": "Agent A" 
 } 

Now, you update it with: 
 { 
   "ticket_id": "TX12345", 
   "status": "In Progress", 
   "priority": "High" 
 } 

If the API expects a full object, omitting the "assignee" field may cause it to be removed or set to null. So always confirm if the API supports partial objects for PUT, or include all fields to avoid data loss.
 

Understanding the differences between Webhook HTTP Methods 

GET
POST
PUT
PATCH
DELETE
GET
Primary Purpose
Typical Use Cases
Request Body
Example Scenario
Retrieve data from a server
- Fetch user details
- Get ticket history
- Retrieve knowledge base articles
No
Display a user’s subscription status based on their email.
POST
Primary Purpose
Typical Use Cases
Request Body
Example Scenario
Submit data to create a new resource
- Create a support ticket
- Submit a form
- Log user feedback
Yes (e.g., JSON)
Create a new ticket in Zoho Desk with user information.
PUT
Primary Purpose
Typical Use Cases
Request Body
Example Scenario
Update or replace an existing resource
- Update ticket status
- Modify user contact details
- Change subscription plan
Yes (full resource)
Change the priority of a support ticket to “Urgent”
PATCH
Apply partial modifications to a resource
- Update ticket priority
- Change the user’s phone number
- Modify specific fields
Yes (particular data)
Update only the status field of a ticket to “In Progress”
DELETE

Primary Purpose

Typical Use Cases

Request Body

Example Scenario

Remove a resource from the server

- Delete a support ticket

- Unsubscribe a user
- Remove a customer record

Optional

Delete a user’s support ticket upon request

 Learn about GETPOSTPATCH, and DELETE

Benefits of using the PUT Method   


  1. Keep external records up to date automatically.
  2. Let users make changes without leaving the bot.
  3. Sync user actions with systems like Zoho Desk or CRMs.
  4. Maintain data consistency across platforms.


FAQs   

Can I use this to update Zoho Desk tickets?
Yes. As long as the API supports it, you can use PUT to update ticket fields like priority, status, or assignee.
Can I test PUT requests before deploying?
Absolutely. Use the Webhook preview in the builder. The response will be shown directly in the preview window.

Tips   


  1. Use the Webhook preview before saving to check your request and response.
  2. Use dynamic variables to tailor updates to each user.
  3. Check if the API needs full data or just the updated fields.
  4. Capture and use the API response to confirm the action to the user.
  5. If you’re only making a small change, consider using PATCH instead.


Learn more about webhooks: Introduction to Webhook Block in GC