put( )

A function that responds to requests made with the HTTP PUT method.

The HTTP PUT method is usually called by consumers to update an existing resource.

If defined in this way and the resource is updated, the function should respond with a 200 (OK) status code. If defined in this way and the resource is created because it did not exist, you should respond with a 201 (Created) status code.

Respond to the request by returning a WixHttpFunctionResponse object you create using one of the response(), ok(), created(), notFound(), serverError(), badRequest(), or forbidden() functions.

The put() function is not a function that you call from your code. You define the function in a file named http-functions.js in your site's Backend section. The function is called when your users make HTTP requests using the associated URLs as described below.

All PUT requests with the following URL will be routed to this function:

Premium sites:


Free sites:


Note: You must publish your site at least once before using both the testing and production endpoints. When you make changes to production endpoints you must publish your site for them to take effect. Testing endpoints will use the latest code in the editor.

Method Declaration
Method Parameters

The request object.

Return Type:WixHttpFunctionResponse
Was this helpful?