Sample - Slack Web API
POST/files.remote.remove

Remove a remote file

Removes a remote file registered with the service. Identify the remote file with file, external_id, or both. The operation removes the registered remote file rather than deleting the source file from its external service.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

3 body fields

Form-encoded data identifying the remote file to remove.

tokenstringoptional
Authentication token. Requires scope: `remote_files:write`
filestringoptional
Specify a file by providing its ID.
external_idstringoptional
Creator defined GUID for the file.

2 status codes
200Returns an object with `ok` set to true when the remote file is removed.
okbooleanrequired
Allowed:true
defaultReturns an object with `ok` set to false when the remote file cannot be removed or the request is invalid.
okbooleanrequired
Allowed:false

Error handling

The authentication token must have the remote_files:write scope. Provide at least one of file or external_id to identify the remote file to remove.