Skip to Content
Launching the open-source gateway

Delete a user

DELETEhttps://api.respan.ai/api/users/{customer_identifier}/

Permanently deletes the user.

Servers

https://api.respan.ai — Respan API Server

Authentication

RespanApiKey

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.

HTTP scheme: bearer; format: Respan API key.

HTTP
Authorization: Bearer $RESPAN_API_KEY

Or:

DashboardJwt

Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.

HTTP scheme: bearer; format: Dashboard JWT.

HTTP
Authorization: Bearer $RESPAN_DASHBOARD_JWT

Path parameters

Parameter Type Required Description and constraints
customer_identifier string Required
Your unique identifier for this user.

Query parameters

Parameter Type Required Description and constraints
environment string Optional
Optional environment filter. If omitted, the backend uses the environment implied by your auth context when applicable.
Allowed: "prod", "test"
Example: "prod"

Responses

204

User deleted successfully.

403

The API key is missing, invalid or expired.

application/json

Field Type Requirement Description and constraints
$ object Body
—
detail string Required in parent
—

OpenAPI response schema

{
  "type": "object",
  "required": [
    "detail"
  ],
  "properties": {
    "detail": {
      "type": "string"
    }
  }
}
Example
JSON
{ "detail": "Your API key is invalid or expired, please check your API key in the platform settings." }

404

Not Found

application/json

Field Type Requirement Description and constraints
$ object Body
—
detail string Optional
Example: "Customer user not found"

OpenAPI response schema

{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "example": "Customer user not found"
    }
  }
}

429

Rate Limited

application/json

Field Type Requirement Description and constraints
$ object Body
—
detail string Optional
Example: "Request was throttled. Expected available in 1 second."

OpenAPI response schema

{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "example": "Request was throttled. Expected available in 1 second."
    }
  }
}

500

Internal Server Error

application/json

Field Type Requirement Description and constraints
$ object Body
—
detail string Optional
Example: "Internal server error"

OpenAPI response schema

{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "example": "Internal server error"
    }
  }
}

OpenAPI source

The operation and referenced components below retain the complete OpenAPI definitions, including constraints and examples.

OpenAPI operation

{
  "summary": "Delete a user",
  "operationId": "deleteUser",
  "tags": [
    "Users"
  ],
  "description": "Permanently deletes the user.",
  "parameters": [
    {
      "name": "customer_identifier",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      },
      "description": "Your unique identifier for this user."
    },
    {
      "name": "environment",
      "in": "query",
      "schema": {
        "type": "string",
        "enum": [
          "prod",
          "test"
        ]
      },
      "description": "Optional environment filter. If omitted, the backend uses the environment implied by your auth context when applicable.",
      "example": "prod"
    }
  ],
  "responses": {
    "204": {
      "description": "User deleted successfully."
    },
    "403": {
      "$ref": "#/components/responses/InvalidApiKey"
    },
    "404": {
      "description": "Not Found",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "detail": {
                "type": "string",
                "example": "Customer user not found"
              }
            }
          }
        }
      }
    },
    "429": {
      "description": "Rate Limited",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "detail": {
                "type": "string",
                "example": "Request was throttled. Expected available in 1 second."
              }
            }
          }
        }
      }
    },
    "500": {
      "description": "Internal Server Error",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "detail": {
                "type": "string",
                "example": "Internal server error"
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "RespanApiKey": []
    },
    {
      "DashboardJwt": []
    }
  ]
}

OpenAPI path metadata

{}

Referenced OpenAPI components

{
  "responses": {
    "InvalidApiKey": {
      "description": "The API key is missing, invalid or expired.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "detail"
            ],
            "properties": {
              "detail": {
                "type": "string"
              }
            }
          },
          "example": {
            "detail": "Your API key is invalid or expired, please check your API key in the platform settings."
          }
        }
      }
    }
  },
  "securitySchemes": {
    "DashboardJwt": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "Dashboard JWT",
      "description": "Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.",
      "x-fern-bearer": {
        "name": "dashboardJwt",
        "env": "RESPAN_DASHBOARD_JWT"
      }
    },
    "RespanApiKey": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "Respan API key",
      "description": "Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.",
      "x-fern-bearer": {
        "name": "respanApiKey",
        "env": "RESPAN_API_KEY"
      }
    }
  }
}