Skill invocation

The payload of a Box skill as sent to a Custom Skill's invocation_url.

string
fd1d2e53-35f5-41fb-9c25-4ba326daf2f9_341016304

Unique identifier for the invocation request.

string
skill_invocation

Value is always skill_invocation

string / date-time
2012-12-12T10:53:43-08:00

The time this invocation was created.

object

The enterprise that this invocation was triggered for

11446498

The unique identifier for this enterprise.

enterprise

Value is always enterprise

Acme Inc.

The name of the enterprise

Event object

The event that triggered this invocation

object

The skill that triggered this invocation

string
11446498

The unique identifier for this skill

string
skill

Value is always skill

hxel2s12wd2h9r8ne103c4gjbqefofih

The client ID of the application

string
Hello World Skill

The name of the skill

The item that caused the invocation to trigger

object

The details status of this event.

Example

Additional status information.

400

Error code information, if error occurred.

Example

Status information

invoked

The state of this event.

  • invoked - Triggered the skill with event details to start applying skill on the file.
  • processing - Currently processing.
  • success - Completed processing with a success.
  • transient_failure - Encountered an issue which can be retried.
  • permanent_failure - Encountered a permanent issue and retry would not help.

Value is one of invoked,processing,success,transient_failure,permanent_failure

object

The read-only and read-write access tokens for this item

object

The basics of an access token

string / token
c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ

The requested access token.

integer / int64
3600

The time in seconds in seconds by which this token will expire.

object array

The permissions that this access token permits, providing a list of resources (files, folders, etc) and the scopes permitted for each of those resources.

The file for which the file can be accessed

item_download

The file scopes for the file access

Value is one of annotation_edit,annotation_view_all,annotation_view_self,base_explorer,base_picker,base_preview,base_upload,item_delete,item_download,item_preview,item_rename,item_share

bearer

Value is always bearer

The basics of an access token

string / token
c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ

The requested access token.

integer / int64
3600

The time in seconds in seconds by which this token will expire.

object array

The permissions that this access token permits, providing a list of resources (files, folders, etc) and the scopes permitted for each of those resources.

The file for which the file can be accessed

item_download

The file scopes for the file access

Value is one of annotation_edit,annotation_view_all,annotation_view_self,base_explorer,base_picker,base_preview,base_upload,item_delete,item_download,item_preview,item_rename,item_share

bearer

Value is always bearer

string
FILE_CONTENT

Action that triggered the invocation

Response Example

{
  "id": "fd1d2e53-35f5-41fb-9c25-4ba326daf2f9_341016304",
  "type": "skill_invocation",
  "created_at": "2012-12-12T10:53:43-08:00",
  "enterprise": {
    "id": 11446498,
    "type": "enterprise",
    "name": "Acme Inc."
  },
  "event": {
    "type": "event",
    "additional_details": {
      "key": "value"
    },
    "created_by": {
      "id": 11446498,
      "type": "user",
      "login": "ceo@example.com",
      "name": "Aaron Levie"
    },
    "event_id": "f82c3ba03e41f7e8a7608363cc6c0390183c3f83",
    "event_type": "FILE_MARKED_MALICIOUS",
    "session_id": "70090280850c8d2a1933c1",
    "source": {
      "id": 11446498,
      "type": "user",
      "address": "900 Jefferson Ave, Redwood City, CA 94063",
      "avatar_url": "https://www.box.com/api/avatar/large/181216415",
      "created_at": "2012-12-12T10:53:43-08:00",
      "job_title": "CEO",
      "language": "en",
      "login": "ceo@example.com",
      "max_upload_size": 2147483648,
      "modified_at": "2012-12-12T10:53:43-08:00",
      "name": "Aaron Levie",
      "notification_email": {
        "email": "notifications@example.com",
        "is_confirmed": true
      },
      "phone": 6509241374,
      "space_amount": 11345156112,
      "space_used": 1237009912,
      "status": "active",
      "timezone": "Africa/Bujumbura"
    }
  },
  "skill": {
    "id": 11446498,
    "type": "skill",
    "api_key": "hxel2s12wd2h9r8ne103c4gjbqefofih",
    "name": "Hello World Skill"
  },
  "source": {
    "id": 12345,
    "type": "file",
    "allowed_invitee_roles": [
      "editor"
    ],
    "content_created_at": "2012-12-12T10:53:43-08:00",
    "content_modified_at": "2012-12-12T10:53:43-08:00",
    "created_at": "2012-12-12T10:53:43-08:00",
    "created_by": {
      "id": 11446498,
      "type": "user",
      "login": "ceo@example.com",
      "name": "Aaron Levie"
    },
    "description": "Contract for Q1 renewal",
    "etag": 1,
    "file_version": {
      "id": 12345,
      "type": "file_version",
      "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
    },
    "has_collaborations": true,
    "is_externally_owned": true,
    "item_status": "active",
    "modified_at": "2012-12-12T10:53:43-08:00",
    "modified_by": {
      "id": 11446498,
      "type": "user",
      "login": "ceo@example.com",
      "name": "Aaron Levie"
    },
    "name": "Contract.pdf",
    "owned_by": {
      "id": 11446498,
      "type": "user",
      "login": "ceo@example.com",
      "name": "Aaron Levie"
    },
    "parent": {
      "id": 12345,
      "type": "folder",
      "etag": 1,
      "name": "Contracts",
      "sequence_id": 3
    },
    "path_collection": {
      "entries": [
        {
          "id": 12345,
          "etag": 1,
          "type": "folder",
          "sequence_id": 3,
          "name": "Contracts"
        }
      ],
      "total_count": 1
    },
    "purged_at": "2012-12-12T10:53:43-08:00",
    "sequence_id": 3,
    "sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
    "shared_link": {
      "access": "open",
      "download_count": 3,
      "download_url": "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg",
      "effective_access": "company",
      "effective_permission": "can_download",
      "is_password_enabled": true,
      "permissions": {
        "can_download": true,
        "can_preview": true
      },
      "preview_count": 3,
      "unshared_at": "2018-04-13T13:53:23-07:00",
      "url": "https://www.box.com/s/vspke7y05sb214wjokpk",
      "vanity_url": "https://acme.app.box.com/v/my_url/"
    },
    "size": 629644,
    "trashed_at": "2012-12-12T10:53:43-08:00"
  },
  "status": {
    "additional_info": "Example",
    "error_code": 400,
    "message": "Example",
    "state": "invoked"
  },
  "token": {
    "read": {
      "access_token": "c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ",
      "expires_in": 3600,
      "restricted_to": [
        {
          "scope": "item_download",
          "object": {
            "id": 12345,
            "etag": 1,
            "type": "file",
            "sequence_id": 3,
            "name": "Contract.pdf",
            "sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
            "file_version": {
              "id": 12345,
              "type": "file_version",
              "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
            }
          }
        }
      ],
      "token_type": "bearer"
    },
    "write": {
      "access_token": "c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ",
      "expires_in": 3600,
      "restricted_to": [
        {
          "scope": "item_download",
          "object": {
            "id": 12345,
            "etag": 1,
            "type": "file",
            "sequence_id": 3,
            "name": "Contract.pdf",
            "sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
            "file_version": {
              "id": 12345,
              "type": "file_version",
              "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
            }
          }
        }
      ],
      "token_type": "bearer"
    }
  },
  "trigger": "FILE_CONTENT"
}