# Update a widget

> PATCH /widgets/{id}. HeyRik API parameters and documented request and response examples.

Source: https://www.heyrik.com/docs/api-reference/widgets/patch-widgets-id-update-a-widget

PATCH https://server.heyrik.com/api/v1/widgets/{id}

## Path parameters

- id (required): Replace {id} in the request URL with the value for this resource.

## Headers

Authorization: Bearer $HEYRIK_API_KEY (required). Keep your key on your server.

## Request example

```sh
curl -X PATCH https://server.heyrik.com/api/v1/widgets/wgt_5f21 \
  -H "Authorization: Bearer $HEYRIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "allowed_origins": ["https://acme.com", "https://app.acme.com"] }'
```
