cURL
curl --request POST \
--url https://api.youappz.dev/teams/{teamId}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"role": "MEMBER",
"email": "john@example.com",
"uid": "kr1PsOIzqEL5Xg6M4VZcZosf"
}
'import requests
url = "https://api.youappz.dev/teams/{teamId}/members"
payload = {
"role": "MEMBER",
"email": "john@example.com",
"uid": "kr1PsOIzqEL5Xg6M4VZcZosf"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({role: 'MEMBER', email: 'john@example.com', uid: 'kr1PsOIzqEL5Xg6M4VZcZosf'})
};
fetch('https://api.youappz.dev/teams/{teamId}/members', 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://api.youappz.dev/teams/{teamId}/members",
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([
'role' => 'MEMBER',
'email' => 'john@example.com',
'uid' => 'kr1PsOIzqEL5Xg6M4VZcZosf'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.youappz.dev/teams/{teamId}/members"
payload := strings.NewReader("{\n \"role\": \"MEMBER\",\n \"email\": \"john@example.com\",\n \"uid\": \"kr1PsOIzqEL5Xg6M4VZcZosf\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.youappz.dev/teams/{teamId}/members")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"role\": \"MEMBER\",\n \"email\": \"john@example.com\",\n \"uid\": \"kr1PsOIzqEL5Xg6M4VZcZosf\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.youappz.dev/teams/{teamId}/members")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"role\": \"MEMBER\",\n \"email\": \"john@example.com\",\n \"uid\": \"kr1PsOIzqEL5Xg6M4VZcZosf\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"email": "<string>",
"teamId": "<string>",
"roleId": 123,
"createdBy": 123,
"createdAt": 123,
"updatedAt": 123
}{
"code": 400,
"message": "One of the provided values in the request body/query is invalid"
}teams
Invite a user
Invite a user to join the team specified in the URL. The authenticated user needs to be an OWNER in order to successfully invoke this endpoint. The user can be specified with an email or an ID. If both email and ID are provided, ID will take priority.
POST
/
teams
/
{teamId}
/
members
cURL
curl --request POST \
--url https://api.youappz.dev/teams/{teamId}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"role": "MEMBER",
"email": "john@example.com",
"uid": "kr1PsOIzqEL5Xg6M4VZcZosf"
}
'import requests
url = "https://api.youappz.dev/teams/{teamId}/members"
payload = {
"role": "MEMBER",
"email": "john@example.com",
"uid": "kr1PsOIzqEL5Xg6M4VZcZosf"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({role: 'MEMBER', email: 'john@example.com', uid: 'kr1PsOIzqEL5Xg6M4VZcZosf'})
};
fetch('https://api.youappz.dev/teams/{teamId}/members', 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://api.youappz.dev/teams/{teamId}/members",
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([
'role' => 'MEMBER',
'email' => 'john@example.com',
'uid' => 'kr1PsOIzqEL5Xg6M4VZcZosf'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.youappz.dev/teams/{teamId}/members"
payload := strings.NewReader("{\n \"role\": \"MEMBER\",\n \"email\": \"john@example.com\",\n \"uid\": \"kr1PsOIzqEL5Xg6M4VZcZosf\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.youappz.dev/teams/{teamId}/members")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"role\": \"MEMBER\",\n \"email\": \"john@example.com\",\n \"uid\": \"kr1PsOIzqEL5Xg6M4VZcZosf\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.youappz.dev/teams/{teamId}/members")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"role\": \"MEMBER\",\n \"email\": \"john@example.com\",\n \"uid\": \"kr1PsOIzqEL5Xg6M4VZcZosf\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"email": "<string>",
"teamId": "<string>",
"roleId": 123,
"createdBy": 123,
"createdAt": 123,
"updatedAt": 123
}{
"code": 400,
"message": "One of the provided values in the request body/query is invalid"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The role of the user to invite
Available options:
OWNER, MEMBER, DEVELOPER, BILLING, VIEWER, CONTRIBUTOR Example:
"MEMBER"
The email address of the user to invite
Example:
"john@example.com"
The id of the user to invite
Example:
"kr1PsOIzqEL5Xg6M4VZcZosf"
⌘I