Batch Update Pins
Update multiple pins in a single request. This is more efficient than making individual PUT requests.
Endpoint
PATCH /v1/pins/batchAuthentication
Requires API key with pins:write scope. You must be the owner or editor of each pin.
Authorization: Bearer pk_live_your_api_keyRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
updates | object[] | Yes | Array of update objects (max 50) |
Each update object must include:
id: Pin ID to update- Other fields follow the same structure as Update Pin
Example
Client-JS
import { PindownClient } from '@pindownai/client-js'
const client = new PindownClient({
apiKey: process.env.PINDOWN_API_KEY
})
const result = await client.pins.batchUpdate([
{
id: 'p-abc123',
metadata: { title: 'Updated Title 1' }
},
{
id: 'p-xyz789',
is_public: true,
metadata: { tags: ['updated', 'batch'] }
}
])
console.log(`Updated: ${result.updated.length}`)
console.log(`Failed: ${result.failed.length}`)Response
{
"success": true,
"data": {
"updated": ["p-abc123", "p-xyz789"],
"failed": [
{
"id": "p-def456",
"error": "Permission denied"
}
],
"updated_at": 1703123456789
},
"message": "Updated 2 pins"
}Response Fields
updated: Array of pin IDs that were successfully updatedfailed: Array of pins that failed to update with error messagesupdated_at: Timestamp when the batch update was performed
Notes
- Maximum 50 pins per batch request
- Each pin is processed independently - if one fails, others still succeed
- You must be the owner or editor of each pin to update it
- All successful updates share the same
updated_attimestamp
Next Steps
- Batch Get Pins - Retrieve multiple pins
- Batch Delete Pins - Delete multiple pins
- Update Pin - Update a single pin