API7 Docs
API7 GatewayAPI7 Enterprise Admin APIsInvite a user

Invite a user

POST /api/invites

POST /api/invites

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Request Body

application/json

Response Body

application/json

curl -X POST "$API_BASE_URL/api/invites" \  -H "Content-Type: application/json" \  -d '{    "username": "string",    "password": "safe-password"  }'

User invitation created successfully. Returns the user with an invitation link.

{
  "value": {
    "id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
    "username": "admin",
    "name": "admin",
    "email": "test@email.com",
    "email_verified": true,
    "created_at": 1742288232,
    "updated_at": 1742288235,
    "provider": "builtin",
    "two_factor_enabled": true,
    "roles": [
      {
        "id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
        "name": "super_admin",
        "desc": "Object description.",
        "type": "built_in",
        "policies": [
          "super-admin-permission-policy"
        ]
      }
    ],
    "boundaries": [
      {
        "name": "sample-policy",
        "type": "built_in",
        "desc": "Object description.",
        "labels": {
          "version": "v2",
          "env": "prod"
        },
        "policy_document": {
          "statement": [
            {
              "effect": "allow",
              "resources": [
                "arn:api7:gateway:gatewaygroup/<.*>/service/<.*>"
              ],
              "actions": [
                "gateway:GetPublishedService"
              ],
              "conditions": {
                "gateway_group_label": {
                  "type": "MatchLabel",
                  "options": {
                    "key": "env",
                    "operator": "exact_match",
                    "value": "prod"
                  }
                }
              }
            }
          ]
        },
        "id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
        "created_at": 1742288232,
        "updated_at": 1742288235
      }
    ],
    "invitation_link": "string"
  }
}
Complete operation details and schema variants

POST /api/invites

Invite a user

Invite a new dashboard user account. The invitation initiates onboarding so the user can later sign in with supported authentication methods. Required IAM Permission: Action iam:InviteUser, Resource arn:api7:iam:user/*

Parameters

Request body

Content type: application/json

  • username (string, required): The username of the user.
  • password (string, required): The password of the user.
  • boundaries (array, optional): The permission boundaries of the user.
  • name (string, optional): The name of the user.

Responses

  • 200: User invitation created successfully. Returns the user with an invitation link.

  • allOf variant 1

  • value (object, optional): The specific resource.

  • allOf variant 2

  • value (object, optional):

  • allOf variant 1

  • allOf variant 1

  • value.id (string, optional): Operator ID.

  • value.username (string, optional): Operator username.

  • value.name (string, optional): Operator name.

  • value.email (string, optional): Operator email.

  • value.email_verified (boolean, optional): If true, the operator email is verified.

  • allOf variant 2

  • value.created_at (integer, optional): The object created timestamp.

  • value.updated_at (integer, optional): The object updated timestamp.

  • value.provider (string, optional): Method used for user authentication or provisioning source.

  • value.two_factor_enabled (boolean, optional): If true, the user has enabled two-factor authentication (TOTP).

  • value.roles (array, optional): An array of roles to be assigned to a user.

  • value.roles[].id (string, optional): The unique identifier of the role.

  • value.roles[].name (string, optional): The role name.

  • value.roles[].desc (string, optional): The object description.

  • value.roles[].type (string, optional): Type of the role.

  • value.roles[].policies (array, optional): The policies of the role.

  • value.boundaries (array, optional): An array of boundaries to be assigned to the user.

  • allOf variant 1

  • value.boundaries[].name (string, required): The policy name.

  • value.boundaries[].type (string, optional): The permission policy type.

  • value.boundaries[].desc (string, optional): The description of the policy.

  • value.boundaries[].labels (object, optional): The labels of the policy.

  • value.boundaries[].policy_document (object, required): Policy document.

  • value.boundaries[].policy_document.statement (array, required): The statements of the policy.

  • value.boundaries[].policy_document.statement[].effect (string, required): The effect of the statement.

  • value.boundaries[].policy_document.statement[].resources (array, required): The resources for requests.

  • value.boundaries[].policy_document.statement[].actions (array, required): The actions for requests.

  • anyOf variant 1

  • value.boundaries[].policy_document.statement[].conditions (object, optional): Rules for matching requests. The key is the condition name, the value is the condition expression which specifies the function name and parameter structure of condition.

  • anyOf variant 1: Condition for Gateway Group

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label (object, optional): Condition for gateway group label.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 2: Condition for Service

  • value.boundaries[].policy_document.statement[].conditions.service_label (object, optional): Condition for service label.

  • value.boundaries[].policy_document.statement[].conditions.service_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.service_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.service_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.service_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.service_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 3: Condition for Permission Policy

  • value.boundaries[].policy_document.statement[].conditions.permission_policy_label (object, optional): Condition for permission policy label.

  • value.boundaries[].policy_document.statement[].conditions.permission_policy_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.permission_policy_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.permission_policy_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.permission_policy_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.permission_policy_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 4: Condition for Service

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label (object, optional): Condition for gateway group label.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.options.value (string, optional): The value to compare against the label.

  • value.boundaries[].policy_document.statement[].conditions.service_label (object, optional): Condition for service label.

  • value.boundaries[].policy_document.statement[].conditions.service_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.service_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.service_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.service_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.service_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 5: Condition for Role

  • value.boundaries[].policy_document.statement[].conditions.role_label (object, optional): Condition for role label.

  • value.boundaries[].policy_document.statement[].conditions.role_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.role_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.role_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.role_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.role_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 6: Condition for User

  • value.boundaries[].policy_document.statement[].conditions.user_label (object, optional): Condition for user label.

  • value.boundaries[].policy_document.statement[].conditions.user_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.user_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.user_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.user_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.user_label.options.value (string, optional): The value to compare against the label.

  • value.boundaries[].policy_document.statement[].conditions.permission_boundaries (object, optional): Condition for permission boundaries.

  • value.boundaries[].policy_document.statement[].conditions.permission_boundaries.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.permission_boundaries.options (array, optional): An array of options.

  • anyOf variant 7: Condition for Consumer

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label (object, optional): Condition for gateway group label.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.options.value (string, optional): The value to compare against the label.

  • value.boundaries[].policy_document.statement[].conditions.consumer_label (object, optional): Condition for consumer label.

  • value.boundaries[].policy_document.statement[].conditions.consumer_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.consumer_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.consumer_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.consumer_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.consumer_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 8: Condition for Secret

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label (object, optional): Condition for gateway group label.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.gateway_group_label.options.value (string, optional): The value to compare against the label.

  • value.boundaries[].policy_document.statement[].conditions.secret_provider_label (object, optional): Condition for secret provider label.

  • value.boundaries[].policy_document.statement[].conditions.secret_provider_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.secret_provider_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.secret_provider_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.secret_provider_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.secret_provider_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 9: Condition for Contact Point

  • value.boundaries[].policy_document.statement[].conditions.contact_point_label (object, optional): Condition for contact point label.

  • value.boundaries[].policy_document.statement[].conditions.contact_point_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.contact_point_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.contact_point_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.contact_point_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.contact_point_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 10: Condition for Alert Policy

  • value.boundaries[].policy_document.statement[].conditions.alert_policy_label (object, optional): Condition for alert policy label.

  • value.boundaries[].policy_document.statement[].conditions.alert_policy_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.alert_policy_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.alert_policy_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.alert_policy_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.alert_policy_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 11: Condition for Developer

  • value.boundaries[].policy_document.statement[].conditions.developer_label (object, optional): Condition for developer label.

  • value.boundaries[].policy_document.statement[].conditions.developer_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.developer_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.developer_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.developer_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.developer_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 12: Condition for API Product

  • value.boundaries[].policy_document.statement[].conditions.api_product_label (object, optional): Condition for API product label.

  • value.boundaries[].policy_document.statement[].conditions.api_product_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.api_product_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.api_product_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.api_product_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.api_product_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 13: Condition for CA Certificate

  • value.boundaries[].policy_document.statement[].conditions.ca_certificate_label (object, optional): Condition for CA certificate label.

  • value.boundaries[].policy_document.statement[].conditions.ca_certificate_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.ca_certificate_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.ca_certificate_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.ca_certificate_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.ca_certificate_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 14: Condition for Certificate

  • value.boundaries[].policy_document.statement[].conditions.certificate_label (object, optional): Condition for certificate label.

  • value.boundaries[].policy_document.statement[].conditions.certificate_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.certificate_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.certificate_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.certificate_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.certificate_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 15: Condition for SNI

  • value.boundaries[].policy_document.statement[].conditions.sni_label (object, optional): Condition for SNI label.

  • value.boundaries[].policy_document.statement[].conditions.sni_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.sni_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.sni_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.sni_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.sni_label.options.value (string, optional): The value to compare against the label.

  • anyOf variant 16: Condition for Portal

  • value.boundaries[].policy_document.statement[].conditions.portal_label (object, optional): Condition for portal label.

  • value.boundaries[].policy_document.statement[].conditions.portal_label.type (string, optional): Type of condition.

  • value.boundaries[].policy_document.statement[].conditions.portal_label.options (object, optional): Matching expressions.

  • value.boundaries[].policy_document.statement[].conditions.portal_label.options.key (string, optional): The label key to match against.

  • value.boundaries[].policy_document.statement[].conditions.portal_label.options.operator (string, optional): The comparison operator used for matching the label.

  • value.boundaries[].policy_document.statement[].conditions.portal_label.options.value (string, optional): The value to compare against the label.

  • allOf variant 2

  • value.boundaries[].id (string, optional): The policy ID.

  • value.boundaries[].created_at (integer, optional): The object created timestamp.

  • value.boundaries[].updated_at (integer, optional): The object updated timestamp.

  • allOf variant 2

  • value.invitation_link (string, optional): The invitation link of the user.

  • 400: Invalid arguments. Error details will be provided in the response.

cURL

curl -X POST '$API_BASE_URL/api/invites'