Links

Embed
Preview of the card
<a href="https://indrava.forumulate.com/docs/ref-links"><img src="https://indrava.forumulate.com/docs/_api/public/orgs/e421ace4-3e78-4ed8-9818-7b4899cf3aa0/spaces/2bcc7f09-4489-40af-85d8-9fdd3f3da314/pages/172f788e-f720-4e4f-8e13-b3a91fdfa167/social-card.svg?v=3e7ae33eec8b" alt="Links" width="600" height="315"></a>
GET http://localhost:4000/api/v1/links

List short links with their clicks, newest first

Page with limit and offset.

Parameters

postId
string
query
limit
integer
query
offset
integer
query

Code samples

cURL
curl -X GET "http://localhost:4000/api/v1/links" \
  -H "Authorization: Bearer $API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
[
  {
    "id": "string",
    "slug": "string",
    "url": "string",
    "utm": {},
    "postId": "string",
    "channelId": "string",
    "createdAt": "2024-01-01T00:00:00Z",
    "clicks": 0,
    "shortUrl": "string"
  }
]
Schema
id
string
required
slug
string
required
url
string
required
utm
required
postId
string
required
channelId
string
required
createdAt
string
required
clicks
number
required
shortUrl
string
required
POST http://localhost:4000/api/v1/links

Create a short link that is not tied to a post

Request body

application/json
url
string
required
slug
string
utm
object
Show child parameters
source
string
medium
string
campaign
string
term
string
content
string
{
  "url": "string",
  "slug": "string",
  "utm": {
    "source": "string",
    "medium": "string",
    "campaign": "string",
    "term": "string",
    "content": "string"
  }
}

Code samples

cURL
curl -X POST "http://localhost:4000/api/v1/links" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"string","slug":"string","utm":{"source":"string","medium":"string","campaign":"string","term":"string","content":"string"}}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
DELETE http://localhost:4000/api/v1/links/{id}

Delete a short link

Parameters

id
string
path
required

Code samples

cURL
curl -X DELETE "http://localhost:4000/api/v1/links/{id}" \
  -H "Authorization: Bearer $API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
GET http://localhost:4000/api/v1/links/stats

Clicks per day and referrer, for one link or all of them

Parameters

id
string
query
from
string
query
required
to
string
query
required

Code samples

cURL
curl -X GET "http://localhost:4000/api/v1/links/stats?from=<from>&to=<to>" \
  -H "Authorization: Bearer $API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
Updated