Postings notes

Last updated: 2021-10-12Contributors
Edit this page

Notes in RingCentral give teams the ability to post, collaboritively edit and share simple text files with one another. They provide a perfect way to collect and share meeting agendas and minutes, ideas for an upcoming product, todo lists and action items, and you name it.

Posting a note via the REST API

Select your preferred language below.

const RC = require('@ringcentral/sdk').SDK
require('dotenv').config();

CHAT_ID = '<GROUP ID>'

var rcsdk = new RC({
    'server':       process.env.RC_SERVER_URL,
    'clientId':     process.env.RC_APP_CLIENT_ID,
    'clientSecret': process.env.RC_APP_CLIENT_SECRET
});
var platform = rcsdk.platform();
platform.login({ 'jwt':  process.env.RC_USER_JWT })

platform.on(platform.events.loginSuccess, () => {
    post_note( CHAT_ID )
})

async function post_note( group ) {
    try {
    var resp = await platform.post('/team-messaging/v1/chats/'+group+'/notes', {
        "title": "This is a note",
        "body": "<strong>heading</strong><br><br>Any HTML can be entered here."
    });
    var jsonObj = await resp.json()
    console.log( JSON.stringify(jsonObj) )
    } catch (e) {
    console.log(e)
    }
}
#!/usr/bin/python

# You get the environment parameters from your
# application dashbord in your developer account
# https://developers.ringcentral.com

import os
import sys

from dotenv import load_dotenv
from ringcentral import SDK
load_dotenv()

CHAT_ID = '<GROUP ID>'

rcsdk = SDK( os.environ.get('RC_APP_CLIENT_ID'),
             os.environ.get('RC_APP_CLIENT_SECRET'),
             os.environ.get('RC_SERVER_URL') )
platform = rcsdk.platform()
try:
  platform.login( jwt=os.environ.get('RC_USER_JWT') )
except Exception as e:
  sys.exit("Unable to authenticate to platform: " + str(e))

endpoint = "/team-messaging/v1/chats/" + CHAT_ID + '/notes'
note = {
    "title": "This is a note",
    "body": "<strong>heading</strong><br><br>Any HTML can be entered here."
}

resp = platform.post(endpoint, note)
print(resp.text())
<?php
// Remember to modify the path ./../ pointing to the location where the RingCentral SDK was installed and the .env file was saved!
require('./../vendor/autoload.php');
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . './../');
$dotenv->load();

$CHAT_ID = '<GROUP ID>';

$rcsdk = new RingCentral\SDK\SDK( $_ENV['RC_APP_CLIENT_ID'],
                                  $_ENV['RC_APP_CLIENT_SECRET'],
                                  $_ENV['RC_SERVER_URL'] );
$platform = $rcsdk->platform();
$platform->login( [ "jwt" => $_ENV['RC_USER_JWT'] ] );

$endpoint = "/team-messaging/v1/chats/"+CHAT_ID+"/notes";
$params = array(
    "title" => "This is a note",
    "body" => "<strong>heading</strong><br><br>Any HTML can be entered here."
);

$resp = $platform->post($endpoint, $params);
print($resp->text());
?>
#!usr/bin/ruby

# You get the environment parameters from your
# application dashbord in your developer account
# https://developers.ringcentral.com

require 'ringcentral'
require 'dotenv/load'

CHAT_ID = '<GROUP ID>'

$rc = RingCentral.new(ENV['RC_APP_CLIENT_ID'],
                      ENV['RC_APP_CLIENT_SECRETCLIENRT_SECRET'],
                      ENV['RC_SERVER_URL'])

$rc.authorize(jwt: ENV['RC_USER_JWT'])

resp = rc.post('/team-messaging/v1/chats/'+CHAT_ID+'/notes', payload: {
    "title": "This is a note",
    "body": "<strong>heading</strong><br><br>Any HTML can be entered here."
})

puts resp.body

Notes Schema

Please consult our API Reference for creating a note to learn more about the request and response schemas.

Publishing your draft notes

Upon creating a note, the status of the note defaults to "Draft." Therefore, if you intend to make the note immediately available to members of the chat, you will need to subseuently call the publish note API reference.

Keep learning

Using the Notes API you can accomplish a number of tasks relating to the creation, and sharing of notes.