API
AI로 이메일 일부 다시 쓰기
제목이나 본문의 서로 다른 버전, 최대 5개.
POST/emails/rewrite
워크스페이스에 실제 호출을 실행합니다.
POST /emails/rewrite
제목이나 본문의 서로 다른 버전, 최대 5개.
예시
emails:send가 필요합니다. action은 shorten, lengthen, rephrase, formal, casual, custom 중 하나이며, custom에는 무엇을 바꿀지 알려 주는 instruction이 필요합니다. target은 기본값인 body 또는 subject이며, count는 버전을 1~5개 요청하고 기본값은 3입니다.
curl -X POST "$OE/emails/rewrite" -H "$AUTH" -H "Content-Type: application/json" \ -d '{ "text": "Hey, did you get a chance to look at the contract?", "action": "formal", "count": 2 }'{ "object": "rewrite", "target": "body", "variations": [ "Hello, I wanted to ask whether you have had a chance to review the contract.", "Good morning. Have you been able to look over the contract yet?" ]}threadId는 다시 쓴 결과를 답장하는 대화에 맞추며, threads:read가 필요합니다.
버전은 원문을 그대로 되풀이하지 않으며, 호출할 때마다 AI 작업 1회를 씁니다.