> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Web Push Settings

> Turn web push on or off and set the default icon

# Update Web Push Settings

Turns web push on or off, or sets the default notification icon. The first time you turn it on, Sequenzy generates your workspace's VAPID keys. Turning it off keeps the keys, so browsers that already subscribed keep working when you turn it on again.

Requires the `integrations:manage` scope and edit access to the workspace.

## Request

<ParamField body="enabled" type="boolean">
  Turn web push on or off. Provide `enabled`, `defaultIconUrl`, or both.
</ParamField>

<ParamField body="defaultIconUrl" type="string | null">
  https icon used when a message has no icon of its own. `null` or an empty
  string clears it, and web pushes go back to your company logo.
</ParamField>

When `enabled` is `true`, the response also includes `siteKey`: the active
[web tracking key](../web-tracking-keys/list) web push uses, with its install
snippet. If the workspace has no active key and your company website is set,
one named `Website` is created for that website and its `www` or apex twin, and
`siteKeyCreated` is `true`. `siteKey` is `null` when there is no key and the
website is unknown or not a valid origin. Requests that do not enable web push
omit both fields.

```bash theme={null}
curl -X PUT "https://api.sequenzy.com/api/v1/push/settings/web" \
  --header "Authorization: Bearer $SEQUENZY_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"enabled": true}'
```

## Responses

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "push": {
      "web": {
        "enabled": true,
        "vapidPublicKey": "BH3tXU0JSzok9ND7DyeQRcEy..."
      },
      "ios": {
        "configured": true,
        "keyId": "ABC123DEFG",
        "teamId": "DEF123GHIJ",
        "bundleId": "com.example.app",
        "environment": "production",
        "lastError": null,
        "lastErrorAt": null
      },
      "android": {
        "configured": false,
        "projectId": null,
        "clientEmail": null,
        "lastError": null,
        "lastErrorAt": null
      },
      "defaultIconUrl": "https://cdn.example.com/icon-192.png"
    },
    "siteKey": {
      "id": "wtk_123",
      "name": "Website",
      "publicKey": "seq_pk_abc123",
      "allowedOrigins": ["https://example.com", "https://www.example.com"],
      "installSnippet": "<script>...</script><script async src=\"https://api.sequenzy.com/sequenzy.js\" ...></script>"
    },
    "siteKeyCreated": true,
    "message": "Web push is enabled. Created site key seq_pk_abc123 for https://example.com, https://www.example.com."
  }
  ```

  ```json 400 theme={null}
  {
    "error": "defaultIconUrl must be an https:// URL."
  }
  ```

  ```json 401 theme={null}
  {
    "error": "Invalid API key"
  }
  ```

  ```json 403 theme={null}
  {
    "error": "You have view-only access to this company. Contact the owner to request edit permissions."
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.