---
updatedAt: 2026-05-22T11:24:34.000Z
agentTools:
  projectIndex: https://developer.skovik.com/llms.txt
---

# Delete a User

**Required scope:** Write `users`

Returns `204` with an empty body if the user was deleted. Returns an error otherwise.

> 📘 State of Deleted Users
> Deleted users cannot log in or be restored, but all their submitted reports and associated data is kept.
>
> You can rely on Skovik to keep all reports and bookkeeping data tied to an employee even after they've left the company, as is required by governing laws in most jurisdictions.


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "version": "v1",
    "title": "Resources"
  },
  "servers": [
    {
      "url": "https://api.skovik.com/v1"
    }
  ],
  "paths": {
    "/users/{user_id}": {
      "get": {
        "operationId": "readUser",
        "tags": [
          "Users"
        ],
        "summary": "Read a User",
        "description": "**Required scope:** Read `users`\n\nReturns a user resource if a valid `user_id` was provided.\nReturns an error otherwise.\n",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "Skovik ID of the User",
            "example": "61af557eaccbe30037f27335"
          }
        ],
        "responses": {
          "200": {
            "description": "User",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1users~1{user_id}/patch/requestBody/content/application~1json/schema"
                },
                "examples": {
                  "jane_doe": {
                    "$ref": "#/paths/~1users/post/responses/201/content/application~1json/examples/jane_doe"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1ping/get/responses/401/content/application~1json/schema"
                },
                "example": {
                  "errors": [
                    {
                      "id": "ee249b2c-5b1e-4441-bf86-9e08ad9d12c8",
                      "status": "404",
                      "title": "Not found"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteUser",
        "tags": [
          "Users"
        ],
        "summary": "Delete a User",
        "description": "**Required scope:** Write `users`\n\nReturns `204` with an empty body if the user was deleted. Returns an error otherwise.\n\n> 📘 State of Deleted Users\n> Deleted users cannot log in or be restored, but all their submitted reports and associated data is kept.\n>\n> You can rely on Skovik to keep all reports and bookkeeping data tied to an employee even after they've left the company, as is required by governing laws in most jurisdictions.\n",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "Skovik ID of the User",
            "example": "61af557eaccbe30037f27335"
          }
        ],
        "responses": {
          "204": {
            "description": "User deleted"
          },
          "404": {
            "$ref": "#/paths/~1users~1{user_id}/get/responses/404"
          }
        }
      }
    },
    "/ping": {
      "get": {
        "operationId": "ping",
        "tags": [
          "Misc endpoints"
        ],
        "summary": "Ping API",
        "description": "**Required scope:** Read `ping`\n\nSimple endpoint, useful for testing authentication. Will return HTTP status code `200` when successful.\n",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "meta": {
                    "note": "Pong!"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "readOnly": true,
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "readOnly": true,
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "a62f8b4af8821bea623f835320aaa6ba"
                          },
                          "status": {
                            "type": "string",
                            "example": "404"
                          },
                          "code": {
                            "type": "string",
                            "example": "user_not_found"
                          },
                          "title": {
                            "type": "string",
                            "example": "Resource not found"
                          },
                          "detail": {
                            "type": "string",
                            "example": "Invalid email"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "errors": [
                    {
                      "id": "ee249b2c-5b1e-4441-bf86-9e08ad9d12c8",
                      "status": "401",
                      "title": "Unauthorized",
                      "detail": "Missing authentication token. Must be included via bearer header."
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1ping/get/responses/401/content/application~1json/schema"
                },
                "example": {
                  "errors": [
                    {
                      "id": "ee249b2c-5b1e-4441-bf86-9e08ad9d12c8",
                      "status": "403",
                      "title": "Forbidden",
                      "detail": "Could not authorize token. Perhaps the token has been revoked (or never existed)."
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "export_orders": {
      "post": {
        "operationId": "webhookExportOrder",
        "tags": [
          "Webhooks"
        ],
        "summary": "Export order created, completed, or failed",
        "description": "Delivered when an export order is created, completes or fails. The three events share the same payload structure and are distinguished by the `type` field.\n\n- `export_orders.created`: the export order has been created.\n- `export_orders.completed`: the export order completed successfully. Fetch the order via the [Read export order](ref:readexportorder) endpoint to obtain the URL to the export file.\n- `export_orders.failed`: the export order failed. Fetch the order via the [Read export order](ref:readexportorder) endpoint and inspect the `error_message` attribute for details.\n",
        "security": [],
        "parameters": [
          {
            "$ref": "#/webhooks/users/post/parameters/0"
          },
          {
            "$ref": "#/webhooks/users/post/parameters/1"
          },
          {
            "$ref": "#/webhooks/users/post/parameters/2"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Delivery id, matching the `webhook-id` header.",
                    "example": "60c7d63a8f4c4b9e9c2e1a2b"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "export_orders.created",
                      "export_orders.completed",
                      "export_orders.failed"
                    ]
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When this delivery attempt was signed and dispatched.",
                    "example": "2026-05-25T14:30:45Z"
                  },
                  "data": {
                    "allOf": [
                      {
                        "$ref": "#/webhooks/misc.ping/post/requestBody/content/application~1json/schema/properties/data"
                      },
                      {
                        "type": "object",
                        "required": [
                          "relationships"
                        ],
                        "properties": {
                          "relationships": {
                            "type": "object",
                            "required": [
                              "related_object"
                            ],
                            "properties": {
                              "related_object": {
                                "type": "object",
                                "required": [
                                  "data",
                                  "links"
                                ],
                                "properties": {
                                  "data": {
                                    "type": "object",
                                    "required": [
                                      "type",
                                      "id"
                                    ],
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "export_orders"
                                        ]
                                      },
                                      "id": {
                                        "type": "string",
                                        "example": "f3a9c7e15b344a8cb6f122b0"
                                      }
                                    }
                                  },
                                  "links": {
                                    "type": "object",
                                    "required": [
                                      "related"
                                    ],
                                    "properties": {
                                      "related": {
                                        "type": "string",
                                        "example": "/v1/export_orders/f3a9c7e15b344a8cb6f122b0"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    ]
                  }
                }
              },
              "example": {
                "id": "60c7d63a8f4c4b9e9c2e1a2b",
                "type": "export_orders.completed",
                "timestamp": "2026-05-25T14:30:45Z",
                "data": {
                  "id": "8b1d4f122c0e4b1a9f9d3d0e",
                  "type": "webhook_events",
                  "attributes": {
                    "created_at": "2026-05-25T14:30:45Z",
                    "name": "export_orders.completed"
                  },
                  "links": {
                    "self": "/v1/webhook_events/8b1d4f122c0e4b1a9f9d3d0e"
                  },
                  "relationships": {
                    "related_object": {
                      "data": {
                        "type": "export_orders",
                        "id": "f3a9c7e15b344a8cb6f122b0"
                      },
                      "links": {
                        "related": "/v1/export_orders/f3a9c7e15b344a8cb6f122b0"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The endpoint will be disabled immediately. No further events are sent until it is re-enabled in the Skovik UI."
          },
          "2XX": {
            "description": "Successful delivery and verification of the webhook event."
          },
          "default": {
            "description": "Any other response code will be treated as a failure and scheduled for retry with exponential backoff."
          }
        }
      }
    },
    "branches": {
      "post": {
        "operationId": "webhookBranch",
        "tags": [
          "Webhooks"
        ],
        "summary": "Branch created, updated, or archived",
        "description": "Delivered when a branch is created, updated or archived. The three events are distinguished by the `type` field. Fetch the branch via the [Read branch](ref:readbranch) endpoint to obtain its current state.\n\n- `branches.created`: the branch has been created.\n- `branches.updated`: one or more of the branch's attributes have changed.\n- `branches.archived`: the branch has been archived.\n",
        "security": [],
        "parameters": [
          {
            "$ref": "#/webhooks/users/post/parameters/0"
          },
          {
            "$ref": "#/webhooks/users/post/parameters/1"
          },
          {
            "$ref": "#/webhooks/users/post/parameters/2"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Delivery id, matching the `webhook-id` header.",
                    "example": "2a9f8e7d6c5b4a3928170615"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "branches.created",
                      "branches.updated",
                      "branches.archived"
                    ]
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When this delivery attempt was signed and dispatched.",
                    "example": "2026-05-25T14:30:45Z"
                  },
                  "data": {
                    "allOf": [
                      {
                        "$ref": "#/webhooks/misc.ping/post/requestBody/content/application~1json/schema/properties/data"
                      },
                      {
                        "type": "object",
                        "required": [
                          "relationships"
                        ],
                        "properties": {
                          "relationships": {
                            "type": "object",
                            "required": [
                              "related_object"
                            ],
                            "properties": {
                              "related_object": {
                                "type": "object",
                                "required": [
                                  "data"
                                ],
                                "properties": {
                                  "data": {
                                    "type": "object",
                                    "required": [
                                      "type",
                                      "id"
                                    ],
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "branches"
                                        ]
                                      },
                                      "id": {
                                        "type": "string",
                                        "example": "6b5a4938271605f4e3d2c1b0"
                                      }
                                    }
                                  },
                                  "links": {
                                    "type": "object",
                                    "description": "A link to the API resource the event pertains to. Omitted for `branches.archived`.",
                                    "required": [
                                      "related"
                                    ],
                                    "properties": {
                                      "related": {
                                        "type": "string",
                                        "example": "/v1/branches/6b5a4938271605f4e3d2c1b0"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    ]
                  }
                }
              },
              "example": {
                "id": "2a9f8e7d6c5b4a3928170615",
                "type": "branches.created",
                "timestamp": "2026-05-25T14:30:45Z",
                "data": {
                  "id": "9d8c7b6a5e4f3a2b1c0d9e8f",
                  "type": "webhook_events",
                  "attributes": {
                    "created_at": "2026-05-25T14:30:45Z",
                    "name": "branches.created"
                  },
                  "links": {
                    "self": "/v1/webhook_events/9d8c7b6a5e4f3a2b1c0d9e8f"
                  },
                  "relationships": {
                    "related_object": {
                      "data": {
                        "type": "branches",
                        "id": "6b5a4938271605f4e3d2c1b0"
                      },
                      "links": {
                        "related": "/v1/branches/6b5a4938271605f4e3d2c1b0"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The endpoint will be disabled immediately. No further events are sent until it is re-enabled in the Skovik UI."
          },
          "2XX": {
            "description": "Successful delivery and verification of the webhook event."
          },
          "default": {
            "description": "Any other response code will be treated as a failure and scheduled for retry with exponential backoff."
          }
        }
      }
    },
    "users": {
      "post": {
        "operationId": "webhookUser",
        "tags": [
          "Webhooks"
        ],
        "summary": "User created, updated, or archived",
        "description": "Delivered when a user is created, updated or archived. The three events are distinguished by the `type` field. Fetch the user via the [Read user](ref:readuser) endpoint to obtain its current state.\n\n- `users.created`: the user has been created.\n- `users.updated`: some part of the user object in the API has changed.\n- `users.archived`: the user has been archived.\n",
        "security": [],
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "60c7d63a8f4c4b9e9c2e1a2b"
            },
            "description": "Unique identifier for this delivery. Stable across retries."
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1748353845"
            },
            "description": "Unix timestamp in seconds."
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "type": "string",
              "example": "v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE="
            },
            "description": "HMAC-SHA256 signature of the payload following the Standard Webhooks specification."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Delivery id, matching the `webhook-id` header.",
                    "example": "7f2c1a980b5e4d6f8a3c2b11"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "users.created",
                      "users.updated",
                      "users.archived"
                    ]
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When this delivery attempt was signed and dispatched.",
                    "example": "2026-05-25T14:30:45Z"
                  },
                  "data": {
                    "allOf": [
                      {
                        "$ref": "#/webhooks/misc.ping/post/requestBody/content/application~1json/schema/properties/data"
                      },
                      {
                        "type": "object",
                        "required": [
                          "relationships"
                        ],
                        "properties": {
                          "relationships": {
                            "type": "object",
                            "required": [
                              "related_object"
                            ],
                            "properties": {
                              "related_object": {
                                "type": "object",
                                "required": [
                                  "data"
                                ],
                                "properties": {
                                  "data": {
                                    "type": "object",
                                    "required": [
                                      "type",
                                      "id"
                                    ],
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "enum": [
                                          "users"
                                        ]
                                      },
                                      "id": {
                                        "type": "string",
                                        "example": "5c1e0b9a7d234f6a8b1c2d3e"
                                      }
                                    }
                                  },
                                  "links": {
                                    "type": "object",
                                    "description": "A link to the API resource the event pertains to. Omitted for `users.archived`.",
                                    "required": [
                                      "related"
                                    ],
                                    "properties": {
                                      "related": {
                                        "type": "string",
                                        "example": "/v1/users/5c1e0b9a7d234f6a8b1c2d3e"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    ]
                  }
                }
              },
              "example": {
                "id": "7f2c1a980b5e4d6f8a3c2b11",
                "type": "users.updated",
                "timestamp": "2026-05-25T14:30:45Z",
                "data": {
                  "id": "4e5d6c7b8a91023f4d5e6a7b",
                  "type": "webhook_events",
                  "attributes": {
                    "created_at": "2026-05-25T14:30:45Z",
                    "name": "users.updated"
                  },
                  "links": {
                    "self": "/v1/webhook_events/4e5d6c7b8a91023f4d5e6a7b"
                  },
                  "relationships": {
                    "related_object": {
                      "data": {
                        "type": "users",
                        "id": "5c1e0b9a7d234f6a8b1c2d3e"
                      },
                      "links": {
                        "related": "/v1/users/5c1e0b9a7d234f6a8b1c2d3e"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The endpoint will be disabled immediately. No further events are sent until it is re-enabled in the Skovik UI."
          },
          "2XX": {
            "description": "Successful delivery and verification of the webhook event."
          },
          "default": {
            "description": "Any other response code will be treated as a failure and scheduled for retry with exponential backoff."
          }
        }
      }
    },
    "misc.ping": {
      "post": {
        "operationId": "webhookMiscPing",
        "tags": [
          "Webhooks"
        ],
        "summary": "misc.ping",
        "description": "Manual test event triggered from the UI. See [Managing webhook endpoints](doc:api-webhooks) for details.\n",
        "security": [],
        "parameters": [
          {
            "$ref": "#/webhooks/users/post/parameters/0"
          },
          {
            "$ref": "#/webhooks/users/post/parameters/1"
          },
          {
            "$ref": "#/webhooks/users/post/parameters/2"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Manual test event triggered from the UI. Not subscribable. Has no related resource, so the inner `relationships` key is omitted.",
                "required": [
                  "id",
                  "type",
                  "timestamp",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Delivery id, matching the `webhook-id` header.",
                    "example": "1d3b9a440c2f4ad78a1f9e3f"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "misc.ping"
                    ]
                  },
                  "timestamp": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When this delivery attempt was signed and dispatched.",
                    "example": "2026-05-25T14:30:45Z"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "attributes",
                      "links"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Inner event id. Distinct from the top-level delivery id, and identical across deliveries of the same event (even to multiple endpoints).",
                        "example": "8b1d4f122c0e4b1a9f9d3d0e"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "webhook_events"
                        ]
                      },
                      "attributes": {
                        "type": "object",
                        "required": [
                          "created_at",
                          "name"
                        ],
                        "properties": {
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2026-05-25T14:30:45Z"
                          },
                          "name": {
                            "type": "string",
                            "description": "Event name, matching the top-level `type` field."
                          }
                        }
                      },
                      "links": {
                        "type": "object",
                        "required": [
                          "self"
                        ],
                        "properties": {
                          "self": {
                            "type": "string",
                            "example": "/v1/webhook_events/8b1d4f122c0e4b1a9f9d3d0e"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "example": {
                "id": "1d3b9a440c2f4ad78a1f9e3f",
                "type": "misc.ping",
                "timestamp": "2026-05-25T14:30:45Z",
                "data": {
                  "id": "8c2e0c9a4d114d5e91b33a7c",
                  "type": "webhook_events",
                  "attributes": {
                    "created_at": "2026-05-25T14:30:45Z",
                    "name": "misc.ping"
                  },
                  "links": {
                    "self": "/v1/webhook_events/8c2e0c9a4d114d5e91b33a7c"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "410": {
            "description": "The endpoint will be disabled immediately. No further events are sent until it is re-enabled in the Skovik UI."
          },
          "2XX": {
            "description": "Successful delivery and verification of the webhook event."
          },
          "default": {
            "description": "Any other response code, as well as a timeout or connection error, is treated as a failed delivery. Unlike subscribable events, a ping is never retried."
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "x-readme": {
    "proxy-enabled": false,
    "samples-languages": [
      "curl",
      "csharp",
      "ruby",
      "node",
      "python"
    ]
  }
}
```