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.

Edit A Document

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

Required Scopes

ADMIN_READ , 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

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.

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.

Export Document to .docx

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

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

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

Get an Event Cursor

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

Headers

Authorization:Bearer {{access_token}}

Query Params

company_id Optional

user_id Optional

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

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.

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

Headers

Authorization:Bearer {{access_token}}

Query Params

company_id Optional

user_id Optional

event_types Optional

Description

Gets a starting cursor to retrieve historical 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

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.

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

Query Params

Optional

Request Body

company_id

The company to use

object_id

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

Description

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

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 to remove from quarantine

Description

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