Skip to content

Create a variant story by duplicating the original story and mapping the two stories.

POST
https://mapi.storyblok.com/v1/spaces/:space_id/experiments/:experiment_id/variants/:variant_id/story_mappings
  • :space_id required number

    Numeric ID of a space.

  • :experiment_id required number

    Numeric ID of the experiment.

  • :variant_id required number

    Numeric ID of the experiment variant.

  • story_mapping required object

    The story mapping to create.

    Show child properties
    • original_story_id required number

      Numeric ID of the story to duplicate as a variant.

    • variant_story_id number

      Numeric ID of an existing story to link as the variant. When provided, the original story isn’t duplicated.

  • story_mapping object

    The created story mapping.

    Show child properties
    • experiment_variant_id number

      Numeric ID of the variant the mapping belongs to.

    • original_story_id number

      Numeric ID of the original story.

    • variant_story_id number

      Numeric ID of the variant story that replaces the original story when loading the variant.

    • original_slug string

      full_slug of the original story.

    • variant_slug string

      full_slug of the variant story.

    • variant_story object

      The variant story object.

curl "https://mapi.storyblok.com/v1/spaces/288868932106293/experiments/176070002766742/variants/1002/story_mappings" \
-X POST \
-H "Authorization: YOUR_OAUTH_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"story_mapping\":{\"original_story_id\":176024833123843}}"

Was this page helpful?

What went wrong?

This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window) . Terms of Service (opens in a new window) apply.