Skip to content
Docs menu

Copy the text

Your browser did not allow copying. The text below is selected: press Ctrl+C, or ⌘C on a Mac.

Delete a webhook

Removes the webhook of the account. Jobs created before keep sending their events to it; new jobs do not.

DELETEhttps://api.switchfile.io/v2/webhooks/{id}

Needs an API key: Authorization: Bearer YOUR_API_KEY. See Authentication.

Example

curl -X DELETE "https://api.switchfile.io/v2/webhooks/1a7e3c5b-9d2f-4b6a-8e0c-5f3d1b7a9c24" \
  -H "Authorization: Bearer $SWITCHFILE_API_KEY"

Parameters

Path parameters

  • idstring (uuid)required

    ID of the webhook

Responses

  • 204Deleted
  • 401The API key is missing or not valid
    401 application/json
    {
      "message": "Missing or invalid API key.",
      "code": "UNAUTHENTICATED"
    }
  • 404Does not exist for this account
    404 application/json
    {
      "message": "Webhook not found.",
      "code": "NOT_FOUND"
    }
  • 411The request has a body but no Content-Length header
    411 application/json
    {
      "message": "A Content-Length header is required for this request.",
      "code": "LENGTH_REQUIRED"
    }
  • 413The request or the file is too large
    413 application/json
    {
      "message": "The request body is larger than the allowed maximum.",
      "code": "PAYLOAD_TOO_LARGE"
    }
  • 422Invalid data. errors names the fields
    422 application/json
    {
      "message": "id: Expected string to match 'uuid' format",
      "code": "INVALID_DATA",
      "errors": {
        "id": [
          "Expected string to match 'uuid' format"
        ]
      }
    }
  • 429Too many requests or a daily quota is used up. See Retry-After
    429 application/json
    {
      "message": "Too many requests. Try again in 12 seconds.",
      "code": "RATE_LIMIT_EXCEEDED"
    }

Error bodies and codes are explained in Errors.