---
title: Import a Story (XML)
description: Import a story from an XML payload.
url: https://storyblok.com/docs/api/management/stories/import-a-story-xml
---

# Import a Story (XML)

PUT

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

Imports content onto an existing story from an XML payload that has been exported from the [Export a Story (XML)](/docs/api/management/stories/export-a-story-xml) endpoint.

> [!NOTE]
> This endpoint is used by the [Import](https://www.storyblok.com/apps/import) and [Export](https://www.storyblok.com/apps/export) Translatable Fields apps. Exporting and importing stories is available in premium plans. Please refer to Storyblok’s [pricing](https://www.storyblok.com/pricing) for further information.

## Path parameters

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

## Query parameters

-   `version` (string)
    
    Default: `2`. Possible values: `1`, `2`.
    
    > [!WARNING]
    > Version 1 is deprecated. See [examples](/docs/api/management/stories/examples/export-import-xml-examples) for more information on differences between versions.
    
-   `lang_code` (string)
    
    A language code (required for translation imports)
    
-   `import_lang` (boolean)
    
    Whether to import content for the specified `lang_code`. If `false` or omitted, it will fall back to default language values.
    

## Request body properties

-   `data` (required) (string)
    
    An XML string with the same structure as the one exported from [Export a Story (XML)](/docs/api/management/stories/export-a-story-xml).
    

## Response properties

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

## Examples

[Import a Story as XML Examples](/docs/api/management/stories/examples/export-import-xml-examples) Examples describing different ways to import a story as XML.

## Pagination

-   [Previous: Import a Story (JSON)](/docs/api/management/stories/import-a-story)
-   [Next: Get Story Versions (Legacy)](/docs/api/management/stories/get-story-versions)
