

````json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Cloud Code",
    "version": "1.0",
    "contact": {
      "name": "Team: Banasco"
    },
    "description": "## Overview\n\nThis is the API specification for the Unity Cloud Code service that enables\ngame developers to run custom server-side code for their games.\n\n### Limits\n\nThe combined size of the `POST` request body cannot exceed 1 MB.\n\nThe combined size of the response body cannot exceed 2 MiB.\n\nThe API has rate limiting in place. Request are limited on a per-player\nbasis to 600 requests per minute which would allow for a sustained 10 requests per second.\n\nThe API responds with a `429` HTTP status code if the rate limit is\nexceeded.\n\nIt will also respond with a `Retry-After` header to be used in conjunction with a client's retry logic.\nThe value is the number of seconds until a request for the given player will be accepted.\n\n### Modules\n\nYou can deploy a Cloud Code module with the UGS CLI by using the\n[deploy command], or by using the Cloud Code [admin APIs]. Cloud Code\nmodules are C# projects built either with .NET Core or .NET Framework.\n\nA Cloud Code module can have one or more Cloud Code functions, which are\ndefined with the attribute `CloudCodeFunction`. For example, the\nfollowing code represents a Cloud Code module named `HelloWorld` with a\nfunction named `SayHello`. `SayHello` accepts a single string parameter\ncalled `name`.\n\n```cs\npublic class HelloWorld\n{\n  [CloudCodeFunction(\"SayHello\")]\n  public string SayHello(string name)\n  {\n      return $\"Hello, {name}!\";\n  }\n}\n```\n\n[deploy command]: /guides/ugs-cli/latest/general/base-commands/deploy\n[admin APIs]: /cloud-code-admin\n\n### Scripts\n\nYou can create a Cloud Code script in the [UGS dashboard], or by using the\nCloud Code [admin APIs].\n\n[UGS dashboard]: https://dashboard.unity3d.com/cloud-code\n[admin APIs]: /cloud-code-admin\n\n### Useful Links\n\n- [Cloud Code](https://docs.unity.com/cloud-code/)\n"
  },
  "tags": [
    {
      "name": "Cloud Code",
      "description": "Cloud Code runtime APIs. Refer to the [Cloud Code](https://docs.unity.com/cloud-code/) documentation to set up and use Cloud Code."
    }
  ],
  "servers": [
    {
      "url": "https://cloud-code.services.api.unity.com/v1"
    }
  ],
  "security": [
    {
      "Client": []
    },
    {
      "ServiceAccount": []
    }
  ],
  "paths": {
    "/projects/{projectId}/scripts/{scriptId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/ScriptId"
        }
      ],
      "post": {
        "summary": "Run script",
        "operationId": "runScript",
        "tags": [
          "Cloud Code"
        ],
        "description": "Run a Cloud Code script for a project.",
        "requestBody": {
          "description": "A JSON object containing the script run arguments.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunScriptArguments"
              },
              "examples": {
                "Script without params": {
                  "value": {
                    "params": {}
                  }
                },
                "Script with params": {
                  "value": {
                    "params": {
                      "numericParam": 123,
                      "stringParam": "abcdef",
                      "booleanParam": true,
                      "jsonParam": {
                        "key": "value"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunScriptResponse"
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "output": {
                        "playerInfo": {
                          "playerID": "TestUser",
                          "userName": "TestUserName",
                          "displayName": "Name",
                          "email": "test@test.com",
                          "country": null,
                          "deviceType": null,
                          "platform": "IOS",
                          "dateCreated": "string"
                        }
                      }
                    }
                  },
                  "example-2": {
                    "value": {
                      "output": {
                        "playerID": "TestUser",
                        "userName": "TestUserName",
                        "displayName": "Name",
                        "email": "test@test.com"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/GatewayTimeout"
          }
        }
      }
    },
    "/projects/{projectId}/modules/{moduleId}/{functionId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        },
        {
          "$ref": "#/components/parameters/ModuleId"
        },
        {
          "$ref": "#/components/parameters/FunctionId"
        }
      ],
      "post": {
        "summary": "Run module function",
        "operationId": "runModule",
        "tags": [
          "Cloud Code"
        ],
        "description": "Run a Cloud Code function from a module for a project.",
        "requestBody": {
          "description": "A JSON object containing the parameters to pass to the function.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunModuleArguments"
              },
              "examples": {
                "Function with parameters": {
                  "value": {
                    "params": {
                      "numericParam": 123,
                      "stringParam": "abcdef",
                      "booleanParam": true,
                      "jsonParam": {
                        "key": "value"
                      }
                    }
                  }
                },
                "Function without parameters": {
                  "value": {
                    "params": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunModuleResponse"
                },
                "examples": {
                  "Function with boolean output": {
                    "value": {
                      "output": true
                    }
                  },
                  "Function with integer output": {
                    "value": {
                      "output": 123
                    }
                  },
                  "Function with string output": {
                    "value": {
                      "output": "result from script"
                    }
                  },
                  "Function with no output": {
                    "value": {
                      "output": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/RunModuleBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/GatewayTimeout"
          }
        }
      }
    },
    "/projects/{projectId}/subscriptions/tokens/player": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        }
      ],
      "post": {
        "summary": "Create a player subscription token",
        "operationId": "subscriptionTokenPlayer",
        "tags": [
          "Cloud Code"
        ],
        "description": "Create a subscription token for player messages.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionTokenResponse"
                },
                "examples": {
                  "Example subscription token": {
                    "value": {
                      "channel": "$cloud-code!!!player-YL9Ia3mKqq0s620EsWhcc3PW2U3D!!!fc1099a0-a0af-44fe-9c0c-b4b068a090cc!!!b90c4336-189e-494f-82e6-ca4c774cbaec",
                      "token": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImNsb3VkLWNvZGU6YWY2ZjlmMzItMGEwMy00MjM5LWI4MTQtOWZhZGZmYmU1NjA5IiwidHlwIjoiSldUIn0.eyJlbnZpcm9ubWVudE..."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/GatewayTimeout"
          }
        }
      }
    },
    "/projects/{projectId}/subscriptions/tokens/project": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        }
      ],
      "post": {
        "summary": "Create a project subscription token",
        "operationId": "subscriptionTokenProject",
        "tags": [
          "Cloud Code"
        ],
        "description": "Create a subscription token for project messages.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionTokenResponse"
                },
                "examples": {
                  "Example subscription token": {
                    "value": {
                      "channel": "$cloud-code!!!project!!!fc1099a0-a0af-44fe-9c0c-b4b068a090cc!!!b90c4336-189e-494f-82e6-ca4c774cbaec",
                      "token": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImNsb3VkLWNvZGU6YWY2ZjlmMzItMGEwMy00MjM5LWI4MTQtOWZhZGZmYmU1NjA5IiwidHlwIjoiSldUIn0.eyJlbnZpcm9ubWVudE..."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/GatewayTimeout"
          }
        }
      }
    },
    "/projects/{projectId}/warm": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ProjectId"
        }
      ],
      "post": {
        "summary": "Ready invokers",
        "operationId": "warmInvoker",
        "tags": [
          "Cloud Code"
        ],
        "description": "Run a warm-up operation to ready the invokers for the project so the first module call is not delayed by provisioning.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/GatewayTimeout"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "Client": {
        "type": "http",
        "scheme": "bearer",
        "description": "To get started with Authentication, see [Client Authentication].\n\n[Client Authentication]: https://services.docs.unity.com/docs/client-auth"
      },
      "ServiceAccount": {
        "type": "http",
        "scheme": "bearer",
        "description": "To get started with Authentication, please visit the\n[Service Account Authentication section](https://services.docs.unity.com/docs/service-account-auth).\nWhen using a Service Account, these APIs require exchanging Service Account credentials for\nan access token, please see the section about the\n[Token Exchange API](https://services.docs.unity.com/docs/service-account-auth/index.html#extra-step-use-the-token-exchange-api)."
      }
    },
    "parameters": {
      "ProjectId": {
        "name": "projectId",
        "in": "path",
        "description": "ID of the project.",
        "required": true,
        "schema": {
          "type": "string"
        },
        "example": "8bdacc33-6eef-4577-beb0-633c86259f5b"
      },
      "ScriptId": {
        "name": "scriptId",
        "in": "path",
        "description": "Name of the script.",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/ScriptId"
        }
      },
      "ModuleId": {
        "name": "moduleId",
        "in": "path",
        "description": "Name of the Cloud Code module.",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/ModuleId"
        }
      },
      "FunctionId": {
        "name": "functionId",
        "in": "path",
        "description": "Name of the function to invoke from the given module.",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/FunctionId"
        }
      }
    },
    "schemas": {
      "ScriptId": {
        "title": "Script name",
        "type": "string",
        "pattern": "^[a-zA-Z0-9-_]+$",
        "minLength": 1,
        "maxLength": 50,
        "description": "Name of the script."
      },
      "ModuleId": {
        "title": "Module name",
        "type": "string",
        "pattern": "^[a-zA-Z0-9_]*$",
        "minLength": 1,
        "maxLength": 50,
        "description": "Name of the Cloud Code module."
      },
      "FunctionId": {
        "title": "Module function name",
        "type": "string",
        "minLength": 1,
        "description": "Name of the function to invoke from the given module."
      },
      "RequestId": {
        "title": "Request ID",
        "description": "An identifier Unity uses internally to investigate what happened to\na particular request that went through the Unity Services or Game API\nGateway.\n"
      },
      "RunScriptArguments": {
        "title": "Run script arguments",
        "type": "object",
        "properties": {
          "params": {
            "type": "object",
            "description": "Object containing key-value pairs that map on to the parameter\ndefinitions for the script. Parameters are required according to\nthe definition.\n"
          }
        },
        "required": [
          "params"
        ]
      },
      "RunModuleArguments": {
        "title": "Run module arguments",
        "type": "object",
        "properties": {
          "params": {
            "type": "object",
            "description": "Object containing key-value pairs that map on to the parameter\ndefinitions for the given function of a module. Parameters are\nrequired according to the arguments defined in the function\nsignature.\n"
          }
        },
        "required": [
          "params"
        ]
      },
      "RunScriptResponse": {
        "title": "Run script response",
        "type": "object",
        "properties": {
          "output": {}
        }
      },
      "RunModuleResponse": {
        "title": "Run module response",
        "type": "object",
        "properties": {
          "output": {}
        },
        "required": [
          "output"
        ]
      },
      "SubscriptionTokenResponse": {
        "title": "Subscription token response",
        "type": "object",
        "properties": {
          "channel": {
            "type": "string",
            "description": "The subscription channel that the token was generated for."
          },
          "token": {
            "type": "string",
            "description": "The authentication token to be used when subscribing to a channel."
          }
        }
      },
      "BasicErrorResponse": {
        "title": "Basic error response",
        "description": "Referenced from - https://tools.ietf.org/html/rfc7807#page-3",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "A URI reference [RFC3986] that identifies the problem type. This\nspecification encourages that, when dereferenced, it provide\nhuman-readable documentation for the problem type (e.g., using HTML\n[W3C.REC-html5-20141028]). When this member is not present, its\nvalue is assumed to be \"about:blank\".\n\n[RFC3986]: https://www.rfc-editor.org/rfc/rfc3986\n[W3C.REC-html5-20141028]: https://www.rfc-editor.org/rfc/rfc7807#ref-W3C.REC-html5-20141028\n"
          },
          "title": {
            "type": "string",
            "description": "A short, human-readable summary of the problem type. It SHOULD NOT\nchange from occurrence to occurrence of the problem, except for\npurposes of localization (e.g., using proactive content negotiation;\nsee [RFC7231, Section 3.4]).\n\n[RFC7231, Section 3.4]: https://www.rfc-editor.org/rfc/rfc7231#section-3.4\n"
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status code ([RFC7231, Section 6]) generated by the origin\nserver for this occurrence of the problem.\n\n[RFC7231, Section 6]: https://www.rfc-editor.org/rfc/rfc7231#section-6\n"
          },
          "requestId": {
            "$ref": "#/components/schemas/RequestId"
          },
          "code": {
            "description": "Service specific error code",
            "type": "integer"
          },
          "detail": {
            "type": "string",
            "description": "A human-readable explanation specific to this occurrence of the problem."
          },
          "instance": {
            "type": "string",
            "nullable": true,
            "description": "A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced."
          },
          "details": {
            "type": "array",
            "description": "Machine readable service specific errors.",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "ValidationErrorResponse": {
        "title": "ValidationErrorResponse",
        "type": "object",
        "description": "Validation error response when a value provided from the client does notpass validation on server.",
        "example": {
          "type": "problems/validation",
          "title": "Validation error",
          "status": 400,
          "detail": "See 'errors' for specific validation errors",
          "instance": "null",
          "code": 1004,
          "errors": [
            {
              "field": "string",
              "messages": [
                "parameter is required"
              ]
            }
          ]
        },
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "code": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "instance": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationErrorBody"
            }
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "code",
          "detail",
          "errors"
        ]
      },
      "ValidationErrorBody": {
        "title": "ValidationErrorBody",
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "field",
          "messages"
        ],
        "description": "Single error in the validation error response."
      },
      "InvocationErrorResponse": {
        "title": "InvocationErrorResponse",
        "description": "An invocation error from the execution backend. Describes the error and provides a stack trace.",
        "type": "object",
        "example": {
          "type": "problems/invocation",
          "title": "Unprocessable Entity",
          "status": 422,
          "code": 9009,
          "detail": "Invocation Error",
          "details": [
            {
              "name": "Error",
              "message": "something went wrong",
              "stackTrace": [
                "at foo (baz.qux:1:26)",
                "at bar (baz.qux:2:2)"
              ]
            }
          ]
        },
        "properties": {
          "type": {
            "type": "string",
            "default": "problems/invocation"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "code": {
            "type": "integer"
          },
          "detail": {
            "type": "string",
            "default": "Invocation Error"
          },
          "instance": {
            "type": "string",
            "nullable": true
          },
          "details": {
            "type": "array",
            "items": {
              "title": "InvocationErrorResponseDetails",
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "message": {
                  "type": "string",
                  "minLength": 1
                },
                "stackTrace": {
                  "type": "array",
                  "minItems": 0,
                  "items": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              },
              "required": [
                "name",
                "message",
                "stackTrace"
              ]
            }
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "code",
          "detail",
          "details"
        ]
      },
      "AxiosInvocationErrorResponse": {
        "title": "AxiosInvocationErrorResponse",
        "description": "An invocation error from the execution backend in an axios request. Describes the error and provides details about the request and response.\nMost common cause is an unhandled error from one of the Cloud Code SDKs for other Unity services (ex. Cloud Save).\n",
        "type": "object",
        "example": {
          "type": "problems/invocation/axios",
          "title": "Unprocessable Entity",
          "status": 422,
          "code": 9009,
          "detail": "Invocation Error",
          "details": [
            {
              "name": "Error",
              "message": "Request failed with status code 401",
              "request": {
                "data": "{\"key\":\"DIE_ROLL\",\"value\":2}",
                "headers": {
                  "Accept": "application/json, text/plain, */*",
                  "Authorization": "Bearer foo",
                  "Content-Length": 28,
                  "Content-Type": "application/json",
                  "User-Agent": "axios/0.21.4"
                },
                "method": "post",
                "url": "https://cloud-save.services.api.unity.com/v1/data/projects/example-project/players/example-player/items"
              },
              "response": {
                "code": 51,
                "detail": "Authentication token could not be verified",
                "requestId": "2f7bbebb-e2d3-42da-894d-21b30c51b09a",
                "status": 401,
                "title": "Unauthorized",
                "type": "problems/basic"
              }
            }
          ]
        },
        "properties": {
          "type": {
            "type": "string",
            "default": "problems/invocation"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "code": {
            "type": "integer"
          },
          "detail": {
            "type": "string",
            "default": "Invocation Error"
          },
          "instance": {
            "type": "string",
            "nullable": true
          },
          "details": {
            "type": "array",
            "items": {
              "title": "AxiosInvocationErrorResponseDetails",
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "message": {
                  "type": "string",
                  "minLength": 1
                },
                "request": {
                  "title": "AxiosInvocationErrorResponseRequest",
                  "type": "object",
                  "properties": {
                    "data": {
                      "nullable": true,
                      "type": "string"
                    },
                    "headers": {
                      "nullable": true,
                      "type": "object"
                    },
                    "method": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  }
                },
                "response": {
                  "title": "AxiosInvocationErrorResponseResponse",
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "status": {
                      "type": "number"
                    },
                    "code": {
                      "type": "number"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "requestId": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                }
              },
              "required": [
                "name",
                "message",
                "request",
                "response"
              ]
            }
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "code",
          "detail",
          "details"
        ]
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad Request. Returned code indicates one of:\n- Request parameter validation failure\n- Other\nSee the errors field for more details.\n",
        "content": {
          "application/problem+json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/BasicErrorResponse"
                },
                {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              ],
              "discriminator": {
                "propertyName": "type",
                "mapping": {
                  "problems/basic": "#/components/schemas/BasicErrorResponse",
                  "problems/validation": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          }
        }
      },
      "RunModuleBadRequest": {
        "description": "Bad request",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/BasicErrorResponse"
            },
            "examples": {
              "Invalid module name": {
                "$ref": "#/components/examples/InvalidModuleIdErrorResponse"
              },
              "Invalid function name": {
                "$ref": "#/components/examples/InvalidFunctionIdErrorResponse"
              },
              "JSON decode error": {
                "$ref": "#/components/examples/JsonDecodeRequestErrorResponse"
              },
              "Other": {
                "$ref": "#/components/examples/UnspecifiedBadRequestErrorResponse"
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Invalid authentication token",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/BasicErrorResponse"
            },
            "examples": {
              "Gateway": {
                "$ref": "#/components/examples/GatewayUnauthorizedErrorResponse"
              },
              "Service": {
                "$ref": "#/components/examples/ServiceUnauthorizedErrorResponse"
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "Not found",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/BasicErrorResponse"
            },
            "example": {
              "status": 404,
              "title": "Not Found",
              "requestId": "6203fac6-6579-4a71-a659-e20655580408"
            }
          }
        }
      },
      "UnprocessableEntity": {
        "description": "Unprocessable entity.\nReturned code indicates one of:\n - Cannot run a script type\n - Invalid parameters for script\n - Script Timeout\n - Script Exception\n",
        "content": {
          "application/problem+json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/BasicErrorResponse"
                },
                {
                  "$ref": "#/components/schemas/InvocationErrorResponse"
                },
                {
                  "$ref": "#/components/schemas/AxiosInvocationErrorResponse"
                }
              ],
              "discriminator": {
                "propertyName": "type",
                "mapping": {
                  "problems/invocation": "#/components/schemas/InvocationErrorResponse",
                  "problems/invocation/axios": "#/components/schemas/AxiosInvocationErrorResponse",
                  "problems/basic": "#/components/schemas/BasicErrorResponse"
                }
              }
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Too many requests",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "number",
              "description": "Indicates how many seconds the client should wait before making a\nfollow-up request.\n",
              "example": 90
            }
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/BasicErrorResponse"
            },
            "examples": {
              "Too many requests": {
                "$ref": "#/components/examples/GatewayTooManyRequestsErrorResponse"
              },
              "Quota exceeded": {
                "$ref": "#/components/examples/GatewayQuotaExceededErrorResponse"
              },
              "Rate limit exceeded": {
                "$ref": "#/components/examples/GatewayRatelimitExceededErrorResponse"
              }
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Internal server error",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/BasicErrorResponse"
            },
            "examples": {
              "Generic": {
                "$ref": "#/components/examples/GatewayInternalServerErrorResponse"
              },
              "Internal authorization": {
                "$ref": "#/components/examples/FailedSigningServiceTokenErrorResponse"
              }
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "Service unavailable",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/BasicErrorResponse"
            },
            "example": {
              "status": 503,
              "title": "Service Unavailable"
            }
          }
        }
      },
      "GatewayTimeout": {
        "description": "Gateway timeout",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/BasicErrorResponse"
            },
            "example": {
              "status": 504,
              "title": "Gateway Timeout"
            }
          }
        }
      }
    },
    "examples": {
      "GatewayUnauthorizedErrorResponse": {
        "value": {
          "status": 401,
          "title": "Unauthorized",
          "requestId": "6203fac6-6579-4a71-a659-e20655580408",
          "detail": "Authentication Failed"
        }
      },
      "GatewayTooManyRequestsErrorResponse": {
        "value": {
          "status": 429,
          "title": "Too Many Requests"
        }
      },
      "GatewayQuotaExceededErrorResponse": {
        "value": {
          "status": 429,
          "title": "Quota Exceeded"
        }
      },
      "GatewayRatelimitExceededErrorResponse": {
        "value": {
          "status": 429,
          "title": "Ratelimit Exceeded"
        }
      },
      "GatewayInternalServerErrorResponse": {
        "value": {
          "status": 500,
          "title": "Internal Server Error"
        }
      },
      "JsonDecodeRequestErrorResponse": {
        "value": {
          "status": 400,
          "title": "Bad Request",
          "detail": "Could not decode request body as JSON",
          "code": 1002
        }
      },
      "UnspecifiedBadRequestErrorResponse": {
        "value": {
          "status": 400,
          "title": "Bad Request",
          "detail": "Bad request",
          "code": 1003
        }
      },
      "InvalidModuleIdErrorResponse": {
        "value": {
          "status": 400,
          "title": "Bad Request",
          "detail": "the request script module is invalid",
          "code": 1003
        }
      },
      "InvalidFunctionIdErrorResponse": {
        "value": {
          "status": 400,
          "title": "Bad Request",
          "detail": "the request script module function is invalid",
          "code": 1003
        }
      },
      "ServiceUnauthorizedErrorResponse": {
        "value": {
          "status": 401,
          "title": "Unauthorized",
          "detail": "Unauthorized",
          "code": 1005
        }
      },
      "FailedSigningServiceTokenErrorResponse": {
        "value": {
          "status": 500,
          "title": "Internal Server Error",
          "detail": "could not authorize an internal request",
          "code": 9001
        }
      }
    }
  }
}
````