{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"cb29b458-6059-4d42-bfd0-1d8c1466acda","name":"GoLinks API","description":"Welcome to the GoLinks API! You can use this API to access our endpoints, such as the Golinks API to create golinks that you and everyone on your team can access. To access our API, you need to be on the GoLinks Enterprise plan. You can upgrade to the Enterprise plan by visiting the [billing page](https://www.golinks.io/billing.php). If you have any questions about the Enterprise plan, you can reach out to the [Sales team](https://www.golinks.io/sales.php).\n\n# Authentication\n\nThe GoLinks API uses access tokens to authenticate requests. The access token must be included in the **Authorization header** of your request. Any user on the Enterprise plan can create and revoke a token. Non-admins can only view and access their own tokens while admins can view and access all the tokens from their organization. Since any user can create a token, do not share your token with other users or include them in publicly accessible areas such as GitHub. If your token gets compromised, you can revoke that token and create a new one.\n\n## Create an Access Token\n\nTo create an access token, sign in to your GoLinks account and go to the [“Developers”](https://www.golinks.io/settings.php#developers) tab in the \"Settings\" page. In the “API Tokens” panel, click on “Manage” and then click the “Create token” button.\n\n<img src=\"https://www.golinks.io/d/images/api-doc/empty-tokens-table.png\" alt=\"drawing\" width=\"750\">\n\nEnter a token name and click on the “Create token” button. Once the token gets created, you will be able to copy the token to your clipboard.\n\n<img src=\"https://www.golinks.io/d/images/api-doc/create-token-modal.png\" alt=\"drawing\" width=\"610\">\n\nYou should now see the new token information in the table. You are able to view the raw token anytime you need to, as well as edit the token name and revoke the token.\n\n<img src=\"https://www.golinks.io/d/images/api-doc/tokens-table.png\" alt=\"drawing\" width=\"750\">\n\n## How to use your Access Token\n\nOnce you have created your access token, you can use it to make requests to the API. Requests are authenticated using [HTTP Bearer Authentication](https://tools.ietf.org/html/rfc6750). You must provide the access token in the Authorization header:\n\n```\nAuthorization: Bearer {ACCESS_TOKEN}\n\n ```\n\nIf you do not provide an access token or your access token is no longer active, you will receive an error message with a **401 status code**.\n\n```\n{\n  \"error\": {\n    \"message\": \"The API token is not valid or is deactivated.\",\n    \"code\": 401,\n    \"type\": \"not_authorized\"\n   }\n}\n\n ```\n\n# API Overview\n\nThe GoLinks API is REST-based and uses standard HTTP verbs and status codes. The API accepts [form-encoded](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) request bodies and returns JSON-encoded responses. All requests should be made over SSL.\n\n## Base URL\n\nThe base URL to access the GoLinks API is [https://api.golinks.io](https://api.golinks.io). For example, to access the _golinks_ endpoint, just add the endpoint to the base URL: [https://api.golinks.io/golinks](https://api.golinks.io/golinks).\n\n## Errors\n\nAll responses from the API will include a standard HTTP successful or error status code. The successful status codes are as follows:\n\n| HTTP Status Code | Description |\n| --- | --- |\n| 200 OK | The request was successful. |\n| 201 Created | The resource has been successfully created. |\n\nFor errors, we include extra information as to why the request was not successful. The error response body will have the following format:\n\n```\n{\n  \"error\": {\n    \"message\": \"Descriptive information about the error\",\n    \"code\": \"HTTP error code\",\n    \"type\": \"Type of error returned\"\n   }\n}\n\n ```\n\nFor example, if you try to create a golink that already exists, you will get the following error response:\n\n```\n{\n  \"error\": {\n     \"message\": \"The golink go/git already exists. Please use another name for the golink.\",\n     \"code\": 409,\n     \"type\": \"conflict\"\n   }\n}\n\n ```\n\nThe error status codes, along with their error types, are as follows:\n\n| HTTP Status Code | Error Type | Description |\n| --- | --- | --- |\n| 400 Bad Request | bad_request | The request cannot be accepted. Might be because the request body is empty when it shouldn’t be. |\n| 401 Unauthorized | not_authorized | The access token provided is invalid or deactivated. |\n| 409 Conflict | conflict | The request conflicts with an existing resource. For example, if creating a golink with an existing name, this error will be returned. |\n| 422 Unprocessable Entity | missing_field or invalid_request | The contents of the request contains errors, such as required fields that are missing or validation errors. |\n| 429 Too Many Requests | rate_limit_exceeded | The rate limit has been exceeded. You have to wait a short time before trying again. |\n| 500 Internal Server Error | internal_server_error | Something went wrong with the GoLinks API. |\n\n## Rate Limiting\n\nA rate limit is enforced for every endpoint and is based on the user's IP address. We currently allow 100 writes per minute and 150 reads per minute. If you exceed the rate limit, you will receive a **429 status code** with the following error body:\n\n```\n{\n  \"error\": {\n     \"message\": \"API rate limit exceeded. Please try again in 60 seconds.\",\n     \"code\": 429,\n     \"type\": \"rate_limit_exceeded\"\n   }\n}\n\n ```\n\nEvery request contains information about the rate limit in the HTTP response headers.\n\n| HTTP Header | Description |\n| --- | --- |\n| **RateLimit-Limit** | The maximum number of requests allowed per minute for the endpoint. |\n| **RateLimit-Remaining** | The number of requests remaining for the current rate limit window. |\n| **Retry-After** | The number of seconds to wait until the rate limit window resets. This header will only be sent if the rate limit has been exceeded. |\n\n## Pagination\n\nAll the endpoints that return a list come with a **metadata** object that contains pagination information. We return a default of 50 results per page and use the **limit** and **offset** parameters to determine the number of results to return and the number of results to skip. You can fetch the next set of results through the URL that is provided in _metadata.links.next_. If there are no more results, then the value will be **null**.\n\nThe metadata object will include the following parameters. The dot notation denotes a child attribute.\n\n| Pagination Parameters | Description |\n| --- | --- |\n| limit | The limit on the number of results to return, between 1 and 100. Defaults to 50 results. |\n| offset | The number of results to skip. Defaults to 0. |\n| count | The number of results returned in the current page. |\n| total_results | The total number of results found. |\n| links.next | The URL link to the next set of results. If there are no more results, this will be **null**. |\n| links.prev | The URL link to the previous set of results. If there are no more results, this will be **null**. |\n\n# Setup for Postman\n\nIf you will be running the following requests in Postman, you can add your **Access token** to the **Pre-request Script** or create a new environment variable named **token** and set the value to be your access token.\n\n```\n// Add your access token below\npostman.setEnvironmentVariable(\"token\", \"\");\n\n ```\n\n# Support\n\nIf you have any questions about the API or are running into errors, please reach out to [support@golinks.io](https://mail.google.com/mail/u/0/?view=cm&fs=1&tf=1&source=mailto&to=support@golinks.io).","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"10666283","team":612216,"collectionId":"cb29b458-6059-4d42-bfd0-1d8c1466acda","publishedId":"TVzVjGcy","public":true,"publicUrl":"https://docs.golinks.io","privateUrl":"https://go.postman.co/documentation/10666283-cb29b458-6059-4d42-bfd0-1d8c1466acda","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"00a3e7"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2021-01-19T17:36:45.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/02b57fcd0c2622e5d8fa678857a254b76b2a3666a2c700da16bec953c35107c1","favicon":"https://res.cloudinary.com/postman/image/upload/v1605724440/team/dv8qclfvdxlzwgmhrkca.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://docs.golinks.io/view/metadata/TVzVjGcy"}