Retrieve widgets

Get a widget

To retrieve your widget, send a GET request on /widgets/{id}.

GET https://api.didomi.io/widgets/{id}?organization_id=YOUR_ORG_ID

{
  "id": "String",
  "created_at": "Date",
  "updated_at": "Date",
  "name": "String",
  "headless": "Boolean",
  "publication_status": "draft"
  "organization_id": "String",
  "archived": true,
  "format": "hosted",
  "domain": "sub",
  "subdomain_id": "String",
  "custom_domain_id": "String",
  "layout_shape": "squared",
  "theme_id": "String",
  "custom_theme_id": "String",
  "configuration_tree_id": "String",
  "template_id": "full_preference_center",
  "meta_tags_id": "YQbbEDjQ",
  "enabled_languages": [
      "en"
  ],
  "default_language": "en",
  "auth": {
    "method": "String",
    "componentOptions": {},
    "hideIfNotAuthenticated": Boolean,
    "providerId": "String"
  }
}

Retrieve all widgets

To retrieve all your widgets, send a GET request on /widgets.

To retrieve widgets with their meta tags, you need to add &$with[]=meta_tags to your request. Click here to know how to add meta tags to your widget.

GET https://api.didomi.io/widgets?organization_id=YOUR_ORG_ID

{
  "total": 0,
  "limit": 0,
  "skip": 0,
  "data": [
    {
      "id": "String",
      "created_at": "Date",
      "updated_at": "Date",
      "name": "String",
      "headless": "Boolean",
      "publication_status": "draft"      
      "organization_id": "String",
      "archived": true,
      "format": "hosted",
      "domain": "sub",
      "subdomain_id": "String",
      "custom_domain_id": "String",
      "layout_shape": "squared",
      "theme_id": "String",
      "custom_theme_id": "String",
      "configuration_tree_id": "String"
      "template_id": "String",
      "meta_tags_id": "String",
      "enabled_languages": [
          "en"
      ],
      "default_language": "en",
      "auth": {
        "method": "String",
        "componentOptions": {},
        "hideIfNotAuthenticated": Boolean,
        "providerId": "String"
      }         
    }
  ]
}

Last updated