Lampiran
Mengunggah file untuk dikirim bersama pesan. 3 endpoint
POST /attachments
/api/v1/attachments · Perlu sesi login
Body permintaan
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
name | string | ya | panjang 1–200 |
mediaType | string | ya | panjang 0–100 |
data | string | ya | panjang 1–13981018 |
Contoh
bash
curl -X POST 'https://api.lexcetha.com/api/v1/attachments' \
-H "Authorization: Bearer $LEX_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"name":"string","mediaType":"string","data":"string"}'GET /attachments/{id}/content
/api/v1/attachments/{id}/content · Perlu sesi login
Parameter
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
id (path) | string | ya |
Contoh
bash
curl -X GET 'https://api.lexcetha.com/api/v1/attachments/:id/content' \
-H "Authorization: Bearer $LEX_TOKEN"DELETE /attachments/{id}
/api/v1/attachments/{id} · Perlu sesi login
Parameter
| Field | Tipe | Wajib | Catatan |
|---|---|---|---|
id (path) | string | ya |
Contoh
bash
curl -X DELETE 'https://api.lexcetha.com/api/v1/attachments/:id' \
-H "Authorization: Bearer $LEX_TOKEN"