---
openapi: 3.0.3
info:
  title: Braze REST API – Duplicate campaigns using the API
  description: 'Use this endpoint to duplicate campaigns. This API endpoint is similar to [duplicating campaigns in the Braze dashboard][1].

    '
  version: 1.0.0
  contact:
    name: Braze Support
    url: https://www.braze.com/docs/braze_support/
  license:
    name: Braze Documentation
    url: https://www.braze.com/docs/api/home/
servers:
  - url: https://rest.iad-01.braze.com
    description: US-01
  - url: https://rest.iad-02.braze.com
    description: US-02
  - url: https://rest.iad-03.braze.com
    description: US-03
  - url: https://rest.iad-04.braze.com
    description: US-04
  - url: https://rest.iad-05.braze.com
    description: US-05
  - url: https://rest.iad-06.braze.com
    description: US-06
  - url: https://rest.iad-07.braze.com
    description: US-07
  - url: https://rest.iad-08.braze.com
    description: US-08
  - url: https://rest.us-10.braze.com
    description: US-10
  - url: https://rest.fra-01.braze.eu
    description: EU-01
  - url: https://rest.fra-02.braze.eu
    description: EU-02
  - url: https://rest.au-01.braze.com
    description: AU-01
  - url: https://rest.id-01.braze.com
    description: ID-01
  - url: https://rest.jp-01.braze.com
    description: JP-01
  - url: https://rest.kr-01.braze.com
    description: KR-01
security:
- BearerAuth: []
paths:
  "/campaigns/duplicate":
    post:
      summary: Duplicate campaigns using the API
      description: |
        > Use this endpoint to duplicate campaigns. This API endpoint is similar to [duplicating campaigns in the Braze dashboard][1].

        ## Prerequisites

        To use this endpoint, you'll need to generate an API key with the `campaigns.duplicate` permission.

        ## Rate limit

        This endpoint is limited to 100 API calls per minute.

        ## Request body

        The following sample request shows an example of how to duplicate campaigns using the API.

        ```
        Content-Type: application/json
        Authorization: Bearer YOUR_REST_API_KEY
        ```

        ```json
        {
          "campaign_id": (required, string) The campaign identifier,
          "name": (required, string) The name of the resulting campaign,
          "description": (optional, string) The description of the resulting campaign,
          "tag_names": (optional, array of strings) The tags of the resulting campaign,
        }
        ```

        ## Request parameters

        The following table lists the request parameters for this endpoint.

        | Parameter | Required | Data Type | Description |
        | --------- | ---------| --------- | ----------- |
        |`campaign_id`| Required | String | See [campaign identifier]({{site.baseurl}}/api/identifier_types/). |
        |`name`| Required | String | The name of the resulting campaign. |
        |`description`| Optional | String | The description field for the resulting campaign. |
        |`tag_names` | Optional | Array of strings | The tags for the resulting campaign. These must be existing tags. If you add new tags in the request, they overwrite any tags that were on the original campaign. |


        ## Response

        This endpoint returns a `202` status code, and the campaign creation occurs asynchronously. You can use the [security event download][2] to see records of when campaigns were duplicated and by which API key.

        [1]: {{site.baseurl}}/user_guide/messaging/governance/duplicating
        [2]: {{site.baseurl}}/user_guide/administer/global/admin_settings/security_settings/#security-event-report

        ## Response status codes

        The following table lists the responses for this endpoint, the error message you may receive, and how to resolve it.

        | Status code | Meaning | Error message | How to resolve |
        | --- | --- | --- | --- |
        | `202 Accepted` | The request was accepted and the campaign is duplicated asynchronously. | `success` | No action needed. |
        | `400 Bad Request` | The `campaign_id` is missing or doesn't match a campaign in this workspace. | `'campaign_id' must be a valid campaign id` | Pass a valid `campaign_id`. Find it with the [Export campaign list endpoint]({{site.baseurl}}/api/endpoints/export/campaigns/get_campaigns/). |
        | `400 Bad Request` | The `name` isn't a string, or is longer than 256 bytes. | `'name' must be a string no more than 256 bytes` | Pass a `name` string of 256 bytes or fewer. |
        | `400 Bad Request` | The `description` isn't a string, or is longer than 250 characters. | `'description' must be a string no longer than 250 characters` | Pass a `description` of 250 characters or fewer. |
        | `400 Bad Request` | The `tag_names` value isn't an array of strings. | `'tag_names' must be an array of strings` | Pass `tag_names` as an array of strings. |
        | `400 Bad Request` | A tag in `tag_names` doesn't exist in this workspace. | `'tag_name' "..." does not exist` | Create the tag first, or remove it from `tag_names`. |
        | `401 Unauthorized` | The REST API key is missing, malformed, or sent to the wrong REST endpoint. | `Invalid API key` | Send the key as `Authorization: Bearer YOUR_REST_API_KEY` to the correct [REST endpoint]({{site.baseurl}}/api/basics/#endpoints). For more causes, see [Errors and responses]({{site.baseurl}}/api/errors/#fatal-errors). |
        | `403 Access Denied` | The REST API key doesn't have the required permission. | `Access Denied` | Use a REST API key that has the `campaigns.duplicate` permission. |
        | `429 Rate Limited` | You exceeded the rate limit for this endpoint. | `Over rate limit` | Slow your request rate and retry with exponential backoff. See [API rate limits]({{site.baseurl}}/api/api_limits/). |
        | `5XX Internal Server Error` | An unexpected error occurred on the Braze server. | `Internal Server Error` | Retry with exponential backoff. If the error persists, contact [Support]({{site.baseurl}}/braze_support/). |
      operationId: post_campaigns_duplicate_post_duplicate_campaigns
      tags:
      - Messaging
      responses:
        '202':
          description: The request was accepted and the campaign is duplicated asynchronously.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DuplicateCampaignsResponse'
        '400':
          description: |-
            Bad Request. Causes include:

            - `'campaign_id' must be a valid campaign id` — The `campaign_id` is missing or doesn't match a campaign in this workspace.
            - `'name' must be a string no more than 256 bytes` — The `name` isn't a string, or is longer than 256 bytes.
            - `'description' must be a string no longer than 250 characters` — The `description` isn't a string, or is longer than 250 characters.
            - `'tag_names' must be an array of strings` — The `tag_names` value isn't an array of strings.
            - `'tag_name' "..." does not exist` — A tag in `tag_names` doesn't exist in this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: The REST API key is missing, malformed, or sent to the wrong REST endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: The REST API key doesn't have the required permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: You exceeded the rate limit for this endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '5XX':
          description: An unexpected error occurred on the Braze server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                campaign_id:
                  type: string
                  description: See campaign identifier.
                name:
                  type: string
                  description: The name of the resulting campaign.
                description:
                  type: string
                  description: The description field for the resulting campaign.
                tag_names:
                  type: array
                  items:
                    type: string
                  description: The tags for the resulting campaign. These must be existing tags. If you add new tags in the request, they overwrite any tags that were on the original campaign.
              required:
              - campaign_id
              - name
components:
  schemas:
    DuplicateCampaignsResponse:
      type: object
      properties:
        message:
          type: string
          description: Returns `success` when the request completes without errors.
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: The error message describing why the request failed.
        errors:
          type: array
          description: Non-fatal errors encountered while processing the request. Data unaffected by these errors is still processed.
          items:
            type: object
            properties:
              type:
                type: string
                description: The error type.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: REST API key
