{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/SkillInvocation", "title": "Skill webhook payload", "type": "object", "x-box-resource-id": "skill_invocation", "x-box-tag": "skills", "description": "The payload of a Box skill as sent to a skill's\n`invocation_url`.", "properties": { "type": { "type": "string", "description": "`skill_invocation`", "example": "skill_invocation", "enum": [ "skill_invocation" ] }, "id": { "type": "string", "description": "Unique identifier for the invocation request.", "example": "fd1d2e53-35f5-41fb-9c25-4ba326daf2f9_341016304" }, "skill": { "allOf": [ { "title": "Skill", "type": "object", "description": "An object representing a skill", "properties": { "id": { "type": "string", "description": "The unique identifier for this skill", "example": "11446498" }, "type": { "type": "string", "description": "`skill`", "example": "skill", "enum": [ "skill" ] }, "name": { "type": "string", "description": "The name of the skill", "example": "Hello World Skill" }, "api_key": { "type": "string", "description": "The client ID of the application", "example": "hxel2s12wd2h9r8ne103c4gjbqefofih" } } }, { "description": "The skill that triggered this invocation" } ] }, "token": { "type": "object", "description": "The read-only and read-write access tokens for this item", "properties": { "read": { "type": "object", "description": "The basics of an access token", "properties": { "access_token": { "type": "string", "format": "token", "example": "c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ", "description": "The requested access token." }, "expires_in": { "type": "integer", "format": "int64", "example": 3600, "description": "The time in seconds by which this token will expire." }, "token_type": { "type": "string", "enum": [ "bearer" ], "example": "bearer", "description": "The type of access token returned." }, "restricted_to": { "type": "string", "description": "The permissions that this access token permits,\nproviding a list of resources (files, folders, etc)\nand the scopes permitted for each of those resources.", "example": "[{\"scope\":\"gcm\"}, {\"scope\":\"item_upload\",\"object_id\":933941692081,\"object_type\":\"file\"}, {\"scope\":\"manage_skill_invocations\"}]" } } }, "write": { "type": "object", "description": "The basics of an access token", "properties": { "access_token": { "type": "string", "format": "token", "example": "c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ", "description": "The requested access token." }, "expires_in": { "type": "integer", "format": "int64", "example": 3600, "description": "The time in seconds by which this token will expire." }, "token_type": { "type": "string", "enum": [ "bearer" ], "example": "bearer", "description": "The type of access token returned." }, "restricted_to": { "type": "string", "description": "The permissions that this access token permits,\nproviding a list of resources (files, folders, etc)\nand the scopes permitted for each of those resources.", "example": "[{\"scope\":\"gcm\"}, {\"scope\":\"item_upload\",\"object_id\":933941692081,\"object_type\":\"file\"}, {\"scope\":\"manage_skill_invocations\"}]" } } } } }, "status": { "type": "object", "description": "The details status of this event.", "properties": { "state": { "type": "string", "example": "invoked", "description": "The state of this event.\n\n* `invoked` - Triggered the skill with event details to start\n applying skill on the file.\n* `processing` - Currently processing.\n* `success` - Completed processing with a success.\n* `transient_failure` - Encountered an issue which can be\n retried.\n* `permanent_failure` - Encountered a permanent issue and\n retry would not help.", "enum": [ "invoked", "processing", "success", "transient_failure", "permanent_failure" ] }, "message": { "type": "string", "example": "Example", "description": "Status information" }, "error_code": { "type": "string", "example": "400", "description": "Error code information, if error occurred." }, "additional_info": { "type": "string", "example": "Example", "description": "Additional status information." } } }, "created_at": { "type": "string", "format": "date-time", "description": "The time this invocation was created.", "example": "2012-12-12T10:53:43-08:00" }, "trigger": { "type": "string", "example": "FILE_CONTENT", "description": "Action that triggered the invocation" }, "enterprise": { "allOf": [ { "title": "Enterprise", "type": "object", "description": "A representation of a Box enterprise", "properties": { "id": { "type": "string", "description": "The unique identifier for this enterprise.", "example": "11446498" }, "type": { "type": "string", "description": "`enterprise`", "example": "enterprise", "enum": [ "enterprise" ] }, "name": { "description": "The name of the enterprise", "example": "Acme Inc.", "type": "string" } } }, { "description": "The enterprise that this invocation was triggered for" } ] }, "source": { "allOf": [ { "oneOf": [ { "$ref": "#/components/schemas/File" }, { "$ref": "#/components/schemas/Folder" } ] }, { "description": "The item that caused the invocation to trigger" } ] }, "event": { "allOf": [ { "$ref": "#/components/schemas/Event" }, { "description": "The event that triggered this invocation" } ] } } }