---
title: "Create or Update a Custom API"
method: POST
path: "/custom"
tags: ["Custom"]
---

# Create or Update a Custom API

`POST /custom`

Create or update the parameters and ruleset of an existing Custom API

## Request body

- object
  - `notes` string[] — An array of strings that can be added manually. The API automatically adds a notes specifying when the API was last updated.
  - `xForwardHeaders` object — Allows you to pass in X-Forward headers by name, including X-Evaluate (aka. X-Forward-X-Evaluate; omit "X-Forward" in the header name)
    - `X-Evaluate` string
  - `rules` object[] — An object that defines a set of rules for a specific urlPattern-api combination
    - `name` string
    - `selector` string
    - `filters` object[]
      - `args` string[]
      - `type` string
  - `api` string — The specific API being targeted. Always precede the API name with "/api/" as in `"/api/article"` except for "all")
  - `urlPattern` string — A regex that defines the URLs for which the ruleset will be applied
  - `testUrl` string — A URL that can be used to check that the rule still works as intended. This is the page that will load automatically when editing the ruleset in the Dashboard UI
  - `renderOptions` string — Rendering options
  - `prefilters` string[] — An array of string selectors that should be omitted from the DOM before extraction occurs
  - `useProxy` string — Used to disable proxies (when they have been set globally), by applying the value `"none"`

## Response `200`

Successful API Response

- object
  - `hashes` string[]

---

[API](https://skmtc.dev/diffbot/apis/web-search.md) · [All operations](https://skmtc.dev/diffbot/apis/web-search/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/diffbot/web-search/revisions/8b88d7dabe63/schema)
