Documentation
List saved Library items
GET
/v1/presetsLibraryExample request
curl -s "https://snip.link/v1/presets" \ -H "Authorization: Bearer $SNIP_KEY"
Example response
{
"presets": [
{
"kind": "rules"
}
]
}Response fields
| Field | Type | Description |
|---|---|---|
presets | LibraryItem[] | |
presets[].id | string | |
presets[].kind | rules | qr | campaign | preview | template | |
presets[].name | string | |
presets[].description | string | |
presets[].config | object | |
presets[].version | integer | |
presets[].is_default | boolean | |
presets[].created_at | string | |
presets[].updated_at | string | |
account | object | |
account.id | string | |
account.label | string | |
limit | integer | |
plan | object | |
plan.id | string | |
plan.name | string | |
plan.price_cents | number | |
permissions | object | |
permissions.edit | boolean | |
permissions.defaults | boolean | |
permissions.billing | boolean | |
upgrade | object, null | |
upgrade.kind | string | |
upgrade.plan | string | |
upgrade.plan_name | string | |
upgrade.href | string |
Errors
| Status | Meaning |
|---|---|
| 400 | The body or query is invalid. details names each field. |
| 401 | The API key is missing, malformed or revoked. |
| 403 | This account role cannot perform the action. details.reason identifies the permission refusal. |
| 404 | No Library item or selected link in the authenticated account. |
| 409 | The item or a selected link changed. Read it again and preview before retrying. |
| 413 | The input is larger than the plan allows per run. details carries the size, the limit and the unit. |
| 429 | Either the key exceeded its requests-per-second limit (honor Retry-After), or a daily or plan quota is used up (details.reason). |
| 503 | The feature is switched off for the service right now. Try again later. |