> For the complete documentation index, see [llms.txt](https://docs.storylane.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.storylane.io/integrations/integrations-and-data-flow/external-api.md).

# External API

Use Storylane’s External API to connect your workspace with internal tools, applications, and automated workflows.

{% hint style="info" %}
The API is available to users on all paid plans. If you need help, contact us at <support@storylane.io>.
{% endhint %}

With the API, you can:

* List published demos and retrieve their details
* Create and manage personalized demo links
* Add passcodes, expiration dates, and other access controls
* Pass personalization tokens and recipient information
* View and disable existing demo links

### Getting started

You can generate and manage API keys directly from your Storylane workspace.

#### Step 1: Generate an API key

<figure><img src="https://2431356420-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN8hWd9k2Pbb6YSWO4pUQ%2Fuploads%2FwDSPj0tagKgPfl3xo9yC%2FScreenshot%202026-08-27%20at%2014.35.34.png?alt=media&amp;token=a79b6f86-cb2e-4119-92a4-497153179b38" alt=""><figcaption></figcaption></figure>

1. Sign in to your Storylane workspace.
2. Go to **Settings → Integrations**.
3. Find **API keys** and click **View key**.
4. Copy the **Workspace ID** displayed in the modal.
5. Click **Generate new key** to create an API key.
6. Give the key a descriptive name, such as `Production automation`, `Analytics sync`, or `Staging`.
7. Copy the generated API key and store it securely.

{% hint style="warning" %}
&#x20;We are not able to access `access_token` again if you lose it. We don’t store it on our side and have no access to it after we send it to you. Therefore, please store it securely.&#x20;
{% endhint %}

We recommend creating a separate API key for each integration or environment. This makes it easier to rotate or revoke access without affecting your other integrations.

#### Step 2: Configure the Postman collection

Open the [Storylane Public Postman Collection](https://www.postman.com/team-storylane/storylane-public/collection/2zkg7jc/storylane-connect?action=share\&creator=17698894).

In the collection variables, replace:

* **`ACCESS_TOKEN`** with the API key you generated in Storylane. It will be used as the Bearer authentication token.
* **`WORKSPACE_ID`** with your Storylane workspace ID, if required by the endpoint.

Then save the updated variables.

#### Step 3: Test the connection

Run the API endpoints in Postman and verify that you are successfully retrieving your company’s demo data.

<figure><img src="https://2431356420-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN8hWd9k2Pbb6YSWO4pUQ%2Fuploads%2FUZHkcRqMjFF5q1wmgHMD%2Fimage.png?alt=media&amp;token=b1e7f1e8-e1dd-4c94-979e-b615ba8aa463" alt="" width="375"><figcaption></figcaption></figure>

Here is an interactive demo demonstrating how to set up using Postman 👇

{% @storylane/embed subdomain="app" linkValue="jkzyb2hwbamc" url="<https://app.storylane.io/share/jkzyb2hwbamc>" %}

A successful response will return data from your Storylane workspace. If the request fails, verify that:

* The API key was copied correctly
* The key is active
* The request uses Bearer authentication
* The workspace ID is correct, where required
* Your workspace has access to the External API

### Managing API keys

You can return to **Settings → Integrations → API keys** at any time to view active keys or revoke keys that are no longer needed.

To rotate a key safely:

1. Generate a new API key.
2. Update your integration to use the new key.
3. Confirm that the integration is working.
4. Revoke the old key.

If you believe a key has been exposed, generate a replacement and revoke the affected key immediately.

### **API Responses**

**1. All Published Demos**\
Use the endpoint to list all published demos in your workspace. A sample response:

```json
{
    "demos": [
         {
            "id": "4553c46a-43c7-41fd-8101-57904egeskw7a",
            "convert_cta": {
                "text": "Talk to Sales",
                "url": "https://storylane-security-review.my.salesforce-setup.com",
                "enabled": false
            },
            "created_at": "2026-01-22T11:26:14.732-12:00",
            "edited_at": "2026-01-22T12:35:55.589-12:00",
            "folder": null,
            "kind": "image",
            "links_count": 1,
            "name": "DemoHub x Salesforce",
            "published_at": "2026-01-22T12:35:55.589-12:00",
            "status": "published",
            "team_id": "d48e4b56-61f4-402e-abf4-219c85dd00ba",
            "user": {
                "id": "5b094482-be80-4b25-bd5f-7458efda2f0a",
                "email": "renee@storylane.io",
                "first_name": "Renee",
                "last_name": "Scrybalo"
            }
        },
        {
            "id": "fd81ad9a-aa56-478a-84b9-e81e9cbe782fa",
            "convert_cta": {
                "text": "Book a Demo",
                "url": "",
                "enabled": false
            },
            "created_at": "2026-01-22T09:43:28.796-12:00",
            "edited_at": "2026-01-22T09:48:22.218-12:00",
            "folder": null,
            "kind": "html",
            "links_count": 1,
            "name": "HubSpot + Storylane | Jan 22 4:43 PM",
            "published_at": "2026-01-22T09:46:02.522-12:00",
            "status": "amended",
            "team_id": "d48e4b56-61f4-402e-abf4-219c85dd00ba",
            "user": {
                "id": "5b094482-be80-4b25-bd5f-7458efda2f0a",
                "email": "renee@storylane.io",
                "first_name": "Renee",
                "last_name": "Scrybalo"
            }
        },
        ...
    ]
}
```

***

**2. Get Details on a Single Demo**\
Use the endpoint to fetch detailed information about a specific demo. A sample response:

```json
{
    "demo": {
        "id": "4553c46a-43c7-41fd-8101-57904ed6dad9",
        "chapter_menu": null,
        "chapters": [
            {
                "id": "5386c880-d642-4a4e-8929-4c3ed370731e",
                "name": "Default",
                "steps": [
                    {
                        "id": "0decf650-6627-442e-864e-194b5452b45c",
                        "audio_url": "",
                        "content": "<h2 style=\"text-align: center\"><strong>Sync Buyer Hub Properties now in Salesforce!</strong></h2><p style=\"text-align: center\">Learn how to integrate our new Demo Hub data with your Salesforce leads for deeper insights and more effective prospect tracking</p>",
                        "cta": "begin!",
                        "kind": "popup",
                        "secondary": null,
                        "transcription": null
                    },
                    {
                        "id": "0dbde31a-fd5f-4bee-afac-71670f623c5e",
                        "audio_url": "",
                        "content": "",
                        "cta": null,
                        "kind": "hotspot",
                        "secondary": null,
                        "transcription": null
                    }
                ]
            }
        ],
        "convert_cta": {
            "text": "Talk to Sales",
            "url": "https://storylane-security-review.my.salesforce-setup.com",
            "enabled": false
        },
        "created_at": "2026-01-22T11:26:14.732-12:00",
        "edited_at": "2026-01-22T12:35:55.589-12:00",
        "folder": null,
        "kind": "image",
        "links_count": 1,
        "name": "DemoHub x Salesforce",
        "published_at": "2026-01-22T12:35:55.589-12:00",
        "status": "published",
        "team": {
            "id": "d48e4b56-61f4-402e-abf4-219c85dd00b5",
            "name": "Renee S Team (:"
        },
        "user": {
            "id": "5b094482-be80-4b25-bd5f-7458efda2f0f",
            "email": "renee@storylane.io",
            "first_name": "Renee",
            "last_name": "Scrybalo"
        }
    }
}
```

***

**3. List Demo Links**\
Returns a response containing all links associated with a specific demo. A sample:

```json
{
    "links": [
        {
            "id": "e92cab1c-ccb1-46da-92dc-0c796859d4e3",
            "created_at": "2026-01-22T12:35:43.061-12:00",
            "default_link": true,
            "email_confirmation_required": false,
            "email_required": false,
            "expires_at": null,
            "name": "Default",
            "passcode": null,
            "recipient_email": null,
            "tokens": [],
            "updated_at": "2026-01-22T12:35:43.061-12:00",
            "url": "https://renee.storylane.io/share/g0gtnfqh9n1e",
            "user": {
                "id": "5b094482-be80-4b25-bd5f-7458efda2f0f",
                "email": "renee@storylane.io",
                "first_name": "Renee",
                "last_name": "Scrybalo"
            },
            "whitelist_email_domains": []
        }
    ]
}
```

***

**4. Create a New Demo Link**\
A sample response for getting the details of newly created demo links:

```json
{
    "link": {
        "id": "b8e449e5-979f-442f-a75d-68ae8b446f5c",
        "created_at": "2026-01-23T04:19:05.392-12:00",
        "default_link": false,
        "email_confirmation_required": false,
        "email_required": false,
        "expires_at": null,
        "name": "Zuzi",
        "passcode": null,
        "recipient_email": null,
        "tokens": [],
        "updated_at": "2026-01-23T04:19:05.392-12:00",
        "url": "https://renee.storylane.io/share/cm6la2wsqtwp",
        "user": {
            "id": "5b094482-be80-4b25-bd5f-7458efda2f0f",
            "email": "renee@storylane.io",
            "first_name": "Renee",
            "last_name": "Scrybalo"
        },
        "whitelist_email_domains": []
    }
}
```

***

**5. Update an Existing Demo Link**\
Returns a response with updated details of an existing demo link:

```json
{
    "link": {
        "id": "b8e449e5-979f-442f-a75d-68ae8b446f5a",
        "created_at": "2026-01-23T04:19:05.392-12:00",
        "default_link": false,
        "email_confirmation_required": false,
        "email_required": false,
        "expires_at": null,
        "name": "Zuzi",
        "passcode": null,
        "recipient_email": null,
        "tokens": [],
        "updated_at": "2026-01-23T04:19:05.392-12:00",
        "url": "https://renee.storylane.io/share/cm6la2wsqtwp",
        "user": {
            "id": "5b094482-be80-4b25-bd5f-7458efda2f0a",
            "email": "renee@storylane.io",
            "first_name": "Renee",
            "last_name": "Scrybalo"
        },
        "whitelist_email_domains": []
    }
}
```

### Additional Notes

* Ensure API tokens are stored securely and not shared publicly.

For further assistance, please contact <support@storylane.io>.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.storylane.io/integrations/integrations-and-data-flow/external-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
