---
title: Multi Switch
slug: multi-switch
docTags: 
createdAt: 2021-07-26T08:55:33.000Z
---

Switches the reponse based on the input provided. e.g if you are looking for a convert all reponses to a standardized output. The multi switch performs multiple switch operations at the same time





### API Definition

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://orca.pathfix.com/functions/text/multiswitch",
  "name": "MultiSwitch API",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "pzVSyji09iHeqPtALONoY",
        "code": "{\n\t\"output\": {\n\t\t\"lead source\": \"fb\",\n\t\t\"product interest\": \"oauth-sso\"\n\t}\n}",
        "language": "200"
      },
      {
        "id": "JAE2HuVSsON2Qkj3GHQxB",
        "code": "{\n    \"message\": \"error\"\n}",
        "language": "404"
      }
    ],
    "selectedLanguageId": "pzVSyji09iHeqPtALONoY"
  },
  "examples": {
    "languages": [
      {
        "id": "mKhhBPyPymue9piokQmlX",
        "code": "{\r\n\t\"switches\": {\r\n\t\t\"lead source\": {\r\n\t\t\t\"input\": \"Facebook\",\r\n\t\t\t\"switch\": {\r\n\t\t\t\t\"Facebook\": \"fb\",\r\n\t\t\t\t\"fbook\": \"fb\",\r\n\t\t\t\t\"facebook\": \"fb\",\r\n\t\t\t\t\"facebk\": \"fb\",\r\n\t\t\t\t\"linkedIn\": \"li\",\r\n\t\t\t\t\"LinkedIn\": \"li\",\r\n\t\t\t\t\"LinkIn\": \"li\"\r\n\t\t\t}\r\n\t\t},\r\n\t\t\"product interest\": {\r\n\t\t\t\"input\": \"authentication\",\r\n\t\t\t\"switch\": {\r\n\t\t\t\t\"oauth\": \"oauth-data\",\r\n\t\t\t\t\"authentication\": \"oauth-sso\",\r\n\t\t\t\t\"auth\": \"oauth-sso\",\r\n\t\t\t\t\"automation\": \"atmn\",\r\n\t\t\t\t\"webhooks\": \"atmn\"\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "mKhhBPyPymue9piokQmlX"
  },
  "description": "Call the following API to switch multiple responses with a standard output",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::






