Update a Custom API

Adjust the parameters and ruleset of an existing Custom API

A single Custom API instance is a JSON ruleset object containing a JSON array of rules and some parameters.

To update the rules of an existing Custom API, make a POST request to this endpoint and include a JSON ruleset object in the body.

The values of api and urlPattern needs to match those of an existing Custom API ruleset exactly or a brand new Custom API ruleset will be created.

If you wish to update an existing Custom API ruleset's api or urlPattern, send that ruleset's hashcode (response from the ruleset's last update, more on this below) in the &replace parameter.

To update/overwrite several Custom API rulesets for your token at a time, send a JSON array of objects. This will replace (or create) each corresponding Custom API ruleset for your token.

Response

Updating or creating rules will return a JSON response containing an array of hashes. These hashes represent each of your updated or created rules, and can be used to update individual rules.

The following is an example response upon successful update or creation of a Custom API.

{
  "hashes":
    [
      "507a31ce",
      "ax7n3sa1",
      "z992ns6c"
    ]
}
Language
Authentication
Query
Click Try It! to start a request and see the response here!