Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

Params

Param name Description
name
required

Webhook name

Validations:

  • Must be a String

http_url
required

Webhook URL

Validations:

  • Must be a String

http_method
required

Webhook Method

Validations:

  • Must be a String

trigger_events
required

Webhook trigger events

Validations:

  • Must be an array of [“ASSET_REMOVED_FAVORITE”, “ASSET_ADDED_FAVORITE”, “ASSET_ADDED_COMMENT”, “ASSET_STARTED_INGEST”, “ASSET_RESTORED”, “ASSET_REMOVED”, “ASSET_EDITED_COMMENT”, “ASSET_REMOVED_COMMENT”, “ASSET_EDITED_METADATA”, “ASSET_ADDED_APPROVAL”, “ASSET_APPROVED”, “ASSET_REJECTED”, “ASSET_LINKED”, “ASSET_UNLINKED”, “ASSET_ADDED_CLIP”, “ASSET_EDITED_CLIP”, “ASSET_REMOVED_CLIP”, “ASSET_ADDED_ATTACHMENT”, “ASSET_REMOVED_ATTACHMENT”, “ASSET_ADDED_FIELD_GROUP”, “ASSET_EDITED_FIELD_GROUP”, “ASSET_REMOVED_FIELD_GROUP”, “ASSET_ADDED”, “ASSET_STARTED_ANALYSIS”, “ASSET_FINISHED_ANALYSIS”, “ASSET_DOWNLOADED”, “ASSET_SHARED_LINK”, “ASSET_PUBLISHED”, “ASSET_STARTED_RTSP_STREAM”, “ASSET_STARTED_RTMP_STREAM”, “ASSET_FINISHED_STREAM”, “ASSET_ADDED_CROP”, “ASSET_EDITED_CROP”, “ASSET_REMOVED_CROP”, “ASSET_FINISHED_INGEST”, “ASSET_REMOVE_MEDIA_QUEUED”, “ASSET_REMOVED_MEDIA”, “ASSET_UPDATED_PROXY_MP4”, “ASSET_FINISHED_PROXY_MP4”, “ASSET_ADDED_TO_COLLECTION”, “ASSET_REMOVED_FROM_COLLECTION”, “INCOMING_ASSET_ADDED_TO_DROP_FOLDER”, “OUTGOING_ASSET_ADDED_TO_DROP_FOLDER”, “ASSET_PURGED”, “ASSET_ADDED_SHAREABLE_LINK”, “ASSET_UPDATED_INGEST”, “ASSET_FINISHED_EJECT”, “ASSET_UPDATED_EJECT”, “ASSET_ADDED_ARTICLE”, “ASSET_EDITED_ARTICLE”, “ASSET_FINISHED_IMAGE_PREVIEW”, “ASSET_FINISHED_IMAGE_THUMBNAIL”, “ASSET_FINISHED_DOCUMENT_PREVIEW”, “ASSET_FINISHED_AUDIO_WAVEFORM”, “ASSET_FINISHED_AUDIO_PROXY”, “PROJECT_REMOVED_FAVORITE”, “PROJECT_ADDED_FAVORITE”, “PROJECT_ADDED_COMMENT”, “PROJECT_RESTORED”, “PROJECT_REMOVED”, “PROJECT_EDITED_COMMENT”, “PROJECT_REMOVED_COMMENT”, “PROJECT_EDITED_METADATA”, “PROJECT_LINKED”, “PROJECT_UNLINKED”, “PROJECT_ADDED_ATTACHMENT”, “PROJECT_REMOVED_ATTACHMENT”, “PROJECT_ADDED_FIELD_GROUP”, “PROJECT_EDITED_FIELD_GROUP”, “PROJECT_REMOVED_FIELD_GROUP”, “PROJECT_PRIVATE”, “PROJECT_PUBLIC”, “PROJECT_ADDED”, “PROJECT_ADDED_THUMBNAIL_ASSET”, “PROJECT_REMOVED_THUMBNAIL_ASSET”, “PROJECT_PURGED”, “USER_LINKED”, “USER_UNLINKED”, “USER_ADDED”, “USER_EDITED”, “USER_REMOVED”, “USER_EDITED_AVATAR”, “USER_REMOVED_AVATAR”, “USER_GROUP_LINKED”, “USER_GROUP_UNLINKED”, “USER_GROUP_USER_LINKED”, “USER_GROUP_USER_UNLINKED”, “USER_GROUP_ADDED”, “USER_GROUP_EDITED”, “USER_GROUP_REMOVED”, “USER_ROLE_ADDED”, “USER_ROLE_REMOVED”, “USER_ROLE_EDITED”, “COLLECTION_CREATED”, “COLLECTION_UPDATED_METADATA”, “COLLECTION_DELETED”, “COLLECTION_ADDED_FAVORITE”, “COLLECTION_REMOVED_FAVORITE”, “COLLECTION_PUBLIC”, “COLLECTION_PRIVATE”, “DROP_FOLDER_ADDED”, “DROP_FOLDER_EDITED_METADATA”, “DROP_FOLDER_REMOVED”, “DROP_FOLDER_PUBLIC”, “DROP_FOLDER_PRIVATE”, “API_KEY_ADDED”, “API_KEY_REMOVED”, “FIELD_ADDED”, “FIELD_EDITED”, “FIELD_REMOVED”, “FIELD_GROUP_ADDED”, “FIELD_GROUP_EDITED”, “FIELD_GROUP_REMOVED”, “PERMISSION_EDITED”, “LOADER_PING”, “LOADER_PROCESS_UPDATED”, “LOADER_PROCESS_REMOVED”, “LOADER_EDITED”, “LOADER_PROCESS_EDITED”, “NOTIFICATION_ADDED”, “STARTED_DAG_ACTION_RUN”, “COMPLETED_DAG_ACTION_RUN”, “UPDATED_DAG_ACTION_RUN”]

project_id
optional

Id of the webhook project

Validations:

  • Must be a String

Examples

// Successful request
POST /api/v2/admin/webhooks
{
  "name": "Sample Webhook",
  "http_url": "https://example.website.com",
  "http_method": "POST",
  "trigger_events": [
    "ASSET_ADDED"
  ],
  "project_id": "GsrwPNm6nJ7CKRYnQZl6"
}
200
{
  "webhook": {
    "id": 5,
    "name": "Sample Webhook",
    "http_url": "https://example.website.com",
    "http_method": "POST",
    "trigger_events": [
      "ASSET_ADDED"
    ],
    "created_at": "2023-11-27T09:42:39.937Z",
    "updated_at": "2023-11-27T09:42:39.937Z",
    "disabled": false,
    "project_id": "GsrwPNm6nJ7CKRYnQZl6",
    "queue_length": 0,
    "retry_queue_length": 0,
    "latest_run": null,
    "webhook_users": [],
    "webhook_headers": []
  }
}
// Successful request
POST /api/v2/admin/webhooks
{
  "name": "Sample Webhook",
  "http_url": "https://example.website.com",
  "http_method": "POST",
  "trigger_events": [
    "ASSET_ADDED"
  ]
}
200
{
  "webhook": {
    "id": 6,
    "name": "Sample Webhook",
    "http_url": "https://example.website.com",
    "http_method": "POST",
    "trigger_events": [
      "ASSET_ADDED"
    ],
    "created_at": "2023-11-27T09:42:40.100Z",
    "updated_at": "2023-11-27T09:42:40.100Z",
    "disabled": false,
    "project_id": null,
    "queue_length": 0,
    "retry_queue_length": 0,
    "latest_run": null,
    "webhook_users": [],
    "webhook_headers": []
  }
}
// Not admin user
POST /api/v2/admin/webhooks
401
// Missing parameters
POST /api/v2/admin/webhooks
{
  "name": "Sample Webhook",
  "http_url": null,
  "http_method": "POST",
  "trigger_events": [
    "ASSET_ADDED"
  ]
}
422
{
  "error": "Invalid parameter 'http_url' value nil: Must be a String"
}
// Project not found
POST /api/v2/admin/webhooks
{
  "name": "Sample Webhook",
  "http_url": "https://example.website.com",
  "http_method": "POST",
  "trigger_events": [
    "ASSET_ADDED"
  ],
  "project_id": "test_id"
}
404
{
  "error": "project not found"
}

Errors

Code Description
401 Unauthorized
404 Not found
500 Internal Server Error
422 Missing parameters