Overview

Admin API

For governance and security purposes, Quip makes available a set of APIs to enable specific users to see all content within a Quip site and to take actions against that content.

Requirements

This API requires that you have first followed the setup instructions for the Quip Automation API.

To call this API, the access token you use must be for a user who is an admin.

You must also have the admin API enabled for your quip instance. Ask your support representative if you would like this functionality enabled.


Rate Limit

Quip’s Admin API is rate limited by number of requests per time period per admin - with a default of 100 requests per minute and 1500 requests per hour. API responses include a few custom headers to aid programmers implement backoffs in their code. These headers are:

X-Ratelimit-Limit: The number of requests/min the admin can make
X-Ratelimit-Remaining: The number of requests remaining this admin can make within the minute - this number changes with each request.
X-Ratelimit-Reset: The UTC timestamp for when the rate limit will reset

Note: If you believe your application requires escalated rate limits please reach out to support and explain your use case and rationale.


Threads

List Threads

POST https://platform.quip.com/1/admin/threads/list

Required Scopes

ADMIN_READ

Headers

Content-Type:application/x-www-form-urlencoded
Authorization:Bearer {{access_token}}

Request Body

company_id

The company to use

page Optional

number used for pagination

since_timestamp Optional

epoch time in seconds to fetch since

until_timestamp Optional

epoch time in seconds to fetch since

sorted_by Optional

Values can be 'ASC' or 'DESC'

query_token Optional

Description

Returns a list of all threads in the company along with a timestamp when they were last modified.

Get a Thread

GET https://platform.quip.com/1/admin/threads/:id

Required Scopes

ADMIN_READ

Headers

Authorization:Bearer {{access_token}}

Path Variables

id

The ID of the thread to inspect

Query Params

company_id

The company to use

Description

Retrieve information about a specific thread.

Get a Thread

{
    "thread": {
        "author_id": "VLP9EAwREEs",
        "thread_class": "document",
        "id": "UaU9AAX4O8t",
        "created_usec": 1558125528931838,
        "updated_usec": 1558416856049619,
        "title": "Untitled",
        "link": "https://corp.quip.com/Os2mAY8uPVaQ",
        "type": "document",
        "is_deleted": false
    },
    "user_ids": [
        "VLP9EAwREEs"
    ],
    "shared_folder_ids": [],
    "expanded_user_ids": [
        "VLP9EAwREEs"
    ],
    "invited_user_emails": []
}

Get Threads by ID

GET https://platform.quip.com/1/admin/threads/

Required Scopes

ADMIN_READ

Headers

Authorization:Bearer {{access_token}}

Query Params

company_id

The company to use

ids

A comma separated list of thread IDs

Description

Retrieve details on a list of threads

Get Threads by ID

{
    "AVN9AAeqq5w": {
        "thread": {
            "author_id": "LJa9EAtQi98",
            "thread_class": "document",
            "id": "AVN9AAeqq5w",
            "created_usec": 1519926805974011,
            "updated_usec": 1558224928731511,
            "title": "❗️ very important cat pics ❗️",
            "link": "https://corp.quip.com/klUsAqWxr8Ne",
            "type": "document",
            "is_deleted": false
        },
        "user_ids": [],
        "shared_folder_ids": [
            "RKa9OAiGmsC"
        ],
        "expanded_user_ids": [
            "PZF9EA0i0ef",
            "dHe9EABHRsb",
            "EHY9EAokwO3",
        ],
        "invited_user_emails": [],
        "html": "..."
    },
    "UcZ9AAhvqrc": {
        "thread": {
            "author_id": "KLf9EAPrxbs",
            "thread_class": "document",
            "id": "UcZ9AAhvqrc",
            "created_usec": 1553875833997942,
            "updated_usec": 1558416856485215,
            "title": "LFG",
            "sharing": {
                "company_id": "eaM9cAYW16x",
                "company_mode": "EDIT"
            },
            "link": "https://corp.quip.com/vKLyAnao5u2R",
            "type": "document",
            "is_deleted": false
        },
        "user_ids": [],
        "shared_folder_ids": [
            "RKH9OAELPKV"
        ],
        "expanded_user_ids": [
            "PZF9EA0i0ef",
            "IPX9EAmMSP0",
            "ICe9EAuECt9",
            "AOR9EACeKjK",
        ],
        "invited_user_emails": [],
        "html": "<h1 id='UcZ9CAK0DQz'>LFG</h1>\n\n<p id='UcZ9CA91kZu' class='line'>​</p>\n\n<p id='UcZ9CAGumhq' class='line'>​</p>\n\n"
    }
}

Search for Threads

GET https://platform.quip.com/1/admin/threads/search

Required Scopes

ADMIN_READ

Headers

Authorization:Bearer {{access_token}}

Query Params

company_id

The company to use

query

A string to search for

page Optional

number used for pagination. Defaults to 1

Description

Returns all documents that contain words specified in the "query" parameter.

Additional rate limits, separate from overall Admin API Rate Limit, are imposed for paginating over admin search results.

Create a Document, Spreadsheet or Slides

POST https://platform.quip.com/1/admin/threads/new-document

Required Scopes

ADMIN_WRITE

Headers

Content-Type:application/x-www-form-urlencoded
Authorization:Bearer {{access_token}}

Request Body

company_id

The company to use

format Optional

Either html or markdown. Defaults to html.

content

The html or markdown content of the new document.

title Optional

The title of the new document. If not specified, we infer the title from the first content of the document, e.g., the first heading.

member_ids Optional

A comma-separated list of folder IDs or user IDs. The document will be placed in the specified folders, and any individual users listed will be granted individual access to the document. If this argument is not given, the document is created in the authenticated user's Private folder.

type Optional

Either document, spreadsheet or slides. Defaults to document.

Description

Creates a document, spreadsheet, or slides, returning the new thread in the same format as Get Thread.

Note that for slides threads, this endpoint currently only supports creating a bare-bones, one-slide deck with a given title. Copy a Document or Template provides fuller slides functionality, allowing automatic creation of a new slide deck adapted from an existing one.

Edit A Document

POST https://platform.quip.com/1/admin/threads/edit-document

Required Scopes

ADMIN_WRITE

Headers

Authorization:Bearer {{access_token}}

Request Body

company_id

The company to use

thread_id

The thread whose document you want to modify

format Optional

Either html or markdown. Defaults to html.

content

The html or markdown content of the new document.

section_id Optional

The id for the section you want to modify. Required for some location values.

location Optional

Where we should insert the new content. Defaults to 0: APPEND.

  • 0: APPEND - Append to the end of the document.
  • 1: PREPEND - Prepend to the beginning of the document.
  • 2: AFTER_SECTION - Insert after the section specified by section_id.
  • 3: BEFORE_SECTION - Insert before the section specified by section_id.
  • 4: REPLACE_SECTION - Delete the section specified by section_id and insert the new content at that location.
  • 5: DELETE_SECTION - Delete the section specified by section_id (no content required).

Description

Incrementally modifies the content of a document.

We determine where to insert the new content based on the location argument. Some location values are relative to another section, which is specified by section_id, enabling fine-grained editing. For example, to add an item to the end of a checklist, you would send the ID of the last list item in the list as the section_id and send 2: AFTER_SECTION as the location.

To get the IDs of sections in an existing document, parse the HTML returned by the methods above. Every paragraph, list item, and table cell will have an HTML id attribute you can use in this method.

content is required for all calls unless the location is 5: DELETE_SECTION, which indicates we should simply delete the specified section_id. Any images referenced must have been previously uploaded separately.

We return the updated thread in the format specified in Get Thread

Copy a Document or Template

POST https://platform.quip.com/1/admin/threads/copy-document

Required Scopes

ADMIN_READ , ADMIN_WRITE

Headers

Content-Type:application/x-www-form-urlencoded

Request Body

company_id

The company to use

thread_id

The id or secret of the document to be copied

values Optional

A string or file containing a valid JSON dictionary whose keys are strings and whose values are either strings or dictionaries. Keys can only contain the characters A-Z, a-z, 0-9, .(dot) and _(underscore). If not supplied, the source document will not be treated as a template. Any valid JSON dictionary is acceptable. It can contain arrays but the key syntax does not provide any way to navigate through them or print them.

member_ids Optional

List of member ids that will be added to the new document

folder_ids Optional

A list of folder ids the new document will be added to

title Optional

A string value to be the title of the new document. If this isn't the same string as the first section in the doc, it will get overwritten with the first section when the document is saved.

Description

Makes a copy of the document specified by the thread_id argument. The source document can also be treated as a template. To use the source document as a template, the values query argument must contain a valid JSON dictionary that consists of string keys and whose values are either string, numbers or other dictionaries. The endpoint will scan the document for a text pattern like:

[[varname]]

where varname consists of a series of alphanumeric characters and underscores (_). It will then look up 'varname' in the values dictionary and replace the pattern with its value.

In addition, patterns can contain one or more dots (.) like:

[[varname1.varname2]]

In this case, the endpoint will separate the string into 'varname1' and 'varname2'. If it finds varname1 in the first dictionary, it will expect that value to be another dictionary and will then use varname2 to look for another value. For example, if values has the following JSON representation:

{ &quot;user&quot;: { &quot;name&quot;: &quot;Arnie&quot;, &quot;age&quot;: &quot;34&quot; }}

The template variable [[user.name]] will be substituted with 'Arnie'.

If the key specified in the template variable can't be found in the values dictionary, then the template variable pattern is left unchanged in the document.

Response Fields

thread

A dictionary that contains an id field with the thread_id of the new document

Example Response

{
    "thread": {
        "id": "AbFAAALoIx9"
    }
}

Add People to a Thread or Add a Thread to Folders

POST https://platform.quip.com/1/admin/threads/add-members

Required Scopes

ADMIN_MANAGE

Headers

Content-Type:application/x-www-form-urlencoded
Authorization:Bearer {{access_token}}

Request Body

company_id

The company to use

thread_id

The thread to which you want to add folders and users.

member_ids

A comma-separated list of folder IDs and user IDs. We add each user ID individually to the thread. We add the thread to each of the specified folder IDs.

Description

The member_ids parameter must contain a list of folder IDs and user IDS. Specified users will be added to the document and the thread will be added to the specified folders.

Remove People from a Thread or Remove a Thread from Folders

POST https://platform.quip.com/1/admin/threads/remove-members

Required Scopes

ADMIN_MANAGE

Headers

Content-Type:application/x-www-form-urlencoded
Authorization:Bearer {{access_token}}

Request Body

company_id

The company to use

thread_id

The thread from which you want to remove folders and users.

member_ids

A comma-separated list of folder IDs and user IDs. We remove each user ID individually from the thread. We remove the thread from each of the specified folder IDs.

Description

The member_ids parameter must contain a list of folder IDs and user IDS. Specified users will be removed from the thread and the thread will be removed from specified folders.

POST https://platform.quip.com/1/admin/threads/edit-share-link-settings

Required Scopes

ADMIN_MANAGE

Headers

Authorization:Bearer {{access_token}}
Content-Type:application/x-www-form-urlencoded

Request Body

company_id

The company to use

thread_id

The ID of the thread to modify

allow_external_access Optional

true/false, indicates whether people outside the thread's company can access the document

mode Optional

valid values are: edit, view, or none. Indicates the access that users will have to the thread.

enable_request_access Optional

true/false, allow users to request access to the document. When a user tries to access a document that they don't have access to, they are presented with a dialog informing them they do not have access to this document. If enable_request_access is true, this dialog will contain a “Request Access” button.

show_conversation Optional

true/false, enable or disable the conversation panel on the right of the document.

show_edit_history Optional

true/false, allow users to see the edit history of the document.

allow_messages Optional

true/false, allow messages in the conversation panel.

allow_comments Optional

true/false, allow comments on the content of this thread.

Description

Allows the api user to change the link-shared settings of any thread

Delete a Thread

POST https://platform.quip.com/1/admin/threads/delete

Required Scopes

ADMIN_MANAGE

Headers

Authorization:Bearer {{access_token}}

Request Body

company_id

The company to use

thread_id

The thread whose document you want to modify

Description

Deletes the thread with the specified id or secret.

RESPONSE FIELDS

No JSON is returned by this endpoint when successful. On an error, there are three fields returned:

error

The type of error

error_code

The status code of the http request

error_description

A short description of why the request failed

Get a Blob from a Thread

GET https://platform.quip.com/1/admin/blob/:thread_id/:blob_id

Required Scopes

ADMIN_READ

Headers

Authorization:Bearer {{access_token}}

Path Variables

thread_id

The thread ID that contains the desired blob

blob_id

The blob ID to return

Query Params

company_id

The company to use

Description

Returns the contents of specified blob from the thread.

Add a Blob to a Thread

POST https://platform.quip.com/1/admin/blob/:thread_id

Required Scopes

ADMIN_WRITE

Headers

Authorization:Bearer {{access_token}}

Path Variables

thread_id

Request Body

blob

The image or blob binary

company_id

The company to use

Description

Uploads an image or other blob to the given thread. Returns a url that may be used in the content field of Edit Document requests and an id that may be used in the attachment field of Add a Message.

Response Fields

id

The new blob ID.

url

The relative URL to reference the blob in document edits.

Example Response

{
    "id": "DiPp1ZQyC8QUtvBT4vojzM",
    "url": "/blob/LeSAAAqaCfc/DiPp1ZQyC8QUtvBT4vojzM"
}

Export Document to .docx

GET https://platform.quip.com/1/admin/threads/:thread_id/export/docx

Required Scopes

ADMIN_READ

Path Variables

thread_id

Query Params

company_id Optional

Export Spreadsheet to .xlsx

GET https://platform.quip.com/1/admin/threads/:thread_id/export/xlsx

Required Scopes

ADMIN_READ

Path Variables

thread_id

Query Params

company_id Optional

Export Slides to .pdf

GET https://platform.quip.com/1/admin/threads/:thread_id/export/pdf

Required Scopes

ADMIN_READ

Path Variables

thread_id

Query Params

company_id Optional


Messages

Get Messages for a Thread

GET https://platform.quip.com/1/admin/messages/:thread_id

Required Scopes

ADMIN_READ

Headers

Authorization:Bearer {{access_token}}

Path Variables

thread_id

The thread ID to view messages for.

Query Params

company_id

The company to use

count Optional

Number of messages to return. Default is 25, max is 100.

max_created_usec Optional

If given, we return messages updated before the given max_created_usec, which is a UNIX timestamp in microseconds. To use this argument for paging, you can use the created_usec field in the returned message objects.

sort_by Optional

ASC or DESC. Changes the order of the returned messages.

Description

Returns a list of the most recent messages for the given thread, ordered reverse-chronologically.

Get a Message

GET https://platform.quip.com/1/admin/message/:message_id

Required Scopes

ADMIN_READ

Headers

Authorization:Bearer {{access_token}}

Path Variables

message_id

The message ID to view the message for.

Query Params

company_id

The company to use

Description

Returns a message with the given message ID.

Delete a Message

POST https://platform.quip.com/1/admin/message/delete

Required Scopes

ADMIN_WRITE

Headers

Authorization:Bearer {{access_token}}

Query Params

company_id

The company to use

message_id

The ID of the message

Description

Delete a message with the given message ID.


Users

List Users at a Company

POST https://platform.quip.com/1/admin/users/list

Required Scopes

ADMIN_READ

Headers

Authorization:Bearer {{access_token}}

Request Body

company_id

The company to use

count Optional

Maximum number of users to return. Default is 25,000.

offset Optional

Number of users to skip before returning results. Default is 0.

Description

Returns a list of users in the company.The list contains the name, emails, and id of each user.

Get Information about a User

GET https://platform.quip.com/1/admin/users/:id

Required Scopes

ADMIN_READ

Headers

Authorization:Bearer {{access_token}}

Path Variables

id

The user to get information for

Query Params

company_id

The company to use

threads_meta Optional

true/false, if true will limit the response fields to just the thread_ids and their last_updated timestamp. default: false

since_updated_usec Optional

epoch seconds. Limits results to threads that have been updated after <value>

include_deleted Optional

true/false, if true will return deleted users in addition to existing users. Default false

Description

Returns information about the specified user. When no optional parameters are present, the return value is a dictionary that contains three lists, one for each of the user's threads, contacts and companies.

For larger companies, this information can become too large to return in one request. There are four optional parameters that clients can use to page through this information.

Optional Parameters

  • since_updated_usec - limits the number of entries in the 'threads' field of the response to just those that have an updated_usec value greater than or equal to this value.
  • include_deleted - includes deleted threads that the user was a member of in the results.
  • thread_ids - limits the returned threads to those specifically reference by this argument.
  • threads_meta - changes the form of the response. When this argument is present, the list of threads is replaced with a meta field that contains the updated_usec and is_deleted values for each thread.

These four parameters can be used in any combination with the expected result.

Get Information about a User

{
    "name": "Rita Smith",
    "emails": [
        "rita@quip.com"
    ],
    "id": "VLP9EAwREEs",
    "created_usec": 1552521339058795,
    "is_robot": false,
    "affinity": 0,
    "desktop_folder_id": "AMO9OAGJma7",
    "archive_folder_id": "AMO9OABZPUw",
    "starred_folder_id": "AMO9OALLvIj",
    "private_folder_id": "AMO9OAEnK3w",
    "shared_folder_ids": [],
    "group_folder_ids": [
        "RKH9OAELPKV"
    ],
    "disabled": false,
    "profile_picture_url": "https://quip-cdn.com/vxTAbl8chaw2_GEogVEZsA",
    "threads": {
        "meta": {
            "AVN9AAeqq5w": {
                "updated_usec": 1558224928731511,
                "is_deleted": false
            },
            "fbI9AAbDHaf": {
                "updated_usec": 1558480668573063,
                "is_deleted": false
            },
            "feW9AAOL8dH": {
                "updated_usec": 1558482746511269,
                "is_deleted": false
            }
        }
    }
}

Folders

Get a Folder

GET https://platform.quip.com/1/admin/folders/:id

Required Scopes

ADMIN_READ

Headers

Authorization:Bearer {{access_token}}

Path Variables

id

The folder ID to look up

Query Params

company_id

The company to use

Description

Get information about any folder.

Get a Folder

{
    "folder": {
        "title": "Quip",
        "creator_id": "KLf9EAPrxbs",
        "id": "RKH9OAELPKV",
        "created_usec": 1497474937520657,
        "updated_usec": 1558247457514983
    },
    "member_ids": [
        "YNK9EAU71mc",
        "PEW9EAtTnrV",
        "aBd9EAl8R0H",
        "MVT9EACSny8",
        "LJa9EAtQi98",
        "ROS9EAGOj1u"
    ],
    "children": [
        {
            "thread_id": "aXM9AASQOGr"
        },
        {
            "thread_id": "cYX9AAfS6ma"
        },
        {
            "thread_id": "WVD9AA1grdh"
        }
    ]
}

Events (requires subscription)

| Event Type           | Description                                                       |
| -------------------- | ----------------------------------------------------------------- |
| create-thread        | A thread was created. Additional data on the type of creation can |
|                      | be found in sub_action; the options are: create-new,              |
|                      | create-import, create-copy                                        |
| open-thread          | A thread was opened                                               |
| delete-thread        | A thread was deleted                                              |
| share-thread         | Additional members were added to a thread. Additional data on the |
|                      | type of sharing can be found in sub_action                        |
| unshare-thread       | Members of a thread were removed                                  |
| move-thread          | A thread was moved from one folder into another folder, a thread  |
|                      | is deleted and moved to trash, or a thread is restored from trash |
|                      | and moved back to a folder                                        |
| send-message         | A message was sent. This event type is a subset of create-message,|
|                      | including annotation, sending message in conversation pane, and   |
|                      | sending a direct message                                          |
|                      |                                                                   |
|                      | NOTE: Because send-message is a subset of create-message, We      |
|                      | recommend developers use create-message                           |
| delete-message       | A message was deleted                                             |
| edit-message         | A message was edited                                              |
| create-message       | A message was created and sent. Additional data on the type of    |
|                      | message can be found in sub_action. The options are: annotation,  |
|                      | sending message in conversation pane, sending a direct message,   |
|                      | and ending an edit session, which sends edits to the conversation |
|                      | pane                                                              |
|                      |                                                                   |
|                      | NOTE: create-message is the preferred event type moving forward;  |
|                      | we advise developers to rely on this instead of send-message      |
| create-folder        | A folder was created                                              |
| delete-folder        | A folder was deleted                                              |
| open-folder          | A folder was opened                                               |
| move-folder          | A folder was moved                                                |
| copy-folder          | A folder was copied                                               |
| share-folder         | A folder was shared                                               |
| unshare-folder       | Members of a folder were removed                                  |
| login                | A site member logged in                                           |
| print-document       | A thread was printed                                              |
| export-thread        | A thread was exported                                             |
| upload_blob-thread   | A file was uploaded to a thread                                   |
| create-user          | A site member was created                                         |
| disable-user         | A site member was disabled                                        |
| admin_edit           | An admin took an action in the admin console                      |
| admin_api_call       | An admin API endpoint was accessed                                |
| restore-thread       | Thread removed from the trash by a user, restoring access         |
| create-policy        | A data retention or data hold policy was created                  |
| retire-policy        | A data retention or data hold policy was retired                  |
| attach-policy        | A data retention or data hold policy was attached to a thread     |
| execute-policy       | The policy action on a data hold or data retention was executed   |
| create-link          | A shareable link for a thread was created                         |
| edit-link            | A sharaeble link's access to a thread was changed                 |
| delete-link          | A sharaeble link for a thread was disabled                        |
| download_blob-thread | A file attachment of a thread downloaded by user                  |
| search_threads       | A search query across corpus of threads                           |

Event JSON

Responses format individual events as a JSON dictionary described below.

| Field                       | Description                                                      |
|------------------------------------------------------------------------------------------------|
| time_usec                   | Server timestamp in microseconds                                 |
| ip                          | IP address of the client, if present                             |
| user_agent                  | Software agent acting on behalf of the user, such as a browser   |
| device                      | Platform type used by user                                       |
| quip_version                | Software version, only present for some device types             |
| id                          | Unique id for the event                                          |
| action                      | Action taken by user                                             |
| sub_action                  | More detailed description of the action taken by user            |
| object                      | What the action acted upon                                       |
| child_object                | More detailed description of the object the action is taken upon |
| user (flattened)            | (not a field, represented by fields below)                       |
| user_id                     | Unique id of user associated to the event                        |
| thread (flattened)          | (not a field, represented by fields below)                       |
| thread_id                   | Unique id of thread associated to the event                      |
| thread__author_id           | Thread creator's user_id                                         |
| thread__thread_type         | Valid values: NONE, DOCUMENT, TWO_PERSON_CHAT, GROUP_CHAT,       |
|                             | CHANNEL, FILE_UPLOAD, TASKS_SEARCH, ALERTS_FEED                  |
| folder (flattened)          | (not a field, represented by fields below)                       |
| folder_id                   | Unique id of folder associated to the event                      |
| folder__author_id           | Folder creator's user_id                                         |
| folder__folder_type         | Valid values: PRIVATE, SHARED                                    |
| company (flattened)         | (not a field, represented by fields below)                       |
| company_id                  | Unique id of company for user associated to the event            |
| document_id                 | Unique id of document associated to the event                    |
| link (flattened)            | (not a field, represented by fields below)                       |
| link_id                     | Unique id for a shareable url link to a thread                   |
| link__show_conversation     | Whether access via the link shows conversation pane              |
| link__show_diff             | Whether access via the link shows the document changes/diffs     |
| link__allow_messages        | Whether access via the link allows comments                      |
| link__enable_request_access | Whether access via the link allows requesting more access        |
| link__link_sharing_mode     | Updated access level via the link                                |
|                             | Valid values: NONE, VIEW, EDIT                                   |
| link__allow_access_outside_domain | Whether access via the link requires authentication to     |
|                             | owning organization                                              |
| recipient_ids               | User ids of members shared in a `share` action                   |
| src_folder_ids              | Where the object is moved from in actions like `move`            |
| dst_folder_ids              | Where the object is moved to in action like `move`               |
| annotation (flattened)      | (not a field, represented by fields below)                       |
| annotation_id               | Unique id of annotation associated to the event                  |
| message (flattened)         | (not a field, represented by fields below)                       |
| message_id                  | Unique id of message associated to the event                     |
| blob (flattened)            | (not a field, represented by fields below)                       |
| blod_id                     | Unique id of blob associated to the event                        |
| policy (flattened)          | (not a field, represented by fields below)                       |
| policy_id                   | Unique id of policy associated to the event                      |

Get an Event Cursor

GET https://platform.quip.com/1/admin/events/1/cursor/create

Required Scopes

ADMIN_READ

Headers

Authorization:Bearer {{access_token}}

Query Params

company_id

The company to use

user_id Optional

The user to use

event_types Optional

since_timestamp

in microseconds, e.g. (echo $(( gdate +%s%N / 1000 - (6 * 3600 * 1000000) )))

until_timestamp

In microseconds, e.g. (echo $(( gdate +%s%N / 1000 - (5 * 3600 * 1000000) ))

Description

Gets a starting cursor to retrieve historical events.

Get an Event Cursor

{
	"next_cursor": "..."
}

Get Next Batch of Events

GET https://platform.quip.com/1/admin/events/1/events/get

Required Scopes

ADMIN_READ

Headers

Authorization:Bearer {{access_token}}

Query Params

cursor

The "next_cursor" value from the previous call.

Description

Returns the next batch of historical events from the cursor argument.

Response contains list of zero or more events, whose format and content fields are described above.

Get Next Batch of Events

{
	"events": [
		...
	],
	"more_to_read": True,
	"next_cursor": "..."
}

Get a Cursor for Near Real-Time Events

GET https://platform.quip.com/1/admin/events/1/cursor/realtime/create

Required Scopes

ADMIN_READ

Headers

Authorization:Bearer {{access_token}}

Query Params

company_id

The company to use

user_id Optional

The user to use

event_types Optional

Description

Gets a starting cursor to retrieve historical events.

Note that near real-time cursors expire 24 hours after creation, including next_cursors provided when getting a batch of events.

Get a Cursor for Near Real-Time Events

{
	"next_cursor": "..."
}

Get Next Batch of Near Real-Time Events

GET https://platform.quip.com/1/admin/events/1/events/realtime/get

Required Scopes

ADMIN_READ

Headers

Authorization:Bearer {{access_token}}

Query Params

cursor

The "next_cursor" value from the previous call.

Description

Returns the next batch of historical events from the cursor argument.

Response contains list of zero or more events, whose format and content fields are described above.

Get Next Batch of Near Real-Time Events

{
	"events": [
		...
	],
	"more_to_read": True,
	"next_cursor": "..."
}

Quarantine

Add Quarantine

POST https://platform.quip.com/1/admin/quarantine

Required Scopes

ADMIN_MANAGE

Request Body

company_id

The company to use

object_id

The ID of the thread (for a document) or message or blob to quarantine

blob_thread_id Optional

If quarantining a blob, this is the thread id to use

Description

Quarantines a given object, either a message or a document or a blob. Quarantining a document hides all document content, including the title, and blocks all edits. Quarantining a message hides all message content. Quarantining a blob prevents accessing the blob.

Remove Quarantine

DELETE https://platform.quip.com/1/admin/quarantine

Required Scopes

ADMIN_MANAGE

Query Params

company_id

The company to use

object_id

The ID of the thread (for a document) or message or blob to remove from quarantine

blob_thread_id Optional

If quarantining a blob, this is the thread id to use

Description

Remove a document or message from quarantine. This will restore its content to its pre-quarantine state.


Company

Get Managed Sites

GET https://platform.quip.com/1/admin/company/managed-sites

Required Scopes

ADMIN_MANAGE

Headers

Authorization:Bearer {{access_token}}

Query Params

company_id

The company to use

Request Body

Description

Returns a list of all managed site IDs for the admin's company.


Admin Roles

Get Admin Role for a User

GET https://platform.quip.com/1/admin/users/admin-role

Required Scopes

ADMIN_READ

Headers

Authorization:Bearer {{access_token}}

Query Params

company_id

The company to use

user_id

The user to use

Description

Returns the admin role id and admin role name given a user id.

Set Admin Role for a User

POST https://platform.quip.com/1/admin/users/admin-role

Required Scopes

ADMIN_WRITE

Query Params

company_id

The company to use

user_id

The user to use

admin_role_id

The admin role to set to

Description

Updates a given user's admin role.

Delete Admin Role for a User

DELETE https://platform.quip.com/1/admin/users/admin-role

Required Scopes

ADMIN_WRITE

Headers

Authorization:Bearer {{access_token}}

Query Params

company_id

The company to use

user_id

The user to use

Description

Removes a given user's admin role and removes them as an admin.

Get Admin Roles for a Company

GET https://platform.quip.com/1/admin/company/admin-roles

Required Scopes

ADMIN_READ

Headers

Authorization:Bearer {{access_token}}

Query Params

company_id

The company to use

Description

Returns a list of all the admin role ids and admin role names.