Skip to content

Lampiran ​

Mengunggah file untuk dikirim bersama pesan. 3 endpoint

POST /attachments​

/api/v1/attachments · Perlu sesi login

Body permintaan

FieldTipeWajibCatatan
namestringyapanjang 1–200
mediaTypestringyapanjang 0–100
datastringyapanjang 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

FieldTipeWajibCatatan
id (path)stringya

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

FieldTipeWajibCatatan
id (path)stringya

Contoh

bash
curl -X DELETE 'https://api.lexcetha.com/api/v1/attachments/:id' \
  -H "Authorization: Bearer $LEX_TOKEN"

Lex oleh Gavalytics AI