Invites
Redeem an invite
Accepts an invite and joins the workspace. If the email address has no existing
account, a new account is created using the provided name. Returns an API token
that can be used immediately.
This endpoint returns HTTP 201.
POST
/
invites
/
redeem
Redeem an invite
curl --request POST \
--url https://slog.ai/invites/redeem \
--header 'Content-Type: application/json' \
--data '
{
"token": "inv_tok_01jqinv01234abcd",
"name": "Jamie Lee"
}
'import requests
url = "https://slog.ai/invites/redeem"
payload = {
"token": "inv_tok_01jqinv01234abcd",
"name": "Jamie Lee"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({token: 'inv_tok_01jqinv01234abcd', name: 'Jamie Lee'})
};
fetch('https://slog.ai/invites/redeem', 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://slog.ai/invites/redeem",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'token' => 'inv_tok_01jqinv01234abcd',
'name' => 'Jamie Lee'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://slog.ai/invites/redeem"
payload := strings.NewReader("{\n \"token\": \"inv_tok_01jqinv01234abcd\",\n \"name\": \"Jamie Lee\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://slog.ai/invites/redeem")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"inv_tok_01jqinv01234abcd\",\n \"name\": \"Jamie Lee\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://slog.ai/invites/redeem")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"inv_tok_01jqinv01234abcd\",\n \"name\": \"Jamie Lee\"\n}"
response = http.request(request)
puts response.read_body{
"api_token": "slog_key_01jqapikey5678efgh",
"workspace": {
"id": "ws_01jqworksp001",
"name": "Acme Engineering",
"slug": "acme-engineering"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Task not found"
}
}{
"errors": {
"email": [
"The email field must be a valid email address"
],
"code": [
"The code field must be exactly 6 characters long"
]
}
}Body
application/json
⌘I
Redeem an invite
curl --request POST \
--url https://slog.ai/invites/redeem \
--header 'Content-Type: application/json' \
--data '
{
"token": "inv_tok_01jqinv01234abcd",
"name": "Jamie Lee"
}
'import requests
url = "https://slog.ai/invites/redeem"
payload = {
"token": "inv_tok_01jqinv01234abcd",
"name": "Jamie Lee"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({token: 'inv_tok_01jqinv01234abcd', name: 'Jamie Lee'})
};
fetch('https://slog.ai/invites/redeem', 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://slog.ai/invites/redeem",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'token' => 'inv_tok_01jqinv01234abcd',
'name' => 'Jamie Lee'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://slog.ai/invites/redeem"
payload := strings.NewReader("{\n \"token\": \"inv_tok_01jqinv01234abcd\",\n \"name\": \"Jamie Lee\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://slog.ai/invites/redeem")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"inv_tok_01jqinv01234abcd\",\n \"name\": \"Jamie Lee\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://slog.ai/invites/redeem")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"inv_tok_01jqinv01234abcd\",\n \"name\": \"Jamie Lee\"\n}"
response = http.request(request)
puts response.read_body{
"api_token": "slog_key_01jqapikey5678efgh",
"workspace": {
"id": "ws_01jqworksp001",
"name": "Acme Engineering",
"slug": "acme-engineering"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Task not found"
}
}{
"errors": {
"email": [
"The email field must be a valid email address"
],
"code": [
"The code field must be exactly 6 characters long"
]
}
}