{
  "$id": "https://intentschema.org/profiles/com.slack/communication.chat.file.upload.v1.json",
  "id": "org.intentschema.communication.chat.file.upload.v1@com.slack.v1",
  "pins": "https://intentschema.org/intents/communication/chat/file/upload/v1.json",
  "title": "Slack file upload profile",
  "description": "Slack profile for files.getUploadURLExternal + files.completeUploadExternal (two-step upload).",
  "constraints": {
    "properties": {
      "target": {
        "properties": {
          "system": {
            "const": "slack"
          }
        },
        "required": [
          "system"
        ]
      },
      "slack": {
        "type": "object",
        "properties": {
          "channels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "initial_comment": {
            "type": "string"
          },
          "snippet_type": {
            "type": "string"
          }
        }
      }
    }
  },
  "api": {
    "method": "POST",
    "path": "/api/files.getUploadURLExternal",
    "scopes": [
      "files:write"
    ],
    "docs": "https://api.slack.com/methods/files.getUploadURLExternal",
    "params": {
      "object.channel_id": "channel_id (in completeUploadExternal)",
      "object.file": "file content (uploaded to URL from getUploadURLExternal)",
      "object.file.filename": "filename (in getUploadURLExternal)",
      "object.file.size": "length (in getUploadURLExternal)",
      "object.comment": "initial_comment (in completeUploadExternal)",
      "object.thread_id": "thread_ts (in completeUploadExternal)",
      "slack.channels": "channel_id (in completeUploadExternal)",
      "slack.initial_comment": "initial_comment",
      "slack.snippet_type": "snippet_type"
    },
    "base_url": "https://slack.com"
  }
}
