Documentation
Apply a reviewed Library item
POST
/v1/presets/{preset}/applyLibrarySend the item version, selected links and revisions from preview. Each link update is guarded. The response reports per-link successes and failures; retry only failed links after a fresh preview. At most 20 per call. Identity and passwords stay unchanged.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
preset | string, in the path | required |
Request body
JSON, sent with Content-Type: application/json.
| Field | Type | Required | Description |
|---|---|---|---|
version | integer | required | Current version from the Library response. A stale edit answers 409. |
links | string[] | required | |
revisions | object | required |
Example request
curl -s -X POST "https://snip.link/v1/presets/preset/apply" \
-H "Authorization: Bearer $SNIP_KEY" \
-H "Content-Type: application/json" \
-d '{}'Response fields
| Field | Type | Description |
|---|---|---|
results | object | object[] |
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. |