GoLinks API Documentation (2.0.0)

Download OpenAPI specification:

Introduction

Welcome to the GoLinks API! You can use this API to access our endpoints, such as the Go Links API, to create go links that you and everyone in your workspace can use, read workspace users and go link analytics, run searches and export the audit log. To access the API you need to be on the GoLinks Enterprise plan. You can upgrade to the Enterprise plan on the billing page. If you have any questions about the Enterprise plan, reach out to the Sales team.

Authentication

Every request must carry a credential in the Authorization header. The GoLinks API supports two kinds:

Credential Use it for Where it comes from
API token Scripts and integrations that you run yourself Developer Tools › API
OAuth 2.0 access token Apps and integrations you build that other people in the workspace authorize Developer Tools › OAuth Apps

API tokens

Any user with the Developer Tools permission on an Enterprise workspace can create and revoke tokens. Non-admins only see their own tokens, while admins see every token in the workspace. Requests made with a token act as the user who created it, so do not share your token with other users or put it in publicly accessible places such as GitHub. If a token is compromised, revoke it and create a new one.

Create an access token

Sign in to GoLinks, open Developer Tools › API and click Create token. Give the token a name and choose:

  • Permissions – whether the token may also return your own unlisted and private go links. By default a token only sees the go links that everyone in the workspace can see.
  • Expiration – 7, 30, 90 (default), 180 or 365 days, or never. Expired tokens are rejected with a 401 and cannot be renewed; create a new token and update your integration.

The raw token is shown once the token is created. You can view it again, rename the token or revoke it at any time from the same table.

How to use your access token

Requests are authenticated with HTTP Bearer authentication. Provide the token in the Authorization header:

Authorization: Bearer {ACCESS_TOKEN}

If you do not provide a token, or the token is invalid, expired or revoked, you receive a 401 response:

{
  "error": {
    "message": "An error occurred",
    "code": 401,
    "type": "not_authorized",
    "request_id": "56A14568A9F05AFB"
  }
}

OAuth 2.0

Workspace admins can register apps in Developer Tools › OAuth Apps by giving the app a name, its redirect URIs and the scopes it may request; GoLinks generates the client_id. Apps you register are private to your workspace: only members of your workspace can authorize them, and the consent screen tells them the app has not been verified by GoLinks. Registered apps use the Authorization Code flow with PKCE. Apps are public clients: there is no client secret, the code_verifier proves possession of the authorization code instead.

  1. Send the user to https://www.golinks.io/oauth_authorize.php with the query parameters response_type=code, client_id, redirect_uri (must exactly match one of the URIs registered for the app), scope (space separated, see below), state, code_challenge and code_challenge_method=S256.
  2. The user signs in to GoLinks and approves the requested scopes. GoLinks redirects back to redirect_uri with code and state. The code is single use and expires after 10 minutes.
  3. Exchange the code at POST /oauth/token with grant_type=authorization_code and the code_verifier. The response contains an access token that is valid for one hour and a refresh token.
  4. Call the API with Authorization: Bearer {ACCESS_TOKEN}. When the access token expires, call POST /oauth/token with grant_type=refresh_token. Every refresh rotates both tokens; presenting an already rotated refresh token revokes the whole grant and the user has to authorize the app again.
  5. Revoke tokens you no longer need with POST /oauth/revoke.
Scope Grants
golinks:read Read go links and go link metrics
golinks:write Create, update and delete go links
search:read Run workspace searches
users:read List workspace users
admin:read Read the workspace audit log (the authorizing user must be an admin)

An access token that lacks the scope an endpoint requires is rejected with 403 and the body {"error": "insufficient_scope", "error_description": "Insufficient scope."}.

API Overview

The GoLinks API is REST-based and uses standard HTTP verbs and status codes. All requests must be made over HTTPS and every response body is JSON.

Base URL

The base URL of the GoLinks API is https://api.golinks.io. For example, to access the go links endpoint, append the endpoint path to the base URL: https://api.golinks.io/golinks.

Request format

  • The go link endpoints (POST, PUT and PATCH /golinks, POST /golinks_bulk) accept form-encoded request bodies only. Send exactly Content-Type: application/x-www-form-urlencoded (no charset suffix); any other content type is rejected with 415. Arrays use bracket notation, for example tags[]=drive&tags[]=docs or geolinks[0][location]=US&geolinks[0][url]=https://example.com/us.
  • The OAuth endpoints accept form-encoded or application/json bodies.

Errors

All responses include a standard HTTP status code. The successful status codes are:

HTTP Status Code Description
200 OK The request was successful.
201 Created The resource has been created.

Errors carry extra information about why the request was not successful. The error body has the following format:

{
  "error": {
    "message": "Descriptive information about the error",
    "code": 409,
    "type": "conflict",
    "request_id": "56A14568A9F05AFB"
  }
}

message is currently the generic text An error occurred for most failures. Use type and code to decide how to handle an error and quote the request_id when you contact support, so we can look up the details of the failed request. The error status codes, along with their error types, are:

HTTP Status Code Error Type Description
400 Bad Request bad_request The request cannot be accepted, for example because the request body is empty.
401 Unauthorized not_authorized The token is missing, invalid, expired or revoked.
403 Forbidden forbidden The token is not allowed to use this method on this endpoint, or the user lacks the required permission.
404 Not Found not_found The resource was not found.
405 Method Not Allowed method_not_allowed The request method is not supported by the endpoint.
408 Request Timeout request_timed_out The request took too long to process; retry later.
409 Conflict conflict The request conflicts with an existing resource, for example creating a go link whose name is already taken or reserved.
415 Unsupported Media Type invalid_content_type The request content type is not supported.
422 Unprocessable Entity missing_field or invalid_request The request contains errors, such as required fields that are missing or values that fail validation.
429 Too Many Requests rate_limit_exceeded The rate limit has been exceeded. Wait and retry.
500 Internal Server Error internal_server_error Something went wrong with the GoLinks API.

The OAuth endpoints return RFC 6749 style errors instead, for example {"error": "invalid_grant", "error_description": "Authorization code has expired."}. The one exception is a request that leaves out a required parameter, which is rejected with the standard 422 envelope shown above.

Rate Limiting

Rate limits are enforced per endpoint and HTTP method for every client and are independent of how many API tokens you create:

  • a burst limit of 80 requests per 10-second window, and
  • a daily quota that depends on your plan (500,000 requests per endpoint per day on the Enterprise plan).

If you exceed a limit you receive a 429 status code with the following body:

{
  "error": {
    "message": "An error occurred",
    "code": 429,
    "type": "rate_limit_exceeded",
    "request_id": "56A14568A9F05AFB"
  }
}

Every response contains information about the rate limit in the HTTP headers.

HTTP Header Description
RateLimit-Limit The maximum number of requests allowed in the current window (the burst limit, or the daily quota once it is the limit you hit).
RateLimit-Remaining The number of requests remaining in the current window.
Retry-After The number of seconds to wait before retrying. Only sent when the rate limit has been exceeded.

Pagination

All endpoints that return a list come with a metadata object that contains pagination information. Use the limit and offset query parameters to choose how many results to return and how many to skip. You can fetch the next page through the URL in metadata.links.next; when there are no more results the value is null.

Pagination Parameters Description
limit The maximum number of results per page. Defaults to 50 (go links, users), 100 (search) or 20 (audit log); the maximum is 1000 for go links and 100 elsewhere.
offset The number of results to skip. Defaults to 0.
count The number of results in the current page.
total_results The total number of results found.
links.next The URL of the next page of results, or null.
links.prev The URL of the previous page of results, or null.

Timestamps

Unless stated otherwise, timestamps are integers measured in seconds since the Unix epoch.

Support

If you have any questions about the API or run into errors, reach out to [email protected].

Metrics

The Metrics API returns the daily redirect hits of a go link.

Retrieve the daily redirect hits of a go link

https://api.golinks.io/metrics/{gid}

Retrieve the daily redirect hits of a go link for the last 30 days (or the number of days given by days). The response contains one entry per day, including today, so 30 days produce 31 entries. Days without redirects have 0 hits. Private go links are only available to their owner.

Authorizations:
ApiTokenOAuth2
path Parameters
gid
required
integer
Example: 12130

ID of the go link.

query Parameters
days
integer >= 1
Default: 30

Number of past days to include.

Responses

Request samples

curl "https://api.golinks.io/metrics/12130?days=30" \
  -H "Authorization: Bearer $GOLINKS_TOKEN"

Response samples

Content type
application/json
{
  • "gid": 12130,
  • "name": "drive",
  • "metrics": [
    ]
}

Users

The Users API lets you retrieve information about the users of your workspace. You can search for users by name or email, and filter by access level or status.

List or search users

https://api.golinks.io/users

Retrieve the users of your workspace, sorted by email unless sort is given. Search for a specific user by name, username or email with search (a partial value such as @golinks.io or jane works), and narrow the list down with access-level and status. Invited users who have not joined yet are not returned.

Authorizations:
ApiTokenOAuth2
query Parameters
access-level[]
Array of strings
Items Enum: "admin" "moderator" "member" "limited_member"
Example: access-level[]=admin

Only return users with these access levels. Repeat the parameter with the PHP bracket name (access-level[]=admin&access-level[]=moderator) to allow several. A single value can also be sent as access-level=admin, or several as a comma separated list (access-level=admin,moderator).

limit
integer [ 1 .. 100 ]
Default: 50

Number of users per page.

offset
integer >= 0
Default: 0

Number of users to skip.

order
string
Default: "desc"
Enum: "asc" "desc"

Sort direction.

search
string <= 100 characters

Text to match against first name, last name, full name and email.

sort
string
Enum: "name" "created_at" "status"

Sort field. When searching without sort, results are ordered by relevance.

status
string
Enum: "active" "inactive"

Only return active or deactivated users.

Responses

Request samples

curl "https://api.golinks.io/users?search=test.user&access-level[]=admin" \
  -H "Authorization: Bearer $GOLINKS_TOKEN"

Response samples

Content type
application/json
{}

Search

The Search API runs the same search as the GoLinks dashboard and returns matching go links, tags, users and collections.

Search go links, tags, users and collections

https://api.golinks.io/search?search-term=drive

Run the same search as the GoLinks dashboard. search-term is matched against go link names, aliases, descriptions, URLs and tags; when smart search is enabled for the workspace, long natural-language terms are rewritten by AI before searching (the term actually used is returned in true-search-term). Use result-type to choose which resource is the primary, paginated result list.

Go links are returned in the dashboard representation (see the schema); limited members receive empty descriptions and URLs.

Authorizations:
ApiTokenOAuth2
query Parameters
app-result-type
string
Default: "links"
Enum: "links" "tags"

Only with result-type=apps. Whether app counts are based on go links or tags.

app-search-term
string

Only with result-type=apps. Additional term to filter the app list.

app[]
Array of strings

Only return go links pointing at these app domains (for example atlassian.net). Repeat the parameter (app[]=atlassian.net&app[]=google.com) for several domains; a single domain can also be sent as app=atlassian.net.

collection_department
string

Department to filter collection results by.

collid
integer

Only return go links in this collection.

exclude_collid
integer

Exclude go links in this collection.

filter[]
Array of strings
Items Enum: "all" "my_links" "user_links" "locked_links" "public_links" "private_links" "unlisted_links" "favorite_links" "variable_links" "non_variable_links" "multi_links" "non_multi_links" "geo_links"

Go link filters. Repeat the parameter with the PHP bracket name (filter[]=my_links&filter[]=variable_links) to combine filters; a single filter can also be sent as filter=my_links. user_links requires the username[] parameter. Filters for locked, public, unlisted and private links require the matching plan feature.

include-primary-filter-count
string
Enum: "true" "false"

Set to true to include primaryFilterTotal, the number of go links matching only the primary filters.

limit
integer [ 1 .. 100 ]
Default: 100

Number of primary results per page.

modified
string
Enum: "today" "last_7_days" "last_30_days" "last_90_days" "last_year"

Only return go links modified in this period.

offset
integer >= 0
Default: 0
order
string
Default: "desc"
Enum: "asc" "desc"
pinned-first
string
Default: "true"
Enum: "true" "false"

Only applies when sort is set to a value other than relevance (the default). Pinned go links are then listed before all other results unless this is set to false, in which case they are sorted along with the rest.

result-type
string
Default: "all"
Enum: "all" "links" "tags" "users" "collections" "apps"

Which resource is the primary result. all returns go links plus previews of users, tags and collections.

search-term
required
string
Example: search-term=drive

The search term. A leading go/ is ignored.

sort
string
Default: "relevance"
Enum: "relevance" "daily" "weekly" "monthly" "alltime" "new" "created_at" "updated_at" "user_recently_used" "name"

Sort order of the go link results. new is an alias of created_at; user_recently_used also filters out go links the token owner never used.

tag[]
Array of strings

Only return go links that carry these tags. Repeat the parameter (tag[]=drive&tag[]=docs) for several tags; a single tag can also be sent as tag=drive.

true-search-term
string

Search exactly this term and skip the AI rewrite of search-term.

username[]
Array of strings

Owner username(s) for the user_links filter. Repeat the parameter (username[]=jane&username[]=john) for several owners; a single owner can also be sent as username=jane.

Responses

Request samples

curl "https://api.golinks.io/search?search-term=drive&result-type=links&limit=20" \
  -H "Authorization: Bearer $GOLINKS_TOKEN"

Response samples

Content type
application/json
{
  • "type": "search",
  • "search-term": "drive",
  • "true-search-term": "drive",
  • "spelling-suggestion": null,
  • "spelling-corrected": false,
  • "total_links": 1,
  • "total_tags": 1,
  • "total_users": 0,
  • "total_collections": 0,
  • "users": [ ],
  • "tags": [
    ],
  • "collections": [ ],
  • "results": [
    ],
  • "externalDomain": "",
  • "location": "US",
  • "metadata": {
    },
  • "hasRows": 0
}

Audit Log

The Audit Log API exports the workspace audit log (an Enterprise feature). The token owner must be a workspace admin with permission to view the audit log.

List audit log entries

https://api.golinks.io/admin/audit_log

Retrieve the workspace audit log, newest entries first. The audit log is an Enterprise feature and the token owner must be a workspace admin with the view audit log permission. Filter values are the enum case names listed below (for example section=Golinks, event_type=GoLinkCreated).

Authorizations:
ApiTokenOAuth2
query Parameters
event_type
string
Enum: "APITokenCreated" "APITokenDeleted" "APITokenUpdated" "APITokenRevoked" "DomainRolesUpdated" "GoLinkCreated" "GoLinkDeleted" "GoLinkLocked" "GoLinkPinned" "GoLinkUnlocked" "GoLinkUnpinned" "GoLinkUpdated" "InviteRevoked" "SetAccessLevel" "SetActiveStatus" "SetAdminStatus" "UserInvited" "UserUpdated" "WebhookCreated" "WebhookDeleted" "WebhookUpdated" "OAuthAppCreated" "OAuthAppDeleted" "OAuthAppUpdated" "WorkspaceSettingsChanged" "SCIMUserCreated" "SCIMUserUpdated" "SCIMUserDeactivated" "SCIMTokenCreated" "SCIMTokenRevoked" "CollectionCreated" "CollectionDeleted" "CollectionUpdated" "TagCreated" "TagDeleted" "TagUpdated" "TagsMerged" "JotCreated" "JotDeleted" "ProvisionedUserRemoved" "CrossProductLoginTokenIssued"

Specific event.

export
string
Value: "true"

Set to true to export up to 5000 entries in one response (ignores limit).

filter_uid
integer

Only return entries caused by this user.

general_type
string
Enum: "Added" "Changed" "Removed"

Kind of change.

limit
integer [ 1 .. 100 ]
Default: 20

Number of entries per page.

offset
integer >= 0
Default: 0
search
string <= 100 characters

Text to match against the entry message and event type.

section
string
Enum: "Golinks" "UserManagement" "Settings" "DeveloperTools" "SCIM" "Collections" "Tags" "Jots"

Product area the entry belongs to.

Responses

Request samples

curl "https://api.golinks.io/admin/audit_log?section=Golinks&limit=20" \
  -H "Authorization: Bearer $GOLINKS_TOKEN"

Response samples

Content type
application/json
{
  • "metadata": {
    },
  • "results": [
    ]
}

OAuth

Token endpoints for OAuth 2.0 apps registered in Developer Tools › OAuth Apps. See Authentication for the full authorization flow.

Exchange an authorization code or refresh token

https://api.golinks.io/oauth/token

Token endpoint of the OAuth 2.0 Authorization Code flow with PKCE. Send grant_type=authorization_code with the code received on your redirect URI and the code_verifier, or grant_type=refresh_token with a refresh token to rotate the pair. Access tokens are valid for one hour. Refresh tokens are single use: the previous access and refresh tokens are revoked as soon as the new pair is issued, and presenting an already used refresh token revokes every token of the grant.

The endpoint is unauthenticated (apps are public clients) and accepts form-encoded or JSON bodies. It is rate limited to 60 requests per minute per client.

Request Body schema:
required
One of
client_id
required
string

Client ID of the OAuth app.

code
required
string

Authorization code received on the redirect URI.

code_verifier
required
string

PKCE verifier whose SHA-256 (base64url) matches the code_challenge sent in the authorization request.

grant_type
required
string
Value: "authorization_code"
redirect_uri
required
string <uri>

The same redirect_uri that was used in the authorization request.

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "access_token": "3f9c2c4a0b6f4d1e9a8c7b6a5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f",
  • "token_type": "Bearer",
  • "expires_in": 3600,
  • "refresh_token": "0e1d2c3b4a5968778695a4b3c2d1e0f9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1",
  • "scope": "golinks:read golinks:write"
}

Revoke a token

https://api.golinks.io/oauth/revoke

Revoke an access or refresh token (RFC 7009). Revoking a refresh token also revokes the access token issued with it. The endpoint always responds with 200 and an empty JSON object, even when the token is unknown or belongs to another client, so callers cannot probe for valid tokens. It is unauthenticated and accepts form-encoded or JSON bodies.

Request Body schema:
required
client_id
required
string

Client ID of the OAuth app the token belongs to.

token
required
string

The access or refresh token to revoke. Revoking a refresh token also revokes the access token issued with it.

token_type_hint
string
Enum: "access_token" "refresh_token"

Optional hint about the token type, per RFC 7009. GoLinks tries the other type when the hinted one does not match.

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{ }