# Validate Data for Custom API Example

> Example showing validation of input data for custom APIs in API Maker.

Source: https://docs.apimaker.dev/v1/examples/sys/system/isValidDataForCustomAPI.html

<!-- --8<-- [start:body] -->

`g.sys.system.isValidDataForCustomAPI` calls the [is valid data for custom API system API](/v1/docs/apis-all/system-apis/system-generated-is-valid-data-for-custom-api.html) from your code, whatever the settings of that API say about HTTP callers.

### Validate custom API body object

Test custom API data valid or not using global object 'g'.

```ts linenums="1"
await g.sys.system.isValidDataForCustomAPI({
    name: "custom_api_name",
    data: {
        "some": "data",
        "some": "data"
    },
    type: "BODY" // BODY | QUERY_PARAMS
});
```

<!-- --8<-- [end:body] -->

## Related

- [Is valid data for custom api system API](/v1/docs/apis-all/system-apis/system-generated-is-valid-data-for-custom-api.html) · [All system APIs from code](/v1/examples/sys/system/system.html) · [The global object g](/v1/docs/pre-defined-terms/global-object-g.html)
