> ## Documentation Index
> Fetch the complete documentation index at: https://api.docs.flare.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Organization Member

> Create a user in an organization, add it to the tenants listed in `memberships` (at least one) and return the new member. A tenant role defaults to `viewer`; on demo tenants it is forced to `admin` for organization admins and `viewer` for everyone else. A welcome email is sent unless `send_welcome_email` is false. Creation is refused when the organization reached its active user limit. Requires write permission on the members of the organization.

&#x20;Required API key permission: **Write Organization**


## OpenAPI

````yaml firework-v2-openapi post /firework/v2/organizations/{organization_id}/members
openapi: 3.0.1
info:
  description: >

    Manage and access Firework resources.


    Requests are authenticated with API tokens, which are obtained using an API
    key:


    1. Generate an API key from the [Profile
    page](https://app.flare.io/#/profile).

    2. Send a `POST` request to `https://api.flare.io/tokens/generate` with the
    `Authorization: <api-key>` header to get an API token. API tokens expire
    after 1 hour.

    3. Call the API endpoints with the `Authorization: Bearer <api-token>`
    header.


    See [Authentication](https://api.docs.flare.io/concepts/authentication) for
    details.
  title: Firework API
  version: v2
servers:
  - url: https://api.flare.io/
security:
  - BearerAuth: []
tags:
  - description: >-
      The authenticated user, its API keys, organizations, tenants, onboarding
      and usage.
    name: Account
  - description: >-
      Events collected by Flare: global search, tenant and identifier feeds,
      event details, actions and saved feed views.
    name: Events
  - description: >-
      Identifiers are the assets a tenant monitors, such as domains, keywords
      and email addresses. Includes recommendations and authorization of
      sensitive identifiers.
    name: Identifiers
  - description: Report groups, reports, their sections, schedules and delivery channels.
    name: Reports
paths:
  /firework/v2/organizations/{organization_id}/members:
    post:
      tags:
        - Account
      summary: Create an organization member
      description: >-
        Create a user in an organization, add it to the tenants listed in
        `memberships` (at least one) and return the new member. A tenant role
        defaults to `viewer`; on demo tenants it is forced to `admin` for
        organization admins and `viewer` for everyone else. A welcome email is
        sent unless `send_welcome_email` is false. Creation is refused when the
        organization reached its active user limit. Requires write permission on
        the members of the organization.
      operationId: post_organization_members_api
      parameters:
        - description: ID of the organization.
          in: path
          name: organization_id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationMemberData'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/post_organization_members_api_200_response
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
          description: >-
            The request body is invalid or the member cannot be created. Codes:
            `INVITE_ERROR` (this email address cannot be invited),
            `INVALID_EMAIL_ADDRESS`, `MINIMUM_OF_ONE_TENANT` (`memberships` is
            empty), `EMAIL_NOT_AUTHORIZED` (email domain not allowed for this
            organization), `INVALID_AUTH_TENANT_ID` (`auth_tenant_id` is not a
            tenant of the organization).
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
          description: >-
            Codes: `FORBIDDEN` (the caller cannot add members to this
            organization), `MEMBER_LIMIT_REACHED` (the organization reached its
            active user limit).
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
          description: >-
            The organization does not exist or its members are not visible to
            the caller (code `NOT_FOUND`).
components:
  schemas:
    OrganizationMemberData:
      properties:
        name:
          description: First name of the new member.
          type: string
        surname:
          description: Surname of the new member.
          type: string
        email:
          description: Email address of the new member.
          type: string
        organization_member_permissions:
          description: >-
            Object mapping an organization member permission name to a boolean;
            the only permission is `admin`. Send an empty object for a regular
            member.
          properties: {}
          type: object
        user_permissions:
          description: >-
            Object mapping a user permission name to a boolean; defaults to an
            empty object.
          properties: {}
          type: object
        memberships:
          description: >-
            Tenants to add the new member to, with the role in each; at least
            one is required.
          items:
            $ref: '#/components/schemas/UserTenantMembership'
          type: array
        send_welcome_email:
          default: true
          description: Whether to send a welcome email to the new member; defaults to true.
          type: boolean
      required:
        - email
        - name
        - organization_member_permissions
        - surname
      type: object
    post_organization_members_api_200_response:
      properties:
        member:
          $ref: '#/components/schemas/OrganizationMemberWithMetadata'
      type: object
    HttpError:
      properties:
        message:
          description: Human-readable description of the error.
          type: string
        code:
          description: Machine-readable error code.
          type: string
      type: object
    UserTenantMembership:
      properties:
        tenant_id:
          description: ID of the tenant to add the member to.
          type: integer
        is_readonly:
          description: >-
            Legacy way to set the role: true for `viewer`, false for `editor`;
            `role` wins when both are sent.
          type: boolean
        role:
          description: Role of the member in the tenant; defaults to `viewer`.
          enum:
            - viewer
            - editor
            - admin
          example: viewer
          type: string
      required:
        - tenant_id
      type: object
    OrganizationMemberWithMetadata:
      properties:
        user:
          allOf:
            - $ref: '#/components/schemas/OrganizationMember'
          description: The member (user).
          type: object
        tenant_count:
          description: Number of tenants the member belongs to.
          type: integer
      type: object
    OrganizationMember:
      properties:
        id:
          description: ID of the member (user).
          type: integer
        name:
          description: First name of the member.
          type: string
        surname:
          description: Surname of the member.
          type: string
        email:
          description: Email address of the member.
          type: string
        organization_member_permissions:
          allOf:
            - $ref: '#/components/schemas/OrganizationMemberPermission'
          description: >-
            Organization member permissions, as an object mapping a permission
            name to a boolean; the only permission is `admin`.
          type: object
        is_disabled:
          description: Whether the account of the member is disabled.
          type: boolean
        registered_at:
          description: Date and time at which the member registered, in ISO 8601 format.
          format: date-time
          type: string
        urn:
          description: The uniform resource name of the member.
          type: string
      type: object
    OrganizationMemberPermission:
      properties:
        '*':
          additionalProperties:
            type: boolean
          description: >-
            Whether the member holds the organization member permission named by
            the key; the only permission is `admin`.
          type: object
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.