Skip to content

Execute bulk card operations

POST/v1/cards/bulk
Authorization
AuthorizationBearer token (OAuth access token or teakapi_ API key) · headerrequired

Bearer token. Accepts either an OAuth 2.0 access token (obtained via browser sign-in; expires after 1 hour and is refreshable) or a teakapi_ API key.

Request body
application/json
itemsobject[]required

Up to 100 items. create items take content, url, notes, tags, cardType, sourceUrl and sourceTitle; update items take cardId plus content, url, notes or tags; favorite items take cardId and isFavorited. delete, restore, archive and unarchive items take cardId. addTags and removeTags items take cardId and tags (up to 20, each at most 64 characters); tags are matched ignoring case, and removeTags also clears tags Teak added. Repeating an operation on a card already in that state succeeds without changing it.

operationstringrequired
Allowed:createupdatefavoritedeletearchiveunarchiveaddTagsremoveTagsrestore
Responses
200

Bulk operation result

operationstringrequired
Allowed:createupdatefavoritedeletearchiveunarchiveaddTagsremoveTagsrestore
resultsobject[]required

One result per item, in order: { index, status: "success", cardId } or { index, status: "error", code, error }. An item that fails changes nothing.

failedIdsstring[]required

The cardId of every item that failed, so a client can retry just those.

summaryobjectrequired
Show properties
failednumberrequired
succeedednumberrequired
totalnumberrequired
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'https://teakvault.com/api/v1/cards/bulk' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "items": [
    {}
  ],
  "operation": "create"
}'
Response
{
  "operation": "create",
  "results": [
    {}
  ],
  "failedIds": [
    "string"
  ],
  "summary": {
    "failed": 0,
    "succeeded": 0,
    "total": 0
  }
}

Was this page helpful?