Skip to main content

Update (PUT)

Use the PUT method to update a record.

Content types supported are "text/plain" or "application/json" - You can send plain text to the server or JSON. We recommend using "application/json" but also give the option of "text/plain" requests to give developers more freedom.

uniqueId - The uniqueId is required to replace the existing data of the record.

Request data

HTTP method PUT

URL format: https://baseUrl/versionNumber/customEndpointRoute/userEndpoint?key=apiKey&uniqueId=uniqueId[&dataOnly=true]


Request Parameters

The following table describes the Request parameters.

baseUrlBase url for calling the API.


versionNumberService version.

Value: The current value is 1.

customEndpointRouteThe route which identifies custom endpoints.

Default value: ce


The endpoint name generated by the user.

Value: the name created at

keyThe API Key of the project.Yes
uniqueIdThe identifier of the record.Yes

If used, the endpoint response will be the POST body, without additional information such as ‘uniqueId’.

Value: true

masterKeyOverrides the need for Access tokens or restrictions applied to Authentication endpoints.

Don't use this key in your client application.

For more information please refer to projects.

Value: the masterKey created at

strategyA strategy allows you to choose how the data is updated.

  • force - (default) replaces the content regardless of the type.
  • merge - merges objects, it only works with JSON.
  • replace - replaces the entire content, types must be the same.

Request Cookies


The Access token is required for secure endpoints.

It is obtained when doing a login and it is stored in an httpOnly cookie. To automatically include it in the request you need to set the following property:

// using fetch { credentials: 'include' } // using axios { withCredentials: true }

Alternatively you can also use the Authorization header.

For more information please refer to  the login documentation and Secure Endpoints documentation.
Yes - if endpoint is secure and Authorization header is not used

Request Headers


Specifies the MIME type of the body of the Request. Options:

  • application/json
  • text/plain

The Access token is required for secure endpoints.

You should use this header if you are not using the httpOnly cookie to access a Secure endpoint.

For more information please refer to  the login documentation and Secure Endpoints documentation.

Yes - if endpoint is secure and httpOnly cookie is not used

POST body

You can post JSON or plain text, just make sure you set the appropriate Content-Type header.

Response data

Error codes

Error codeDescription
400Possible reasons:
  • Endpoint or API Key not valid.
  • Wrong Content-Type, it only accepts "text/plain" or "application/json".
  • Empty Request body.
  • uniqueId is not present in the URL.
  • No record was found.
401If the endpoint is secure and the access token is missing or is not valid.

It may also return this error if the user no longer exists.

403Missing API Key, not allowed origin or disallowed request without orign.

Successful response

This endpoint returns the new updated record.


uniqueId: "3f38bf9e1bb54d2396d1f1b8fbba1630",
data: { newProperty: "data" },
createdAt: "2020-12-27T10:58:45.000Z",
updatedAt: "2020-12-27T10:58:45.000Z"