Invite member
Add an existing user to the workspace by email. The user must already have a SendKit account.
Requires a platform API key (sk_user_...). Workspace keys are rejected with 403.
Requires invite permission: owner/admin can always invite, members can invite only if settings.allowMemberInvites is enabled.
curl -X POST "https://api.sendkit.ai/v1/workspaces/example_string/members" \
-H "Content-Type: application/json" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"email": "newmember@example.com",
"role": "member"
}'
import requests
import json
url = "https://api.sendkit.ai/v1/workspaces/example_string/members"
headers = {
"Content-Type": "application/json",
"X-Api-Key": "YOUR_API_KEY",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"email": "newmember@example.com",
"role": "member"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.sendkit.ai/v1/workspaces/example_string/members", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Api-Key": "YOUR_API_KEY",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"email": "newmember@example.com",
"role": "member"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"email": "newmember@example.com",
"role": "member"
}`)
req, err := http.NewRequest("POST", "https://api.sendkit.ai/v1/workspaces/example_string/members", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-Api-Key", "YOUR_API_KEY")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.sendkit.ai/v1/workspaces/example_string/members')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-Api-Key'] = 'YOUR_API_KEY'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"email": "newmember@example.com",
"role": "member"
}'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"message": "Member added",
"userId": "665d3e4f5a6b7c8d9e0f1a2b"
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
{
"error": "Conflict",
"message": "The request conflicts with the current state of the resource",
"code": 409,
"details": "Resource already exists"
}
/v1/workspaces/{id}/membersPlatform API key (sk_user_...) or Workspace API key (sk_...)
Resource ID
The media type of the request body
Email address of the user to invite (must be a registered SendKit user)
Role to assign. Defaults to workspace's settings.defaultRole if omitted.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Platform API key (sk_user_...) or Workspace API key (sk_...)
Bearer token. API key as Bearer token
Path Parameters
Resource ID
Body
Email address of the user to invite (must be a registered SendKit user)
Role to assign. Defaults to workspace's settings.defaultRole if omitted.
adminmemberResponses
Last updated today
Built with Documentation.AI