client.followUps()
इस नेमस्पेस का हर मेथड: उसका सिग्नेचर, उसके पैरामीटर, वह क्या लौटाता है और एक उदाहरण।
मेथड
Reminders on mail you sent: ask for a thread to come back to the top of the inbox if nobody replies by a time you choose, list the reminders still waiting and the ones that ended, and cancel one.
followUps().list
List reminders
List<Map<String, Object>> list(RequestOptions options)Returns the reminders you set on mail you sent, newest first: the ones still waiting for a reply and the ones that ended. A reminder is waiting until somebody replies (answered), its time comes with no reply (due, and the thread is back at the top of the inbox, unread) or it is cancelled. uk.openemail.constants.FollowUpStatuses holds the four states.
An API key lists the reminders of the workspace owner, and an app those of the person who connected it. A key or an app limited to particular addresses lists only reminders on threads delivered to them. They come back as one plain list with no paging, and limit caps how many.
पैरामीटर
options.statusStringOnly reminders in this state:
waiting,answered,dueorcancelled, as inuk.openemail.constants.FollowUpStatuses.options.threadIdStringOnly the reminders on this thread.
options.limitintHow many to return, newest first, from 1 to 200. 100 when left out.
options.apiKeyStringOverrides the client's API key for this call only.
लौटाता है
A list of maps, each with object set to follow_up, id, threadId, messageId, emailId, subject, remindAt, status, answeredAt, firedAt and createdAt. threadId is null until a scheduled message with a reminder goes out, emailId names the email when the reminder was set with followUpAt, answeredAt is null unless answered and firedAt is null unless due.
उदाहरण
List<Map<String, Object>> waiting = client.followUps().list(RequestOptions.of("status", "waiting")); for (Map<String, Object> followUp : waiting) { System.out.println(followUp.get("id") + " " + followUp.get("status"));}टिप्पणियाँ
In
query,is:waitingfinds the same conversations throughthreads().list: the ones with a reminder nobody has answered yet.Read only, so the SDK retries it after a network failure like any other read.
इनमें भी उपलब्ध
followUps().set
Set a reminder on a thread
Map<String, Object> set(Map<String, Object> body, RequestOptions options)Asks to be reminded about a thread if nobody replies by remindAt. If a real reply arrives first, the reminder closes by itself. Otherwise, when the time comes, the thread returns to the top of the inbox, unread, with the built-in FOLLOW_UP label and a push to your phones. Automatic replies, delivery reports and your own sending address do not count as a reply.
A thread holds one waiting reminder per person, so setting another moves the time. remindAt takes an Instant or an ISO 8601 string with an offset, and the SDK sends an Instant as an ISO 8601 instant in UTC. To set one as you send, pass followUpAt to emails().send instead.
पैरामीटर
body.threadIdStringआवश्यकThe thread to be reminded about, as
threads().listreturns it.body.remindAtInstant or Stringआवश्यकWhen the thread comes back if nobody replied: a future instant, at most 365 days out.
options.apiKeyStringOverrides the client's API key for this call only.
लौटाता है
A map, the reminder with status set to waiting: object set to follow_up, id, threadId, messageId, emailId, subject, remindAt, status, answeredAt, firedAt and createdAt.
उदाहरण
Map<String, Object> reminder = client.followUps().set(Body.of( "threadId", "CAHk7pQ2x9LmZ4-mail.example.com", "remindAt", "2026-10-13T22:34:28.592Z")); System.out.println(reminder.get("id") + " " + reminder.get("status") + " " + reminder.get("remindAt"));टिप्पणियाँ
A
remindAtthat is not in the future, or is more than 365 days out, is a 422invalid_follow_up. A thread that does not exist, or one delivered to no address the key covers, is a 404.An API key sets the reminder for the workspace owner, and an app for the person who connected it. The push goes out unless that person turned
phoneFollowUpsoff withsettings().update.The SDK retries this call after a network failure, which is safe because setting the same time twice leaves one reminder.
इनमें भी उपलब्ध
- API
POST /follow-ups- TypeScript
followUps.set()- Python
follow_ups.set()- Ruby
follow_ups.set- PHP
followUps->set- Go
FollowUps.Set- C#
FollowUps.SetAsync- CLI
openemail follow-ups set
followUps().cancel
Cancel a reminder
Map<String, Object> cancel(String id, RequestOptions options)Cancels a waiting reminder, so the thread stays where it is when the time comes. A reminder that already ended is returned as it is, which is why the SDK retries this call. Only your own reminders can be cancelled.
पैरामीटर
idStringआवश्यकThe id of the reminder,
fup_and 24 hex characters, aslistreturns it.options.apiKeyStringOverrides the client's API key for this call only.
लौटाता है
A map, the reminder as it is now: status is cancelled when it was waiting, and unchanged when it had already ended.
उदाहरण
Map<String, Object> cancelled = client.followUps().cancel("fup_4c1b257a9e3d6f8025b7c1d4"); System.out.println(cancelled.get("status") + " " + cancelled.get("remindAt"));टिप्पणियाँ
An unknown id, and a reminder somebody else set, are each a 404. So is one on a thread delivered to no address the key covers.
A cancelled reminder is kept, and
listreturns it withstatusset tocancelled.