{
  "components": {
    "securitySchemes": {
      "accountSid_authToken": {
        "scheme": "basic",
        "type": "http"
      }
    },
    "schemas": {
      "frontline.v1.user": {
        "type": "object",
        "properties": {
          "sid": {
            "type": "string",
            "minLength": 34,
            "maxLength": 34,
            "pattern": "^US[0-9a-fA-F]{32}$",
            "nullable": true,
            "description": "The unique string that we created to identify the User resource."
          },
          "identity": {
            "type": "string",
            "nullable": true,
            "description": "The application-defined string that uniquely identifies the resource's User. This value is often a username or an email address, and is case-sensitive.",
            "x-twilio": {
              "pii": {
                "handling": "standard",
                "deleteSla": 30
              }
            }
          },
          "friendly_name": {
            "type": "string",
            "nullable": true,
            "description": "The string that you assigned to describe the User.",
            "x-twilio": {
              "pii": {
                "handling": "standard",
                "deleteSla": 30
              }
            }
          },
          "avatar": {
            "type": "string",
            "nullable": true,
            "description": "The avatar URL which will be shown in Frontline application."
          },
          "state": {
            "$ref": "#/components/schemas/user_enum_state_type"
          },
          "is_available": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the User is available for new conversations. Defaults to `false` for new users."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "An absolute API resource URL for this user."
          }
        }
      },
      "user_enum_state_type": {
        "type": "string",
        "enum": [
          "active",
          "deactivated"
        ],
        "description": "Current state of this user. Can be either `active` or `deactivated` and defaults to `active`"
      }
    }
  },
  "info": {
    "title": "Twilio - Frontline",
    "description": "This is the public Twilio REST API.",
    "termsOfService": "https://www.twilio.com/legal/tos",
    "contact": {
      "name": "Twilio Support",
      "url": "https://support.twilio.com",
      "email": "support@twilio.com"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version": "1.0.0",
    "x-twilio": {
      "apiStandards": "v0.1"
    }
  },
  "openapi": "3.0.1",
  "paths": {
    "/v1/Users/{Sid}": {
      "servers": [
        {
          "url": "https://frontline-api.twilio.com"
        }
      ],
      "description": "A User resource represents a frontline user.",
      "x-twilio": {
        "defaultOutputProperties": [
          "sid",
          "identity"
        ],
        "pathType": "instance"
      },
      "get": {
        "description": "Fetch a frontline user",
        "summary": "Fetch a frontline user",
        "tags": [
          "FrontlineV1User"
        ],
        "parameters": [
          {
            "name": "Sid",
            "in": "path",
            "description": "The SID of the User resource to fetch. This value can be either the `sid` or the `identity` of the User resource to fetch.",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/frontline.v1.user"
                },
                "examples": {
                  "fetch": {
                    "value": {
                      "sid": "USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                      "identity": "john@example.com",
                      "friendly_name": "John Doe",
                      "avatar": "https://example.com/profile.png",
                      "state": "active",
                      "is_available": true,
                      "url": "https://frontline-api.twilio.com/v1/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
                    }
                  }
                }
              }
            },
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "Specify the origin(s) allowed to access the resource",
                "schema": {
                  "type": "string"
                },
                "example": "*"
              },
              "Access-Control-Allow-Methods": {
                "description": "Specify the HTTP methods allowed when accessing the resource",
                "schema": {
                  "type": "string"
                },
                "example": "POST, OPTIONS"
              },
              "Access-Control-Allow-Headers": {
                "description": "Specify the headers allowed when accessing the resource",
                "schema": {
                  "type": "string"
                },
                "example": "Content-Type, Authorization"
              },
              "Access-Control-Allow-Credentials": {
                "description": "Indicates whether the browser should include credentials",
                "schema": {
                  "type": "boolean"
                }
              },
              "Access-Control-Expose-Headers": {
                "description": "Headers exposed to the client",
                "schema": {
                  "type": "string",
                  "example": "X-Custom-Header1, X-Custom-Header2"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "accountSid_authToken": []
          }
        ],
        "operationId": "FetchUser"
      },
      "post": {
        "description": "Update an existing frontline user",
        "summary": "Update an existing frontline user",
        "tags": [
          "FrontlineV1User"
        ],
        "parameters": [
          {
            "name": "Sid",
            "in": "path",
            "description": "The SID of the User resource to update. This value can be either the `sid` or the `identity` of the User resource to update.",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/frontline.v1.user"
                },
                "examples": {
                  "update": {
                    "value": {
                      "sid": "USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                      "identity": "john@example.com",
                      "friendly_name": "John Doe",
                      "avatar": "https://example.com/profile.png",
                      "state": "active",
                      "is_available": true,
                      "url": "https://frontline-api.twilio.com/v1/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
                    }
                  }
                }
              }
            },
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "Specify the origin(s) allowed to access the resource",
                "schema": {
                  "type": "string"
                },
                "example": "*"
              },
              "Access-Control-Allow-Methods": {
                "description": "Specify the HTTP methods allowed when accessing the resource",
                "schema": {
                  "type": "string"
                },
                "example": "POST, OPTIONS"
              },
              "Access-Control-Allow-Headers": {
                "description": "Specify the headers allowed when accessing the resource",
                "schema": {
                  "type": "string"
                },
                "example": "Content-Type, Authorization"
              },
              "Access-Control-Allow-Credentials": {
                "description": "Indicates whether the browser should include credentials",
                "schema": {
                  "type": "boolean"
                }
              },
              "Access-Control-Expose-Headers": {
                "description": "Headers exposed to the client",
                "schema": {
                  "type": "string",
                  "example": "X-Custom-Header1, X-Custom-Header2"
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "accountSid_authToken": []
          }
        ],
        "operationId": "UpdateUser",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "title": "UpdateUserRequest",
                "properties": {
                  "FriendlyName": {
                    "type": "string",
                    "description": "The string that you assigned to describe the User."
                  },
                  "Avatar": {
                    "type": "string",
                    "description": "The avatar URL which will be shown in Frontline application."
                  },
                  "State": {
                    "$ref": "#/components/schemas/user_enum_state_type"
                  },
                  "IsAvailable": {
                    "type": "boolean",
                    "description": "Whether the User is available for new conversations. Set to `false` to prevent User from receiving new inbound conversations if you are using [Pool Routing](https://www.twilio.com/docs/frontline/handle-incoming-conversations#3-pool-routing)."
                  }
                }
              },
              "examples": {
                "update": {
                  "value": {
                    "State": "active",
                    "FriendlyName": "Name",
                    "Avatar": "https://example.com/avatar.png",
                    "IsAvailable": true
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://frontline-api.twilio.com"
    }
  ],
  "tags": [
    {
      "name": "FrontlineV1Index"
    },
    {
      "name": "FrontlineV1User"
    },
    {
      "name": "FrontlineV1Version"
    }
  ],
  "security": [
    {
      "accountSid_authToken": []
    }
  ]
}