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

# Remove a member

> Remove a member from your team.



## OpenAPI

````yaml openapi/magnific-api-v2-openapi.yaml DELETE /v2/team/members/{member_id}
openapi: 3.1.0
info:
  title: Magnific API v2 — Team
  version: 2.0.0
  description: >-
    Read and manage your team with the Magnific API v2: members, groups, API
    keys, credit limits, the total budget (beta), tool permissions, credit usage
    and audit logs. Authenticate with a personal token or with an API key in
    `x-magnific-api-key`; each operation names the scope a personal token needs
    (`api:read`, `api:write` or `api:destructive`). Errors are JSON `{code,
    message, details?, request_id?}`. Listings page with `limit` and `cursor`,
    and answer `meta.pagination.next_cursor`.
servers:
  - description: Production V2
    url: https://api.magnific.com
security:
  - magnificApiKey: []
  - bearerAuth: []
tags:
  - description: Members and invitations of your team.
    name: Members
  - description: Groups of your team.
    name: Groups
  - description: API keys of your team.
    name: API keys
  - description: Credit limits and the total budget.
    name: Budgets
  - description: Tool permissions of the organization, groups and members.
    name: Permissions
  - description: Credit usage and project budgets.
    name: Analytics
  - description: Audit-log events and reports.
    name: Audit logs
paths:
  /v2/team/members/{member_id}:
    delete:
      tags:
        - Members
      summary: Remove a member
      description: >
        Removes the member from your team and answers the member as it was.
        Needs the members remove permission

        (owners and admins; group admins within their group when the
        organization allows it). Needs `api:destructive`.
      operationId: team_members_delete
      parameters:
        - description: A member of your team, as `GET /team/members` lists it.
          example: usr_a3f81c2d9e4b7f60
          in: path
          name: member_id
          required: true
          schema:
            pattern: ^usr_[0-9a-f]{16}$
            type: string
        - description: >-
            Personal token only: the team the call acts on (its UUID). The
            caller must be an active member of it. Without it, the team in the
            token is used; with neither, the call is `team_required` (400).
            Ignored for an API key, which always acts on its own team.
          example: 8a5b79ee-5d57-4ce0-b3e2-a00fbfed3ba5
          in: header
          name: x-magnific-team-id
          required: false
          schema:
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Teamteam_members_delete_200_response'
          description: The member removed.
        '400':
          $ref: '#/components/responses/Team400-team-required'
        '401':
          $ref: '#/components/responses/Team401-unauthenticated'
        '403':
          $ref: '#/components/responses/Team403-forbidden'
        '404':
          $ref: '#/components/responses/Team404-not-found'
        '409':
          $ref: '#/components/responses/Team409-conflict'
        '422':
          $ref: '#/components/responses/Team422-validation-failed'
        '429':
          $ref: '#/components/responses/Team429-rate-limited'
        '500':
          $ref: '#/components/responses/Team500-server-error'
        '503':
          $ref: '#/components/responses/Team503-service-unavailable'
      security:
        - magnificApiKey: []
        - bearerAuth: []
components:
  schemas:
    Teamteam_members_delete_200_response:
      example:
        data:
          member_id: usr_a3f81c2d9e4b7f60
          role: member
          email: designer@example.com
          status: active
      properties:
        data:
          $ref: '#/components/schemas/Teammember'
      required:
        - data
      type: object
    Teammember:
      example:
        member_id: usr_a3f81c2d9e4b7f60
        role: member
        email: designer@example.com
        status: active
      properties:
        member_id:
          description: >-
            Stable, opaque id of a member in your team. It is the same value as
            `user_reference` in the credit usage, and it differs from team to
            team for the same person.
          example: usr_a3f81c2d9e4b7f60
          pattern: ^usr_[0-9a-f]{16}$
          type: string
        email:
          description: Lowercased.
          example: designer@example.com
          format: email
          type: string
        role:
          enum:
            - owner
            - admin
            - group_admin
            - member
          example: member
          type: string
        status:
          description: '`active`, or `inactive` for a member whose seat was not renewed.'
          example: active
          type: string
      required:
        - email
        - member_id
        - role
        - status
      type: object
    Teamerror:
      description: The body of every error of API v2.
      example:
        code: validation_failed
        details:
          required_scope: api:write
          errors:
            key:
              - errors
              - errors
        message: Validation error.
        request_id: 0f8c2c1e8d6a4b7f
      properties:
        code:
          description: >-
            Stable, for code: `team_required`, `unauthenticated`,
            `insufficient_scope`, `magnific_api_disabled`, `forbidden`,
            `not_found`, `conflict`, `validation_failed`, `upgrade_required`,
            `rate_limited`, `upstream_error`, `service_unavailable`,
            `server_error`... Each response lists the codes it carries.
          example: validation_failed
          type: string
        message:
          description: For people. The text can change.
          example: Validation error.
          type: string
        details:
          $ref: '#/components/schemas/Teamerror_details'
        request_id:
          description: >-
            The request's id, the same as the `X-Request-Id` response header.
            Share it with support.
          example: 0f8c2c1e8d6a4b7f
          type: string
      required:
        - code
        - message
      type: object
    Teamerror_details:
      additionalProperties: true
      description: >-
        What the refusal knows: `errors` lists the validation messages by field,
        `required_scope` names the scope an `insufficient_scope` error lacks,
        `minimum_credits` the lowest total budget allowed.
      example:
        required_scope: api:write
        errors:
          key:
            - errors
            - errors
      properties:
        errors:
          additionalProperties:
            items:
              type: string
            type: array
          type: object
        required_scope:
          example: api:write
          type: string
      type: object
  responses:
    Team400-team-required:
      content:
        application/json:
          example:
            code: team_required
            message: 'No team: send x-magnific-team-id with the team id (a UUID).'
            request_id: 0f8c2c1e8d6a4b7f
          schema:
            $ref: '#/components/schemas/Teamerror'
      description: >-
        `team_required`: a personal token that names no team. Send
        `x-magnific-team-id`. Answered by the gateway.
    Team401-unauthenticated:
      content:
        application/json:
          example:
            code: unauthenticated
            message: Unauthenticated.
          schema:
            $ref: '#/components/schemas/Teamerror'
      description: '`unauthenticated`: missing, invalid or expired credentials.'
    Team403-forbidden:
      content:
        application/json:
          examples:
            insufficient_scope:
              value:
                code: insufficient_scope
                message: Forbidden
                details:
                  required_scope: api:write
            magnific_api_disabled:
              value:
                code: magnific_api_disabled
                message: Magnific API is disabled for this organization.
            forbidden:
              value:
                code: forbidden
                message: You do not have permission to perform this action.
          schema:
            $ref: '#/components/schemas/Teamerror'
      description: >-
        `insufficient_scope`: the personal token or API key lacks the
        operation's scope (`details.required_scope`). `magnific_api_disabled`:
        the organization switched the Magnific API off. `forbidden`: the
        caller's role can't do this, on this resource, or the plan has no
        analytics.
    Team404-not-found:
      content:
        application/json:
          example:
            code: not_found
            message: Not Found
          schema:
            $ref: '#/components/schemas/Teamerror'
      description: >-
        `not_found`: no such member, group, API key or report in your team, or
        the route does not exist for your credential.
    Team409-conflict:
      content:
        application/json:
          example:
            code: conflict
            message: Conflict
          schema:
            $ref: '#/components/schemas/Teamerror'
      description: '`conflict`: the change conflicts with the team''s current state.'
    Team422-validation-failed:
      content:
        application/json:
          example:
            code: validation_failed
            message: Validation error.
            details:
              errors:
                limit:
                  - This value should be an integer between 1 and 100.
          schema:
            $ref: '#/components/schemas/Teamerror'
      description: >-
        `validation_failed`: the body or the query is not valid. Field errors
        are listed by field in `details.errors`; a field or parameter the
        operation does not take is refused as not supported. A rule the domain
        checks comes with only `message`.
    Team429-rate-limited:
      content:
        application/json:
          example:
            code: rate_limited
            message: Too many requests
          schema:
            $ref: '#/components/schemas/Teamerror'
      description: >-
        `rate_limited`: too many requests. Wait the seconds in `Retry-After`.
        Answered by the gateway.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            example: 60
            type: integer
    Team500-server-error:
      content:
        application/json:
          example:
            code: server_error
            message: Internal Server error
          schema:
            $ref: '#/components/schemas/Teamerror'
      description: >-
        `server_error`: unexpected error. Retry; if it keeps failing, share the
        `request_id` with support.
    Team503-service-unavailable:
      content:
        application/json:
          example:
            code: service_unavailable
            message: Service Unavailable
          schema:
            $ref: '#/components/schemas/Teamerror'
      description: >-
        `service_unavailable`: the credential or the team could not be checked,
        or a search timed out. Retry later.
  securitySchemes:
    magnificApiKey:
      description: >
        Your Magnific API key. Required for authentication. [Learn how to obtain
        an API key](https://docs.magnific.com/quickstart)
      in: header
      name: x-magnific-api-key
      type: apiKey
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Personal access token. Reads need the `api:read` scope; changes (team,
        budgets, audit-log exports) need `api:write`. Pick the team with
        `x-magnific-team-id`.

````

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