Duplicate a reusable email block
/v1/email/blocks/{block_id}/duplicate// Requires email_management:write permission in the target workspace.
const source = await bird.email.blocks.get("ebl_01krdgeqcxet5s7t44vh8rt9mg");
const copy = await bird.email.blocks.duplicate(source.id, {
revision: source.revision,
name: "Legal footer (EU)",
});
console.log(copy.id);# Requires email_management:write permission in the target workspace.
source = client.email.blocks.get("ebl_01krdgeqcxet5s7t44vh8rt9mg")
copy = client.email.blocks.duplicate(source.id, revision=source.revision, name="Legal footer (EU)")
print(copy.id)// Requires email_management:write permission in the target workspace.
client, err := bird.NewClient(option.WithAPIKey(os.Getenv("BIRD_API_KEY")))
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
source, err := client.Email.Blocks.Get(ctx, "ebl_01krdgeqcxet5s7t44vh8rt9mg")
if err != nil {
log.Fatal(err)
}
block, err := client.Email.Blocks.Duplicate(ctx, source.Id, bird.EmailBlocksDuplicateParams{
Revision: int(source.Revision),
Name: "Legal footer (EU)",
})
if err != nil {
log.Fatal(err)
}
fmt.Println(block.Id)// Requires email_management:write permission in the target workspace.
$blockId = 'ebl_01krdgeqcxet5s7t44vh8rt9mg';
$source = $bird->email->blocks->get($blockId);
$params = (new \MessageBird\Wire\Model\EmailBlockDuplicate())
->setRevision($source->getRevision())
->setName('Legal footer (EU)');
$copy = $bird->email->blocks->duplicate($blockId, $params);
echo $copy->getId();bird email blocks duplicate <block-id> \
--name 'Legal disclosure copy' \
--revision 1curl -X POST "https://us1.platform.bird.com/v1/email/blocks/{block_id}/duplicate" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"revision": 1,
"name": "Legal disclosure copy"
}'{
"id": "ebl_01krdgeqcxet5s7t44vh8rt9mg",
"name": "Legal disclosure",
"source_language": "pt-BR",
"revision": 1,
"created_by": {
"id": "usr_01krdgeqcxet5s7t44vh8rt9mg",
"type": "user"
},
"created_at": "2026-05-20T09:14:52Z",
"updated_at": "2026-05-25T16:42:01Z"
}
Copies every current draft language into a new unpublished block, with no publication history or translation-source references. Each language keeps its authoring mode. A change to the source block while copying returns a 409 conflict_error.
参数
block_idstringBlock to read or edit.
请求载荷
revisionSource metadata revision last read. A change while copying returns 409.
nameName for the new block.
响应载荷
idnameName for people choosing the block, such as when linking it into a template.
descriptionOptional notes for people maintaining the block. Omitted when empty.
source_languageA language tag in BCP-47 form, for example en or pt-BR.
revisionMetadata revision to send when editing or duplicating this block.
created_byWho created the block. A duplicate is created by whoever duplicated it.
显示子属性
created_by.idActor identifier.
created_by.typeNew actor types may be added. Treat unrecognized values as future types, not errors.
user: a member's own session.api_key: a workspace API key.oauth_token: a token issued to a caller on a member's behalf.system: an action we perform without a customer actor.sso: an organization's SSO connection.service_account: a workspace's connected Integration acting with no member behind it.automation: an automation execution in your workspace.
Possible values (may grow over time): user, api_key, oauth_token, system, sso, service_account, automation
created_by.display_nameThe label the actor is shown under: typically a member's name or email address, or the API key's name. Null when it could not be resolved.
archived_atPresent when the block is archived. Retained published content remains readable.
created_atupdated_at