Skip to Content
Pindown.ai is in early alpha - features may change
Pins APIShare Pin

Update Sharing Settings

Control who can access your pin by updating sharing permissions.

Endpoint

POST /v1/pins/:pinId/share

Authentication

Requires API key with pins:share scope.

Authorization: Bearer pk_live_your_api_key

Path Parameters

ParameterTypeRequiredDescription
pinIdstringYesThe pin ID (e.g., p-abc123def456)

Request Body

FieldTypeRequiredDescription
is_publicbooleanNoMake pin publicly accessible (default: false)
allow_editbooleanNoAllow viewers to edit the pin (default: false)
require_sign_inbooleanNoRequire sign-in to view (default: false)
allow_commentsbooleanNoEnable comments on the pin (default: false)

Response

Success (200 OK)

{ "success": true, "data": { "id": "p-abc123def456", "is_public": true, "allow_edit": false, "require_sign_in": false, "allow_comments": true } }

Examples

Make Pin Public

curl -X POST https://api.pindown.ai/v1/pins/p-abc123def456/share \ -H "Authorization: Bearer pk_live_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "is_public": true, "allow_comments": true }'

Enable Comments Only

curl -X POST https://api.pindown.ai/v1/pins/p-abc123def456/share \ -H "Authorization: Bearer pk_live_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "allow_comments": true }'

Make Private Again

curl -X POST https://api.pindown.ai/v1/pins/p-abc123def456/share \ -H "Authorization: Bearer pk_live_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "is_public": false, "allow_comments": false }'

Code Examples

import { PindownClient } from '@pindownai/client-js' const client = new PindownClient({ apiKey: process.env.PINDOWN_API_KEY }) // Make pin public with comments const result = await client.pins.share('p-abc123def456', { is_public: true, allow_comments: true }) console.log(`Share URL: ${result.shareable_url}`) // Make pin private again await client.pins.share('p-abc123def456', { is_public: false, allow_comments: false })

Permission Combinations

is_publicrequire_sign_inallow_editBehavior
false--Private (only you can access)
truefalsefalsePublic, no sign-in required, read-only
truetruefalsePublic, sign-in required, read-only
truefalsetruePublic, no sign-in, editable by anyone
truetruetruePublic, sign-in required, editable

Error Responses

404 Not Found

{ "error": { "code": "NOT_FOUND", "message": "Pin not found or you don't have access" } }

403 Forbidden

{ "error": { "code": "SCOPE_REQUIRED", "message": "This endpoint requires the 'pins:share' scope" } }

401 Unauthorized

{ "error": { "code": "UNAUTHORIZED", "message": "Invalid or missing API key" } }

Rate Limiting

This endpoint costs 3 tokens per request (email costs for notifications).

Next Steps