{
  "info": {
    "name": "Lynkarr API",
    "description": "Set `token` to an API token from Settings. It starts lyn1_ and is shown once when you create it.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://lynkarr.com/api/v1"
    },
    {
      "key": "token",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Who this token belongs to",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/me",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "me"
          ]
        }
      }
    },
    {
      "name": "List QR codes",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/codes",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "codes"
          ]
        }
      }
    },
    {
      "name": "Create a QR code",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/codes",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "codes"
          ]
        }
      }
    },
    {
      "name": "Read one code",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/codes/{id}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "codes",
            "{id}"
          ]
        }
      }
    },
    {
      "name": "Change a code",
      "request": {
        "method": "PATCH",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/codes/{id}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "codes",
            "{id}"
          ]
        }
      }
    },
    {
      "name": "Duplicate a code",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/codes/{id}/clone",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "codes",
            "{id}",
            "clone"
          ]
        }
      }
    },
    {
      "name": "Delete a code's scan history",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/codes/{id}/clear-scans",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "codes",
            "{id}",
            "clear-scans"
          ]
        }
      }
    },
    {
      "name": "Take a code out of use",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/codes/{id}/archive",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "codes",
            "{id}",
            "archive"
          ]
        }
      }
    },
    {
      "name": "List short links",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/links",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "links"
          ]
        }
      }
    },
    {
      "name": "Create a short link",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/links",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "links"
          ]
        }
      }
    },
    {
      "name": "Recent scans, clicks and views",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/events",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "events"
          ]
        }
      }
    },
    {
      "name": "Recent form replies",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/submissions",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "submissions"
          ]
        }
      }
    },
    {
      "name": "Subscribe to events as they happen",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/hooks",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "hooks"
          ]
        }
      }
    },
    {
      "name": "Unsubscribe",
      "request": {
        "method": "DELETE",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/hooks/{id}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "hooks",
            "{id}"
          ]
        }
      }
    },
    {
      "name": "How one code has performed",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{token}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/analytics/codes/{id}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "analytics",
            "codes",
            "{id}"
          ]
        }
      }
    }
  ]
}