POST
/
rooms
curl --request POST \
  --url https://api.pagecall.com/v1/rooms \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Meeting Room - 1",
  "type": "public",
  "record": true,
  "max_meeting_seconds": 123,
  "members": [
    {
      "user_id": "000585f36eed9e8fb6b655b4",
      "type": "guest",
      "name": "user-1"
    }
  ],
  "webhook": {
    "url": "<string>",
    "headers": {}
  }
}'
{
  "room": {
    "id": "000585f36eed9e8fb6b655b4",
    "application_id": "000585f36eed9e8fb6b655b4",
    "type": "public",
    "created_user_id": "#DEPRECATED#",
    "name": "Weekly Meet",
    "thumbnail_url": "https://example.url/thumbnail.png",
    "last_thumbnail_updated_at": "#DEPRECATED#",
    "room_template_id": "#DEPRECATED#",
    "layout": "SixAll",
    "record": true,
    "meeting_time": 200000,
    "is_terminated": "#DEPRECATED#",
    "is_ephemeral": "#DEPRECATED#",
    "is_recurring": "#DEPRECATED#",
    "started_at": "2023-01-01T01:00:00.000Z",
    "terminated_at": "2023-01-01T01:00:00.000Z",
    "updated_at": "2023-01-01T01:00:00.000Z",
    "created_at": "2023-01-01T01:00:00.000Z"
  },
  "paging": {
    "limit": 30,
    "offset": 0,
    "total": 0
  }
}

Webhook

When you create a room with webhook parameters, a webhook will be sent via a POST method for each participant’s entry and exit. The request body for this is as follows.

{
  action: "sessionLeft" | "sessionJoined",
  payload: {
    roomId: string,
    userId?: string,
    memberId: string,
    sessionId: string,
    sessionsCount: number,
    membersCount: number,
    timestamp: string // e.g. '2022-05-31T12:38:15.059Z'
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request format to create a new room

Response

200
application/json

Successful operation

The response is of type object.