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

    MethodEndpointDescription
    POST/v1/invitations-adminCreate an invitation
    GET/v1/invitations-adminList 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:

    FieldTypeRequiredDescription
    emailstringYesEmail address to invite
    rolestringNoRole 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

    StatusDescription
    pendingInvitation sent, awaiting acceptance
    acceptedUser accepted and joined the account
    expiredInvitation expired (after 7 days)
    revokedInvitation was cancelled

    Roles

    RolePermissions
    adminFull access to all resources and settings
    memberAccess 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:

    1. They're directed to the DNScale signup page
    2. They create a password for their account
    3. They're automatically added to your customer account
    4. They can immediately access the dashboard