Bulk Update Status
Enables or disables multiple links in a single request. This is useful for pausing an entire campaign or re-activating a batch of links.
PATCH
/v1/links/bulk/status links:write Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
ids | string[] | Yes | Array of link UUIDs to update (max 200). |
enabled | boolean | Yes | Set to true to enable or false to disable the links. |
Request Examples
curl -X PATCH https://xqr.co/api/v1/links/bulk/status \ -H "Authorization: Bearer xqr_pk_a1b2c3d4.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{ "ids": [ "d47f2e1a-8c3b-4a5d-9e6f-1234567890ab", "a83c1d4e-2f5b-4890-bc7a-abcdef012345", "e58f3a2b-9d4c-4b6e-af70-2345678901bc" ], "enabled": false }'const response = await fetch("https://xqr.co/api/v1/links/bulk/status", { method: "PATCH", headers: { Authorization: "Bearer xqr_pk_a1b2c3d4.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "Content-Type": "application/json", }, body: JSON.stringify({ ids: [ "d47f2e1a-8c3b-4a5d-9e6f-1234567890ab", "a83c1d4e-2f5b-4890-bc7a-abcdef012345", "e58f3a2b-9d4c-4b6e-af70-2345678901bc", ], enabled: false, }),});
const { data } = await response.json();console.log(`${data.updated} links disabled`);import httpx
response = httpx.patch( "https://xqr.co/api/v1/links/bulk/status", headers={ "Authorization": "Bearer xqr_pk_a1b2c3d4.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "Content-Type": "application/json", }, json={ "ids": [ "d47f2e1a-8c3b-4a5d-9e6f-1234567890ab", "a83c1d4e-2f5b-4890-bc7a-abcdef012345", "e58f3a2b-9d4c-4b6e-af70-2345678901bc", ], "enabled": False, },)
data = response.json()["data"]print(f"{data['updated']} links disabled")Response
200 OK
The count of updated links.
{ "data": { "updated": 3 }, "meta": { "request_id": "req_5e6f708901234567", "rate_limit": { "limit": 600, "remaining": 594, "reset": 1742572800 } }}Was this page helpful?
Thanks for your feedback!