Get an attachment
Returns metadata for a single attachment, including filename, content type, and size.
GET
Returns metadata for a single attachment, including filename, content type, and size.
apiKeyheader
x-api-key<token>id*stringMatch
^att_[0-9a-hjkmnp-tv-z]{16,24}$Success
application/json- response
id*AttachmentIdMatch
^att_[0-9a-hjkmnp-tv-z]{16,24}$messageId*MessageIdMatch
^msg_[0-9a-hjkmnp-tv-z]{16,24}$organizationId*OrganizationIdMatch
^org_[0-9a-hjkmnp-tv-z]{16,24}$filename*stringcontentType*stringsize*integerRange
0 <= value <= 9007199254740991contentId*string|nullisInline*booleancreatedAt*stringimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.attachments.getById({
"id": "example"
});Example Response
{
"id": "string",
"messageId": "string",
"organizationId": "string",
"filename": "string",
"contentType": "string",
"size": 0,
"contentId": "string",
"isInline": true,
"createdAt": "string"
}