Batch Add Pins to Pinboard
Add multiple pins to a pinboard in a single request. This is more efficient than making individual POST requests.
Endpoint
POST /v1/pinboards/:pinboardId/pins/batchAuthentication
Requires API key with pinboards:write scope. You must be the owner or editor of the pinboard.
Authorization: Bearer pk_live_your_api_keyPath Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
pinboardId | string | Yes | Pinboard ID (e.g., pb-abc123) |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
pin_ids | string[] | Yes | Array of pin IDs to add (max 50) |
Example
Client-JS
import { PindownClient } from '@pindownai/client-js'
const client = new PindownClient({
apiKey: process.env.PINDOWN_API_KEY
})
const result = await client.pinboards.batchAddPins('pb-abc123', [
'p-pin1',
'p-pin2',
'p-pin3'
])
console.log(`Added: ${result.added.length}`)
console.log(`Failed: ${result.failed.length}`)Response
{
"success": true,
"data": {
"added": ["p-pin1", "p-pin2"],
"failed": [
{
"id": "p-pin3",
"error": "Pin not found"
}
]
},
"message": "Added 2 pins"
}Response Fields
added: Array of pin IDs that were successfully addedfailed: Array of pins that failed to add with error messages
Notes
- Maximum 50 pins per batch request
- Each pin is processed independently - if one fails, others still succeed
- Pins that are already on the pinboard will be skipped (not added again)
- You must have access to each pin to add it to the pinboard
Next Steps
- Batch Remove Pins - Remove multiple pins from a pinboard
- Add Pin - Add a single pin to a pinboard