Skip to content

Documentation

Create a collection

POST/v1/collectionsCollections

Groups links by hand, optionally with them in one call. With "public": true the collection gets a page at https://snip.link/c/<slug> (and at go.example.com/c/<slug> on each of the account's own domains) with one button per live link, in order. Free on every plan. Free holds 20; Pro holds 500; past that, create answers 429 quota_exceeded (details.reason collection_limit).

Request body

JSON, sent with Content-Type: application/json.

FieldTypeRequiredDescription
namestringrequired
descriptionstring, nulloptionalThe line under the name on the page; null or an empty string removes it.
publicbooleanoptionalSwitches the page on or off. Off by default.
slugstring, nulloptionalThe page's address: 3 to 40 lowercase letters, digits and dashes, unique across snip.link. Left out when the page goes public, one is made from the name. A taken address answers 400 on details.slug.
linksstring[]optionalLinks in order, each by id, ending or domain/ending (go.example.com/menu). Up to 200; a repeat is kept once. A link that is not the account's is refused on its own field (details["links.3"]) and nothing is saved.

Example request

curl -s -X POST "https://snip.link/v1/collections" \
  -H "Authorization: Bearer $SNIP_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Example response

{
  "collection": {
    "id": "3f6c2a9e-1b4d-4e8a-9c7f-2d5b8e1a0c64",
    "name": "Spring launch",
    "description": "Everything for the spring menu.",
    "public": true,
    "slug": "spring-launch",
    "page_url": "https://snip.link/c/spring-launch",
    "held": false,
    "link_count": 6,
    "created_at": "2026-10-20T12:00:00.000Z",
    "updated_at": "2026-10-21T08:30:00.000Z"
  },
  "links": [
    {
      "id": "lnk_7f0c2a2b4bb04a8b",
      "code": "spring-menu",
      "domain": "snip.link",
      "short_url": "https://snip.link/spring-menu",
      "url": "https://example.com/menus/spring-2026",
      "title": "Spring menu",
      "redirect": 302,
      "disabled": false,
      "held": false,
      "expires_at": null,
      "expired_url": null,
      "expired": false,
      "starts_at": null,
      "scheduled": false,
      "max_clicks": null,
      "limit_reached": false,
      "track": true,
      "password_protected": false,
      "routes": [
        {
          "when": "all",
          "conditions": [
            {
              "kind": "os",
              "values": [
                "ios"
              ]
            }
          ],
          "url": "https://apps.apple.com/app/id1234567890",
          "match": "ios"
        },
        {
          "name": "Lunch menu",
          "when": "all",
          "conditions": [
            {
              "kind": "time",
              "from": "11:00",
              "to": "15:00",
              "tz": "America/New_York"
            },
            {
              "kind": "weekday",
              "values": [
                1,
                2,
                3,
                4,
                5
              ],
              "tz": "America/New_York"
            }
          ],
          "url": "https://example.com/menus/lunch"
        }
      ],
      "forward_query": false,
      "health": {
        "status": "ok",
        "code": 200,
        "checked_at": "2026-10-20T08:00:00.000Z"
      },
      "clicks": 1284,
      "qr_style": {
        "style": "rounded",
        "fg": "#111111",
        "bg": "#ffffff",
        "ecc": "M"
      },
      "qr_png_url": "https://snip.link/qr.png?data=https%3A%2F%2Fsnip.link%2Fspring-menu%3Fqr%3D1",
      "qr_svg_url": "https://snip.link/qr.svg?data=https%3A%2F%2Fsnip.link%2Fspring-menu%3Fqr%3D1",
      "snapshots": "public",
      "watch": null,
      "file": null,
      "stats_url": null,
      "created_at": "2026-10-01T09:12:40.000Z",
      "updated_at": "2026-10-18T16:03:11.000Z"
    }
  ]
}

Response fields

FieldTypeDescription
collectionCollection
collection.idstringStable id.
collection.namestring
collection.descriptionstring, nullThe line under the name on the page. Null for none.
collection.publicbooleanTrue while the page is on: anyone with its address sees the collection's live links.
collection.slugstring, nullThe page's address after /c/ (https://snip.link/c/<slug>). Kept while the page is off, so it can come back.
collection.page_urlstring, nullThe page, while it is public and not held. Null otherwise.
collection.heldbooleanTrue while the page is down after a report. The collection itself still works.
collection.link_countinteger
collection.created_atstring
collection.updated_atstring
linksLink[]The collection's links in their order.

Errors

StatusMeaning
400The body or query is invalid. details names each field.
401The API key is missing, malformed or revoked.
429Either the key exceeded its requests-per-second limit (honor Retry-After), or a daily or plan quota is used up (details.reason).

Back to getting started