---
title: Duplicate a Story
description: This endpoint can be used to duplicate a story into another folder.
url: https://storyblok.com/docs/api/management/stories/duplicate-a-story
---

# Duplicate a Story

PUT

```html
https://mapi.storyblok.com/v1/spaces/:space_id/stories/:story_id/duplicate
```

This endpoint can be used to duplicate a story into another folder.

> [!TIP]
> A common use case of this endpoint is to create an alternate version of a story for internationalization or localization purposes. It is recommended to install the [Dimensions](https://www.storyblok.com/apps/locales) app to auto-create links between stories in different languages.

## Path parameters

-   `:space_id` (required) (number)
    
    Numeric ID of a space
    
-   `:story_id` (required) (number)
    
    ID of the story
    

## Request body properties

-   `story` (The Story Object)
    
    Any attributes sent here will be copied to the duplicated story. To link duplicated stories as alternates, specify a `group_id` in the [`story` object.](https://www.storyblok.com/docs/api/management/stories/the-story-object)
    
-   `target_dimension` (number)
    
    The `id` of the target folder.
    
-   `same_path` (boolean)
    
    If set to `true`, the current story’s `path` attribute will used for the duplicated story.
    

## Response properties

-   `story` (The Story Object)
    
    A single [story object](/docs/api/management/stories/the-story-object)
    

## Examples

-   cURL
    
    ```shellscript
    curl "https://mapi.storyblok.com/v1/spaces/288868932106293/stories/531458099/duplicate" \
      -X PUT \
      -H "Authorization: YOUR_OAUTH_TOKEN" \
      -H "Content-Type: application/json" \
      -d "{\"same_path\":true,\"story\":{\"group_id\":\"4f77133f-bb1c-4799-a54d-b6217107247f\"},\"target_dimension\":531452775}"
    ```
    
-   JS
    
    ```javascript
    // storyblok-js-client@>=7, node@>=18
    import Storyblok from "storyblok-js-client";
    
    const storyblok = new Storyblok({
      oauthToken: "YOUR_PERSONAL_ACCESS_TOKEN",
    });
    
    try {
      const response = await storyblok.put('spaces/288868932106293/stories/531458099/duplicate', {
        "same_path": true,
        "story": {
          "group_id": "4f77133f-bb1c-4799-a54d-b6217107247f"
        },
        "target_dimension": 531452775
      })
      console.log({ response })
    } catch (error) {
      console.log(error)
    }
    ```
    
-   PHP
    
    ```php
    $client = new \Storyblok\ManagementClient('YOUR_OAUTH_TOKEN');
    
    $payload = ["same_path" => true,"story" => ["group_id" => "4f77133f-bb1c-4799-a54d-b6217107247f"],"target_dimension" => 531452775];
    
    $client->put('spaces/288868932106293/stories/531458099/duplicate', $payload)->getBody();
    ```
    
-   Java
    
    ```java
    HttpResponse<String> response = Unirest.put("https://mapi.storyblok.com/v1/spaces/288868932106293/stories/531458099/duplicate")
      .header("Content-Type", "application/json")
      .header("Authorization", "YOUR_OAUTH_TOKEN")
      .body({"same_path":true,"story":{"group_id":"4f77133f-bb1c-4799-a54d-b6217107247f"},"target_dimension":531452775})
      .asString();
    ```
    
-   C#
    
    ```csharp
    var client = new RestClient("https://mapi.storyblok.com/v1/spaces/288868932106293/stories/531458099/duplicate");
    var request = new RestRequest(Method.PUT);
    
    request.AddHeader("Content-Type", "application/json");
    request.AddHeader("Authorization", "YOUR_OAUTH_TOKEN");
    request.AddParameter("application/json", "{\"same_path\":true,\"story\":{\"group_id\":\"4f77133f-bb1c-4799-a54d-b6217107247f\"},\"target_dimension\":531452775}", ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    ```
    
-   Python
    
    ```python
    import requests
    
    url = "https://mapi.storyblok.com/v1/spaces/288868932106293/stories/531458099/duplicate"
    
    querystring = {}
    
    payload = {"same_path":true,"story":{"group_id":"4f77133f-bb1c-4799-a54d-b6217107247f"},"target_dimension":531452775}
    headers = {
      'Content-Type': "application/json",
      'Authorization': "YOUR_OAUTH_TOKEN"
    }
    
    response = requests.request("PUT", url, data=payload, headers=headers, params=querystring)
    
    print(response.text)
    ```
    
-   Ruby
    
    ```ruby
    require 'storyblok'
    client = Storyblok::Client.new(oauth_token: 'YOUR_OAUTH_TOKEN')
    
    payload = {"same_path" => true,"story" => {"group_id" => "4f77133f-bb1c-4799-a54d-b6217107247f"},"target_dimension" => 531452775}
    
    client.put('spaces/288868932106293/stories/531458099/duplicate', payload)
    ```
    
-   Swift
    
    ```swift
    let storyblok = URLSession(storyblok: .mapi(accessToken: .oauth("YOUR_OAUTH_TOKEN")))
    var request = URLRequest(storyblok: storyblok, path: "spaces/288868932106293/stories/531458099/duplicate")
    request.httpMethod = "PUT"
    request.httpBody = try JSONSerialization.data(withJSONObject: [
        "same_path": true,
        "story": [
            "group_id": "4f77133f-bb1c-4799-a54d-b6217107247f",
        ],
        "target_dimension": 531452775,
    ])
    let (data, _) = try await storyblok.data(for: request)
    print(try JSONSerialization.jsonObject(with: data))
    ```
    
-   Kotlin
    
    ```kotlin
    val client = HttpClient {
        install(Storyblok(MAPI)) {
            accessToken = OAuth("YOUR_OAUTH_TOKEN")
        }
    }
    
    val response = client.put("spaces/288868932106293/stories/531458099/duplicate") {
        setBody(buildJsonObject {
            put("same_path", true)
            putJsonObject("story") {
                put("group_id", "4f77133f-bb1c-4799-a54d-b6217107247f")
            }
            put("target_dimension", 531452775)
        })
    }
    
    println(response.body<JsonElement>())
    ```

## Pagination

-   [Previous: Create and Manage Folders](/docs/api/management/stories/create-and-manage-folders)
-   [Next: Update a Story](/docs/api/management/stories/update-a-story)
