Skip to content

댓글 작성 Tier 4

POST/api/files/:id/commentsCopied!

댓글 또는 기존 댓글의 답글을 작성합니다.

예시

ts
const comment = await client.comments.createForFile("FX1234567890ABCD", {
  content: "Looks great, approved.",
  anchor: 12000,
  duration: 3000,
  parent: { id: "0efee6f8-5829-41c9-bb4d-90dd7e72cc58" },
});
bash
youvico comment create \
  --file FX1234567890ABCD \
  --content "Looks great, approved." \
  --anchor 12000 \
  --duration 3000 \
  --parent 0efee6f8-5829-41c9-bb4d-90dd7e72cc58
bash
curl -X POST 'https://api.youvico.com/api/files/FX1234567890ABCD/comments' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "content": "Looks great, approved.", "anchor": 12000, "duration": 3000, "parent": { "id": "0efee6f8-5829-41c9-bb4d-90dd7e72cc58" } }'
json
{
  "data": {
    "id": "2fb4e60b-0d9a-46f3-a4dc-cb9fe8ad9be6"
  }
}

요청

경로

idstringrequired
파일 ID

본문

contentstring

Maximum 1000 characters

댓글 내용
anchornumber

0 or greater

비디오는 밀리초 단위 타임스탬프, 문서는 1부터 시작하는 페이지 번호
durationnumber

0 or greater

anchor와 같은 단위의 댓글 구간 길이
parentobject
상위 댓글 객체
parent.idstringrequired
상위 댓글 ID

Example: 0efee6f8-5829-41c9-bb4d-90dd7e72cc58

attachmentsarray

1-10 items

댓글에 연결할 업로드 완료된 첨부파일 목록
attachments[].idstringrequired
댓글 첨부파일 ID

Example: CA1234567890ABCD

INFO

content, anchor, attachments 중 하나 이상을 제공해야 합니다. durationanchor가 있을 때만 제공할 수 있습니다.

INFO

각 첨부파일 ID는 서로 달라야 하며, 같은 사용자가 이 파일을 대상으로 시작해 완료했고 아직 다른 댓글에 연결되지 않은 업로드를 가리켜야 합니다.

WARNING

답글에 대한 답글은 작성할 수 없습니다. parent.id는 최상위 댓글을 가리켜야 합니다.

응답

201 Created를 반환합니다.

dataobject
생성된 댓글
data.idstring
생성된 댓글 ID

Example: 2fb4e60b-0d9a-46f3-a4dc-cb9fe8ad9be6