Invitations
Invite team members to your customer account.
Overview
Invitations allow you to add new team members to your DNScale account. Invited users receive an email with a link to accept the invitation and set up their account.
Base endpoint: /v1/invitations-admin
Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/invitations-admin | Create an invitation |
GET | /v1/invitations-admin | List all invitations |
GET | /v1/invitations-admin/{invitation_id} | Get invitation details |
DELETE | /v1/invitations-admin/{invitation_id} | Revoke an invitation |
Create an Invitation
Invite a new user to join your customer account:
curl -X POST https://api.dnscale.eu/v1/invitations-admin \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "newuser@example.com",
"role": "member"
}'Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Email address to invite |
role | string | No | Role to assign: admin, member (default: member) |
Response:
{
"status": "success",
"data": {
"id": "inv_abc123",
"email": "newuser@example.com",
"role": "member",
"status": "pending",
"expires_at": "2025-01-22T10:30:00Z",
"created_at": "2025-01-15T10:30:00Z"
}
}The invited user receives an email with an acceptance link. Invitations expire after 7 days.
List Invitations
View all pending and recent invitations for your account:
curl https://api.dnscale.eu/v1/invitations-admin \
-H "Authorization: Bearer YOUR_API_KEY"Response:
{
"status": "success",
"data": {
"items": [
{
"id": "inv_abc123",
"email": "pending@example.com",
"role": "member",
"status": "pending",
"expires_at": "2025-01-22T10:30:00Z"
},
{
"id": "inv_def456",
"email": "accepted@example.com",
"role": "admin",
"status": "accepted",
"accepted_at": "2025-01-10T14:00:00Z"
}
],
"total": 2
}
}Get Invitation Details
curl https://api.dnscale.eu/v1/invitations-admin/{invitation_id} \
-H "Authorization: Bearer YOUR_API_KEY"Revoke an Invitation
Cancel a pending invitation before it's accepted:
curl -X DELETE https://api.dnscale.eu/v1/invitations-admin/{invitation_id} \
-H "Authorization: Bearer YOUR_API_KEY"Response:
{
"status": "success",
"data": {
"message": "Invitation revoked successfully"
}
}Revocation
Only pending invitations can be revoked. Once accepted, use the Users API to manage team members.
Invitation Status
| Status | Description |
|---|---|
pending | Invitation sent, awaiting acceptance |
accepted | User accepted and joined the account |
expired | Invitation expired (after 7 days) |
revoked | Invitation was cancelled |
Roles
| Role | Permissions |
|---|---|
admin | Full access to all resources and settings |
member | Access to zones and records, limited account settings |
Example: Invite Multiple Team Members
#!/bin/bash
EMAILS=("dev1@example.com" "dev2@example.com" "ops@example.com")
API_KEY="YOUR_API_KEY"
for email in "${EMAILS[@]}"; do
echo "Inviting $email..."
curl -s -X POST https://api.dnscale.eu/v1/invitations-admin \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d "{\"email\": \"$email\", \"role\": \"member\"}" \
| jq '.data.id'
done
echo "All invitations sent!"Acceptance Flow
When a user clicks the invitation link:
- They're directed to the DNScale signup page
- They create a password for their account
- They're automatically added to your customer account
- They can immediately access the dashboard
Related
- Users - Manage existing team members
- Authentication - API key management for users