Skip to main content
The Box plugin handles incoming webhooks. Point your provider’s subscription URL at your Corsair HTTP handler (see Overview for setup context and the exact URL shape).
New to Corsair? See webhooks and hooks.

Webhook map

  • collaborations
    • accepted (collaborations.accepted)
    • created (collaborations.created)
    • rejected (collaborations.rejected)
    • removed (collaborations.removed)
    • updated (collaborations.updated)
  • comments
    • created (comments.created)
    • deleted (comments.deleted)
    • updated (comments.updated)
  • files
    • copied (files.copied)
    • deleted (files.deleted)
    • downloaded (files.downloaded)
    • locked (files.locked)
    • moved (files.moved)
    • previewed (files.previewed)
    • renamed (files.renamed)
    • restored (files.restored)
    • trashed (files.trashed)
    • unlocked (files.unlocked)
    • uploaded (files.uploaded)
  • folders
    • copied (folders.copied)
    • created (folders.created)
    • deleted (folders.deleted)
    • downloaded (folders.downloaded)
    • moved (folders.moved)
    • renamed (folders.renamed)
    • restored (folders.restored)
    • trashed (folders.trashed)
  • metadata
    • instanceCreated (metadata.instanceCreated)
    • instanceDeleted (metadata.instanceDeleted)
    • instanceUpdated (metadata.instanceUpdated)
  • sharedLinks
    • created (sharedLinks.created)
    • deleted (sharedLinks.deleted)
    • updated (sharedLinks.updated)

HTTP handler setup

app/api/webhook/route.ts
import { processWebhook } from "corsair";
import { corsair } from "@/server/corsair";

export async function POST(request: Request) {
    const headers = Object.fromEntries(request.headers);
    const body = await request.json();
    const result = await processWebhook(corsair, headers, body);
    return result.response;
}

Events

Collaborations

Accepted

collaborations.accepted A collaboration invitation was accepted Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerCOLLABORATION.ACCEPTEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: COLLABORATION.ACCEPTED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        collaborations: {
            accepted: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Created

collaborations.created A new collaboration was created Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerCOLLABORATION.CREATEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: COLLABORATION.CREATED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        collaborations: {
            created: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Rejected

collaborations.rejected A collaboration invitation was rejected Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerCOLLABORATION.REJECTEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: COLLABORATION.REJECTED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        collaborations: {
            rejected: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Removed

collaborations.removed A collaboration was removed Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerCOLLABORATION.REMOVEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: COLLABORATION.REMOVED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        collaborations: {
            removed: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Updated

collaborations.updated A collaboration was updated Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerCOLLABORATION.UPDATEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: COLLABORATION.UPDATED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        collaborations: {
            updated: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Comments

Created

comments.created A comment was created on a file Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerCOMMENT.CREATEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: COMMENT.CREATED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        comments: {
            created: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Deleted

comments.deleted A comment was deleted Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerCOMMENT.DELETEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: COMMENT.DELETED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        comments: {
            deleted: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Updated

comments.updated A comment was updated Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerCOMMENT.UPDATEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: COMMENT.UPDATED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        comments: {
            updated: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Files

Copied

files.copied A file was copied to another location Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFILE.COPIEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FILE.COPIED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        files: {
            copied: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Deleted

files.deleted A file was permanently deleted Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFILE.DELETEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FILE.DELETED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        files: {
            deleted: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Downloaded

files.downloaded A file was downloaded Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFILE.DOWNLOADEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FILE.DOWNLOADED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        files: {
            downloaded: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Locked

files.locked A file was locked Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFILE.LOCKEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FILE.LOCKED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        files: {
            locked: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Moved

files.moved A file was moved to another folder Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFILE.MOVEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FILE.MOVED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        files: {
            moved: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Previewed

files.previewed A file was previewed Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFILE.PREVIEWEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FILE.PREVIEWED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        files: {
            previewed: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Renamed

files.renamed A file was renamed Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFILE.RENAMEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FILE.RENAMED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        files: {
            renamed: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Restored

files.restored A file was restored from trash Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFILE.RESTOREDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FILE.RESTORED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        files: {
            restored: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Trashed

files.trashed A file was moved to trash Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFILE.TRASHEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FILE.TRASHED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        files: {
            trashed: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Unlocked

files.unlocked A file lock was removed Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFILE.UNLOCKEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FILE.UNLOCKED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        files: {
            unlocked: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Uploaded

files.uploaded A new file was uploaded Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFILE.UPLOADEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FILE.UPLOADED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        files: {
            uploaded: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Folders

Copied

folders.copied A folder was copied to another location Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFOLDER.COPIEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FOLDER.COPIED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        folders: {
            copied: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Created

folders.created A new folder was created Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFOLDER.CREATEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FOLDER.CREATED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        folders: {
            created: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Deleted

folders.deleted A folder was permanently deleted Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFOLDER.DELETEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FOLDER.DELETED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        folders: {
            deleted: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Downloaded

folders.downloaded A folder was downloaded Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFOLDER.DOWNLOADEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FOLDER.DOWNLOADED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        folders: {
            downloaded: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Moved

folders.moved A folder was moved to another location Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFOLDER.MOVEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FOLDER.MOVED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        folders: {
            moved: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Renamed

folders.renamed A folder was renamed Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFOLDER.RENAMEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FOLDER.RENAMED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        folders: {
            renamed: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Restored

folders.restored A folder was restored from trash Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFOLDER.RESTOREDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FOLDER.RESTORED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        folders: {
            restored: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Trashed

folders.trashed A folder was moved to trash Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerFOLDER.TRASHEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: FOLDER.TRASHED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        folders: {
            trashed: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Metadata

Instance Created

metadata.instanceCreated A metadata instance was created on a file or folder Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerMETADATA_INSTANCE.CREATEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: METADATA_INSTANCE.CREATED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        metadata: {
            instanceCreated: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Instance Deleted

metadata.instanceDeleted A metadata instance was deleted Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerMETADATA_INSTANCE.DELETEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: METADATA_INSTANCE.DELETED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        metadata: {
            instanceDeleted: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Instance Updated

metadata.instanceUpdated A metadata instance was updated Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerMETADATA_INSTANCE.UPDATEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: METADATA_INSTANCE.UPDATED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        metadata: {
            instanceUpdated: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Created

sharedLinks.created A shared link was created for a file or folder Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerSHARED_LINK.CREATEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: SHARED_LINK.CREATED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        sharedLinks: {
            created: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Deleted

sharedLinks.deleted A shared link was removed Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerSHARED_LINK.DELETEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: SHARED_LINK.DELETED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        sharedLinks: {
            deleted: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})

Updated

sharedLinks.updated A shared link settings were updated Payload
NameTypeRequiredDescription
typewebhook_eventYes
idstringYes
created_atstringYes
triggerSHARED_LINK.UPDATEDYes
webhookobjectYes
created_byobjectYes
sourceobjectYes
additional_infoobjectNo
{
  type: webhook,
  id: string
}
{
  type?: string,
  id?: string,
  name?: string,
  login?: string
}
{
}
{
}
{
  type: webhook_event,
  id: string,
  created_at: string,
  trigger: SHARED_LINK.UPDATED,
  webhook: {
    type: webhook,
    id: string
  },
  created_by: {
    type?: string,
    id?: string,
    name?: string,
    login?: string
  },
  source: {
  },
  additional_info?: {
  }
}
webhookHooks example
box({
    webhookHooks: {
        sharedLinks: {
            updated: {
                before(ctx, args) {
                    return { ctx, args };
                },
                after(ctx, response) {
                },
            },
        },
    },
})