Zendesk Organization Memberships API

The Organization Memberships API from Zendesk — 7 operation(s) for organization memberships.

Documentation

📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/introduction/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/targets/targets/
📖
Documentation
https://developer.zendesk.com/api-reference/sales-crm/resources/account/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/activity_stream/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/channel_framework/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket-attachments/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/audit_logs/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/automations/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/bookmarks/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/brand_agents/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/brands/
📖
Documentation
https://developer.zendesk.com/api-reference/live-chat/chat-api/chats/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/
📖
Documentation
https://developer.zendesk.com/api-reference/custom-data/introduction/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/custom_roles/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/custom_ticket_statuses/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/users/users/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/deletion_schedules/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/dynamic_content/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/email_notifications/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/groups/group_memberships/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/group_sla_policies/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/groups/groups/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_import/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/incremental_exports/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/job_statuses/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/locales/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/macros/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/oauth/oauth_tokens/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/organizations/organization_fields/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/organizations/organization_memberships/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/organizations/organization_subscriptions/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/push_notification_devices/
📖
Documentation
https://developer.zendesk.com/api-reference/agent-availability/omnichannel_routing_queues/omnichannel_routing_queues/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/support_addresses/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/lookup_relationships/lookup_relationships/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket-requests/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/resource_collections/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/skill_based_routing/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/satisfaction_ratings/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/satisfaction_reasons/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/search/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/sessions/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/sharing_agreements/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_skips/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/sla_policies/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/suspended_tickets/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/tags/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_audits/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_fields/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_form_statuses/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_forms/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_metrics/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/triggers/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/views/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/workspaces/

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

zendesk-organization-memberships-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: '1.0'
  title: Zendesk Account Account Settings Organization Memberships API
  description: Needs a description.
tags:
- name: Organization Memberships
paths:
  /api/v2/organization_memberships:
    get:
      operationId: ListOrganizationMemberships
      tags:
      - Organization Memberships
      summary: Zendesk Get  Api V2 Organization_memberships
      description: 'Returns a list of organization memberships for the account, user or organization in question.


        **Note**: When returning organization memberships for a user, organization memberships are sorted with the default organization first, and then by organization name.


        #### Pagination


        * Cursor pagination (recommended)

        * Offset pagination


        See [Pagination](/api-reference/introduction/pagination/).


        Returns a maximum of 100 records per page.


        #### Allowed For


        - Agents

        - End users

        '
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMembershipsResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationMembershipsResponseExample'
    post:
      operationId: CreateOrganizationMembership
      tags:
      - Organization Memberships
      summary: Zendesk Post  Api V2 Organization_memberships
      description: 'Assigns a user to a given organization. Returns an error with status 422 if the user is already assigned to the organization.


        #### Allowed For


        * Admins

        * Agents when creating a new organization membership for an end user

        '
      responses:
        '201':
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMembershipResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationMembershipCreateResponseExample'
  /api/v2/organization_memberships/{organization_membership_id}:
    parameters:
    - $ref: '#/components/parameters/OrganizationMembershipId'
    get:
      operationId: ShowOrganizationMembershipById
      tags:
      - Organization Memberships
      summary: Zendesk Get  Api V2 Organization_memberships Organization_membership_id
      description: '#### Allowed for


        * Agents

        '
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMembershipResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationMembershipResponseExample'
    delete:
      operationId: DeleteOrganizationMembership
      tags:
      - Organization Memberships
      summary: Zendesk Delete  Api V2 Organization_memberships Organization_membership_id
      description: 'Immediately removes a user from an organization and schedules a job to unassign all working tickets currently assigned to the user and organization combination. The `organization_id` of the unassigned tickets is set to null.


        #### Allowed for


        * Admins

        * Agents when deleting an organization membership for an end user

        '
      responses:
        '204':
          description: No Content response
  /api/v2/organization_memberships/create_many:
    post:
      operationId: CreateManyOrganizationMemberships
      tags:
      - Organization Memberships
      summary: Zendesk Post  Api V2 Organization_memberships Create_many
      description: 'Accepts an array of up to 100 organization membership objects.


        This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#show-job-status) endpoint to check for the job''s completion. Only a certain number of jobs can be queued or running at the same time. See [Job limit](/api-reference/introduction/rate-limits/#job-limit) for more information.


        #### Allowed For

        * Admins

        * Agents

        '
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationMembershipCreateManyResponseExample'
  /api/v2/organization_memberships/destroy_many:
    delete:
      operationId: DeleteManyOrganizationMemberships
      tags:
      - Organization Memberships
      summary: Zendesk Delete  Api V2 Organization_memberships Destroy_many
      description: 'Immediately removes a user from an organization and schedules a job to unassign all working tickets currently assigned to the user and organization combination. The `organization_id` of the unassigned tickets is set to null.


        #### Response


        This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#show-job-status) endpoint to check for the job''s completion. Only a certain number of jobs can be queued or running at the same time. See [Job limit](/api-reference/introduction/rate-limits/#job-limit) for more information.


        #### Allowed For


        * Agents

        '
      parameters:
      - name: ids
        in: query
        description: The IDs of the organization memberships to delete
        schema:
          type: array
          items:
            type: integer
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/JobStatusBulkDeleteResponseExample'
  /api/v2/users/{user_id}/organization_memberships/{organization_membership_id}/make_default:
    parameters:
    - $ref: '#/components/parameters/UserId'
    - $ref: '#/components/parameters/OrganizationMembershipId'
    put:
      operationId: SetOrganizationMembershipAsDefault
      tags:
      - Organization Memberships
      summary: Zendesk Put  Api V2 Users User_id Organization_memberships Organization_membership_id Make_default
      description: 'Sets the default organization membership of a given user.


        #### Allowed for


        * Admins

        * Agents when setting the default organization membership for an end user

        '
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMembershipsResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationMembershipsResponseExample'
  /api/v2/users/{user_id}/organizations/{organization_id}:
    parameters:
    - $ref: '#/components/parameters/OrganizationId'
    - $ref: '#/components/parameters/UserId'
    delete:
      operationId: UnassignOrganization
      tags:
      - Organization Memberships
      summary: Zendesk Delete  Api V2 Users User_id Organizations Organization_id
      description: 'Immediately removes a user from an organization and schedules a job to unassign all working tickets currently assigned to the user and organization combination. The `organization_id` of the unassigned tickets is set to null.


        #### Allowed For


        * Agents

        '
      responses:
        '204':
          description: No Content response
  /api/v2/users/{user_id}/organizations/{organization_id}/make_default:
    parameters:
    - $ref: '#/components/parameters/UserId'
    - $ref: '#/components/parameters/OrganizationId'
    put:
      operationId: SetOrganizationAsDefault
      tags:
      - Organization Memberships
      summary: Zendesk Put  Api V2 Users User_id Organizations Organization_id Make_default
      description: 'Sets the default organization membership of a given user.


        #### Allowed For


        * Agents

        '
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMembershipResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationMembershipResponseExample'
components:
  schemas:
    OrganizationMembershipResponse:
      type: object
      properties:
        organization_membership:
          $ref: '#/components/schemas/OrganizationMembershipObject'
    OrganizationMembershipsResponse:
      type: object
      properties:
        organization_memberships:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationMembershipObject'
    JobStatusResponse:
      type: object
      properties:
        job_status:
          $ref: '#/components/schemas/JobStatusObject'