Create publication duplicate OAuth Scope: publications:write
Create publication duplicate OAuth Scope: publications:write
Creates a new publication in the same workspace, or copies into one you already have, and copies the parts of the source publication that don’t hold subscriber data into it: custom fields, subscriber tags, newsletter lists, segments, post templates, the website design, automations, and optionally webhooks. Use it to stand up new publications from a template publication.
The new publication is created immediately and the copy runs in the background, so this endpoint answers 202. Poll the Get publication duplicate endpoint until the status is completed, partial, or failed.
Not copied: subscribers, posts, billing records, and domains. Tag definitions are copied but not which subscribers have them.
Items that can’t be copied: segments whose conditions point at something that only exists on the source publication (a tier, specific post or email, poll, product, form, or another automation) are skipped and listed under results. A segment that uses a newsletter list is copied when newsletter_lists is copied too. Post templates used by a recurring series are skipped too. The status is partial when anything is skipped.
Request related components together: a segment that uses a custom field or subscriber tag can only be copied when that custom field or tag is copied too, so include custom_fields and subscriber_tags alongside segments, and newsletter_lists for segments that use a list. Otherwise the segment is skipped and listed under results. System fields and tags exist in every publication and don’t need to be requested. Automations create any segments, tags, or custom fields they need that are missing.
Copying into an existing publication: send destination_publication_id instead of name to copy into a publication in the same workspace, such as one you duplicated earlier, to add anything it is missing. Nothing is created and the publication limit does not apply. Items the destination already has, matched by name ignoring case or as an earlier copy of the same item, are skipped and listed under skipped in results instead of being copied again, so repeating the request is safe. Existing items are never updated. Webhooks are matched by URL. The website design is skipped when the destination’s site already has pages. Send either name or destination_publication_id, not both.
This endpoint requires an API key with access to every publication in the workspace, and counts a new publication against the workspace’s publication limit. When the workspace is at its limit the request is rejected with a 400 and the code MAX_PUBLICATIONS_REACHED.
Webhooks: request webhooks to copy the source publication’s webhooks. It is not copied by default, because the new webhooks start receiving the new publication’s events as soon as they are created. Each new webhook has its own signing secret, returned under results.webhooks.webhooks once the duplicate has finished. Until then, and when a secret can’t be retrieved, signing_secret is null, so poll again. With OAuth, requesting webhooks needs the webhooks:write scope and reading the secrets needs webhooks:read.
Retrying a request is safe. If a duplicate with the same name, description, subdomain, components and website_theme was started from this publication within the last hour and has not failed, it is returned with reused set to true instead of creating another publication, even if it has already finished. A request that differs in any of these starts a new one, so several publications can be created from the same template. A request with destination_publication_id returns the duplicate for that publication and components only while it is still running; once it has finished, a new request starts another incremental duplication.
If a duplicate ends with the status failed, its new publication is still in the workspace and still counts against the publication limit. Retrying after a failure creates another publication, so delete the one left behind first if you don’t need it.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
Request
The name of the new publication. Required unless destination_publication_id is given.
The subdomain of the new publication, as in subdomain.beehiiv.com. Generated from the name when omitted. A subdomain that is already taken is rejected with a 422.
The prefixed ID of an existing publication in the same workspace to copy into instead of creating a new one. Cannot be combined with name.
Which parts of the publication to copy. Defaults to every component except webhooks when omitted.
Theme changes applied to the copied website. Requires website_design to be copied, otherwise the request is rejected with a 400.