Actions14
- Business Actions
- Campaign Claim Actions
- Files Actions
- Redemption Actions
- Token Actions
- User Actions
Token → Create Metadata
AI-generatedSummary
Creates a new metadata record for a PERS token contract by POSTing to /tokens/{tokenId}/metadata, and returns the API's JSON response.
Inputs
- Token ID (required) — UUID of the token contract to attach the metadata to. It is placed in the request URL, not the body.
- Additional Fields: Name / Description — Item name and description (Markdown supported). Both support {{placeholder}} syntax for dynamic personalization.
- Additional Fields: Image URL / Animation URL / YouTube URL / External URL / Preview URL — Media and link fields. The YouTube URL is only used if no animation URL is given.
- Additional Fields: Tags — Comma-separated tags, sent as an array of trimmed strings.
- Additional Fields: Business IDs — Comma-separated business IDs where the token can be redeemed, sent as an array. If empty, the token can be spent at any business in the tenant.
- Additional Fields: Owner Business ID — If set, the metadata belongs to that business. If omitted, it is tenant-owned.
- Additional Fields: Creator Account Address — Creator wallet address.
- Additional Fields: Is Active — Whether the metadata is active on creation. Defaults to true.
- Additional Fields: Validity Type / Validity Duration / Expiry Date — Control how token expiry is computed. Validity Type and Validity Duration are ERC721 only. Expiry Date is a fixed date used with the fixed_date type.
- Additional Fields: AI Prompt Configs / Default Prompt Context / Allow External Context Overwrite — ERC721-only settings for AI-generated or templated content at mint time. AI Prompt Configs is a JSON array, Default Prompt Context is a JSON object exposed as {{defaults.xxx}}, and the boolean lets claim/redeem requests supply external context.
Output shape
A single item holding the PERS API's JSON response for the created metadata record, paired to the input item.
The source doesn't show the response fields, so the exact shape is whatever the API returns. Only the fields you set in Additional Fields are sent. The node authenticates with the persApi credential. With Continue On Fail enabled, a failed item returns {error: message} instead of stopping the workflow.
Examples
Example 1: Define the template for a new ERC721 voucher with AI-generated names and a 30-day validity.
Token ID = contract UUID; Additional Fields: Name, Image URL, AI Prompt Configs = [{"type":"TEXT_GENERATION","key":"name","prompt":"Generate a unique reward name"}], Validity Type = Days From Issuance, Validity Duration = 30.
Example 2: Create business-owned metadata restricted to specific businesses.
Token ID = contract UUID; Additional Fields: Name, Owner Business ID, Business IDs = "id1, id2", Tags = "summer, vip".