Download OpenAPI specification:Download
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.
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:
You can find all this at Platform Wiki.
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).
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.
[- {
- "id": 0,
- "bearer_id": 0,
- "created_at": "string"
}
]
This generates an API Key as an administrators. You must have an existing API key in order to generate more API keys.
bearer_id required | number ID of the bearer to generate an API key for. |
{- "bearer_id": 0
}
{- "id": 0,
- "bearer_id": 0,
- "created_at": "string",
- "token": "string"
}
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.
[- {
- "id": 0,
- "bearer_id": 0,
- "created_at": "string"
}
]
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.
{- "id": 0,
- "bearer_id": 0,
- "created_at": "string",
- "token": "string"
}
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.
id required | any |
{- "error": {
- "code": 0,
- "message": "string",
- "detail": "string"
}
}
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.
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.
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.
|
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:
|
username required | string Username for basic auth for the callback URL |
password required | string Password for basic auth for the callback URL. |
{- "bearer_name": "Ron",
- "bearer_type": "User",
- "username": "RegCattermole",
- "password": "Scabbers80"
}
{- "bearer": {
- "id": "037",
- "bearer_name": "Ron",
- "bearer_type": "User",
- "created_at": "2023-12-06T22:45:37.607Z"
}
}
Updates the specified bearer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
id required | any |
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.
|
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:
|
username required | string Username for basic auth for the callback URL |
password required | string Password for basic auth for the callback URL. |
{- "bearer_name": "string",
- "bearer_type": "string",
- "callback_url": "string",
- "username": "string",
- "password": "string"
}
{- "id": 0,
- "bearer_name": "string",
- "bearer_type": "string",
- "callback_url": "string",
- "created_at": "string"
}
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.
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 |
{- "provider_messaging_sid": "string",
- "global_customer_id": "string",
- "provider_numbers_attributes": "object with elements"
}
{- "id": 0,
- "global_customer_id": "string",
- "name": "string",
- "provider_messaging_sid": "string",
- "provider_name": "string",
- "twilio_messaging_sid": "string",
- "uuid": "string",
- "provider_numbers": [
- {
- "id": 0,
- "phone_number": "string"
}
]
}
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.
| ||||||||
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:
| ||||||||
created_at required | string Timestamp for record creation |
{- "bearer_name": "Severus Snape",
}
{- "id": 0,
- "bearer_name": "string",
- "bearer_type": "string",
- "callback_url": "string",
- "created_at": "string"
}
The Conference Calls object represents a single attempt to create a call between two or more phones.
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. |
{- "twilio_number": "string",
- "moderator_number": "string",
- "client_conversation_id": "string",
- "welcome_message": "string",
- "callback_url": "string",
- "participant_numbers": [
- "string"
]
}
{- "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": {
- "alternateFormats": {
- "webvtt": "string",
- "srt": "string",
- "formattedText": "string",
- "dfxp": "string"
}, - "words": [ ]
}, - "updated_at": "string",
- "uuid": "string",
- "conference_call": {
- "id": 0,
- "client_conversation_id": "string",
- "conference_sid": "string",
- "created_at": "string",
- "friendly_name": "string",
- "internal_status": "string",
- "moderator_number": "string",
- "participant_numbers": [
- "string"
], - "provider_number": "string",
- "provider_status": "string",
- "recording_url": "string",
- "transcription": {
- "alternateFormats": {
- "webvtt": "string",
- "srt": "string",
- "formattedText": "string",
- "dfxp": "string"
}, - "words": [ ]
}, - "twilio_number": "string",
- "updated_at": "string",
- "uuid": "string",
- "welcome_message": "string"
}
}
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.
uuid required | any |
{- "id": 0,
- "client_conversation_id": "string",
- "conference_sid": "string",
- "created_at": "string",
- "friendly_name": "string",
- "internal_status": "string",
- "moderator_number": "string",
- "participant_numbers": [
- "string"
], - "provider_number": "string",
- "provider_status": "string",
- "recording_url": "string",
- "transcription": {
- "alternateFormats": {
- "webvtt": "string",
- "srt": "string",
- "formattedText": "string",
- "dfxp": "string"
}, - "words": [ ]
}, - "twilio_number": "string",
- "updated_at": "string",
- "uuid": "string",
- "welcome_message": "string"
}
A conversation is a unique message thread that contains Participants and the Messages they have sent.
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.
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.
uuid required | string The unique ID for this message. |
{- "id": 0,
- "client_conversation_id": "string",
- "global_id": "string",
- "internal_conversation_id": "string",
- "media_file_urls": [
- "string"
], - "media_urls": [
- "string"
], - "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"
}
This allows you to create a message for immediate delivery or schedule it to be sent later.
required | object Object containing data associated with the message. |
{- "message": {
- "sender_number": "string",
- "receiver_number": "string",
- "message_body": "string",
- "message_type": "sms",
- "messaging_service_sid": "string",
- "callback_url": "string",
- "language_code": "en-US",
- "client_conversation_id": "string",
- "global_id": "string",
- "global_customer_id": "string",
- "media_urls": [
- "string"
], - "send_at": "string",
- "priority": "string"
}
}
{- "id": 0,
- "client_conversation_id": "string",
- "global_id": "string",
- "internal_conversation_id": "string",
- "media_file_urls": [
- "string"
], - "media_urls": [
- "string"
], - "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"
}
Canclels a scheduled message immediately. Supply the unique message ID that was returned from your previous request, and Platform will cancle the scheduled message.
uuid required | any |
{- "error": {
- "code": 0,
- "message": "string",
- "detail": "string"
}
}
Returns a list of your messages filtered by the to
and from
numbers.
from required | string sender number |
to required | string receiver number |
{- "from": "string",
- "to": "string"
}
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.
The Return Calling feature encompasses two main scenarios:
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.
Enable parents to return calls made by teachers, offering them specific interaction options.
{host}/api/v1/voicemails/{id}
can be used to retrieve a new signed URL.Generate a Twilio Access Token and Voice Grant for frontend calls.
moderator_id
, conversation_id
and a callback_url
with the client_call_id
.required | object Conversation Properties for generating a new twilio call token |
{- "conversation": "string"
}
{- "identity": "string",
- "token": "string"
}
Generates a TwiML response for frontend SDK calls.
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 . |
{- "To": "string",
- "client_conversation_id": "string",
- "global_id": "string",
- "internal_conversation_id": "string",
- "messaging_service_sid": "string",
- "global_customer_id": "string",
- "callback_url": "string"
}
Returns the properties of the voicemail for id
id required | any |
{- "id": 0,
- "caller_id": "string",
- "created_at": "string",
- "internal_status": "string",
- "participant_number": "string",
- "provider_number": "string",
- "provider_status": "string",
- "updated_at": "string"
}
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.
required | object |
{- "announcement": {
- "id": 0,
- "body": "string",
- "recipient_number": "string",
- "global_customer_id": "string",
- "client_announcement_id": "string",
- "client_message_id": "string",
- "callback_url": "string",
- "created_at": "string",
- "updated_at": "string"
}
}
{- "client_announcement_id": "string",
- "client_message_id": "string"
}
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:
UUID
is provided in the payload's root after creating one and also in each webhook you get back. UUID
is via webhooks.uuid required | any |
{- "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": {
- "alternateFormats": {
- "webvtt": "string",
- "srt": "string",
- "formattedText": "string",
- "dfxp": "string"
}, - "words": [ ]
}, - "updated_at": "string",
- "uuid": "string"
}
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:
UUID
is provided in the payload's root after creating one and also in each webhook you get back. UUID
is via webhooks.uuid required | any |
{- "recording_url": "string"
}
conversation_id required | any |
Authorization | string |
required | object |
{- "participant": {
- "contact_number": "string"
}
}
conversation_id required | any |
Authorization | string |
required | object |
{- "participant": {
- "contact_number": "string"
}
}
conversation_id required | any |
Authorization | string |
required | object |
{- "participant": {
- "contact_number": "string"
}
}
Retrieves the details of all stored messaging services.
[- {
- "id": 0,
- "global_customer_id": "string",
- "name": "string",
- "provider_messaging_sid": "string",
- "provider_name": "string",
- "twilio_messaging_sid": "string",
- "uuid": "string",
- "provider_numbers": [
- {
- "id": 0,
- "phone_number": "string"
}
]
}
]
Creates a messaging service. This is a combination of a global customer ID, a twilio messaging service sid, and a bandwidth messaging sid
required | object |
{- "messaging_service": {
- "name": "string",
- "provider_messaging_sid": "string",
- "global_customer_id": "string"
}
}
{- "id": 0,
- "global_customer_id": "string",
- "name": "string",
- "provider_messaging_sid": "string",
- "provider_name": "string",
- "twilio_messaging_sid": "string",
- "uuid": "string",
- "provider_numbers": [
- {
- "id": 0,
- "phone_number": "string"
}
]
}
Retrieves a single messaging service using its uuid
uuid required | any |
{- "id": 0,
- "global_customer_id": "string",
- "name": "string",
- "provider_messaging_sid": "string",
- "provider_name": "string",
- "twilio_messaging_sid": "string",
- "uuid": "string",
- "provider_numbers": [
- {
- "id": 0,
- "phone_number": "string"
}
]
}
Updates a messaging service using its uuid
uuid required | any |
{- "id": 0,
- "global_customer_id": "string",
- "name": "string",
- "provider_messaging_sid": "string",
- "provider_name": "string",
- "twilio_messaging_sid": "string",
- "uuid": "string",
- "provider_numbers": [
- {
- "id": 0,
- "phone_number": "string"
}
]
}
Updates a messaging service using its uuid
uuid required | any |
{- "id": 0,
- "global_customer_id": "string",
- "name": "string",
- "provider_messaging_sid": "string",
- "provider_name": "string",
- "twilio_messaging_sid": "string",
- "uuid": "string",
- "provider_numbers": [
- {
- "id": 0,
- "phone_number": "string"
}
]
}
Retrieves the details of a messaging service using its provider messaging service sid
twilio_messaging_sid | string |
{- "id": 0,
- "global_customer_id": "string",
- "name": "string",
- "provider_messaging_sid": "string",
- "provider_name": "string",
- "twilio_messaging_sid": "string",
- "uuid": "string",
- "provider_numbers": [
- {
- "id": 0,
- "phone_number": "string"
}
]
}
Retrieves the details of a messaging service using its provider messaging service sid
provider_messaging_sid | string |
{- "id": 0,
- "global_customer_id": "string",
- "name": "string",
- "provider_messaging_sid": "string",
- "provider_name": "string",
- "twilio_messaging_sid": "string",
- "uuid": "string",
- "provider_numbers": [
- {
- "id": 0,
- "phone_number": "string"
}
]
}
Retrieves the details of a messaging service using its global customer id
global_customer_id | string |
{- "id": 0,
- "global_customer_id": "string",
- "name": "string",
- "provider_messaging_sid": "string",
- "provider_name": "string",
- "twilio_messaging_sid": "string",
- "uuid": "string",
- "provider_numbers": [
- {
- "id": 0,
- "phone_number": "string"
}
]
}
Retrieves the details of a messaging service using its' name
name | string |
{- "id": 0,
- "global_customer_id": "string",
- "name": "string",
- "provider_messaging_sid": "string",
- "provider_name": "string",
- "twilio_messaging_sid": "string",
- "uuid": "string",
- "provider_numbers": [
- {
- "id": 0,
- "phone_number": "string"
}
]
}
required | object |
{- "participant": {
- "video_call_id": 0,
- "shunkan_ido_session_key": "string",
- "username": "string",
- "is_host": true
}
}
{- "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
}
A Creates a Video Call in our database, then generates the host participant, including a token for that host participant
object |
{- "video_call": {
- "callback_url": "string",
- "session_name": "string",
- "username": "string",
- "client_conversation_id": "string",
- "internal_conversation_id": "string",
- "global_id": "string",
- "global_customer_id": "string",
- "maximum_call_length": 0
}
}
{- "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"
}
Retrieves a video call, as well as its participants and recordings, by session key.
session_key required | string The unique ID for this video call. |
{- "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": [
- {
- "id": 0,
- "bearer_id": 0,
- "created_at": "string",
- "is_host": true,
- "join_time": "string",
- "leave_reason": "string",
- "leave_time": "string",
- "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,
- "video_call_recordings": [
- {
- "id": 0,
- "created_at": "string",
- "download_url": "string",
- "filename": "string",
- "internal_status": "string",
- "provider_status": "string",
- "recording_end": "string",
- "recording_start": "string",
- "transcript": {
- "alternateFormats": {
- "webvtt": "string",
- "srt": "string",
- "formattedText": "string",
- "dfxp": "string"
}, - "words": [ ]
}, - "updated_at": "string"
}
]
}
], - "video_call_recordings": [
- {
- "id": 0,
- "created_at": "string",
- "download_url": "string",
- "filename": "string",
- "internal_status": "string",
- "provider_status": "string",
- "recording_end": "string",
- "recording_start": "string",
- "transcript": {
- "alternateFormats": {
- "webvtt": "string",
- "srt": "string",
- "formattedText": "string",
- "dfxp": "string"
}, - "words": [ ]
}, - "updated_at": "string"
}
]
}
This endpoint accepts webhooks from Zoom, which we use for video calls.
event_ts | number unix integer timestamp for when the event was sent. |
event | string event name froom zoom |
object |
{- "event_ts": 0,
- "event": "string",
- "payload": {
- "account_id": "string"
}
}
{- "plainToken": "string",
- "encryptedToken": "string"
}
This webhook is sent whenever an end-user opts out of communication from a given provider phone number.
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. |
{- "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"
}
This webhook is to update announcements messages with Twilio information and hit end users applications to notify them.
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. |
{- "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"
}