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" \
-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"
}
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"
},
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")
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.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/{workspaceId}/membersTarget server for requests. Edit to use your own host.
Platform API key (sk_user_...) or Workspace API key (sk_...)
Workspace 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_...)
Path Parameters
Workspace 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
User ID of the invited member
false