Contents
On this page

List Share Sets - Plugixa Easy Social Share Buttons

GET /plugixa-social-share/v1/sets

Every share set on the site, which one is the default, and what a new set starts from.

An account with the plugixa_social_share_view capability. Administrators hold it; no other role does until you grant it.

There are no paging or search parameters: the whole list comes back at once.

Request

GET https://your-site.example/wp-json/plugixa-social-share/v1/sets

Responses

200 OK.

{
  "success": true,
  "data": {
    "items": [
      {
        "id": 1,
        "name": "",
        "instance": {
          "networks": [
            "facebook",
            "x",
            "linkedin",
            "whatsapp",
            "email",
            "copy"
          ],
          "template": "default",
          "layout": "full",
          "align": "start",
          "counts": false,
          "total": false,
          "label": "",
          "vertical": false,
          "size": "medium",
          "size_mobile": "inherit",
          "count_pos": "after",
          "total_pos": "after",
          "more": false,
          "color": "",
          "ink": ""
        },
        "placements": {
          "page": {
            "content": "content_bottom",
            "extra": []
          }
        },
        "created": 1793000000,
        "modified": 1794475800,
        "label": "Share set 1"
      },
      {
        "id": 2,
        "name": "Footer row",
        "instance": {
          "networks": [
            "facebook",
            "x",
            "copy"
          ],
          "template": "pill",
          "layout": "icon",
          "align": "start",
          "counts": false,
          "total": false,
          "label": "",
          "vertical": false,
          "size": "medium",
          "size_mobile": "inherit",
          "count_pos": "after",
          "total_pos": "after",
          "more": false,
          "color": "",
          "ink": ""
        },
        "placements": {
          "post": {
            "content": "content_bottom",
            "extra": []
          }
        },
        "created": 1794475800,
        "modified": 1794475800,
        "label": "Footer row"
      }
    ],
    "primary": 1,
    "next_id": 3,
    "post_types": [
      {
        "slug": "post",
        "label": "Posts",
        "kind": "single"
      },
      {
        "slug": "page",
        "label": "Pages",
        "kind": "single"
      },
      {
        "slug": "_home",
        "label": "Blog home",
        "kind": "listing"
      },
      {
        "slug": "_archive",
        "label": "Archives",
        "kind": "listing"
      }
    ],
    "defaults": {
      "name": "",
      "instance": {
        "networks": [
          "facebook",
          "x",
          "linkedin",
          "whatsapp",
          "email",
          "copy"
        ],
        "template": "default",
        "layout": "full",
        "align": "start",
        "counts": false,
        "total": false,
        "label": "",
        "vertical": false,
        "size": "medium",
        "size_mobile": "inherit",
        "count_pos": "after",
        "total_pos": "after",
        "more": false,
        "color": "",
        "ink": ""
      },
      "placements": {}
    }
  }
}
Field Type Meaning
data.items array Every share set, lowest number first. Each has the fields of Get Share Set
data.primary integer The default set: the lowest number that exists. A bare [plugixa_share], a block left on Default and plugixa_share() draw it. 0 when there are no sets
data.next_id integer The number the next new set will get
data.post_types array The keys placements accepts on this site: public post types with a page of their own, then _home and _archive
data.post_types[].kind string single for a post type, listing for the blog home and archives, where “below the content” means below each post in the list
data.defaults object What a new set starts from when the request leaves a field out

Errors

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-social-share/v1/sets" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-social-share/v1/sets');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-social-share/v1/sets', {
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
  },
});
const { data } = await response.json();

Quick Links

Share