Knowledge Base›WEDOS API (WAPI)›Global Members

WAPI – Global Members

On this pagewg-members-createwg-members-showwg-members-delete

This article describes the WAPI commands for inviting members to the WEDOS Global administration. A member is another user to whom you give access to your domains. WAPI setup, authentication and troubleshooting are covered in WAPI – Manual. The full list of codes is in WAPI – Response Codes.

This article covers the following commands:

General information

  • Names: parameter and item names in JSON (email, policies…) must be used exactly as shown in this article.
  • Common codes: any command can return 2100 (required parameter missing) and 2101 (invalid parameter value). They are not repeated for each command.
  • Test mode: a test request ("test": 1) validates the input parameters, changes nothing and returns 1000 without data.

wg-members-create

Use wg-members-create to create an invitation for a new member and set their permissions for your domains.

Parameters

  • email = email address of the new member or login of an existing WEDOS account (required)
  • policies = domain permissions (required, must not be empty). The key is a domain name, or * for all domains. The value is:
    • 1 or true = read only: the member can only view the domain
    • 0 or false = management: the member can manage the domain within the subscription plan

Any other value returns 2420. Invalid domains are skipped; policies_count returns how many permissions were set.

Return codes

  • 1000 = OK
  • 2223 = invalid email format or the address does not exist
  • 2274 = internal error – user_id missing
  • 2400 = WEDOS Global internal error
  • 2419 = invitation not found
  • 2420 = invalid permissions array
  • 2424 = the membership already exists
  • 4000 = internal error

Response data

  • email = email the invitation was sent to
  • url = URL for accepting the invitation
  • policies_count = number of permissions set

Templates

JSON request:

{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wg-members-create",
"clTRID": "your request id",
"data": {
"email": "member@domain.tld",
"policies": {
"domain1.tld": 1,
"domain2.tld": 0
}
}
}
}

JSON response (OK):

{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wg-members-create",
"data": {
"email": "member@domain.tld",
"url": "invitation URL",
"policies_count": 2
}
}
}

wg-members-show

Use wg-members-show to show a member’s invitation, including the URL for accepting it.

Parameters

  • email = email address of the member or login of their WEDOS account (required)

Return codes

  • 1000 = OK
  • 2223 = invalid email format or the address does not exist
  • 2274 = internal error – user_id missing
  • 2400 = WEDOS Global internal error
  • 2419 = invitation not found
  • 4000 = internal error

Response data

  • email = email the invitation was sent to
  • url = URL for accepting the invitation
  • policies_count = number of permissions set

Templates

JSON request:

{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wg-members-show",
"clTRID": "your request id",
"data": {
"email": "member@domain.tld"
}
}
}

JSON response (OK):

{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wg-members-show",
"data": {
"email": "member@domain.tld",
"url": "invitation URL",
"policies_count": 2
}
}
}

wg-members-delete

Use wg-members-delete to remove a member and revoke their permissions.

Parameters

  • email = email address of the member or login of their WEDOS account (required)

Return codes

  • 1000 = OK
  • 2223 = invalid email format or the address does not exist
  • 2274 = internal error – user_id missing
  • 2400 = WEDOS Global internal error
  • 2419 = invitation not found
  • 4000 = internal error

Response data

  • email = email of the removed member

Templates

JSON request:

{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wg-members-delete",
"clTRID": "your request id",
"data": {
"email": "member@domain.tld"
}
}
}

JSON response (OK):

{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wg-members-delete",
"data": {
"email": "member@domain.tld"
}
}
}

Was this article helpful?

Your feedback helps us improve our articles.

Your message goes to the documentation team, who do not reply to it. If you need help, contact us using the contact form. Do not include passwords or personal data.

Didn’t find what you were looking for?

Send us your question using the contact form.