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.

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_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

Copy a Document or Template

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

Required Scopes

USER_READ , USER_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

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

Export Slides to .pdf

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

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)

Use of the Events endpoints requires a Quip Event Monitoring subscription.

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 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 Optional

The company to use

Request Body

Description

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