NAV Navigation
Javascript PHP

SnapCall Rest API

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

SnapCall's Rest API allows you to interact automatically with your SnapCall data on demand. With simple scripts, you can build your own analytics by retrieving calls informations and manage your SnapCall buttons list.

API key Authentication

The SnapCall API uses an API key to authenticate requests. You can view your API key in the SnapCall Dashboard.

Your API key carry many privileges, so be sure to keep it secure! Do not share your API key in publicly accessible areas such as GitHub, client-side code, and so forth.

Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic auth username value. You do not need to provide a password.

If you need to authenticate via bearer auth (e.g., for a cross-origin request), you can pass your API key as the bearer token.

All request bodies should have content type application/json and be valid JSON.

Buttons

Create

[POST] /v2/buttons

Code samples

const apiKey = 'abc';

const options = {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    name,
    brand,
    call_id,
    agent,
    schedule_template_id,
    timezone,
    caller_id,
    config,
    display_page,
    cart_value,
    active,
  }),
};

fetch('https://api.snapcall.io/v2/buttons', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/buttons');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, [
  'name' => string,
  'brand' => string,
  'call_id' => alternatives,
  'agent' => string,
  'schedule_template_id' => number,
  'timezone' => string,
  'caller_id' => alternatives,
  'config' => object,
  'display_page' => string,
  'cart_value' => number,
  'active' => boolean,
]);
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Create a button

JSON Payload

Parameter Type Required
name string true
brand string false
call_id alternatives false
agent string false
schedule_template_id number false
timezone string false
caller_id alternatives false
config object false
display_page string false
cart_value number false
active boolean false

Create batch

[POST] /v2/buttons/batch

Code samples

const apiKey = 'abc';

const options = {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    buttons,
  }),
};

fetch('https://api.snapcall.io/v2/buttons/batch', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/buttons/batch');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, [
  'buttons' => array,
]);
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Create multiple buttons

JSON Payload

Parameter Type Required
buttons array true

Info

[GET] /v2/buttons/{bid}/info

Code samples

fetch('https://api.snapcall.io/v2/buttons/bid/info')
  .then(res => res.json())
  .then(console.log);

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/buttons/bid/info');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);



$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Retrieve information about a specific button

URI Components

Parameter Type Required
bid alternatives true

Read

[GET] /v2/buttons/{bid}

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/buttons/bid', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/buttons/bid');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Read a button

URI Components

Parameter Type Required
bid alternatives true

Read all

[GET] /v2/buttons

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/buttons', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/buttons');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Read all buttons

Query String

Parameter Type Required
page number false
limit number false
name string false
agent string false
active boolean false

Update

[PUT] /v2/buttons/{bid}

Code samples

const apiKey = 'abc';

const options = {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    name,
    brand,
    call_id,
    schedule_template_id,
    timezone,
    caller_id,
    config,
    display_page,
    cart_value,
    active,
  }),
};

fetch('https://api.snapcall.io/v2/buttons/bid', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/buttons/bid');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
  'name' => string,
  'brand' => string,
  'call_id' => alternatives,
  'schedule_template_id' => number,
  'timezone' => string,
  'caller_id' => alternatives,
  'config' => object,
  'display_page' => string,
  'cart_value' => number,
  'active' => boolean,
]));
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Update a button

URI Components

Parameter Type Required
bid alternatives true

JSON Payload

Parameter Type Required
name string false
brand string false
call_id alternatives false
schedule_template_id number false
timezone string false
caller_id alternatives false
config object false
display_page string false
cart_value number false
active boolean false

Update batch

[PUT] /v2/buttons/batch

Code samples

const apiKey = 'abc';

const options = {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    buttons,
  }),
};

fetch('https://api.snapcall.io/v2/buttons/batch', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/buttons/batch');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
  'buttons' => array,
]));
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Update multiple buttons

JSON Payload

Parameter Type Required
buttons array true

Calls

Read

[GET] /v2/calls/{id}

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/calls/123', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/calls/123');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Read a call, given an ID

URI Components

Parameter Type Required
id number true

Read all

[GET] /v2/calls

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/calls', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/calls');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Read all calls

Query String

Parameter Type Required
page number false
limit number false
rate alternatives false
start date false
end date false
button alternatives false
status alternatives false
agent alternatives false
client alternatives false
ani number false
exporting boolean false

Recording - Delete

[DELETE] /v2/calls/{id}/recording

Code samples

const apiKey = 'abc';

const options = {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/calls/123/recording', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/calls/123/recording');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');

$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Deletes a call record

URI Components

Parameter Type Required
id number true

Recording - Read

[GET] /v2/calls/{id}/recording

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/calls/123/recording', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/calls/123/recording');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Provides access to a call record

URI Components

Parameter Type Required
id number true

Integrations

Integration - Read all

[GET] /v2/integrations

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/integrations', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/integrations');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

List integrations

Roles

Read

[GET] /v2/roles

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/roles', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/roles');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Get a role list

Query String

Parameter Type Required
page number false
limit number false

Read

[GET] /v2/roles/{role_id}

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/roles/123', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/roles/123');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Get information about a Role

URI Components

Parameter Type Required
role_id number true

Schedule-templates

Create

[POST] /v2/schedule-templates

Code samples

const apiKey = 'abc';

const options = {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    name,
    schedule,
  }),
};

fetch('https://api.snapcall.io/v2/schedule-templates', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/schedule-templates');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, [
  'name' => string,
  'schedule' => array,
]);
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Create a schedule template

JSON Payload

Parameter Type Required
name string true
schedule array true

Read

[GET] /v2/schedule-templates/{id}

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/schedule-templates/123', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/schedule-templates/123');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Read a schedule template

URI Components

Parameter Type Required
id number true

Read all

[GET] /v2/schedule-templates

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/schedule-templates', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/schedule-templates');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Read all schedule template

Query String

Parameter Type Required
page number false

Update

[PUT] /v2/schedule-templates/{id}

Code samples

const apiKey = 'abc';

const options = {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    name,
    schedule,
  }),
};

fetch('https://api.snapcall.io/v2/schedule-templates/123', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/schedule-templates/123');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
  'name' => string,
  'schedule' => array,
]));
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Update a schedule template

URI Components

Parameter Type Required
id number true

JSON Payload

Parameter Type Required
name string false
schedule array false

Agents

Read

[GET] /v2/agents/{email}

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/agents/hello', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/agents/hello');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Read an agent

URI Components

Parameter Type Required
email string true

Read

[GET] /v2/agents/{email}/info

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/agents/hello/info', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/agents/hello/info');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Read an agent

URI Components

Parameter Type Required
email string true

Status

[PUT] /v2/agents/{email}/status

Code samples

const apiKey = 'abc';

const options = {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    status,
  }),
};

fetch('https://api.snapcall.io/v2/agents/hello/status', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/agents/hello/status');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
  'status' => string,
]));
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Update the status of an agent

URI Components

Parameter Type Required
email string true

JSON Payload

Parameter Type Required
status string true

Update

[PUT] /v2/agents/{email}

Code samples

const apiKey = 'abc';

const options = {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    wrap_up_time,
    last_bridge_end,
  }),
};

fetch('https://api.snapcall.io/v2/agents/hello', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/agents/hello');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
  'wrap_up_time' => number,
  'last_bridge_end' => number,
]));
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Update an agent

URI Components

Parameter Type Required
email string true

JSON Payload

Parameter Type Required
wrap_up_time number false
last_bridge_end number false

Invites

Invite - Accept

[POST] /v2/invites/accept

Code samples

const apiKey = 'abc';

const options = {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    token,
  }),
};

fetch('https://api.snapcall.io/v2/invites/accept', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/invites/accept');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, [
  'token' => string,
]);
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Accept a company invitation

JSON Payload

Parameter Type Required
token string true

Read

[GET] /v2/invites/{token}

Code samples

fetch('https://api.snapcall.io/v2/invites/hello')
  .then(res => res.json())
  .then(console.log);

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/invites/hello');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);



$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Get information about a company invitation

URI Components

Parameter Type Required
token string true

Partner

Activate account

[POST] /v2/partner/activate-account

Code samples

const apiKey = 'abc';

const options = {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    email,
    user_id,
    timezone,
    password,
    currency,
  }),
};

fetch('https://api.snapcall.io/v2/partner/activate-account', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/partner/activate-account');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, [
  'email' => string,
  'user_id' => number,
  'timezone' => string,
  'password' => string,
  'currency' => string,
]);
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Activate a user account from partner. Authentication should be done using partner account api_key.

JSON Payload

Parameter Type Required
email string false
user_id number false
timezone string false
password string false
currency string false

Agent button

[POST] /v2/partner/agent-button

Code samples

const apiKey = 'abc';

const options = {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    agent_email,
    stream,
  }),
};

fetch('https://api.snapcall.io/v2/partner/agent-button', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/partner/agent-button');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, [
  'agent_email' => string,
  'stream' => boolean,
]);
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Get an agent button. Authentication should be done using user api_key.

JSON Payload

Parameter Type Required
agent_email string true
stream boolean false

Call

[GET] /v2/partner/calls/{id}

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/partner/calls/123', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/partner/calls/123');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Read a call, given an ID

URI Components

Parameter Type Required
id number true

Calls

[GET] /v2/partner/calls

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/partner/calls', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/partner/calls');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Get calls history.

Query String

Parameter Type Required
page number false
limit number false
start date false
end date false
agent alternatives false
exporting boolean false

Stats

[GET] /v2/partner/stats

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/partner/stats', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/partner/stats');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Get general call statistics.

Query String

Parameter Type Required
start date true
end date true

Streams

Info

[GET] /v2/streams/{streamToken}/info

Code samples

fetch('https://api.snapcall.io/v2/streams/hello/info')
  .then(res => res.json())
  .then(console.log);

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/streams/hello/info');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);



$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Retrieve public information about a specific Stream

Query String

Parameter Type Required
flowToken string false

URI Components

Parameter Type Required
streamToken string true

Read all

[GET] /v2/streams/v2

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/streams/v2', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/streams/v2');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Get a list of streams

Query String

Parameter Type Required
page number false
limit number false
button alternatives false
expired boolean false
start date false
end date false
exporting boolean false

StreamEvent - delete Admin

[DELETE] /v2/streams/{streamToken}/events/{id}

Code samples

const apiKey = 'abc';

const options = {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/streams/hello/events/123', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/streams/hello/events/123');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');

$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

delete an event as Admin

URI Components

Parameter Type Required
streamToken string true
id number true

StreamEvent - Read admin

[GET] /v2/streams/{streamToken}/events/{id}

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/streams/hello/events/123', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/streams/hello/events/123');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

read an event as admin

URI Components

Parameter Type Required
streamToken string true
longTimeExpiration boolean true
id number true

Users

Button

[POST] /v2/users/{id}/button

Code samples

const options = {
  method: 'POST',
  body: JSON.stringify({
    referer,
    cart_value,
  }),
};

fetch('https://api.snapcall.io/v2/users/123/button', options)
  .then(res => res.json())
  .then(console.log);

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/users/123/button');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, [
  'referer' => string,
  'cart_value' => number,
]);
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Return a button passing every display filters

URI Components

Parameter Type Required
id number true

JSON Payload

Parameter Type Required
referer string true
cart_value number false

Me

[GET] /v2/users/me

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/users/me', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/users/me');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Read the authenticated user

Admin

Read all

[GET] /v2/admin/streams/

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/admin/streams/', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/admin/streams/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Get a list of streams

Query String

Parameter Type Required
page number false
limit number false
button alternatives false
expired boolean false
start date false
end date false
exporting boolean false

StreamEvent - delete Admin

[DELETE] /v2/admin/streams/{streamToken}/events/{id}

Code samples

const apiKey = 'abc';

const options = {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/admin/streams/hello/events/123', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/admin/streams/hello/events/123');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');

$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

delete an event as Admin

URI Components

Parameter Type Required
streamToken string true
id number true

StreamEvent - Read admin

[GET] /v2/admin/streams/{streamToken}/events/{id}

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/admin/streams/hello/events/123', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/admin/streams/hello/events/123');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

read an event as admin

URI Components

Parameter Type Required
streamToken string true
longTimeExpiration boolean true
id number true

Booking-pages

Booking Page - Public read

[GET] /v2/booking-pages/{uuid}/info

Code samples

fetch('https://api.snapcall.io/v2/booking-pages/hello/info')
  .then(res => res.json())
  .then(console.log);

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/booking-pages/hello/info');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);



$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Public fetch a booking page

URI Components

Parameter Type Required
uuid string true

Companies

Booking Page - Read

[GET] /v2/companies/{companyId}/booking-pages/{uuid}

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/booking-pages/hello', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/booking-pages/hello');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

List a booking Page for a company

URI Components

Parameter Type Required
companyId number true
uuid string true

Booking pages - Create

[POST] /v2/companies/{companyId}/booking-pages

Code samples

const apiKey = 'abc';

const options = {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    team_id,
    user_id,
    duration,
    name,
    description,
  }),
};

fetch('https://api.snapcall.io/v2/companies/123/booking-pages', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/booking-pages');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, [
  'team_id' => number,
  'user_id' => number,
  'duration' => number,
  'name' => string,
  'description' => string,
]);
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

create a booking page

URI Components

Parameter Type Required
companyId number true

JSON Payload

Parameter Type Required
team_id number false
user_id number false
duration number false
name string true
description string false

Booking Pages - Delete

[DELETE] /v2/companies/{companyId}/booking-pages/{uuid}

Code samples

const apiKey = 'abc';

const options = {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/booking-pages/hello', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/booking-pages/hello');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');

$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

delete a booking pages

URI Components

Parameter Type Required
companyId number true
uuid string true

Booking pages - Read All

[GET] /v2/companies/{companyId}/booking-pages

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/booking-pages', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/booking-pages');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

List all booking Page for a company

Query String

Parameter Type Required
page number false
limit number false
name string false
hasTeamAssociated boolean false

URI Components

Parameter Type Required
companyId number true

Booking pages - Update

[PUT] /v2/companies/{companyId}/booking-pages/{uuid}

Code samples

const apiKey = 'abc';

const options = {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    team_id,
    user_id,
    name,
    duration,
    description,
    status,
  }),
};

fetch('https://api.snapcall.io/v2/companies/123/booking-pages/hello', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/booking-pages/hello');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
  'team_id' => number,
  'user_id' => number,
  'name' => string,
  'duration' => number,
  'description' => string,
  'status' => string,
]));
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Update a booking page

URI Components

Parameter Type Required
companyId number true
uuid string true

JSON Payload

Parameter Type Required
team_id number false
user_id number false
name string false
duration number false
description string false
status string false

Company - List users

[GET] /v2/companies/{companyId}/users

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/users', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/users');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

List all users for a company

Query String

Parameter Type Required
page number false
limit number false
team_id number false
status string false
name string false
withPending boolean false

URI Components

Parameter Type Required
companyId number true

Delete

[DELETE] /v2/companies/{companyId}/streams/{streamToken}

Code samples

const apiKey = 'abc';

const options = {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/streams/hello', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/streams/hello');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');

$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Delete a stream

URI Components

Parameter Type Required
streamToken string true
companyId number true

Invite

[POST] /v2/companies/{companyId}/streams/{streamToken}/invite

Code samples

const apiKey = 'abc';

const options = {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    type,
    userIds,
    emails,
    phoneNumbers,
    text,
  }),
};

fetch('https://api.snapcall.io/v2/companies/123/streams/hello/invite', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/streams/hello/invite');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, [
  'type' => string,
  'userIds' => array,
  'emails' => array,
  'phoneNumbers' => array,
  'text' => string,
]);
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Send an invitation to a stream

URI Components

Parameter Type Required
streamToken string true
companyId number true

JSON Payload

Parameter Type Required
type string false
userIds array false
emails array false
phoneNumbers array false
text string false

Invite - Create

[POST] /v2/companies/{companyId}/invites

Code samples

const apiKey = 'abc';

const options = {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    role_id,
    email,
  }),
};

fetch('https://api.snapcall.io/v2/companies/123/invites', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/invites');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, [
  'role_id' => number,
  'email' => string,
]);
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Invite a user to join a company

URI Components

Parameter Type Required
companyId number true

JSON Payload

Parameter Type Required
role_id number false
email string true

Invite - Delete

[DELETE] /v2/companies/{companyId}/invites/{token}

Code samples

const apiKey = 'abc';

const options = {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/invites/hello', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/invites/hello');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');

$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Cancel the invitation for a user to join a company

URI Components

Parameter Type Required
companyId number true
token string true

Invite - Update invite

[PUT] /v2/companies/{companyId}/invites/{token}

Code samples

const apiKey = 'abc';

const options = {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    role_id,
  }),
};

fetch('https://api.snapcall.io/v2/companies/123/invites/hello', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/invites/hello');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
  'role_id' => number,
]));
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Update users invitation for a company

URI Components

Parameter Type Required
companyId number true
token string true

JSON Payload

Parameter Type Required
role_id number true

Invites - Read All

[GET] /v2/companies/{companyId}/invites

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/invites', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/invites');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

List all pending users for a company

Query String

Parameter Type Required
page number false
limit number false

URI Components

Parameter Type Required
companyId number true

Read

[GET] /v2/companies/{companyId}/streams/{streamToken}

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/streams/hello', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/streams/hello');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Get a stream

URI Components

Parameter Type Required
streamToken string true
companyId number true

Read all

[GET] /v2/companies/{companyId}/streams

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/streams', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/streams');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Get a list of streams

Query String

Parameter Type Required
page number false
limit number false
button alternatives false
expired boolean false
type alternatives false
start date false
end date false
exporting boolean false
has_recording boolean false
custom_filter string false
team_ids alternatives false
user_ids alternatives false
name string false

URI Components

Parameter Type Required
companyId number true

Read all

[GET] /v2/companies/{companyId}/stream-events

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/stream-events', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/stream-events');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Get a list of streams event

Query String

Parameter Type Required
exporting boolean false
page number false
limit number false
start date false
end date false
type alternatives false
mediaType alternatives false
stream_token string false
order string false

URI Components

Parameter Type Required
companyId number true

Read company users

[GET] /v2/companies/{companyId}/users/{userId}

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/users/123', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/users/123');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

read users for a company

URI Components

Parameter Type Required
companyId number true
userId number true

Recording - Delete

[DELETE] /v2/companies/{companyId}/streams/{streamToken}/recording

Code samples

const apiKey = 'abc';

const options = {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/streams/hello/recording', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/streams/hello/recording');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');

$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Delete a stream record

URI Components

Parameter Type Required
companyId number true
streamToken string true

Recording - Read

[GET] /v2/companies/{companyId}/streams/{streamToken}/recording

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/streams/hello/recording', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/streams/hello/recording');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Provides access to a stream record

URI Components

Parameter Type Required
companyId number true
streamToken string true

StreamEvent - Delete

[DELETE] /v2/companies/{companyId}/streams/{streamToken}/events/{id}

Code samples

const apiKey = 'abc';

const options = {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/streams/hello/events/123', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/streams/hello/events/123');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');

$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

delete an event

URI Components

Parameter Type Required
companyId number true
streamToken string true
id number true

StreamEvent - Read

[GET] /v2/companies/{companyId}/streams/{streamToken}/events/{id}

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/streams/hello/events/123', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/streams/hello/events/123');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

read an event

URI Components

Parameter Type Required
companyId number true
streamToken string true
id number true

Streams - request audio files

[POST] /v2/companies/{companyId}/streams/{streamToken}/events/{eventId}/mix

Code samples

const apiKey = 'abc';

const options = {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/streams/hello/events/123/mix', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/streams/hello/events/123/mix');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');

$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

request a streams mix if granted

URI Components

Parameter Type Required
eventId number true
streamToken string true
companyId number true

Streams - request audio files

[POST] /v2/companies/{companyId}/streams/{streamToken}/events/{eventId}/video-mix

Code samples

const apiKey = 'abc';

const options = {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/streams/hello/events/123/video-mix', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/streams/hello/events/123/video-mix');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');

$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

request a streams mix if granted

URI Components

Parameter Type Required
eventId number true
streamToken string true
companyId number true

Streams - terminate

[POST] /v2/companies/{companyId}/streams/{streamToken}/recording

Code samples

const apiKey = 'abc';

const options = {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/streams/hello/recording', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/streams/hello/recording');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');

$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

request a streams mix if granted

URI Components

Parameter Type Required
streamToken string true
companyId number true

Teams - Add user

[POST] /v2/companies/{companyId}/teams/{teamId}/users

Code samples

const apiKey = 'abc';

const options = {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    user_id,
  }),
};

fetch('https://api.snapcall.io/v2/companies/123/teams/123/users', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/teams/123/users');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, [
  'user_id' => number,
]);
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Add a user to a Team

URI Components

Parameter Type Required
companyId number true
teamId number true

JSON Payload

Parameter Type Required
user_id number true

Teams - Create

[POST] /v2/companies/{companyId}/teams

Code samples

const apiKey = 'abc';

const options = {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    name,
    description,
  }),
};

fetch('https://api.snapcall.io/v2/companies/123/teams', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/teams');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, [
  'name' => string,
  'description' => string,
]);
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Create a teams

URI Components

Parameter Type Required
companyId number true

JSON Payload

Parameter Type Required
name string true
description string false

Teams - Delete

[DELETE] /v2/companies/{companyId}/teams/{id}

Code samples

const apiKey = 'abc';

const options = {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/teams/123', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/teams/123');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');

$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Delete a Team

URI Components

Parameter Type Required
companyId number true
id number true

Teams - Read

[GET] /v2/companies/{companyId}/teams/{teamId}

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/teams/123', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/teams/123');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Read a team of a company

URI Components

Parameter Type Required
companyId number true
teamId number true

Teams - Read all

[GET] /v2/companies/{companyId}/teams

Code samples

const apiKey = 'abc';

const options = {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/teams', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/teams');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);


$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

List teams of a company

Query String

Parameter Type Required
page number false
limit number false
name string false

URI Components

Parameter Type Required
companyId number true

Teams - Remove user

[DELETE] /v2/companies/{companyId}/teams/{teamId}/users/{userId}

Code samples

const apiKey = 'abc';

const options = {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/123/teams/123/users/123', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/teams/123/users/123');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');

$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Remove a user from a team

URI Components

Parameter Type Required
companyId number true
teamId number true
userId number true

Teams - Update

[PUT] /v2/companies/{companyId}/teams/{teamId}

Code samples

const apiKey = 'abc';

const options = {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    name,
    description,
    settings,
  }),
};

fetch('https://api.snapcall.io/v2/companies/123/teams/123', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/teams/123');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
  'name' => string,
  'description' => string,
  'settings' => object,
]));
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Update a teams

URI Components

Parameter Type Required
companyId number true
teamId number true

JSON Payload

Parameter Type Required
name string false
description string false
settings object false

User - Remove

[DELETE] /v2/companies/{companyId}/users/{userId}

Code samples

const apiKey = 'abc';

const options = {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
};

fetch('https://api.snapcall.io/v2/companies/hello/users/hello', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/hello/users/hello');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');

$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Remove a user from a company

URI Components

Parameter Type Required
companyId string true
userId string true

User - Update users

[PUT] /v2/companies/{companyId}/users/{userId}

Code samples

const apiKey = 'abc';

const options = {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    role_id,
  }),
};

fetch('https://api.snapcall.io/v2/companies/123/users/123', options)
  .then(res => res.json())
  .then(console.log);
$api_key = 'abc';

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.snapcall.io/v2/companies/123/users/123');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer {$api_key}",
]);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
  'role_id' => number,
]));
$response = curl_exec($curl);
curl_close($curl);

var_dump($response);

Update users for a company

URI Components

Parameter Type Required
companyId number true
userId number true

JSON Payload

Parameter Type Required
role_id number true