Skip to Content

Delete an attachment

Deletes an attachment and returns the deleted attachment's ID. Request: DELETE /v1/attachments/{id}. Scope: messages:delete.

DELETE
/v1/attachments/{id}

Deletes an attachment and returns the deleted attachment's ID.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^att_[0-9a-hjkmnp-tv-z]{16,24}$

Response Body

Success

application/json
  1. response
success*boolean
deletedId*AttachmentId
Match^att_[0-9a-hjkmnp-tv-z]{16,24}$
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.attachments.remove({
  "id": "example"
});
Example Response
{
  "success": true,
  "deletedId": "string"
}

Related documentation