POST
/
links
Create a new affiliate link
curl --request POST \
  --url https://www.pushlapgrowth.com/api/v1/links \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "link": "<string>",
  "affiliateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "affiliateEmail": "jsmith@example.com"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "link": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "affiliate": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "email": "jsmith@example.com"
  },
  "program": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "currency": "<string>"
  },
  "clicks": 123,
  "referrals": 123,
  "sales": 123,
  "totalRevenue": 123,
  "fullURLs": [
    {
      "baseUrl": "<string>",
      "fullUrl": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Affiliate link details

The affiliate link string (letters, numbers, and hyphens only)

affiliateId
string<uuid>

The affiliate ID (required if affiliateEmail not provided)

affiliateEmail
string<email>

The affiliate email (required if affiliateId not provided)

Response

Affiliate link created successfully

id
string<uuid>

The affiliate link ID

The affiliate link string

createdAt
string<date-time>

Timestamp when the affiliate link was created

updatedAt
string<date-time>

Timestamp when the affiliate link was last updated

affiliate
object
program
object
clicks
integer

Number of clicks on this affiliate link

referrals
integer

Number of referrals generated by this link

sales
integer

Number of sales generated by this link

totalRevenue
number

Total revenue generated by this link

fullURLs
object[]

Array of full URLs for this affiliate link