Skip to content
Connect an agent

Templates

Change a template

Change a template.

PATCH/v1/templates/{id}

TL;DR

QuestionAnswer
What does it do?Change a template.
What does it need?An API key or an OAuth access token.
What does it take?A JSON body with the fields below, and id in the path.
What does it return?Status 200 with a body of type Template.
In the SDK?flung.templates.update()
What can go wrong?401 Missing, unknown, revoked or expired API key; 404 No such template in this workspace; 422 The request failed validation; 429 Too many requests for this credential; wait for retry-after seconds. Every failure has the same error shape.

Example

bash
curl -X PATCH 'https://api.flung.dev/v1/templates/tpl_aaaaaaaaaaaaaaaaaaaaaaaa' \  --header "Authorization: Bearer $FLUNG_API_KEY" \  --header 'Content-Type: application/json' \  --data '{  "content": "Launching today."}'

A successful answer looks like this:

json
{  "id": "tpl_aaaaaaaaaaaaaaaaaaaaaaaa",  "name": "string",  "content": "string",  "mediaIds": [    "string"  ],  "accountIds": [    "string"  ],  "platformOverrides": {},  "createdAt": "2026-11-01T09:00:00.000Z",  "updatedAt": "2026-11-01T09:00:00.000Z"}

Path parameters

FieldTypeRequiredDescription
idstringyes

Request body

The body has the type an object, with the fields below.

FieldTypeRequiredDescription
namestringnoat least 1 character; at most 100 characters.
contentstringnoat least 1 character; at most 10000 characters.
mediaIdsstring[]no
accountIdsstring[]no
platformOverridesobjectno
platformOverrides.xobjectno
platformOverrides.x.contentstringnoat least 1 character.
platformOverrides.x.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.x.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.x.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.x.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.x.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.x.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.x.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.instagramobjectno
platformOverrides.instagram.contentstringnoat least 1 character.
platformOverrides.instagram.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.instagram.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.instagram.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.instagram.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.instagram.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.instagram.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.instagram.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.facebookobjectno
platformOverrides.facebook.contentstringnoat least 1 character.
platformOverrides.facebook.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.facebook.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.facebook.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.facebook.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.facebook.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.facebook.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.facebook.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.threadsobjectno
platformOverrides.threads.contentstringnoat least 1 character.
platformOverrides.threads.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.threads.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.threads.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.threads.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.threads.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.threads.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.threads.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.linkedinobjectno
platformOverrides.linkedin.contentstringnoat least 1 character.
platformOverrides.linkedin.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.linkedin.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.linkedin.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.linkedin.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.linkedin.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.linkedin.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.linkedin.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.tiktokobjectno
platformOverrides.tiktok.contentstringnoat least 1 character.
platformOverrides.tiktok.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.tiktok.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.tiktok.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.tiktok.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.tiktok.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.tiktok.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.tiktok.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.youtubeobjectno
platformOverrides.youtube.contentstringnoat least 1 character.
platformOverrides.youtube.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.youtube.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.youtube.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.youtube.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.youtube.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.youtube.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.youtube.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.pinterestobjectno
platformOverrides.pinterest.contentstringnoat least 1 character.
platformOverrides.pinterest.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.pinterest.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.pinterest.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.pinterest.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.pinterest.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.pinterest.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.pinterest.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.blueskyobjectno
platformOverrides.bluesky.contentstringnoat least 1 character.
platformOverrides.bluesky.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.bluesky.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.bluesky.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.bluesky.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.bluesky.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.bluesky.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.bluesky.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.mastodonobjectno
platformOverrides.mastodon.contentstringnoat least 1 character.
platformOverrides.mastodon.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.mastodon.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.mastodon.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.mastodon.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.mastodon.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.mastodon.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.mastodon.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.discordobjectno
platformOverrides.discord.contentstringnoat least 1 character.
platformOverrides.discord.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.discord.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.discord.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.discord.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.discord.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.discord.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.discord.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.farcasterobjectno
platformOverrides.farcaster.contentstringnoat least 1 character.
platformOverrides.farcaster.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.farcaster.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.farcaster.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.farcaster.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.farcaster.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.farcaster.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.farcaster.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.

Responses

StatusMeaningBody
200The template.Template
401Missing, unknown, revoked or expired API key.Error
404No such template in this workspace.Error
422The request failed validation.Error
429Too many requests for this credential; wait for retry-after seconds.Error

Response body

A 200 answer has the type Template.

FieldTypeRequiredDescription
idstringyes
namestringyes
contentstringyes
mediaIdsstring[]yes
accountIdsstring[]yes
platformOverridesobjectyes
platformOverrides.xobjectno
platformOverrides.x.contentstringno
platformOverrides.x.boardIdstringno
platformOverrides.instagramobjectno
platformOverrides.instagram.contentstringno
platformOverrides.instagram.boardIdstringno
platformOverrides.facebookobjectno
platformOverrides.facebook.contentstringno
platformOverrides.facebook.boardIdstringno
platformOverrides.threadsobjectno
platformOverrides.threads.contentstringno
platformOverrides.threads.boardIdstringno
platformOverrides.linkedinobjectno
platformOverrides.linkedin.contentstringno
platformOverrides.linkedin.boardIdstringno
platformOverrides.tiktokobjectno
platformOverrides.tiktok.contentstringno
platformOverrides.tiktok.boardIdstringno
platformOverrides.youtubeobjectno
platformOverrides.youtube.contentstringno
platformOverrides.youtube.boardIdstringno
platformOverrides.pinterestobjectno
platformOverrides.pinterest.contentstringno
platformOverrides.pinterest.boardIdstringno
platformOverrides.blueskyobjectno
platformOverrides.bluesky.contentstringno
platformOverrides.bluesky.boardIdstringno
platformOverrides.mastodonobjectno
platformOverrides.mastodon.contentstringno
platformOverrides.mastodon.boardIdstringno
platformOverrides.discordobjectno
platformOverrides.discord.contentstringno
platformOverrides.discord.boardIdstringno
platformOverrides.farcasterobjectno
platformOverrides.farcaster.contentstringno
platformOverrides.farcaster.boardIdstringno
createdAtstringyes
updatedAtstringyes

See also

DocWhy
API referenceEvery endpoint
SchemasEvery request and response type
ErrorsEvery error code and what to do about it