{
  "openapi": "3.1.0",
  "info": {
    "title": "sites",
    "version": "1.1"
  },
  "servers": [
    {
      "url": "https://api.aimtell.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "X-Authorization-Api-Key",
        "in": "header",
        "x-default": ""
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/prod/sites/": {
      "post": {
        "summary": "Add Website",
        "description": "Add a Website to Account",
        "operationId": "add-website",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url",
                  "name"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Website URL"
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of Website"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "message": "Added website https://example.com succesfully.",
                      "id": 123
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #139."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Websites"
        ]
      },
      "get": {
        "summary": "Get All Websites",
        "description": "Grabs all active websites for account.",
        "operationId": "get-all-websites",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results to return per page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Number of results to skip for pagination (offset).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "load",
            "in": "query",
            "description": "Load Additional Information (i.e. subscriber_count)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": [
                      {
                        "id": 123,
                        "uid": "exampleUid",
                        "url": "https://example.com",
                        "name": "Example Site",
                        "icon": "https://cdn.aimtell.io/example/icon.jpg",
                        "promptId": 0,
                        "webPushID": null,
                        "auto_prompt": 1,
                        "createdAt": "2024-01-01 00:00:00",
                        "active": 1
                      },
                      {
                        "id": 456,
                        "uid": "exampleUid",
                        "url": "https://example.com",
                        "name": "Example Site",
                        "icon": "https://cdn.aimtell.io/example/icon.jpg",
                        "promptId": 200,
                        "webPushID": "web.example.aimtell.com",
                        "auto_prompt": 1,
                        "createdAt": "2024-01-01 00:00:00",
                        "active": 1
                      },
                      {
                        "id": 789,
                        "uid": "exampleUid",
                        "url": "https://example.com",
                        "name": "Example Site",
                        "icon": "https://cdn.aimtell.io/example/icon.jpg",
                        "promptId": null,
                        "webPushID": "web.example.aimtell.com",
                        "auto_prompt": 1,
                        "createdAt": "2024-01-01 00:00:00",
                        "active": 1
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Websites"
        ]
      }
    },
    "/prod/site/{id}": {
      "get": {
        "summary": "Get Website",
        "description": "Returns information about a website",
        "operationId": "api-get-website",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "id": 123,
                      "uid": "exampleUid",
                      "url": "https://example.com",
                      "name": "Example Site",
                      "icon": "https://cdn.aimtell.io/example/icon.jpg",
                      "promptId": 456,
                      "webPushID": "web.example.aimtell.com",
                      "auto_prompt": 1,
                      "createdAt": "2024-01-01 00:00:00",
                      "active": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Websites"
        ]
      },
      "put": {
        "summary": "Update Website Details",
        "description": "Update a Website's Name or Icon",
        "operationId": "update-website",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Website Name"
                  },
                  "icon": {
                    "type": "string",
                    "description": "URL of Website Icon",
                    "default": ""
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "message": "Updated website succesfully.",
                      "id": "1"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #136."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Please specify a valid auth_token."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Websites"
        ]
      },
      "delete": {
        "summary": "Delete Website",
        "description": "Delete a specific Website.",
        "operationId": "delete-website",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "message": "Successfully de-activated website.",
                      "id": "123"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Please specify a valid auth_token."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Websites"
        ]
      }
    },
    "/prod/site/{idSite}/permitted": {
      "get": {
        "summary": "Get Website Permissions",
        "description": "Returns a list of users that have access to a site",
        "operationId": "api-get-website-permissions",
        "parameters": [
          {
            "name": "idSite",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": [
                      {
                        "uid": "exampleUid",
                        "first_name": "Example",
                        "last_name": "User",
                        "username": "user@example.com",
                        "owner": true
                      },
                      {
                        "uid": "exampleUid2",
                        "first_name": "Example",
                        "last_name": "User",
                        "username": "user2@example.com"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Permissions"
        ]
      },
      "post": {
        "summary": "Grant Website Permissions",
        "description": "Grants access to a site to a registered user by email address",
        "operationId": "api-grant-website-permissions",
        "parameters": [
          {
            "name": "idSite",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "description": "email address of registered user"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "message": "Added user exampleUid succesfully.",
                      "id": 123
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "No user found.",
                      "error_logged": true,
                      "error_code": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Permissions"
        ]
      },
      "delete": {
        "summary": "Remove Website Permissions",
        "description": "Removes access to a site to a registered user by uid",
        "operationId": "api-remove-website-permissions",
        "parameters": [
          {
            "name": "idSite",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uid": {
                    "type": "string",
                    "description": "uid of user"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "message": "Removed user exampleUid succesfully."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Permissions"
        ]
      }
    },
    "/prod/site/{id}/settings": {
      "get": {
        "summary": "Get Website Settings",
        "description": "Get a Website's Tracking Settings",
        "operationId": "api-get-website-settings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "message": "Updated site settings"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #136."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Please specify a valid auth_token."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Settings"
        ]
      },
      "post": {
        "summary": "Update Website Settings",
        "description": "Update a Website's Tracking Settings",
        "operationId": "update-website-settings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "collect_ip",
                  "collect_ip_as_attribute",
                  "collect_suburl",
                  "collect_ua_as_attribute",
                  "track_clicks_as_events",
                  "track_subscribe_as_event",
                  "retention_length",
                  "frequency_cap"
                ],
                "properties": {
                  "collect_ip": {
                    "type": "integer",
                    "description": "Allow collection of IP Address (0 = false, 1 = true)",
                    "default": 1
                  },
                  "collect_ip_as_attribute": {
                    "type": "integer",
                    "description": "Automatically track IP address as a custom attribute  (0 = false, 1 = true)",
                    "default": 0
                  },
                  "collect_suburl": {
                    "type": "integer",
                    "description": "Automatically track subscription URL as custom attribute  (0 = false, 1 = true)",
                    "default": 0
                  },
                  "collect_ua_as_attribute": {
                    "type": "integer",
                    "description": "Automatically track User Agent as custom attribute  (0 = false, 1 = true)",
                    "default": 1
                  },
                  "track_clicks_as_events": {
                    "type": "integer",
                    "description": "Automatically track notification clicks as custom events.  (0 = false, 1 = true)",
                    "default": 0
                  },
                  "track_subscribe_as_event": {
                    "type": "integer",
                    "description": "Automatically track subscriptions as custom events.  (0 = false, 1 = true)",
                    "default": 0
                  },
                  "retention_length": {
                    "type": "integer",
                    "description": "Number of days to keep data for deleted subscribers",
                    "default": "30"
                  },
                  "frequency_cap": {
                    "type": "integer",
                    "description": "Max number of notifications a subscriber can receive per day",
                    "default": 15
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "message": "Updated site settings"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #136."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Please specify a valid auth_token."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Settings"
        ]
      }
    },
    "/prod/site/code/{id}": {
      "get": {
        "summary": "Get Website Code",
        "description": "Returns Aimtell push & website tracking code.",
        "operationId": "get-website-code",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "url": "example.com",
                      "value": "<!-- start aimtell tracking code --> <script type='text/javascript'>var _at = {};_at.domain = 'example.com';_at.owner = 'exampleUid';_at.idSite = '123';_at.attributes = {};  (function() {var u='//api.aimtell.com/prod/';var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'trackpush.min.js'; s.parentNode.insertBefore(g,s);})();</script><!-- end aimtell tracking code -->",
                      "idSite": 123,
                      "uid": "exampleUid"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Invalid token.",
                      "error_code": 71831
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Settings"
        ]
      }
    },
    "/prod/site/{id}/keys": {
      "get": {
        "summary": "Get Website Keys",
        "description": "Gets a Website's VAPID or FCM Keys\n\nKeys that are marked \"is_primary\" are the ones that will be currently used on the site for new subscribers.\n\nIf the results are empty, this means you are using legacy Aimtell keys. We advise you to generate your own VAPID keys within the dashboard.",
        "operationId": "api-get-website-keys",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": [
                      {
                        "id": 123,
                        "id_site": 456,
                        "type": "vapid",
                        "pub": "exampleVapidPublicKey",
                        "priv": "exampleVapidPrivateKey",
                        "is_primary": 1,
                        "active": 1,
                        "created_at": "2024-01-01 00:00:00",
                        "updated_at": "2024-01-01 00:00:00"
                      },
                      {
                        "id": 124,
                        "id_site": 456,
                        "type": "vapid",
                        "pub": "exampleVapidPublicKey2",
                        "priv": "exampleVapidPrivateKey2",
                        "is_primary": 0,
                        "active": 1,
                        "created_at": "2024-01-01 00:00:00",
                        "updated_at": "2024-01-01 00:00:00"
                      },
                      {
                        "id": 125,
                        "id_site": 456,
                        "type": "gcm",
                        "pub": "exampleGcmPublicKey",
                        "priv": "exampleGcmPrivateKey",
                        "is_primary": 0,
                        "active": 1,
                        "created_at": "2024-01-01 00:00:00",
                        "updated_at": "2024-01-01 00:00:00"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #136."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Please specify a valid auth_token."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Settings"
        ]
      }
    },
    "/prod/site/{id}/keys/upsert": {
      "post": {
        "summary": "Upsert Website Keys",
        "description": "Update a Website's VAPID or FCM Keys\n\nNote: this can directly impact your optin rate and/or push delivery. Only update these if you know what you are doing.",
        "operationId": "api-upsert-website-keys",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "pub",
                  "priv",
                  "primary",
                  "type"
                ],
                "properties": {
                  "pub": {
                    "type": "string",
                    "description": "Public ID (either VAPID ID or FCM ID)"
                  },
                  "priv": {
                    "type": "string",
                    "description": "Private key attached to the public id"
                  },
                  "primary": {
                    "type": "string",
                    "description": "1 = primary, 0 = regular"
                  },
                  "type": {
                    "type": "string",
                    "description": "Must use either \"gcm\" or \"vapid\" (without quotes)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "success",
                      "message": "Website Key added/updated successfully"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #136."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Please specify a valid auth_token."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Settings"
        ]
      }
    },
    "/prod/site/variables/{id}": {
      "get": {
        "summary": "Get Website Custom Variables",
        "description": "Gets a Website's Custom Variables",
        "operationId": "api-get-website-custom-variables",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": [
                      {
                        "id": 123,
                        "id_site": 456,
                        "name": "site_identifier",
                        "value": "example_value",
                        "created_at": "2024-01-01 00:00:00",
                        "updated_at": "2024-01-01 00:00:00",
                        "snippet": "{custom_variable:site_identifier}"
                      },
                      {
                        "id": 124,
                        "id_site": 456,
                        "name": "domain",
                        "value": "example.com",
                        "created_at": "2024-01-01 00:00:00",
                        "updated_at": "2024-01-01 00:00:00",
                        "snippet": "{custom_variable:domain}"
                      },
                      {
                        "id": 125,
                        "id_site": 456,
                        "name": "source",
                        "value": "example_source",
                        "created_at": "2024-01-01 00:00:00",
                        "updated_at": "2024-01-01 00:00:00",
                        "snippet": "{custom_variable:source}"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #136."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Please specify a valid auth_token."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Settings"
        ]
      },
      "post": {
        "summary": "Upsert Website Custom Variable",
        "description": "Creates or Updates a Custom Variable for a Website",
        "operationId": "api-creat-website-custom-variable",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "value"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name of Custom Variable"
                  },
                  "value": {
                    "type": "string",
                    "description": "Value of Custom Variable"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": true
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #136."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Please specify a valid auth_token."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Settings"
        ]
      },
      "delete": {
        "summary": "Delete Website Custom Variable",
        "description": "Deletes a Custom Variable for a Website by Name",
        "operationId": "api-delete-website-custom-variable",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Site ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name of Custom Variable"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": true
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Error #136."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": {
                      "result": "error",
                      "message": "Please specify a valid auth_token."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Settings"
        ]
      }
    }
  }
}