Styleguide Component

This event is used to notify webhooks about changes related to a components in Zeplin styleguides.

Actions

  • "created"
  • "deleted"
  • "updated"
  • "version_created"

Context

AttributeTypeDescription
styleguideStyleguideStyleguide that contains the component
versionComponent Version Summary (optional)The details of the component's version (exists for all actions except deleted action).

Resource

AttributeTypeDescription
idstringUnique id of the resource
typestring ("Component")Type of the resource (one of the API models)
dataComponentObject representing the resource content

Example

{
  "event": "styleguide.component",
  "action": "version_created",
  "timestamp": 1572347818,
  "resource": {
    "type": "Component",
    "data": {
      "id": "5dbad85a76ea51c1f35b6f69",
      "name": "Button",
      "description": "Generic button for HAL 9000",
      "image": {
        "width": 2560,
        "height": 1920,
        "original_url": "http://placekitten.com/2560/1920",
        "thumbnails": {
          "small": "http://placekitten.com/256/256",
          "medium": "http://placekitten.com/512/512",
          "large": "http://placekitten.com/1024/1024"
        }
      },
      "created": 1517184000,
      "updated": 1572347818,
      "section": {
        "id": "5db81e6e6a4462065f04d932",
        "group": {
          "id": "507f1f77bcf86cd799439011"
        }
      },
      "variant_properties": [
        {
          "id": "60422281c96b47c3be1a912f",
          "name": "Type",
          "value": "Primary"
        }
      ]
    }
  },
  "context": {
    "styleguide": {
      "id": "5db981be9df2b3e1bfa19ef2",
      "name": "Discovery 1",
      "description": "Global styleguide for all projects of Discovery 1.",
      "platform": "web",
      "thumbnail": "http://placekitten.com/200/300",
      "status": "active",
      "created": 1517184000,
      "updated": 1572347818,
      "number_of_members": 13,
      "number_of_components": 241,
      "number_of_text_styles": 48,
      "number_of_colors": 37,
      "parent": {
        "id": "5db981b14ce405d079b376f0"
      }
    },
    "version": {
      "id": "5dbad85a76ea51c1f35b6f69",
      "created": 1517184000,
      "creator": {
        "id": "5d9caaecb4a3fa9bc9718686",
        "email": "[email protected]",
        "username": "zozo",
        "emotar": "🍎",
        "avatar": "http://placekitten.com/200/300",
        "last_seen": 1616739240
      },
      "image_url": "http://placekitten.com/256/256",
      "thumbnails": {
        "small": "http://placekitten.com/256/256",
        "medium": "http://placekitten.com/512/512",
        "large": "http://placekitten.com/1024/1024"
      },
      "width": 256,
      "height": 256,
      "density_scale": 2,
      "source": "sketch",
      "background_color": {
        "source_id": "0BEBFEB3-A107-4D1D-A3B0-77D1FBD35F01",
        "r": 143,
        "g": 152,
        "b": 5,
        "a": 1
      },
      "links": [
        {
          "rect": {
            "x": 0,
            "y": 0,
            "width": 40,
            "height": 40
          },
          "destination": {
            "name": "Artboard",
            "type": "screen"
          }
        }
      ]
    }
  },
  "actor": {
    "user": {
      "id": "5d9caaecb4a3fa9bc9718686",
      "email": "[email protected]",
      "username": "zozo",
      "emotar": "🍎",
      "avatar": "http://placekitten.com/200/300",
      "last_seen": 1616739240
    }
  }
}