Introduction

GoLinks API - Manage your Go Links, tags, and permissions programmatically.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_SANCTUM_TOKEN}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your API token by click the user profile dropdown in the upper right-hand corner, selecting API Access, and generating a new personal access token.

Links

APIs for managing Go Links

GET
http://localhost
/api/v2/links
requires authentication

Retrieve all links accessible to the authenticated user. This includes links owned by the user and links shared with them.

Headers

Authorization
Example:
Bearer {YOUR_SANCTUM_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

page
integer

Page number for pagination.

Example:
1
per_page
integer

Number of results per page (max 100).

Example:
15
filter[owned]
boolean

Filter to only show owned links.

Example:
true
filter[shared]
boolean

Filter to only show shared links.

Example:
false
filter[enabled]
boolean

Filter by enabled status.

Example:
true
filter[tag]
string

Filter by tag label.

Example:
important
filter[search]
string

Search in link strings and target URLs.

Example:
example
sort
string

Sort field (string, target_url, created_at, hit_count). Default: created_at.

Example:
hit_count
order
string

Sort order (asc, desc). Default: desc.

Example:
desc

Body Parameters

Response Fields

Example request:
curl --request GET \
    --get "http://localhost/api/v2/links?page=1&per_page=15&filter%5Bowned%5D=1&filter%5Bshared%5D=&filter%5Benabled%5D=1&filter%5Btag%5D=important&filter%5Bsearch%5D=example&sort=hit_count&order=desc" \
    --header "Authorization: Bearer {YOUR_SANCTUM_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"per_page\": 1,
    \"filter\": {
        \"owned\": true,
        \"shared\": false,
        \"enabled\": false,
        \"tag\": \"architecto\",
        \"search\": \"architecto\"
    }
}"
Example response:
POST
http://localhost
/api/v2/links
requires authentication

Create a new Go Link. If no custom string is provided, a random 7-character string will be generated. Users need the appropriate permissions to create random or custom links.

Headers

Authorization
Example:
Bearer {YOUR_SANCTUM_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request POST \
    "http://localhost/api/v2/links" \
    --header "Authorization: Bearer {YOUR_SANCTUM_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"string\": \"my-link\",
    \"target_url\": \"https:\\/\\/example.com\",
    \"enabled\": true,
    \"exclude_from_status_check\": false,
    \"tag_id\": 1,
    \"share_with\": \"jdoe\"
}"
Example response:
PATCH
http://localhost
/api/v2/links/bulk-update
requires authentication

Update the target URL for multiple links in a single request. Each link is independently authorized — you must have manage permissions for each link. Links you cannot manage or that do not exist will be returned in the errors array.

Headers

Authorization
Example:
Bearer {YOUR_SANCTUM_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request PATCH \
    "http://localhost/api/v2/links/bulk-update" \
    --header "Authorization: Bearer {YOUR_SANCTUM_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"links\": [
        {
            \"string\": \"my-link\",
            \"target_url\": \"https:\\/\\/example.com\\/new\"
        }
    ]
}"
Example response:
GET
http://localhost
/api/v2/links/{string}
requires authentication

Retrieve a specific link by its string identifier.

Headers

Authorization
Example:
Bearer {YOUR_SANCTUM_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

string
string
required

The link string.

Example:
my-link

Response Fields

Example request:
curl --request GET \
    --get "http://localhost/api/v2/links/my-link" \
    --header "Authorization: Bearer {YOUR_SANCTUM_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
PATCH
http://localhost
/api/v2/links/{string}
requires authentication

Update an existing link. You must be the owner or have manage permissions.

Headers

Authorization
Example:
Bearer {YOUR_SANCTUM_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

string
string
required

The link string.

Example:
my-link

Body Parameters

Response Fields

Example request:
curl --request PATCH \
    "http://localhost/api/v2/links/my-link" \
    --header "Authorization: Bearer {YOUR_SANCTUM_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"target_url\": \"https:\\/\\/newexample.com\",
    \"enabled\": false,
    \"exclude_from_status_check\": true
}"
Example response:
DELETE
http://localhost
/api/v2/links/{string}
requires authentication

Delete a link. You must be the owner of the link to delete it.

Headers

Authorization
Example:
Bearer {YOUR_SANCTUM_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

string
string
required

The link string.

Example:
my-link
Example request:
curl --request DELETE \
    "http://localhost/api/v2/links/my-link" \
    --header "Authorization: Bearer {YOUR_SANCTUM_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
POST
http://localhost
/api/v2/links/{string}/transfer
requires authentication

Transfer ownership of a link to another user. You must be the owner of the link.

Headers

Authorization
Example:
Bearer {YOUR_SANCTUM_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

string
string
required

The link string.

Example:
my-link

Body Parameters

Example request:
curl --request POST \
    "http://localhost/api/v2/links/my-link/transfer" \
    --header "Authorization: Bearer {YOUR_SANCTUM_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"new_owner_unity_id\": \"jsmith\"
}"
Example response:
POST
http://localhost
/api/v2/links/{string}/tags
requires authentication

Attach a tag to a link. You must have manage permissions for both the link and the tag.

Headers

Authorization
Example:
Bearer {YOUR_SANCTUM_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

string
string
required

The link string.

Example:
my-link

Body Parameters

Example request:
curl --request POST \
    "http://localhost/api/v2/links/my-link/tags" \
    --header "Authorization: Bearer {YOUR_SANCTUM_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tag_id\": 1
}"
Example response:
DELETE
http://localhost
/api/v2/links/{string}/tags/{tag}
requires authentication

Remove a tag from a link. You must have manage permissions for the link.

Headers

Authorization
Example:
Bearer {YOUR_SANCTUM_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

string
string
required

The link string.

Example:
my-link
tag
integer
required

The tag ID to detach.

Example:
1
Example request:
curl --request DELETE \
    "http://localhost/api/v2/links/my-link/tags/1" \
    --header "Authorization: Bearer {YOUR_SANCTUM_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:

Tags

APIs for managing tags

Get Tags

GET
http://localhost
/api/v2/tags
requires authentication

Retrieve all tags owned by the authenticated user.

Headers

Authorization
Example:
Bearer {YOUR_SANCTUM_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

Query Parameters

page
integer

Page number for pagination.

Example:
1
per_page
integer

Number of results per page (max 100).

Example:
15
filter[search]
string

Search in tag labels.

Example:
project
sort
string

Sort field (label, created_at, updated_at). Default: label.

Example:
label
order
string

Sort order (asc, desc). Default: asc.

Example:
asc
include_counts
boolean

Include link counts and hit totals for each tag. Default: false.

Example:
true

Body Parameters

Response Fields

Example request:
curl --request GET \
    --get "http://localhost/api/v2/tags?page=1&per_page=15&filter%5Bsearch%5D=project&sort=label&order=asc&include_counts=1" \
    --header "Authorization: Bearer {YOUR_SANCTUM_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"per_page\": 1,
    \"filter\": {
        \"search\": \"architecto\"
    },
    \"include_counts\": true
}"
Example response:
{
    "data": [
        {
            "id": 1,
            "label": "important",
            "name": "important",
            "created_at": "2025-11-01T12:00:00.000000Z",
            "updated_at": "2025-11-01T12:00:00.000000Z",
            "links_count": 5,
            "hits": 142
        },
        {
            "id": 2,
            "label": "project-alpha",
            "name": "project-alpha",
            "created_at": "2025-11-02T10:00:00.000000Z",
            "updated_at": "2025-11-02T10:00:00.000000Z",
            "links_count": 12,
            "hits": 847
        }
    ],
    "meta": {
        "current_page": 1,
        "per_page": 15,
        "total": 2,
        "last_page": 1
    }
}
{
    "message": "Unauthenticated."
}

Create Tag

POST
http://localhost
/api/v2/tags
requires authentication

Create a new tag for organizing your links.

Headers

Authorization
Example:
Bearer {YOUR_SANCTUM_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Response Fields

Example request:
curl --request POST \
    "http://localhost/api/v2/tags" \
    --header "Authorization: Bearer {YOUR_SANCTUM_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"label\": \"My Project\"
}"
Example response:
{
    "id": 1,
    "label": "My Project",
    "name": "my-project",
    "user_id": 1,
    "created_at": "2025-11-21T12:00:00.000000Z",
    "updated_at": "2025-11-21T12:00:00.000000Z"
}
{
    "message": "The given data was invalid.",
    "errors": {
        "label": [
            "The label field is required."
        ]
    }
}

Get Tag

GET
http://localhost
/api/v2/tags/{id}
requires authentication

Retrieve a specific tag by ID.

Headers

Authorization
Example:
Bearer {YOUR_SANCTUM_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The ID of the tag.

Example:
architecto
tag
integer
required

The tag ID.

Example:
1

Query Parameters

include_links
boolean

Include all links with this tag. Default: false.

Example:
true

Response Fields

Example request:
curl --request GET \
    --get "http://localhost/api/v2/tags/architecto?include_links=1" \
    --header "Authorization: Bearer {YOUR_SANCTUM_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "id": 1,
    "label": "important",
    "name": "important",
    "user_id": 1,
    "created_at": "2025-11-01T12:00:00.000000Z",
    "updated_at": "2025-11-01T12:00:00.000000Z",
    "links_count": 5,
    "hits": 142,
    "links": [
        {
            "id": 1,
            "string": "example",
            "target_url": "https://example.com",
            "enabled": true
        }
    ]
}
{
    "message": "You do not have permission to view this tag."
}
{
    "message": "Tag not found."
}

Update Tag

PATCH
http://localhost
/api/v2/tags/{id}
requires authentication

Update a tag's label. You must be the owner of the tag.

Headers

Authorization
Example:
Bearer {YOUR_SANCTUM_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The ID of the tag.

Example:
architecto
tag
integer
required

The tag ID.

Example:
1

Body Parameters

Response Fields

Example request:
curl --request PATCH \
    "http://localhost/api/v2/tags/architecto" \
    --header "Authorization: Bearer {YOUR_SANCTUM_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"label\": \"Updated Project\"
}"
Example response:
{
    "id": 1,
    "label": "Updated Project",
    "name": "updated-project",
    "user_id": 1,
    "created_at": "2025-11-01T12:00:00.000000Z",
    "updated_at": "2025-11-21T12:30:00.000000Z"
}
{
    "message": "You do not have permission to update this tag."
}
{
    "message": "Tag not found."
}

Delete Tag

DELETE
http://localhost
/api/v2/tags/{id}
requires authentication

Delete a tag. This will automatically detach the tag from all associated links. You must be the owner of the tag.

Headers

Authorization
Example:
Bearer {YOUR_SANCTUM_TOKEN}
Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

id
string
required

The ID of the tag.

Example:
architecto
tag
integer
required

The tag ID.

Example:
1
Example request:
curl --request DELETE \
    "http://localhost/api/v2/tags/architecto" \
    --header "Authorization: Bearer {YOUR_SANCTUM_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "message": "Tag deleted successfully. The tag was removed from 5 link(s)."
}
{
    "message": "You do not have permission to delete this tag."
}
{
    "message": "Tag not found."
}