remove-profile-image
Method: DELETE
Path: /auth/user/{id}/profile-image
Tags: Auth
Summary
Delete profile image
Description
Delete profile image API streamlines the process of removing profile images associating with user accounts. Upon success, the API responds with a confirmation message. In case of errors, clear error messages facilitate quick issue resolution.
Storefront SDK Usage
SDK Method: sdk.auth.deleteProfileImage()
Example:
typescript
// Delete user's profile image
const { data, error } = await sdk.auth.deleteProfileImage({
id: "01H9XYZ12345USERID"
});
if (error) {
console.error("Failed to delete profile image:", error.message);
} else {
console.log("Profile image deleted successfully");
console.log("Success:", data.success);
}TypeScript Definition
typescript
"remove-profile-image": {
parameters: {
query?: never;
header?: never;
path: {
/** @description user ID */
id: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
/** @description A descriptive message confirming the success or failure of the delete operation. */
message: string;
/** @description Indicates whether the request was successful or failure (true for success, false for failure). */
success: boolean;
};
};
};
400: components["responses"]["BadRequest"];
401: components["responses"]["Unauthorized"];
404: components["responses"]["NotFound"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["responses"]["BadRequest"] | BadRequest |
components["responses"]["Unauthorized"] | Unauthorized |
components["responses"]["NotFound"] | NotFound |
Parameters
- id (path): user ID
Responses
200
OK
400
Bad request
401
Not authorized for given operation on the Resource
404
Requested resource not found
OpenAPI Definition
json
{
"tags": [
"Auth"
],
"operationId": "remove-profile-image",
"summary": "Delete profile image",
"description": "Delete profile image API streamlines the process of removing profile images associating with user accounts. Upon success, the API responds with a confirmation message. In case of errors, clear error messages facilitate quick issue resolution.",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/operations/remove-profile-image",
"description": "API reference for the remove-profile-image operation"
},
"parameters": [
{
"name": "id",
"in": "path",
"description": "user ID",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message",
"success"
],
"properties": {
"message": {
"description": "A descriptive message confirming the success or failure of the delete operation.",
"type": "string"
},
"success": {
"description": "Indicates whether the request was successful or failure (true for success, false for failure).",
"type": "boolean"
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
},
"security": [
{
"Authorization": []
}
],
"x-speakeasy-group": "auth",
"x-speakeasy-ignore": true,
"x-speakeasy-name-override": "removeProfileImage"
}Auto-generated from OpenAPI spec and TypeScript definitions