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

Batch Create Pins

Create multiple pins in a single request. This is more efficient than making individual POST requests.

Endpoint

POST /v1/pins/batch

Authentication

Requires API key with pins:write scope.

Authorization: Bearer pk_live_your_api_key

Request Body

FieldTypeRequiredDescription
pinsobject[]YesArray of pin objects (max 50)

Each pin object follows the same structure as Create Pin.

Example

import { PindownClient } from '@pindownai/client-js' const client = new PindownClient({ apiKey: process.env.PINDOWN_API_KEY }) const result = await client.pins.batchCreate([ { pin_type: 'markdown', pin_config: { content: '# First Pin' }, metadata: { title: 'First Pin' } }, { pin_type: 'stat-cards', pin_config: { cards: [{ title: 'Revenue', value: '$100k' }] }, metadata: { title: 'Revenue Stats' } } ]) console.log(`Created: ${result.created.length}`) console.log(`Failed: ${result.failed.length}`)

Response

{ "success": true, "data": { "created": [ { "id": "p-abc123", "index": 0, "created_at": 1703123456789 }, { "id": "p-xyz789", "index": 1, "created_at": 1703123456789 } ], "failed": [ { "index": 2, "error": "metadata.title is required" } ] }, "message": "Created 2 pins" }

Response Fields

  • created: Array of successfully created pins with their IDs and original index
  • failed: Array of pins that failed to create with error messages

Notes

  • Maximum 50 pins per batch request
  • Each pin is processed independently - if one fails, others still succeed
  • The index field in responses corresponds to the position in your input array

Next Steps