Skip to Content
Fluxmail

POST /api/v1/admin/members

Create a pending member and return a one-time enrollment code. Requires admin.members.

Create a pending member and return a one-time enrollment code. Requires admin.members.

Authentication

Pass an administrator member session or an API key as a bearer token. The key must belong to an administrator and include the capability listed above.

Remote administrative requests require HTTPS. Requests from the local computer can use HTTP.

Request

curl 'http://localhost:8977/api/v1/admin/members' \
  -X POST \
  -H "Authorization: Bearer $FLUXMAIL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "name": "string",
  "email": "person@example.com",
  "role": "admin"
}'

Request body

Content type: application/json

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "role": {
      "type": "string",
      "enum": [
        "admin",
        "member"
      ]
    }
  },
  "required": [
    "name",
    "email",
    "role"
  ],
  "additionalProperties": false
}

Responses

StatusDescriptionContent type
200Successapplication/json
201Successapplication/json
400Invalid requestapplication/json
401Authentication requiredapplication/json
403Permission deniedapplication/json
404Not foundapplication/json
409Conflictapplication/json
413Request body too largeapplication/json
429Too many attemptsapplication/json

200 response

{
  "type": "object",
  "properties": {
    "data": {
      "nullable": true
    }
  },
  "additionalProperties": {
    "nullable": true
  }
}

201 response

{
  "type": "object",
  "properties": {
    "data": {
      "nullable": true
    }
  },
  "additionalProperties": {
    "nullable": true
  }
}

Last updated