---
title: Create a conversation
slug: v2-api-docs/create-a-conversation
createdAt: 2025-08-17T10:42:17.583Z
---

### Session Creation

To create an assistant conversation session, make the following API call:

:::ApiMethodV2
```json
{
  "name": "Create conversation",
  "method": "POST",
  "url": "https://api.autoscriber.com/v1/assistant",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "IfCrk1n4qMCqKoXrFJzkF",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"id\": \"String\"\n});\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.cakes.com\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "IfCrk1n4qMCqKoXrFJzkF"
  },
  "results": {
    "languages": [
      {
        "id": "eLcKuyQdzoccoDpvGBb8x",
        "language": "200",
        "code": "",
        "customLabel": ""
      },
      {
        "id": "4aioToFwoz0p1sjkM0hth",
        "language": "404",
        "code": "",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "4aioToFwoz0p1sjkM0hth"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "api-key",
        "kind": "required",
        "type": "string",
        "description": "Your API key",
        "": "required"
      }
    ],
    "bodyDataParameters": [
      {
        "name": "practitioner_id",
        "kind": "required",
        "type": "string",
        "description": "User_ID",
        "": "required"
      },
      {
        "name": "language",
        "kind": "required",
        "type": "string",
        "description": "Dutch - nl\nEnglish - en\nGerman - de",
        "": "Dutch - nl\nEnglish - en\nGerman - de"
      },
      {
        "name": "organization_id",
        "kind": "optional",
        "type": "string",
        "description": "Optional_org_id",
        "": "optional"
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "hasTryItOut": true,
  "response": [
    {
      "name": "token",
      "kind": "optional",
      "type": "string",
      "description": "This will be your JWT - e.g. \"ey...\"",
      "children": []
    },
    {
      "name": "session_id",
      "kind": "optional",
      "type": "string",
      "description": "This will be the UUID, which is the unique identifier of the session, used in subsequent API calls. "
    }
  ]
}
```
:::

### Session Refresh

After the session has been created, the session can be refreshed by using the below API call:

:::ApiMethodV2
```json
{
  "name": "Get Cakes",
  "method": "GET",
  "url": "https://api.autoscriber.com /v1/assistant/:sessionId",
  "description": "Get a cake by its ID",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "zaYF-IDwTZWazbjRDBRrf",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"id\": \"String\"\n});\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.cakes.com\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "zaYF-IDwTZWazbjRDBRrf"
  },
  "results": {
    "languages": [
      {
        "id": "fr_d9aeyhdSpZrVueGGzm",
        "language": "200",
        "code": "{\n  \"name\": \"Cake's name\",\n}",
        "customLabel": ""
      },
      {
        "id": "yI1C7ih9yYk4SZZmnWbDP",
        "language": "404",
        "code": "{\n  \"message\": \"Ain't no cake like that.\"\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "fr_d9aeyhdSpZrVueGGzm"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "api-key",
        "kind": "required",
        "type": "string",
        "description": "Your API key",
        "": "required"
      }
    ],
    "bodyDataParameters": [
      {
        "name": "sessionId",
        "kind": "required",
        "type": "string",
        "description": "Your Session ID received in response to the initial session creation. ",
        "": "Your Session ID received in response to the initial session creation. "
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "hasTryItOut": true,
  "response": [
    {
      "name": "token",
      "kind": "optional",
      "type": "string",
      "description": "This will be your JWT - e.g. \"ey...\""
    },
    {
      "name": "session_id",
      "kind": "optional",
      "type": "string",
      "description": "This will be the UUID, which is the unique identifier of the session, used in subsequent API calls. ",
      "children": []
    }
  ]
}
```
:::

