Close subpackage_memberships API

The subpackage_memberships API from Close — 3 operation(s) for subpackage_memberships.

Documentation

📖
Documentation
https://developer.close.com/
📖
APIReference
https://developer.close.com/resources/leads/
📖
APIReference
https://developer.close.com/resources/contacts/
📖
APIReference
https://developer.close.com/resources/opportunities/
📖
APIReference
https://developer.close.com/resources/tasks/
📖
APIReference
https://developer.close.com/resources/activities/
📖
APIReference
https://developer.close.com/resources/activities/call/
📖
APIReference
https://developer.close.com/resources/activities/email/
📖
APIReference
https://developer.close.com/resources/activities/sms/
📖
APIReference
https://developer.close.com/resources/activities/meeting/
📖
APIReference
https://developer.close.com/resources/pipelines/
📖
APIReference
https://developer.close.com/resources/custom-fields/
📖
APIReference
https://developer.close.com/resources/custom-objects/
📖
APIReference
https://developer.close.com/resources/templates/
📖
APIReference
https://developer.close.com/resources/sequences/
📖
APIReference
https://developer.close.com/resources/bulk-actions/
📖
APIReference
https://developer.close.com/resources/smart-views/
📖
APIReference
https://developer.close.com/resources/exports/
📖
APIReference
https://developer.close.com/resources/reports/
📖
APIReference
https://developer.close.com/resources/phone-numbers/
📖
APIReference
https://developer.close.com/resources/scheduling/
📖
APIReference
https://developer.close.com/resources/connected-accounts/
📖
APIReference
https://developer.close.com/resources/users/
📖
APIReference
https://developer.close.com/resources/organization/
📖
APIReference
https://developer.close.com/resources/roles/
📖
APIReference
https://developer.close.com/resources/groups/
📖
APIReference
https://developer.close.com/resources/event-log/
📖
APIReference
https://developer.close.com/resources/webhooks/
📖
Documentation
https://developer.close.com/topics/oauth/

Specifications

OpenAPI Specification

close-subpackage-memberships-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: API Endpoints subpackage_activities subpackage_memberships API
  version: 1.0.0
servers:
- url: https://api.close.com/api/v1
tags:
- name: subpackage_memberships
paths:
  /membership/:
    post:
      operationId: create
      summary: Create a membership
      description: 'Ensures an active membership for the given email will be provisioned.


        - If the user already exists, they will be added to the requestor''s organization.

        - If it doesn''t exist, a new user will be provisioned.


        `role_id` can be one of `''admin''`, `''superuser''`, `''user''` or `''restricteduser''` for the corresponding predefined role, or an ID of a [Role](https://developer.close.com/api/resources/roles).


        This request requires "Manage Organization" permissions.


        API access to this endpoint is supported via OAuth only.'
      tags:
      - subpackage_memberships
      parameters:
      - name: Authorization
        in: header
        description: Use your API key as the username and leave the password empty.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/memberships_create_Response_200'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: Not found
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMembership'
    put:
      operationId: bulk-update
      summary: Bulk update memberships
      description: Any field that can be updated on a membership individually can also be used to bulk update multiple memberships. To issue a bulk update, pass their comma separated ids into `id__in` in `_params` as shown in the example below.
      tags:
      - subpackage_memberships
      parameters:
      - name: Authorization
        in: header
        description: Use your API key as the username and leave the password empty.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/memberships_bulkUpdate_Response_200'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: Not found
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              description: Any type
  /membership/{id}/:
    put:
      operationId: update
      summary: Update a membership
      description: 'You can update the field `role_id` and its value can be one of `''admin''`, `''superuser''`, `''user''` or `''restricteduser''` for the corresponding predefined role, or an ID of a [Role](https://developer.close.com/api/resources/roles).


        The field `auto_record_calls` is used to manage whether or not calls are automatically recorded. The initial value for a membership is `''unset''`. It can be updated to `''disabled''`, or `''enabled''`.'
      tags:
      - subpackage_memberships
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: Use your API key as the username and leave the password empty.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/memberships_update_Response_200'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: Not found
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              description: Any type
  /membership/{id}/pinned_views/:
    get:
      operationId: get-pinned-views
      summary: Get pinned views for a membership
      description: Get the ordered list of pinned views for the given membership.
      tags:
      - subpackage_memberships
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: Use your API key as the username and leave the password empty.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/memberships_getPinnedViews_Response_200'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: Not found
          content:
            application/json:
              schema:
                description: Any type
    put:
      operationId: update-pinned-views
      summary: Update pinned views for a membership
      description: Set the pinned views for the given membership. Provide an ordered list that will overwrite the entire current list.
      tags:
      - subpackage_memberships
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: Use your API key as the username and leave the password empty.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/memberships_updatePinnedViews_Response_200'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: Not found
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetPinnedSavedView'
components:
  schemas:
    SetPinnedSavedView:
      type: object
      properties:
        saved_view_ids:
          type: array
          items:
            type: string
      required:
      - saved_view_ids
      title: SetPinnedSavedView
    memberships_getPinnedViews_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: memberships_getPinnedViews_Response_200
    memberships_bulkUpdate_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: memberships_bulkUpdate_Response_200
    CreateMembership:
      type: object
      properties:
        email:
          type: string
          format: email
        role_id:
          type: string
      required:
      - email
      - role_id
      title: CreateMembership
    memberships_create_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: memberships_create_Response_200
    memberships_update_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: memberships_update_Response_200
    memberships_updatePinnedViews_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: memberships_updatePinnedViews_Response_200
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: basic
      description: Use your API key as the username and leave the password empty.
    OAuth2:
      type: http
      scheme: bearer