Documentation
Add a link to a collection
POST
/v1/collections/{collection}/linksCollectionsPuts one link at the end of the collection. Adding one it already holds changes nothing (added is false). A collection holds up to 200 links (429 quota_exceeded, details.reason collection_full).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
collection | string, in the path | required | The collection's id. |
Request body
JSON, sent with Content-Type: application/json.
| Field | Type | Required | Description |
|---|---|---|---|
link | string | required |
Example request
Terminal
curl "https://snip.link/v1/collections/3f6c2a9e-1b4d-4e8a-9c7f-2d5b8e1a0c64/links" \
-X POST \
-H "Authorization: Bearer $SNIP_KEY" \
-H "Content-Type: application/json" \
-d '{}'Errors
| Status | Meaning |
|---|---|
| 400 | The body or query is invalid. details names each field. |
| 401 | The API key is missing, malformed or revoked. |
| 404 | No collection by that id in this account. |
| 429 | Either the key exceeded its requests-per-second limit (honor Retry-After), or a daily or plan quota is used up (details.reason). |