---
title: "Create a user-level webhook target"
method: PUT
path: "/user/settings/webhooks"
tags: ["webhooks"]
---

# Create a user-level webhook target

`PUT /user/settings/webhooks`

Create a webhook target for the current user that receives events across all projects.

## Request body

- ModelsWebhook
  - `basic_auth_password` string
  - `basic_auth_user` string — If provided, webhook requests will be sent with a Basic Auth header.
  - `created` string — A timestamp when this webhook target was created. You cannot change this value.
  - `created_by` UserUser
    - `bot_owner_id` integer — BotOwnerID is the ID of the owning (human) user if this user is a bot. A non-zero value means this user is a bot and cannot authenticate via password.
    - `created` string — A timestamp when this task was created. You cannot change this value.
    - `email` string — The user's email address.
    - `id` integer — The unique, numeric id of this user.
    - `name` string — The full name of the user.
    - `updated` string — A timestamp when this task was last updated. You cannot change this value.
    - `username` string — The username of the user. Is always unique.
  - `events` string[] — The webhook events which should fire this webhook target
  - `id` integer — The generated ID of this webhook target
  - `project_id` integer — The project ID of the project this webhook target belongs to
  - `secret` string — If provided, webhook requests will be signed using HMAC. Check out the docs about how to use this: https://vikunja.io/docs/webhooks/#signing
  - `target_url` string — The target URL where the POST request with the webhook payload will be made
  - `updated` string — A timestamp when this webhook target was last updated. You cannot change this value.
  - `user_id` integer — The user ID if this is a user-level webhook (mutually exclusive with ProjectID)

## Response `200`

The created webhook target

- ModelsWebhook
  - `basic_auth_password` string
  - `basic_auth_user` string — If provided, webhook requests will be sent with a Basic Auth header.
  - `created` string — A timestamp when this webhook target was created. You cannot change this value.
  - `created_by` UserUser
    - `bot_owner_id` integer — BotOwnerID is the ID of the owning (human) user if this user is a bot. A non-zero value means this user is a bot and cannot authenticate via password.
    - `created` string — A timestamp when this task was created. You cannot change this value.
    - `email` string — The user's email address.
    - `id` integer — The unique, numeric id of this user.
    - `name` string — The full name of the user.
    - `updated` string — A timestamp when this task was last updated. You cannot change this value.
    - `username` string — The username of the user. Is always unique.
  - `events` string[] — The webhook events which should fire this webhook target
  - `id` integer — The generated ID of this webhook target
  - `project_id` integer — The project ID of the project this webhook target belongs to
  - `secret` string — If provided, webhook requests will be signed using HMAC. Check out the docs about how to use this: https://vikunja.io/docs/webhooks/#signing
  - `target_url` string — The target URL where the POST request with the webhook payload will be made
  - `updated` string — A timestamp when this webhook target was last updated. You cannot change this value.
  - `user_id` integer — The user ID if this is a user-level webhook (mutually exclusive with ProjectID)

## Other responses

- `400` — Invalid webhook
- `500` — Internal server error

---

[API](https://skmtc.net/go-vikunja/apis/vikunja-api.md) · [All operations](https://skmtc.net/go-vikunja/apis/vikunja-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/go-vikunja/vikunja-api/revisions/feb3f68bbdf1/schema)
