Pretty Links Developer Tools Add-on Overview

The Pretty Links Developer Tools is a Pretty Links add-on. The add-on allows you to integrate Pretty Links with third-party platforms and plugins using REST API and webhook events.

This document covers the basics of Developer Tools and their capabilities. 

Note: This add-on is available with the Marketer and Super Affiliate plans. If you’re on the Beginner plan or using Pretty Links Lite, you can upgrade your Pretty Links plan to use it.

You can install the Developer Tools add-on from your website Dashboard:

  1. Login to your website as an administrator, and navigate to Dashboard > Pretty Links > Add-ons.
  1. Search for Developer Tools or browse the add-ons list.
  2. Click on the Install Add-on button.

Once the plugin is installed, you can access the Developer Tools options at Dashboard > Pretty Links > Developer.

Here, you will find the add-on menu with the following options:

  • Webhooks
  • Events
  • REST API

Webhooks

Each integration you create requires a webhook URL for Pretty Links to communicate with a third-party platform or plugin. The list of webhook URLs for all your integrations is under the Webhooks menu.

To add webhook URL for any new integration, follow these steps: 

  1. Navigate to Dashboard > Pretty Links > Developer > Webhooks.
  2. Click on the +” icon.
  1. Add the URL.
  2. Click the Advanced option to select events that should be sent to this webhook. You can choose All Events or specific events needed for that webhook.
  1. Click the Save Webhooks button to save changes.

Webhook Key

The add-on generates the Webhook key automatically, which you can use to authenticate the POST requests.

Note: If needed, you can generate a new webhook key by clicking the spinning arrows icon (“Regenerate Webhook Key” icon) next to the key field.

To validate the webhook request, fetch the HTTP headers and look for the PRLI-WEBHOOK-KEY header. 

Events

Under the Events menu, you can select any event to get details about it. Here, you can find information on when that event is triggered and a sample of the associated JSON response.

You can also test the event by clicking the Send Test button. This way, you’ll send the POST request to all webhooks using this event.

REST API

You can find Pretty Links API routes and your API key under the REST API menu option.

Note: The public, v3-compatible REST API uses the pl/v1 namespace. The add-on’s admin API uses pl-developer/v1.

Like webhook keys, Developer Tools automatically generates a unique API key for authenticating with the REST API. If needed, you can regenerate the API key by clicking the spinning arrows icon.

Note: Regenerating API and webhook keys can break existing integrations you created. When regenerating keys, ensure your integrations are updated to use the new keys where needed.

Select the API route you need to check the related details:

  • URL: the REST API route;
  • Example request: an example of how the request should look like for the selected event;
  • Arguments: the list of available search and update arguments;
  • Example response: an example of the proper response you should receive for the selected event.
Table of Contents

    Docs Didn’t Solve It?

    Send us a message and someone from our Support Team will be in touch shortly.