Create a user invite for an organization
curl --request POST \
--url https://b.anny.co/api/v1/organizations/{organization_id}/user-invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "<string>",
"attributes": {
"name": "<string>",
"email": "<string>",
"mobile": "<string>"
},
"relationships": {
"roles": {
"data": [
{
"id": "<string>"
}
]
}
},
"meta": {}
}
}
'import requests
url = "https://b.anny.co/api/v1/organizations/{organization_id}/user-invites"
payload = { "data": {
"type": "<string>",
"attributes": {
"name": "<string>",
"email": "<string>",
"mobile": "<string>"
},
"relationships": { "roles": { "data": [{ "id": "<string>" }] } },
"meta": {}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
type: '<string>',
attributes: {name: '<string>', email: '<string>', mobile: '<string>'},
relationships: {roles: {data: [{id: '<string>'}]}},
meta: {}
}
})
};
fetch('https://b.anny.co/api/v1/organizations/{organization_id}/user-invites', 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://b.anny.co/api/v1/organizations/{organization_id}/user-invites",
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([
'data' => [
'type' => '<string>',
'attributes' => [
'name' => '<string>',
'email' => '<string>',
'mobile' => '<string>'
],
'relationships' => [
'roles' => [
'data' => [
[
'id' => '<string>'
]
]
]
],
'meta' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+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://b.anny.co/api/v1/organizations/{organization_id}/user-invites"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"<string>\",\n \"attributes\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"mobile\": \"<string>\"\n },\n \"relationships\": {\n \"roles\": {\n \"data\": [\n {\n \"id\": \"<string>\"\n }\n ]\n }\n },\n \"meta\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+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://b.anny.co/api/v1/organizations/{organization_id}/user-invites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"type\": \"<string>\",\n \"attributes\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"mobile\": \"<string>\"\n },\n \"relationships\": {\n \"roles\": {\n \"data\": [\n {\n \"id\": \"<string>\"\n }\n ]\n }\n },\n \"meta\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/organizations/{organization_id}/user-invites")
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/vnd.api+json'
request.body = "{\n \"data\": {\n \"type\": \"<string>\",\n \"attributes\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"mobile\": \"<string>\"\n },\n \"relationships\": {\n \"roles\": {\n \"data\": [\n {\n \"id\": \"<string>\"\n }\n ]\n }\n },\n \"meta\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "organizations",
"attributes": {
"slug": "<string>",
"name": "<string>",
"official_name": "<string>",
"description": "<string>",
"plain_description": "<string>",
"support_email": "<string>",
"phone": "<string>",
"currency": "<string>",
"timezone": "<string>",
"country_code": "<string>",
"region": "<string>",
"uses_payments": true,
"automated_invoicing": true,
"is_organization": true,
"default_locale": "<string>",
"live": true,
"features": {},
"preview_token": "<string>",
"setup_completed": true,
"requires_subscription": true,
"billing_address": {},
"billing_email": "<string>",
"custom_styles": {},
"responsible_for_contents": "<string>",
"ceo": "<string>",
"vat_id": "<string>",
"register_number": "<string>",
"local_court": "<string>",
"financial_office": "<string>",
"email_info": "<string>",
"created_at": "<string>"
},
"links": {
"self": "<string>"
},
"relationships": {
"industry": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"addresses": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"resources": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"cover_image": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"logo_image": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"negative_logo_image": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"organization_users": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"legal_documents": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"bank_accounts": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"resource_groups": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"integrations": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"location": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"main_subscription": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"payment_account": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
}
}
}
}{
"data": {
"id": "<string>",
"type": "userinvites",
"attributes": {
"name": "<string>",
"first_name": "<string>",
"email": "<string>",
"mobile": "<string>",
"accepted_at": "<string>",
"expiry": "<string>",
"is_expired": true,
"created_at": "<string>"
},
"links": {
"self": "<string>"
},
"relationships": {
"roles": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"abilities": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"organization": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"invited_by": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"user": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
}
}
}
}Organization & Users
Create a user invite for an organization
POST
/
api
/
v1
/
organizations
/
{organization_id}
/
user-invites
Create a user invite for an organization
curl --request POST \
--url https://b.anny.co/api/v1/organizations/{organization_id}/user-invites \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"type": "<string>",
"attributes": {
"name": "<string>",
"email": "<string>",
"mobile": "<string>"
},
"relationships": {
"roles": {
"data": [
{
"id": "<string>"
}
]
}
},
"meta": {}
}
}
'import requests
url = "https://b.anny.co/api/v1/organizations/{organization_id}/user-invites"
payload = { "data": {
"type": "<string>",
"attributes": {
"name": "<string>",
"email": "<string>",
"mobile": "<string>"
},
"relationships": { "roles": { "data": [{ "id": "<string>" }] } },
"meta": {}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
type: '<string>',
attributes: {name: '<string>', email: '<string>', mobile: '<string>'},
relationships: {roles: {data: [{id: '<string>'}]}},
meta: {}
}
})
};
fetch('https://b.anny.co/api/v1/organizations/{organization_id}/user-invites', 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://b.anny.co/api/v1/organizations/{organization_id}/user-invites",
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([
'data' => [
'type' => '<string>',
'attributes' => [
'name' => '<string>',
'email' => '<string>',
'mobile' => '<string>'
],
'relationships' => [
'roles' => [
'data' => [
[
'id' => '<string>'
]
]
]
],
'meta' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+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://b.anny.co/api/v1/organizations/{organization_id}/user-invites"
payload := strings.NewReader("{\n \"data\": {\n \"type\": \"<string>\",\n \"attributes\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"mobile\": \"<string>\"\n },\n \"relationships\": {\n \"roles\": {\n \"data\": [\n {\n \"id\": \"<string>\"\n }\n ]\n }\n },\n \"meta\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+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://b.anny.co/api/v1/organizations/{organization_id}/user-invites")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"type\": \"<string>\",\n \"attributes\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"mobile\": \"<string>\"\n },\n \"relationships\": {\n \"roles\": {\n \"data\": [\n {\n \"id\": \"<string>\"\n }\n ]\n }\n },\n \"meta\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://b.anny.co/api/v1/organizations/{organization_id}/user-invites")
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/vnd.api+json'
request.body = "{\n \"data\": {\n \"type\": \"<string>\",\n \"attributes\": {\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"mobile\": \"<string>\"\n },\n \"relationships\": {\n \"roles\": {\n \"data\": [\n {\n \"id\": \"<string>\"\n }\n ]\n }\n },\n \"meta\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"type": "organizations",
"attributes": {
"slug": "<string>",
"name": "<string>",
"official_name": "<string>",
"description": "<string>",
"plain_description": "<string>",
"support_email": "<string>",
"phone": "<string>",
"currency": "<string>",
"timezone": "<string>",
"country_code": "<string>",
"region": "<string>",
"uses_payments": true,
"automated_invoicing": true,
"is_organization": true,
"default_locale": "<string>",
"live": true,
"features": {},
"preview_token": "<string>",
"setup_completed": true,
"requires_subscription": true,
"billing_address": {},
"billing_email": "<string>",
"custom_styles": {},
"responsible_for_contents": "<string>",
"ceo": "<string>",
"vat_id": "<string>",
"register_number": "<string>",
"local_court": "<string>",
"financial_office": "<string>",
"email_info": "<string>",
"created_at": "<string>"
},
"links": {
"self": "<string>"
},
"relationships": {
"industry": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"addresses": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"resources": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"cover_image": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"logo_image": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"negative_logo_image": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"organization_users": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"legal_documents": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"bank_accounts": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"resource_groups": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"integrations": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"location": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"main_subscription": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"payment_account": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
}
}
}
}{
"data": {
"id": "<string>",
"type": "userinvites",
"attributes": {
"name": "<string>",
"first_name": "<string>",
"email": "<string>",
"mobile": "<string>",
"accepted_at": "<string>",
"expiry": "<string>",
"is_expired": true,
"created_at": "<string>"
},
"links": {
"self": "<string>"
},
"relationships": {
"roles": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"abilities": {
"data": [
{
"type": "<string>",
"id": "<string>"
}
],
"links": {
"self": "<string>"
}
},
"organization": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"invited_by": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
},
"user": {
"data": {
"type": "<string>",
"id": "<string>"
},
"links": {
"self": "<string>"
}
}
}
}
}Autorisierungen
The access token received from the authorization server in the OAuth 2.0 flow.
Pfadparameter
The organization identifier.
Abfrageparameter
Organization ID
Body
application/vnd.api+json
Show child attributes
Show child attributes
Antwort
OK
A tenant organization that owns resources, services, and manages bookings.
Show child attributes
Show child attributes
⌘I