Create a card
POST
/v1/cardsAuthorization
AuthorizationBearer token (OAuth access token or teakapi_ API key) · headerrequiredBearer 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/jsoncardTypestringOptional explicit card type. Text content is stored as raw Markdown without normalization. When omitted, Teak keeps automatic URL, quote, and palette classification. Uploaded file types are inferred from fileName and mimeType.
Allowed:
textlinkimagevideoaudiodocumentpalettequotecontentstringCard content. For text cards this is canonical raw Markdown, preserved exactly, with a maximum of 512 KiB measured in UTF-8 bytes.
fileEtagstringETag returned by the completed upload PUT. Include it when creating an uploaded-file card so Teak can verify the exact stored object.
fileKeystringfileNamestringfileSizenumbermimeTypestringnotesstring | nullsourcestringtagsstring[]urlstringResponses
200Created card
appUrlstring<uri>requiredcardCardShow propertiesHide properties
aiSummarystring | nullaiTagsstring[]requiredappUrlstring<uri>requiredcompactUrlstring | nullrequired256px rendition URL for small cards; present for image uploads.
contentstringrequiredcreatedAtnumberrequireddetailUrlstring | nullfileExtensionstring | nullfileKindstring | nullfileLanguagestring | nullfileNamestring | nullfilePreviewobject | nullfileSizenumber | nullfileUrlstring | nullidstringrequiredisFavoritedbooleanrequiredlinkPreviewImageUrlstring | nullmetadataDescriptionstring | nullmetadataTitlestring | nullmimeTypestring | nullnotesstring | nullplaceholderUrlstring | nullrequired48px loading-placeholder rendition URL; present for image uploads.
screenshotUrlstring | nulltagsstring[]requiredthumbnailUrlstring | nulltypestringrequiredupdatedAtnumberrequiredurlstring | nullcardIdstringrequiredstatusstringrequiredAllowed:
createdTry it
Server
Authorization
Bodyapplication/json
Request
curl -X POST "https://teakvault.com/api/v1/cards" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"cardType": "text",
"content": " # Draft\r\n\r\n- [ ] Keep spacing \n",
"fileEtag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
"fileKey": "string",
"fileName": "string",
"fileSize": 0,
"mimeType": "string",
"notes": "string",
"source": "string",
"tags": [
"string"
],
"url": "string"
}'const response = await fetch("https://teakvault.com/api/v1/cards", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"cardType": "text",
"content": " # Draft\r\n\r\n- [ ] Keep spacing \n",
"fileEtag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
"fileKey": "string",
"fileName": "string",
"fileSize": 0,
"mimeType": "string",
"notes": "string",
"source": "string",
"tags": [
"string"
],
"url": "string"
})
});import requests
response = requests.post(
"https://teakvault.com/api/v1/cards",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"cardType": "text",
"content": " # Draft\r\n\r\n- [ ] Keep spacing \n",
"fileEtag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
"fileKey": "string",
"fileName": "string",
"fileSize": 0,
"mimeType": "string",
"notes": "string",
"source": "string",
"tags": [
"string"
],
"url": "string"
},
)Response
{
"appUrl": "http://example.com",
"card": {
"aiSummary": "string",
"aiTags": [
"string"
],
"appUrl": "http://example.com",
"compactUrl": "string",
"content": "string",
"createdAt": 0,
"detailUrl": "string",
"fileExtension": "string",
"fileKind": "string",
"fileLanguage": "string",
"fileName": "string",
"filePreview": {},
"fileSize": 0,
"fileUrl": "string",
"id": "string",
"isFavorited": true,
"linkPreviewImageUrl": "string",
"metadataDescription": "string",
"metadataTitle": "string",
"mimeType": "string",
"notes": "string",
"placeholderUrl": "string",
"screenshotUrl": "string",
"tags": [
"string"
],
"thumbnailUrl": "string",
"type": "string",
"updatedAt": 0,
"url": "string"
},
"cardId": "string",
"status": "created"
}