Skip to Content
Pindown.ai is in early alpha - features may change
Pins APIBatch Update Pins

Batch Update Pins

Update multiple pins in a single request. This is more efficient than making individual PUT requests.

Endpoint

PATCH /v1/pins/batch

Authentication

Requires API key with pins:write scope. You must be the owner or editor of each pin.

Authorization: Bearer pk_live_your_api_key

Request Body

FieldTypeRequiredDescription
updatesobject[]YesArray 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

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 updated
  • failed: Array of pins that failed to update with error messages
  • updated_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_at timestamp

Next Steps