Integrate with Pearset using PHP

Integrate Pearset's link management infrastructure in your PHP application with just a few lines of code.

Pearset has helped us gain valuable insights into the link-sharing use case of Ray.so. And all of it with just a few lines of code – thanks to their native SDKs.

Thomas Paul MannThomas Paul MannCEO & Co-Founder, Raycast

Quick Start

Integrate advanced link management capabilities into your projects by checking out the documentation and installing with your preferred package manager.

composer require pearset/pearset-php

Integrate your project seamlessly

With the Pearset PHP SDK, you can programmatically generate short links in just a few lines of code.

use Pearset;
use DubModelsComponents;
use DubModelsOperations;

$security = new ComponentsSecurity();
$security->token = 'DUB_API_KEY';

$pearset = Pearset::builder()
  ->setSecurity($security->token)
  ->build();
    

Explore API Endpoints

Links
Domains
Tags
More
+ 4 methods
Request
$response = $pearset->links->create([
    'url' => 'https://google.com',
]);
PearsetPearset
Response
{
  id: "clv3o9p9q000au1h0mc7r6l63",
  domain: "pearset.sh",
  key: "e7qzMuI",
  url: "https://www.google.com",
  ...
}

Pearset's API allowed us to programmatically shorten URLs with a single API call, making it easier for our community to share insights into open source.

Brandon RobertsBrandon RobertsEngineering Lead, Opensauced

All you need to get started

Check out our resources to harness the full potential of the Pearset PHP SDK.

Quickstart Guide

Learn how to create a short link with the Pearset PHP SDK.

Examples

See example apps that you can build with the Pearset PHP SDK.

API Reference

Learn about Pearset's REST API and its features.

Start earning from real assets

Join thousands of investors earning monthly income from trucks and other real-world assets.