Send invitation email to an employee
curl --request POST \
--url https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/invite \
--header 'Authorization: Bearer <token>'import requests
url = "https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/invite"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/invite', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/invite",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/invite"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/invite")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/invite")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Employee not found"
}{
"message": "Employee with invalid state active"
}{
"message": "employeeId does not match any of the allowed types"
}{
"message": "Internal server error"
}Employees
Invite employee
POST
/
companies
/
{companyId}
/
employees
/
{employeeId}
/
invite
Send invitation email to an employee
curl --request POST \
--url https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/invite \
--header 'Authorization: Bearer <token>'import requests
url = "https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/invite"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/invite', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/invite",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/invite"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/invite")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pre-public-api.cobee.io/api/v3/companies/{companyId}/employees/{employeeId}/invite")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Employee not found"
}{
"message": "Employee with invalid state active"
}{
"message": "employeeId does not match any of the allowed types"
}{
"message": "Internal server error"
}Overview
Sends the invitation email to the Employee. This endpoint can be used when the automatic invitation email that the employee received on registration has expired or been lost.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the company
The unique identifier of the employee
Response
Invitation email sent successfully
⌘I