import requests
url = "https://api.diga.io/v1/project/invitation/send/bulk"
payload = { "invitations": [
{
"email": "<string>",
"role": "member"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"successful": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invited_email": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"registered": true,
"expires_at": "2023-11-07T05:31:56Z",
"role": "admin",
"inviter_name": "<string>",
"invited_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"failed": [
{
"email": "<string>",
"success": true,
"error": "<string>",
"invitation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invited_email": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"registered": true,
"expires_at": "2023-11-07T05:31:56Z",
"role": "admin",
"inviter_name": "<string>",
"invited_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
]
}Send multiple email invitations to users to join your project. Uses batch email sending to avoid rate limits.
import requests
url = "https://api.diga.io/v1/project/invitation/send/bulk"
payload = { "invitations": [
{
"email": "<string>",
"role": "member"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"successful": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invited_email": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"registered": true,
"expires_at": "2023-11-07T05:31:56Z",
"role": "admin",
"inviter_name": "<string>",
"invited_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"failed": [
{
"email": "<string>",
"success": true,
"error": "<string>",
"invitation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invited_email": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"registered": true,
"expires_at": "2023-11-07T05:31:56Z",
"role": "admin",
"inviter_name": "<string>",
"invited_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Mostrar atributos secundarios