Common Services API (1.31.0-integration.1)

Download OpenAPI specification:Download

Introduction

This document is intended for SSG developers who need applications to interact with backend services and data. It explains basic concepts of SchoolStatus and the API itself. It also provides an overview of the different API supported functions.

Getting Set Up

  1. Some way to hit an API endpoint and receive responses. We’re aware that various organizations within SchoolStatus have different technical stacks, and so we advise that you use whatever your preferred library is for API connections.
  2. An API Key. For now, these can be requested from the Platform team, but we will move this functionality over to either DevOps or IT management at some point.
  3. A phone number to send/receive SMS from - for now, this should come from Twilio, but we will add support for other providers in the future.
  4. A callback URL - somewhere we can send updates and information about inbound messages to.
  5. Familiarize yourself with the core concepts of the JSON (JavaScript Object Notation) data format. JSON is a common, language-independent data format that provides a simple text representation of arbitrary data structures.

Quickstart

This Quickstart will teach you how to do send and recieve text and calls using the Contact Channel API. In this Quickstart, you will learn how to:

  1. Get an API Key to Authenticate with Shunkan-Ido
  2. Set up your development environment to send and receive messages
  3. Send your first SMS
  4. Receive inbound text messages
  5. Reply to incoming messages with an SMS
  6. Start your first call.

You can find all this at Platform Wiki.

Release Notes

1.31.0-integration.1 (2025-01-14)

Features

  • add announcements webhook documentation (2b6e60e)
  • add smstool message characters counting enhancement (a4d0b5a)
  • dashboard: calls and conference calls stats (e7dfacf)
  • dashboard: calls and conference calls stats (8d0cb28)
  • deliver unknown participant message COMM-779 (f902601)
  • fix bug with inbound messages and calls (2b9cdcf)
  • handle block and unblock for inbound announcements (ff8e034)
  • handle lookup errors with internal_status and send notification (3a35588)
  • provision announcement numbers automatically (COMM-974) (c4ff150)
  • refactor participant and conversation repositories (d592460)
  • refactor twilio number migration (COMM-838) (c2accc4)
  • refs #comm-1033 update to latest datadog gem (a413b40), closes #comm-1033
  • refs #comm-937 check for unique client conversation ID and application name (3d01a05), closes #comm-937
  • refs #comms-973 Add E164 validation for phone number on message create endpoint (57a9eba), closes #comms-973

Bug Fixes

  • add missing index to receiver_number in messages (d1366f2)
  • announcements: filter recipients before inserting in batches to make the list uniq (d0a521b)
  • COM-1005 remove e164 validation error (07d774b)
  • refs #comm-1033 fix requirement statement (de9298d)

Changelog

1.31.0-integration.1 (2025-01-14)

Features

  • add announcements webhook documentation (2b6e60e)
  • add smstool message characters counting enhancement (a4d0b5a)
  • dashboard: calls and conference calls stats (e7dfacf)
  • dashboard: calls and conference calls stats (8d0cb28)
  • deliver unknown participant message COMM-779 (f902601)
  • fix bug with inbound messages and calls (2b9cdcf)
  • handle block and unblock for inbound announcements (ff8e034)
  • handle lookup errors with internal_status and send notification (3a35588)
  • provision announcement numbers automatically (COMM-974) (c4ff150)
  • refactor participant and conversation repositories (d592460)
  • refactor twilio number migration (COMM-838) (c2accc4)
  • refs #comm-1033 update to latest datadog gem (a413b40), closes #comm-1033
  • refs #comm-937 check for unique client conversation ID and application name (3d01a05), closes #comm-937
  • refs #comms-973 Add E164 validation for phone number on message create endpoint (57a9eba), closes #comms-973

Bug Fixes

  • add missing index to receiver_number in messages (d1366f2)
  • announcements: filter recipients before inserting in batches to make the list uniq (d0a521b)
  • COM-1005 remove e164 validation error (07d774b)
  • refs #comm-1033 fix requirement statement (de9298d)

1.30.2 (2025-01-13)

Bug Fixes

  • uniq list of recipients before inserting when enqueuing mms (780784c)

1.30.1 (2025-01-10)

Bug Fixes

  • add missing index to receiver_number in messages (cf7286d)
  • apply specifif filters to recipients (b988315)

1.30.0 (2025-01-09)

Features

  • add TwilioWebhookUpdate consumer handler (796dca9)

1.29.0 (2025-01-08)

Features

  • add announcement_number flag to twilio numbers in active admin (COMM-950) (57657c8)
  • announcements: provision announcement numbers manually in activeadmin (COMM-950) (e4b61ef)

Bug Fixes

1.28.0 (2025-01-07)

Features

  • handle lookup errors with internal_status and send notification (c65bd82)

1.27.0 (2024-12-18)

Features

  • Update to latest datadog gem. We updated to version 2.8 so that we can get profile allocation data in DataDog. (bbc16c5)

1.26.0 (2024-12-13)

Features

  • add announcements webhook documentation (5acc77a)
  • handle block and unblock for inbound announcements (e25afce)

1.25.1 (2024-12-11)

Bug Fixes

  • COM-1005 remove e164 validation error (648e927)

1.25.0 (2024-12-10)

Features

  • add conversations associations aa view (d2cb6b8)
  • add participant associations aa view (04223a3)
  • add webhooks associations aa view (bb289f4)
  • video_calls: add association panels for video call participants in activeadmin (f40b048)
  • video_calls: add association panels for video calls in activeadmin (070b97a)

1.24.0 (2024-12-09)

Features

  • add calls associations aa view (2c41b96)
  • add conference_calls associations aa view (6e92501)
  • add messages associations aa view (e583e2d)
  • add voicemail associations aa view (ead2ac1)
  • dashboard: calls and conference calls stats (6125d8e)
  • deliver unknown participant message COMM-779 (5b7e83b)

1.23.0 (2024-12-04)

Features

  • [COMMS-973] Add E.164 validation to receiver numbers for messages (8f5f340)
  • announcement message custom filters in activeadmin (e664bc2)
  • announcements: handle incoming webhooks for voice and sms announcements refs:COMM-921 (3e4797d)
  • announcements: improve API request documentation (bb74f4f)

Bug Fixes

  • [COMM-935] eliminate machine detection on non-moderator calls to solve endless hold music problem (6521f97)
  • errors without translation are confusing clients (93ad9e9)
  • phone voice service twiml response and callback url (6e90d0c)

1.24.0 (2024-12-04)

Features

  • announcement message custom filters in activeadmin (e664bc2)
  • announcements: handle incoming webhooks for voice and sms announcements refs:COMM-921 (3e4797d)
  • announcements: improve API request documentation (bb74f4f)

Bug Fixes

  • phone voice service twiml response and callback url (6e90d0c)

1.23.0 (2024-12-04)

Features

  • [COMMS-973] Add E.164 validation to receiver numbers for messages (8f5f340)

Bug Fixes

  • [COMM-935] eliminate machine detection on non-moderator calls to solve endless hold music problem (6521f97)

1.22.0 (2024-11-21)

Features

  • COMM-937 Validate that the client_conversation_id and application_name combination is unique (b3b5256)

1.21.0 (2024-11-19)

Features

  • Add Twilio MessagingService SID prefix validations (58e7021)
  • announcements: deliver sms announcement (91a88cc)
  • announcements: deliver voice announcement (6defeed)
  • fix bug with new models (eaafed9)
  • refactor participant and conversation repositories (fc9287a)

Bug Fixes

  • dashboard duration column (c4c5f0c)
  • typo in method call for creating customers (f1d2f4c)

1.20.1 (2024-11-14)

Bug Fixes

  • typo in method call for creating customers (f1d2f4c)

1.20.1 (2024-11-14)

Bug Fixes

  • typo in method call for creating customers (f1d2f4c)

1.20.0 (2024-11-14)

Features

Bug Fixes

1.19.0 (2024-11-12)

Features

  • customize active admin authentication logic to ignore devise and use one login COMM-450 (cfe0a71)

1.18.1 (2024-11-07)

Bug Fixes

  • check for blocked status on scheduled messaging refs COMM-894 (802f070)

1.18.0 (2024-11-07)

Features

1.17.0 (2024-11-01)

Features

  • Add HighPriorityDeliverSmsConsumer and virtual partitions config (ae64115)
  • Add priority attribute to Messages (9cac02d)

1.16.0 (2024-10-31)

Features

  • allow delete and update TwilioNumber in AA (1980d95)

1.15.1 (2024-10-30)

Bug Fixes

  • fix duplicate webhooks ref COMM-870 (6103205)
  • fix webhook payload and statuses ref COMM-870 (45ee541)
  • fix webhooks admin page ref COMM-870 (dbae302)
  • remove debugging helper ref COMM-870 (7674710)

1.15.0 (2024-10-24)

Features

  • alter incoming calling menu (f1179f6)

Bug Fixes

  • video_calls: video Call Domain Action End is trying to end a call that is already expired (408b17b)

1.14.0 (2024-10-09)

Features

  • Add mock-twilio gem 1.0.0 (1372e68)
  • Add mock-twilio integration status endpoints (889e895)
  • Add mock-twilio integration toggle (02d8614)
  • Add Switchable mock and real data (3e8afe5)
  • adding credentials for one login production env (2fd96ff)
  • adding one login credentials for staging environment (cd9bd48)
  • set up mock schema data (07cf4d2)

Bug Fixes

  • move tables from common_services to public schema (6bd842d)

1.13.0 (2024-10-01)

Features

  • add get endpoint for video calls refs COMM-833 (399c9a2)
  • verify all api specs are documented COMM-849 (bdf3699)

1.12.0 (2024-09-26)

Features

  • expose new fields business_profile_sid & shaken_stir_product_si… (#423) (cb99065)

Bug Fixes

  • fix video call webhook type typo refs COMM-832 (8814830)

1.11.1 (2024-09-19)

Bug Fixes

  • remove undocumented direct_calls webhook refs COMM-801 (#410) (cd410f4)

1.11.0 (2024-09-19)

Features

  • messaging_services: Move twilio numbers related with a customer to (#383) (1696ee1)

Bug Fixes

  • migration for customers dedicated (e713b1c)

1.10.0 (2024-09-16)

Features

  • add match state validation for customer save (#407) (61ccc9a)

1.9.0 (2024-09-10)

Features

  • add automatic machine detection result as attribute on calls object refs COMM-525 (#401) (a62facf)
  • Add staging to recordings CF url formation (#385) (cd53c75)
  • Set new integration DB (#397) (228b3e5)
  • set state code in phone numbers refs: #COMM-803 (#399) (1c81fb9)
  • shunkan ido translation of classic number pairings COMM-743 (#386) (97fa42a)

Bug Fixes

  • create failed webhook dead letter queue topic as disabled (#402) (cf650d4)
  • inconsistent phone numbers for customers (#403) (ccc5090)
  • move tables from common_services to public schema (#404) (73daee5)

1.8.0 (2024-08-26)

Features

  • Add classtag domain callback_url migration to connect url (#382) (ca4400f)
  • fetch numbers from state related with messaging service k12 (#394) (7e74d6a)
  • refs #comm-752 enforce maximum call length (#376) (243e2c2)
  • rexml CVE-2024-43398 (#396) (5e22106)
  • use tick to execute scheduled tasks refs: #COMM-772 (#390) (b6c7058)

Bug Fixes

1.7.0 (2024-08-16)

Features

  • adding new end point to receive webhook request from lambda fun… (#368) (32fdc4a)
  • comm-441 Video Call Recording functionality (#299) (0fc253a)
  • refs #comm-753 handle session key parameter when creating video call participant (#371) (5568289)
  • update docker-compose to enable external access to local kafka cluster (#378) (8b733c9)

Bug Fixes

  • refs #comm-721 fixes for video call recording lambda code (#372) (9eb15a7)
  • refs #comm-744 add environment variable for updated playright automation (#381) (965a5c8)

1.6.0 (2024-07-25)

Features

  • Add virtual_host option s3 recordings url formation (#365) (6150387)
  • db structure for customers table and K-12 refs: COMM-722 (#366) (4caadea)
  • fix message_body string OPT_OUT case-insensitive (#367) (44f6621)
  • refs #comm-616 add caller ID to voicemail webhooks (#361) (cc2a162)
  • upgrade twilio-ruby and mock-twilio (#363) (b53ef77)

1.5.0 (2024-06-24)

Features

  • add mock twilio gem (#353) (57e9c01)
  • add mock-twilio 0.2.0 - Webhooks::Messages.trigger (#354) (57b8f56)
  • add Mock::Twilio::Client (#348) (57e9c01)
  • refs: #comm-546 automatically sync twilio numbers (#342) (0ed868e)
  • save error_code and set error_description from webhook updates in messages refs: #COMM-566 (#350) (e1fb127)
  • switch to mms type if sms > 160 characters refs: #COMM-594 (#359) (24db97b)

Bug Fixes

  • refs #comm-586 use correct bucket name for recording downloads (#358) (dbda2f5)
  • refs #comm-617 change call create to use participant twilio number (#356) (8415d09)

1.4.0 (2024-05-21)

Features

  • add docker compose, prism set up for twilio mock endpoints (#345) (9313b60)

Bug Fixes

  • force mms type sending empty array of media files to twilio (#346) (9aaf82d)

1.3.0 (2024-05-20)

Features

  • refs #comm-550 edit conversation by client_conversation_id (#343) (282d715)
  • refs #comm-550 edit conversation by global_id (282d715)
  • refs #comm-550 edit conversation by internal_conversation_id (282d715)
  • refs comm-517 change default welcome message (#335) (a572b3f)
  • remove 160 characters validation for SMS body refs: #COMM-558 (#344) (18ce239)

Bug Fixes

  • refs #comm-545 db migration to add missing twilio numbers to production db (#341) (2c1104f)

1.2.2 (2024-05-09)

Bug Fixes

  • refs #comm-506 additional validations for message creation (#325) (e9671f9)

1.2.1 (2024-05-06)

Bug Fixes

  • refs #comm-492 fix: create voicemail records on webhook (151d3b0)

1.2.0 (2024-05-03)

Features

  • add changelog from the github release action to the API doc (#327) (6bccfb0)
  • add version.txt (8e7216a)
  • notify consumer errors to bugsnag (#326) (59c0f60)
  • refs #COMM-414 add callback_url webhooks on zoom events (#295) (2bf2772)

Bug Fixes

Reverts

  • Znensey/fix/comm 500 move prod back to redpanda brokers (#320) (836d312)

1.1.0 (2024-04-25)

Features

  • adds the ability to play a welcome message to call participants on a conference call (53bc624)
  • comm-412 zoom webhook handler (#288) (9eeb5d0)
  • comm-436 welcome messages for conference calling. (#292) (53bc624)
  • document callback_url logic refs: #COMM-483 (#315) (a2abef4)
  • github release action using release-please-action refs: #COMM-489 (1e2b637)
  • github release action using release-please-action refs: #COMM-489 (d2a9fcf)
  • implement get endpoint for D2P call recording by providing the Call UUID refs: #COMM-455 (#296) (5872637)
  • Improve transcription documentation refs: #COMM-443 (#302) (0aea719)
  • refactor documentation for conference calls and direct calls in swagger refs: #COMM-460 (#306) (c0331c0)
  • refs #comm-434 configurable welcome message for direct calls (#287) (8cfc2ae)
  • refs #comm-458 messaging service endpoints (#300) (830135f)
  • refs #comm-463 add data migration to delete data in local/integ… (#304) (6d5cdc4)
  • save webhook payload in DB and show in activeadmin refs: #COMM-431 (826c768)
  • save webhook payload in DB and show in activeadmin refs: #COMM-431 (#289) (826c768)

Bug Fixes

  • blueprint response in webhooks (#308) (2d716c0)
  • move misplaced json doc file. (#297) (141fe7b)
  • name validation in messaging service blocking deployments (d720c67)
  • skip callbacks in messaging service name migration (7450895)
  • vertical scroll in webhook payload refs: #COMM-440 (826c768)

API Keys

The Common Services API uses Bearer Token authentication for authorization of requests. These tokens need to be supplied - otherwise the API will return a 403 Forbidden error. For more details on all that, please refer to the Platform API Overview.

The Common Services API implements two objects, both of which are required for API Access: a Bearer Token and an API Key. A single bearer can have multiple API keys if desired.

There are two user levels for actions relating to API keys. Actions can be performed as an admin or user. Actions taken as an admin can be performed regardless of associated bearers. Non-admin actions can only be performed for the associated bearer token(s).

List all api keys as admin

A list of all the API Keys that have been generated will be returned. Send the request with an empty body. Note that the token is not included in this list.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create an API Key as admin

This generates an API Key as an administrators. You must have an existing API key in order to generate more API keys.

Authorizations:
Bearer
Request Body schema: application/json
bearer_id
required
number

ID of the bearer to generate an API key for.

Responses

Request samples

Content type
application/json
{
  • "bearer_id": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "bearer_id": 0,
  • "created_at": "string",
  • "token": "string"
}

Remove an API Key as admin

Authorizations:
Bearer
path Parameters
id
required
any

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Retrieve an api key

A list of all the API Keys that are associated with the current bearer will be returned. Send the request with an empty body. Note that the token is not included in this list.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create an API key

Generating an API Key can be performed both by administrators and non-administrators, with the caveat that an existing API Key is necessary to generate it, and a non-administrator will only be to generate an API Key for the bearer that the API key belongs to. API Keys can also be revoked.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "bearer_id": 0,
  • "created_at": "string",
  • "token": "string"
}

Remove an API key

It's possible to revoke an API Key with a DELETE request. Deleting keys via this endpoint, you will only be able to delete API Keys associated with the bearer you're using. To revoke the key, send a request with an empty body. Please note that deleting an API Key will delete it in our database - it simply won’t exist anymore to authenticate with.

Authorizations:
Bearer
path Parameters
id
required
any

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Bearers

Bearers can only be generated by someone with admin level API Access. If a user or application sends an outbound message, Common Services will process the message, send it out through our provider, and then receive webhook updates from the provider. Supplying this URL is required for the original application to receive updates regarding the message that was sent out.

Separately, if an inbound message comes in, this URL can also be used to send notifications to an application that a message has been received.

All of this fields are required for generating a bearer.

Create a bearer

To generate a bearer, you must have admin level privileges. Make sure to hang onto the ID for the bearer - it will be necessary for generating an API Key. It may on occasion be necessary to get a list of bearers - this can again only be done at the administrator level.

Authorizations:
Bearer
Request Body schema: application/json
bearer_name
required
string

Descriptive name for the bearer. Could be a person's name, application name, or a server name.

bearer_type
required
string

Type of bearer. Can be Admin, Application, or User. These different types have different permission levels.

  • Admin - These users have access to the entire API. This is mostly just used to limit who can create and view.
  • Application - This is meant to be used by an application.
  • User - This could refer to a person, team, or organization.
callback_url
required
string

Global End user API endpoint for sending messages or making calls. Please, send us a callback_url in your request if you want to override the default one. The order presedence is:

  • we read the callback_url from the request
  • if not present, we read the callback_url from the conversation
  • if not present, we use the Global callback_url from the Bearer.
username
required
string

Username for basic auth for the callback URL

password
required
string

Password for basic auth for the callback URL.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{}

List all bearers

Returns a list of all bearers. This action can only be performed by an admin user.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete a bearer

Permanently deletes a bearer. It cannot be undone.

Authorizations:
Bearer
path Parameters
id
required
any

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Update a bearer

Updates the specified bearer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Authorizations:
Bearer
path Parameters
id
required
any
Request Body schema: application/json
bearer_name
required
string

Descriptive name for the bearer. Could be a person's name, application name, or a server name.

bearer_type
required
string

Type of bearer. Can be Admin, Application, or User. These different types have different permission levels.

  • Admin - These users have access to the entire API. This is mostly just used to limit who can create and view.
  • Application - This is meant to be used by an application.
  • User - This could refer to a person, team, or organization.
callback_url
required
string

Global End user API endpoint for sending messages or making calls. Please, send us a callback_url in your request if you want to override the default one. The order presedence is:

  • we read the callback_url from the request
  • if not present, we read the callback_url from the conversation
  • if not present, we use the Global callback_url from the Bearer.
username
required
string

Username for basic auth for the callback URL

password
required
string

Password for basic auth for the callback URL.

Responses

Request samples

Content type
application/json
{
  • "bearer_name": "string",
  • "bearer_type": "string",
  • "callback_url": "string",
  • "username": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "bearer_name": "string",
  • "bearer_type": "string",
  • "callback_url": "string",
  • "created_at": "string"
}

Create a messaging service

To generate a messaging service, you must have admin level privileges. Make sure to hang onto the ID for the bearer - it will be necessary for generating an API Key. It may on occasion be necessary to get a list of bearers - this can again only be done at the administrator level.

Authorizations:
Bearer
Request Body schema: application/json
twilio_messaging_sid
string

Messaging service sid provider.

provider_messaging_sid
required
string

Messaging service sid provider.

global_customer_id
required
string

global customer id value

twilio_numbers
required
object

twilio numbers available

Responses

Request samples

Content type
application/json
{
  • "provider_messaging_sid": "string",
  • "global_customer_id": "string",
  • "provider_numbers_attributes": "object with elements"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "global_customer_id": "string",
  • "name": "string",
  • "provider_messaging_sid": "string",
  • "provider_name": "string",
  • "twilio_messaging_sid": "string",
  • "uuid": "string",
  • "provider_numbers": [
    ]
}

Update current bearer

Authorizations:
Bearer
Request Body schema: application/json
id
required
number

Database primary key

bearer_name
required
string

Descriptive name for the bearer. Could be a person's name, application name, or a server name.

bearer_type
required
string

Type of bearer. These different types have different permission levels.

Value Description
"Admin" These users have access to the entire API. This is mostly just used to limit who can create and view available bearers.
"Application" This is meant to be used by an application.
"User" This could refer to a person, team, or organization.
callback_url
required
string or null

Global End user API endpoint for sending messages or making calls. Please, send us a callback_url in your request if you want to override the default one. The order presedence is:

  • we read the callback_url from the request
  • if not present, we read the callback_url from the conversation
  • if not present, we use the Global callback_url from the Bearer.
created_at
required
string

Timestamp for record creation

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "id": 0,
  • "bearer_name": "string",
  • "bearer_type": "string",
  • "callback_url": "string",
  • "created_at": "string"
}

Retrieve current bearer

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "bearer_name": "string",
  • "bearer_type": "string",
  • "callback_url": "string",
  • "created_at": "string"
}

Conference Calls

The Conference Calls object represents a single attempt to create a call between two or more phones.

Create a conference call

Authorizations:
Bearer
Request Body schema: application/json
twilio_number
required
string

This number is going to be used to make all the invites and the Conference.

moderator_number
required
string

Moderator number is the first one to get invited to the Call.

client_conversation_id
required
string

This is an ID created by your system. The Common Services API will use this ID to describe the pairing between a school employee and one or more contacts.

welcome_message
string

Voice message that is going to be reproduced at the beginning of the Conference Call

callback_url
string

You can set a URL to receive webhooks when the status of a Conference Call changes. When you make a conference call and create a conversation for the first time, you're supplying us a callback URL. We save that callback URL to the conversation and then use it as a fallback the next time. If you don't provide us a callback_url, we use the one attached to the conversation. If you want to avoid unexpected behavior, we recommend you to always provide a callback_url when creating a conference call.

participant_numbers
required
Array of strings

Set of phone numbers you want to invite to the Call.

Responses

Request samples

Content type
application/json
{
  • "twilio_number": "string",
  • "moderator_number": "string",
  • "client_conversation_id": "string",
  • "welcome_message": "string",
  • "callback_url": "string",
  • "participant_numbers": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "client_conversation_id": "string",
  • "created_at": "string",
  • "error_code": "string",
  • "error_description": "string",
  • "failed_at": "string",
  • "internal_status": "string",
  • "machine_detected": true,
  • "participant_number": "string",
  • "provider_number": "string",
  • "provider_status": "string",
  • "recording_duration": 0,
  • "recording_url": "string",
  • "transcription": {
    },
  • "updated_at": "string",
  • "uuid": "string",
  • "conference_call": {
    }
}

Retrieve a conference call

Retrieves the details of a conference call object that has previously been created. Supply the uuid that was returned from your previous request, and Common Services will return the corresponding conference call information. The same information is returned when creating a conference call.

Authorizations:
Bearer
path Parameters
uuid
required
any

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "client_conversation_id": "string",
  • "conference_sid": "string",
  • "created_at": "string",
  • "friendly_name": "string",
  • "internal_status": "string",
  • "moderator_number": "string",
  • "participant_numbers": [
    ],
  • "provider_number": "string",
  • "provider_status": "string",
  • "recording_url": "string",
  • "transcription": {
    },
  • "twilio_number": "string",
  • "updated_at": "string",
  • "uuid": "string",
  • "welcome_message": "string"
}

Conversations

A conversation is a unique message thread that contains Participants and the Messages they have sent.

Create a conversation

Authorizations:
Bearer
header Parameters
Authorization
string
Request Body schema: application/json
object (Api::V1::ConversationsController_new)

Responses

Request samples

Content type
application/json
{ }

Updates a Conversation

Authorizations:
Bearer
path Parameters
id
required
any
header Parameters
Authorization
string
Request Body schema: application/json
object (Api::V1::ConversationsController_new)

Responses

Request samples

Content type
application/json
{ }

Updates a Conversation

Authorizations:
Bearer
path Parameters
client_conversation_id
required
any
header Parameters
Authorization
string
Request Body schema: application/json
object (Api::V1::ConversationsController_new)

Responses

Request samples

Content type
application/json
{ }

Updates a Conversation

Authorizations:
Bearer
path Parameters
global_id
required
any
header Parameters
Authorization
string
Request Body schema: application/json
object (Api::V1::ConversationsController_new)

Responses

Request samples

Content type
application/json
{ }

Updates a Conversation

Authorizations:
Bearer
path Parameters
internal_conversation_id
required
any
header Parameters
Authorization
string
Request Body schema: application/json
object (Api::V1::ConversationsController_new)

Responses

Request samples

Content type
application/json
{ }

Messages

The Messages object represents an inbound or outbound message between a school entity and one or more guardians. You can create a message object via the REST API, and a message object is created when someone sends a message to a sender_number. Use it to send or schedule a new message, to retrieve a specific message, cancle a scheduled message, or retrieve a list of messages.

Retrieve a message

Retrieves the details of a message object that has previously been created. Supply the unique message ID that was returned from your previous request, and Platform will return the corresponding message information. The same information is returned when creating a message.

Authorizations:
Bearer
path Parameters
uuid
required
string

The unique ID for this message.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "client_conversation_id": "string",
  • "global_id": "string",
  • "internal_conversation_id": "string",
  • "media_file_urls": [
    ],
  • "media_urls": [
    ],
  • "message_body": "string",
  • "message_sid": "string",
  • "message_type": "string",
  • "message_uuid": "string",
  • "priority": "string",
  • "provider": "string",
  • "provider_status": "string",
  • "receiver_number": "string",
  • "sender_number": "string"
}

Create a message

This allows you to create a message for immediate delivery or schedule it to be sent later.

Authorizations:
Bearer
Request Body schema: application/json
required
object

Object containing data associated with the message.

Responses

Request samples

Content type
application/json
{
  • "message": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "client_conversation_id": "string",
  • "global_id": "string",
  • "internal_conversation_id": "string",
  • "media_file_urls": [
    ],
  • "media_urls": [
    ],
  • "message_body": "string",
  • "message_sid": "string",
  • "message_type": "string",
  • "message_uuid": "string",
  • "priority": "string",
  • "provider": "string",
  • "provider_status": "string",
  • "receiver_number": "string",
  • "sender_number": "string"
}

Cancel a scheduled message

Canclels a scheduled message immediately. Supply the unique message ID that was returned from your previous request, and Platform will cancle the scheduled message.

Authorizations:
Bearer
path Parameters
uuid
required
any

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

List all messages

Returns a list of your messages filtered by the to and from numbers.

Authorizations:
Bearer
Request Body schema: application/json
from
required
string

sender number

to
required
string

receiver number

Responses

Request samples

Content type
application/json
{
  • "from": "string",
  • "to": "string"
}

SDK Calls

The SDK calls resource allows you to generate a Twilio voice-token (also called AccessToken in Twilio documentation) for calls and TwiML responses using the Twilio frontend calling SDKs.

Return Calls

The Return Calling feature encompasses two main scenarios:

  1. Return Calling via SDK Phone: This scenario caters to calls made using the Twilio SDK by a school staff member to a contact.
  2. Return Calling via Phone-to-SDK: This scenario applies to calls made by a contact to a school staff member.

Return Call Flow

Each scenario provides callers with menu options upon returning a call, including reconnecting with the teacher, leaving a voicemail, or opting out of future calls.

Return Calling via SDK Phone

Enable parents to return calls made by teachers, offering them specific interaction options.

  1. Device Initialization: The school staff member will need to have a device registered with Platform and Twilio before any calls can be forwarded to it. Depending on your implementation of the Twilio SDK, this will most likely only be the case if the teacher has made a call using their browser.
  2. Play Call Menu Options: Platform will play back the call menu options to the parent. If they select 'option 1' then Platform will instruct Twilio to forward the call through to the Twilio SDK software phone belonging to the school staff member.
  3. Detect Return Call: The Twilio SDK will receive the call from Twilio and ring the staff member.
  4. No Device Available: If there is no device initialized for the staff member the contact is trying to call, then 'option 1' will automatically route them to leave a voicemail.
  5. Retrieve Voicemail: Once the voicemail has been recorded and the call has ended, the recording is processed and transcribed. Once this process is completed, a callback containing a URL to the artifacts in its payload, will be sent to your webhook URL. This URL will be good for 24 hours. A request to GET {host}/api/v1/voicemails/{id} can be used to retrieve a new signed URL.

Create a voice token

Generate a Twilio Access Token and Voice Grant for frontend calls.

  1. You can get a voice token from the API by providing the moderator_id, conversation_id and a callback_url with the client_call_id.
  2. You can then instantiate the SDK client with the voice token you recieved.
  3. Twilio will request the destination and moderator numbers, we will provide these to Twilio for you.
  4. Twilio will create the call.
Authorizations:
Bearer
Request Body schema: application/json
required
object

Conversation Properties for generating a new twilio call token

Responses

Request samples

Content type
application/json
{
  • "conversation": "string"
}

Response samples

Content type
application/json
{
  • "identity": "string",
  • "token": "string"
}

Create a response

Generates a TwiML response for frontend SDK calls.

Authorizations:
Bearer
Request Body schema: application/json
To
string
client_conversation_id
string
global_id
string
internal_conversation_id
string
messaging_service_sid
string
global_customer_id
string
callback_url
string

You can set a URL to receive webhooks when the status of an SDK call (D2P) changes. When you make a call using the SDK you can provide us a callback_url . If you don't provide a callback_url, we use the one attached to the conversation. If you want to avoid unexpected behavior, we recommend you to always provide a callback_url when creating an SDK call .

Responses

Request samples

Content type
application/json
{
  • "To": "string",
  • "client_conversation_id": "string",
  • "global_id": "string",
  • "internal_conversation_id": "string",
  • "messaging_service_sid": "string",
  • "global_customer_id": "string",
  • "callback_url": "string"
}

Retrieve a voicemail

Returns the properties of the voicemail for id

Authorizations:
Bearer
path Parameters
id
required
any

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "caller_id": "string",
  • "created_at": "string",
  • "internal_status": "string",
  • "participant_number": "string",
  • "provider_number": "string",
  • "provider_status": "string",
  • "updated_at": "string"
}

Status

Retrieves a status check for the health of the Common Services API resources.

Retrieves an a health status check message

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Announcements

Create an announcement

Create an announcement message for immediate delivery. This endpoint validates the parameters and queues the message for background delivery. No database record is created during the request to reduce latency. A successful response includes the client_announcement_id and client_message_id that you provided, that can be used with the callback_url to track delivery status.

Authorizations:
Bearer
Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "announcement": {
    }
}

Response samples

Content type
application/json
{
  • "client_announcement_id": "string",
  • "client_message_id": "string"
}

Calls (D2P/P2P)

Retrieve a Call

Returns a Call based on the UUID.
This endpoint supports SDK Calls (D2P) or Conference Calls (P2P), you only have to be sure you provide a Call UUID.

There are multiple ways we share the UUID of a call with you:

  • for conference calls (P2P), the Call UUID is provided in the payload's root after creating one and also in each webhook you get back.
  • for Direct Calls (D2P), the only way to get the UUID is via webhooks.
Authorizations:
Bearer
path Parameters
uuid
required
any

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "call_sid": "string",
  • "client_conversation_id": "string",
  • "created_at": "string",
  • "error_code": "string",
  • "error_description": "string",
  • "failed_at": "string",
  • "internal_status": "string",
  • "machine_detected": true,
  • "participant_number": "string",
  • "provider_number": "string",
  • "provider_status": "string",
  • "recording_duration": 0,
  • "recording_url": "string",
  • "transcription": {
    },
  • "updated_at": "string",
  • "uuid": "string"
}

Retrieve a recording url

Returns an expirable s3 recording url with an expiration of 12 hours by providing a Call UUID. When the recording url doesn't exist, you get an empty value.

There are multiple ways we share the UUID of a call with you:

  • for conference calls (P2P), the Call UUID is provided in the payload's root after creating one and also in each webhook you get back.
  • for Direct Calls (D2P), the only way to get the UUID is via webhooks.
Authorizations:
Bearer
path Parameters
uuid
required
any

Responses

Response samples

Content type
application/json
{
  • "recording_url": "string"
}

Participants

Sets pairing_deactivated_at flag to the current time

Authorizations:
Bearer
path Parameters
conversation_id
required
any
header Parameters
Authorization
string
Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "participant": {
    }
}

Sets pairing_deactivated_at flag to the current time

Authorizations:
Bearer
path Parameters
conversation_id
required
any
header Parameters
Authorization
string
Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "participant": {
    }
}

Sets pairing_deactivated_at flag to the current time

Authorizations:
Bearer
path Parameters
conversation_id
required
any
header Parameters
Authorization
string
Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "participant": {
    }
}

Sets pairing_deactivated_at flag to the current time

Authorizations:
Bearer
header Parameters
Authorization
string
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "participant": {
    }
}

Sets pairing_deactivated_at flag to the current time

Authorizations:
Bearer
header Parameters
Authorization
string
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "participant": {
    }
}

Sets pairing_deactivated_at flag to the current time

Authorizations:
Bearer
header Parameters
Authorization
string
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "participant": {
    }
}

Messaging Services

Retrieve all messaging services

Retrieves the details of all stored messaging services.

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a messaging service

Creates a messaging service. This is a combination of a global customer ID, a twilio messaging service sid, and a bandwidth messaging sid

Authorizations:
Bearer
Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "messaging_service": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "global_customer_id": "string",
  • "name": "string",
  • "provider_messaging_sid": "string",
  • "provider_name": "string",
  • "twilio_messaging_sid": "string",
  • "uuid": "string",
  • "provider_numbers": [
    ]
}

Retrieve a single messaging service

Retrieves a single messaging service using its uuid

Authorizations:
Bearer
path Parameters
uuid
required
any

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "global_customer_id": "string",
  • "name": "string",
  • "provider_messaging_sid": "string",
  • "provider_name": "string",
  • "twilio_messaging_sid": "string",
  • "uuid": "string",
  • "provider_numbers": [
    ]
}

Update a single messaging service using patch

Updates a messaging service using its uuid

Authorizations:
Bearer
path Parameters
uuid
required
any

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "global_customer_id": "string",
  • "name": "string",
  • "provider_messaging_sid": "string",
  • "provider_name": "string",
  • "twilio_messaging_sid": "string",
  • "uuid": "string",
  • "provider_numbers": [
    ]
}

Update a single messaging service using put

Updates a messaging service using its uuid

Authorizations:
Bearer
path Parameters
uuid
required
any

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "global_customer_id": "string",
  • "name": "string",
  • "provider_messaging_sid": "string",
  • "provider_name": "string",
  • "twilio_messaging_sid": "string",
  • "uuid": "string",
  • "provider_numbers": [
    ]
}

Retrieve a messaging service by the provider messaging sid

Retrieves the details of a messaging service using its provider messaging service sid

Authorizations:
Bearer
query Parameters
twilio_messaging_sid
string

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "global_customer_id": "string",
  • "name": "string",
  • "provider_messaging_sid": "string",
  • "provider_name": "string",
  • "twilio_messaging_sid": "string",
  • "uuid": "string",
  • "provider_numbers": [
    ]
}

Retrieve a messaging service by the provider messaging sid

Retrieves the details of a messaging service using its provider messaging service sid

Authorizations:
Bearer
query Parameters
provider_messaging_sid
string

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "global_customer_id": "string",
  • "name": "string",
  • "provider_messaging_sid": "string",
  • "provider_name": "string",
  • "twilio_messaging_sid": "string",
  • "uuid": "string",
  • "provider_numbers": [
    ]
}

Retrieve a messaging service by the global customer ID

Retrieves the details of a messaging service using its global customer id

Authorizations:
Bearer
query Parameters
global_customer_id
string

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "global_customer_id": "string",
  • "name": "string",
  • "provider_messaging_sid": "string",
  • "provider_name": "string",
  • "twilio_messaging_sid": "string",
  • "uuid": "string",
  • "provider_numbers": [
    ]
}

Retrieve a messaging service by the name of the messaging service

Retrieves the details of a messaging service using its' name

Authorizations:
Bearer
query Parameters
name
string

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "global_customer_id": "string",
  • "name": "string",
  • "provider_messaging_sid": "string",
  • "provider_name": "string",
  • "twilio_messaging_sid": "string",
  • "uuid": "string",
  • "provider_numbers": [
    ]
}

Video Calls

Create a Video Call Participant

Authorizations:
Bearer
Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "participant": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "bearer_id": 0,
  • "created_at": "string",
  • "is_host": true,
  • "provider_id": "string",
  • "session_name": "string",
  • "shunkan_ido_session_key": "string",
  • "shunkan_ido_user_key": "string",
  • "token_signature": "string",
  • "updated_at": "string",
  • "username": "string",
  • "video_call_id": 0
}

Create a Video Call

A Creates a Video Call in our database, then generates the host participant, including a token for that host participant

Authorizations:
Bearer
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "video_call": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "bearer_id": 0,
  • "client_conversation_id": "string",
  • "created_at": "string",
  • "end_time": "string",
  • "global_id": "string",
  • "host_token": "string",
  • "host_username": "string",
  • "internal_conversation_id": "string",
  • "internal_status": "string",
  • "maximum_call_length": 0,
  • "provider_id": "string",
  • "provider_status": "string",
  • "session_name": "string",
  • "shunkan_ido_session_key": "string",
  • "start_time": "string",
  • "updated_at": "string"
}

Retrieve a Video Call

Retrieves a video call, as well as its participants and recordings, by session key.

Authorizations:
Bearer
path Parameters
session_key
required
string

The unique ID for this video call.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "bearer_id": 0,
  • "client_conversation_id": "string",
  • "created_at": "string",
  • "end_at": "string",
  • "end_time": "string",
  • "global_id": "string",
  • "host_token": "string",
  • "host_username": "string",
  • "internal_conversation_id": "string",
  • "internal_status": "string",
  • "maximum_call_length": 0,
  • "provider_id": "string",
  • "provider_status": "string",
  • "session_name": "string",
  • "shunkan_ido_session_key": "string",
  • "start_time": "string",
  • "updated_at": "string",
  • "video_call_participants": [
    ],
  • "video_call_recordings": [
    ]
}

Receive a webhook from zoom

This endpoint accepts webhooks from Zoom, which we use for video calls.

Request Body schema: application/json
event_ts
number

unix integer timestamp for when the event was sent.

event
string

event name froom zoom

object

Responses

Request samples

Content type
application/json
{
  • "event_ts": 0,
  • "event": "string",
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "plainToken": "string",
  • "encryptedToken": "string"
}

Webhook Events

announcements.message.opt_out

This webhook is sent whenever an end-user opts out of communication from a given provider phone number.

Request Body schema: application/json
id
number

The internal ID for announcements_messages from postgres.

global_customer_id
string or null

The global customer id the end users have for each customer.

recipient_number
string

The number of the recipient who's receiving the message.

provider_number
string

The number associated to the customer.

client_announcement_id
string or null

The announcement ID, to be able to identity or group a batch of announcements.

client_message_id
string or null

A unique identifier for the message, as provided by the client system.

body
string

The description of the message.

callback_url
string or null

The callback url to hit the end users applications.

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "global_customer_id": "string",
  • "recipient_number": "string",
  • "provider_number": "string",
  • "client_announcement_id": "string",
  • "client_message_id": "string",
  • "body": "string",
  • "callback_url": "string"
}

announcements.message.status_update

This webhook is to update announcements messages with Twilio information and hit end users applications to notify them.

Request Body schema: application/json
id
number

The internal ID for announcements_messages from postgres.

global_customer_id
string or null

The global customer id the end users have for each customer.

recipient_number
string

The number of the recipient who's receiving the message.

provider_number
string

The number associated to the customer.

client_announcement_id
string or null

The announcement ID, to be able to identity or group a batch of announcements.

client_message_id
string or null

A unique identifier for the message, as provided by the client system.

body
string

The description of the message.

callback_url
string or null

The callback url to hit the end users applications.

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "global_customer_id": "string",
  • "recipient_number": "string",
  • "provider_number": "string",
  • "client_announcement_id": "string",
  • "client_message_id": "string",
  • "body": "string",
  • "callback_url": "string"
}

conference_calls.conference_call.status_update

Request Body schema: application/json
any

Responses

Request samples

Content type
application/json
null

direct_calls.call.status_update

Request Body schema: application/json
any

Responses

Request samples

Content type
application/json
null

direct_calls.voicemail.recorded

This webhook is sent whenever a voicemail recording has been received from the third-party provider and saved to our database.

Request Body schema: application/json
any

Responses

Request samples

Content type
application/json
null

direct_calls.voicemail.transcripted

This webhook is sent whenever a voicemail transcription has been received from the third-party provider and saved to our database.

Request Body schema: application/json
any

Responses

Request samples

Content type
application/json
null

direct_calls.voicemail.status_update

This webhook is sent whenever a voicemail has its status updated, usually when it fails.

Request Body schema: application/json
any

Responses

Request samples

Content type
application/json
null

messages.message.status_update

Request Body schema: application/json
any

Responses

Request samples

Content type
application/json
null

messages.message.inbound_sms

Request Body schema: application/json
any

Responses

Request samples

Content type
application/json
null

messages.message.inbound_mms

Request Body schema: application/json
any

Responses

Request samples

Content type
application/json
null

messages.message.opt_out

This webhook is sent whenever an end-user opts out of communication from a given provider phone number.

Request Body schema: application/json
any

Responses

Request samples

Content type
application/json
null

messages.message.images_lambda

header Parameters
Authorization
string
Request Body schema: application/json
any

Responses

Request samples

Content type
application/json
null

video_calls.video_call.status_update

Request Body schema: application/json
any

Responses

Request samples

Content type
application/json
null