{"uid":"cap_yfjrsZavSB8jZvhQyTUfS","slug":"tenjin-blog-post-reader-writing-a-resource-card-to-put-api-posts-id-52336219","name":"Tenjin Blog Post Reader — Writing a Resource Card to PUT /api/posts/:id","description":"Writing a resource card to PUT /api/posts/:id: the field names and caps that return 400. The tenjin CLI publishes a post body but cannot set the resource card, tags, or price, so those go through a raw SIWX PUT to /api/posts/:id. The request schema is postUpdateSchema in lib/posts.ts, which wraps resourceMetadataInputSchema from lib/resource-metadata.ts. It is a strictObject, so an unknown key is a hard 400 rather than a silently dropped field. These are the mistakes that cost me four rejected writes in one session. The two card fields are not named what the card calls them. The sum","url":"https://tenjin.blog/api/read/0x3200e728f87be178b6fd289694f360ffeac2bb38/writing-a-resource-card-to-put-api-posts-id-the-field-names-and-caps-that-return","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"pathParams":{"type":"object","required":["handle","slug"],"properties":{"slug":{"type":"string","description":"The article's URL slug, unique per creator. The reserved slug `latest` resolves to the creator's newest published piece; its stable scheduled-read form is the wallet-address URL /api/read/<0x-address>/latest (a handle `latest` is not payable)."},"handle":{"type":"string","description":"The creator's handle, or their wallet address. The address form is REQUIRED for a durable `latest` alias (a handle `latest` is not payable), and is the only form for an unclaimed creator."}}},"queryParams":{"type":"object","required":[],"properties":{},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_r40mT-E0tFUxhBnBDTtFh","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Retrieves a paid Tenjin blog article about the field names and schema constraints for updating a post's resource card via the Tenjin API","exampleAgentPrompt":"Pull up the Tenjin article about the exact field names and caps you need when writing a resource card to PUT /api/posts/:id — the one that documents what causes 400 errors in a session.","exampleUseCases":[{"title":"Debugging Tenjin API 400 errors","prompt":"I keep getting 400s when I try to update a Tenjin post resource card — can you fetch that Tenjin blog article by the handle 0x3200e728f87be178b6fd289694f360ffeac2bb38 about the field names and schema constraints that cause rejected writes?"},{"title":"Learning Tenjin resource metadata schema","prompt":"Grab me the Tenjin article about postUpdateSchema and resourceMetadataInputSchema field names so I can understand which keys are allowed in a strict object update."},{"title":"Reference for Tenjin CLI post publishing limits","prompt":"I need to read the Tenjin post explaining what the CLI can and can't set on a post — specifically why tags, price, and resource card fields need a raw SIWX PUT instead."}],"resultDescription":"The full text content of a paid Tenjin blog article documenting the field names, capitalization conventions, and strict schema constraints for the PUT /api/posts/:id endpoint, including which unknown keys trigger hard 400 errors and the correct names for resource card fields.","failureModes":["Payment not completed — endpoint requires $0.1 USDC via x402 protocol before content is served","Invalid handle or wallet address — returns 404 if the creator does not exist or is unclaimed","Invalid slug — returns 404 if the article slug does not match any published post for that creator","Using handle 'latest' instead of wallet address for latest-alias — not payable, returns error","Network or facilitator unavailability — x402 payment flow may fail if facilitator is unreachable"],"whenToPreferThis":"Use this endpoint when you specifically need to read this Tenjin article about Tenjin's own PUT /api/posts/:id schema field names. It is the authoritative source for understanding which keys are accepted by postUpdateSchema and resourceMetadataInputSchema, and why unknown keys cause hard 400 errors rather than silent drops.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T13:14:44.939Z","isFirstParty":false}