REST API

LinkCentral is registered as a custom post type in WordPress and has a REST API built directly on top of the standard WordPress REST API. This allows programmatic access to manage LinkCentral links and categories via HTTP endpoints.

Authentication

All REST API requests require authentication using Application Passwords.

  • You must be logged in with appropriate WordPress user credentials.
  • The API checks user capabilities. Ensure the account has the necessary permissions under Plugin Settings → Roles.

Endpoints for Links

1. List / Get Links

Get all links:

GET /wp-json/wp/v2/linkcentral_link

Get specific link (by ID):

GET /wp-json/wp/v2/linkcentral_link/{id}

Get all links within a category:

GET /wp-json/wp/v2/linkcentral_link?linkcentral_category=5

2. Create a Link

POST /wp-json/wp/v2/linkcentral_link

Required Fields:

				
					{
  "title": "My Link Title",
  "slug": "my-custom-link",
  "destination_url": "https://example.com",
}
				
			

By default, links are saved in draft status. To publish directly:

				
					{
  "status": "publish"
}
				
			

You can optionally add other attributes and assign categories. For LinkCentral Premium, you can also define CSS classes, keywords and dynamic rules. 

Full Example (including premium attributes):

				
					{
  "title": "Amazon Affiliate Link",
  "destination_url": "https://amazon.com/dp/B0123456789?tag=myaffiliate-12",
  "status": "publish",
  "linkcentral_category": [5, 10]
  "nofollow": "yes",
  "sponsored": "yes", 
  "redirection_type": "301",
  "note": "High-converting product link for Q4 campaign",
  "parameter_forwarding": "yes",
  "css_classes_option": "replace",
  "custom_css_classes": "affiliate-link amazon-product",
  "disable_slug_prefix": false,
  "keywords": [
    {"keyword": "wireless headphones", "density": "high"},
    {"keyword": "noise cancelling", "density": "medium"}
  ]
  "dynamic_rules": [
    {
      "variables": [
        ["country", "is", "DE"],
        ["device", "is", ["mobile", "tablet"]]
      ],
      "destination": "https://amazon.de/dp/B0123456789?tag=myaffiliate-12"
    }
  ]
}
				
			

Responses:

3. Update a Link

PUT /wp-json/wp/v2/linkcentral_link/{id}

You can update a link by updating one or more fields of choice with their new value.

Example request:

				
					{
  "title": "New Link Title",
  "status": "publish"
}
				
			

Responses:

Delete a Link

DELETE /wp-json/wp/v2/linkcentral_link/{id}

4. Endpoints for Categories

1. List / Get Categories

Get all categories:

GET /wp-json/wp/v2/linkcentral_category

Get specific category (by ID):

GET /wp-json/wp/v2/linkcentral_category/{id}

2. Create a Link Category

POST /wp-json/wp/v2/linkcentral_category

Required fields:

				
					{
  "name": "My LinkCentral Category",
  "description": "This is my new category"
}
				
			

3. Update Categories

PUT /wp-json/wp/v2/linkcentral_category/{id}

4. Delete Categories

DELETE /wp-json/wp/v2/linkcentral_category/{id}
Contents