{

  "openapi": "3.0.3",
  "info": {
    "description": "This endpoint removes all personal data associated with a provided email address from Ada’s databases. It identifies the chatter ID linked to the email address and deletes all related records. For details about processing time, compliance considerations, and limitations, refer to the [Data Compliance API Overview](/reference/overview).",
    "version": "1.0.0",
    "title": "Data Compliance API"
  },
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "servers": [
    {
      "url": "https://example.{env}.support",
      "variables": {
        "env": {
          "default": "ada",
          "description": "Environment",
          "enum": [
            "ada",
            "maple.ada",
            "eu.ada"
          ]
        },
        "bot-name": {
          "default": "example",
          "description": "Customer subdomain/bot handle"
        }
      }
    }
  ],
  "components": {
    "parameters": {
      "TokenIdentifier": {
        "name": "token_identifier",
        "description": "An identifier used to manage a token.",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "x-bearerInfoFunc": "libraries.security.authenticate_token"
      }
    },
    "schemas": {
      "EmailType": {
        "description": "Email of the chatter whose data you wish to delete from Ada's systems.",
        "type": "string",
        "example": "chatter@email.com"
      },
      "TokenType": {
        "description": "Type of data subject request. Must be set to ERASURE.",
        "type": "string",
        "enum": [
          "ERASURE"
        ],
        "example": "ERASURE"
      },
      "IdentifiersType": {
        "description": "List containing extra identifiers sent with the data subject request.",
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "email",
                "chatter_id"
              ],
              "example": "email"
            },
            "value": {
              "type": "string",
              "example": "test@email.com"
            }
          }
        },
        "example": [
          {
            "value": "example-2@example.com",
            "type": "email"
          },
          {
            "value": "6463dbcfafb2e65a02fbc5ee",
            "type": "chatter_id"
          }
        ]
      },
      "DeleteSubjectRequest": {
        "type": "object",
        "minProperties": 2,
        "required": [
          "type",
          "bot-name"
        ],
        "properties": {
          "type": {
            "$ref": "#/components/schemas/TokenType"
          },
          "email": {
            "$ref": "#/components/schemas/EmailType"
          },
          "identifiers": {
            "$ref": "#/components/schemas/IdentifiersType"
          }
        }
      },
      "DeleteSubjectResponse": {
        "type": "object",
        "properties": {
          "email": {
            "$ref": "#/components/schemas/EmailType"
          }
        }
      }
    }
  },
  "paths": {
    "/api/v1/data-subject-request": {
      "post": {
        "summary": "Delete all data associated with a chatter's email address",
        "description": "Deletes all data associated with the provided chatter's email address linked to the bot. Replace `example` with your agent's handle. A successful call returns the chatter's email supplied (null if email field was not supplied) in the request whose data will be deleted from Ada's systems. In order to ensure emails are properly linked to a chatter record, ensure the capture block validation when capturing email is set to `@ Email.`<br><br>
        **Note for multiple participant emails:** If you are requesting data deletion for one chatter’s email address and they are a participant in a conversation that has multiple email participants (i.e., Email thread with additional recipients in CC), the entire transcript will be deleted for all participants.",
        "tags": [
          "Delete chatter data"
        ],
        "security": [
          {
            "bearerAuth": [
              "Authorization"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteSubjectRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteSubjectResponse"
                }
              }
            },
            "description": "The request was successfully ingested into Ada's system."
          },
          "400": {
            "description": "Invalid request body or headers."
          },
          "401": {
            "description": "Authentication token is invalid or does not have the correct permissions. Try generating a new token."
          },
          "500": {
            "description": "Something went wrong on Ada's end."
          },
          "502": {
            "description": "Nginx gateway issue on Ada's servers."
          },
          "503": {
            "description": "Server temporarily unable to handle the request."
          },
          "504": {
            "description": "Temporary infrastructure error on Ada's servers."
          }
        }
      }
    }
  }
}
