The Coda API is a RESTful API that lets you programmatically interact with Coda docs:
As we update and release newer versions of the API, we reserve the right to remove older APIs and functionality with a 3-month deprecation notice. We will post about such changes as well as announce new features in the Developers Central section of our Community, and update the API updates doc.
Our Getting Started Guide helps you learn the basic of working with the API and shows a few ways you can use it. Check it out, and learn how to:
Each resource instance retrieved via the API has the following fields:
id
: The resource's immutable ID, which can be used to refer to it within its contexttype
: The type of resource, useful for identifying it in a heterogenous collection of resultshref
: A fully qualified URI that can be used to refer to and get the latest details on the resourceMost resources can be queried by their name or ID. We recommend sticking with IDs where possible, as names are fragile and prone to being changed by your doc's users.
Endpoints supporting listing of resources have the following fields:
items
: An array containing the listed resources, limited by the limit
or pageToken
query parametersnextPageLink
: If more results are available, an API link to the next page of resultsnextPageToken
: If more results are available, a page token that can be passed into the pageToken
query parameterThe maximum page size may change at any time, and may be different for different endpoints. Please do not rely on it
for any behavior of your application. If you pass a limit
parameter that is larger than our maximum allowed limit,
we will only return as many results as our maximum limit. You should look for the presence of the nextPageToken
on the
response to see if there are more results available, rather than relying on a result set that matches your provided limit.
To fetch a subsequent page of results, pass the pageToken
parameter. Set this parameter to the value given to you as the nextPageToken
in a page response. If no value is provided, there are no more results available. You only need to pass the pageToken
to get
the next page of results, you don't need to pass any of the parameters from your original request, as they are all
implied by the pageToken
. Any other parameters provided alongside a pageToken
will be ignored.
While most object IDs will have to be discovered via the API, you may find yourself frequently wanting to get the ID of a specific Coda doc.
Here's a handy tool that will extract it for you. (See if you can find the pattern!)
The Coda API sets a reasonable limit on the number of requests that can be made per minute. Once this limit is reached, calls to the API will start returning errors with an HTTP status code of 429.
These are the current rate limits. They are subject to change at any time without notice. For robustness, all API scripts should check for HTTP 429 Too Many Requests errors and back off and retry the request. Limits apply per-user across all endpoints that share the same limit and across all docs.
Reading data (with the exceptions below): 100 requests per 6 seconds
Writing data (POST/PUT/PATCH): 10 requests per 6 seconds
Writing doc content data (POST/PUT/PATCH): 5 requests per 10 seconds
Listing docs: 4 requests per 6 seconds
Reading analytics: 100 requests per 6 seconds
While edits made in Coda are shared with other collaborators in real-time, it can take a few seconds for them to
become available via the API. You may also notice that changes made via the API, such as updating a row, are not
immediate. These endpoints all return an HTTP 202 status code, instead of a standard 200, indicating that the
edit has been accepted and queued for processing. This generally takes a few seconds, and the edit may fail if
invalid. Each such edit will return a requestId
in the response, and you can pass this requestId
to the
#getMutationStatus
endpoint to find out if it has been applied.
Similarly, when you get doc data from the API (rows, pages, columns, etc), the data you receive comes from
the most recent "snapshot" of the doc, which might be slightly stale relative to the data you observe in
your browser. If you want to ensure that the data you receive is up to date and are ok getting an error if not,
you can pass this header in your request: X-Coda-Doc-Version: latest
. If the API's view of the doc is
not up to date, the API will return an HTTP 400 response.
Coda exposes a number of "volatile" formulas, as as Today()
, Now()
, and User()
. When used in a live Coda
doc, these formulas affect what's visible in realtime, tailored to the current user.
Such formulas behave differently with the API. Time-based values may only be current to the last edit made to the doc. User-based values may be blank or invalid.
We make the Coda API available to all of our users free of charge, in both free and paid workspaces. However, API usage is subject to the role of the user associated with the API token in the workspace applicable to each API request. What this means is:
#createDoc
endpoint specifically, the owner of the API token must be a Doc
Maker (or Admin) in the workspace. If the "Any member can create docs" option in enabled in the workspace
settings, they can be an Editor and will get auto-promoted to Doc Maker upon using this endpoint. Lastly, if in
addition, the API key owner matches the "Auto-join email domains" setting, they will be auto-added to the
workspace and promoted to Doc Maker upon using this endpointThis behavior applies to the API as well as any integrations that may use it, such as Zapier.
To help you get started, this documentation provides code examples in Python, Unix shell, and Google Apps Script. These examples are based on a simple doc that looks something like this:
These examples use Python 3.6+. If you don't already have the requests
module, use pip
or easy_install
to
get it.
The shell examples are intended to be run in a Unix shell. If you're on Windows, you will need to install WSL.
These examples use the standard cURL utility to pull from the API, and then process it with jq
to extract and
format example output. If you don't already have it, you can either install it
or run the command without it to see the raw JSON output.
Google Apps Script makes it easy to write code in a JavaScript-like syntax and easily access many Google products with built-in libraries. You can set up your scripts to run periodically, which makes it a good environment for writing tools without maintaining your own server.
Coda provides a library for Google Apps Script. To use it, go into Resources -> Libraries...
and enter the
following library ID: 15IQuWOk8MqT50FDWomh57UqWGH23gjsWVWYFms3ton6L-UHmefYHS9Vl
. If you want to see the
library's source code, it's available
here.
Google provides autocomplete for API functions as well as generated docs. You can access these docs via the Libraries dialog by clicking on the library name. Required parameters that would be included in the URL path are positional arguments in each of these functions, followed by the request body, if applicable. All remaining parameters can be specified in the options object.
In an effort to standardize our API and make it accessible, we offer an OpenAPI 3.0 specification:
To get started with prototyping the API quickly in Postman, you can use one of links above to import the Coda API into a collection. You'll then need to set the appropriate header and environment variables.
We do not currently support client libraries apart from Google Apps Script. To work with the Coda API, you can either use standard network libraries for your language, or use the appropriate Swagger Generator tool to auto-generate Coda API client libraries for your language of choice. We do not provide any guarantees that these autogenerated libraries are compatible with our API (e.g., some libraries may not work with Bearer authentication).
Swagger Generator 3 (that link takes you to the docs for the generator API) can generate client libraries for these languages. It's relatively new and thus only has support for a limited set of languages at this time.
Some members of our amazing community have written libraries to work with our API. These aren't officially supported by Coda, but are listed here for convenience. (Please let us know if you've written a library and would like to have it included here.)
Coda docs are foundational, top-level collaborative projects that contain pages. The API lets you list and search your docs to obtain basic metadata like titles and ownership information.
Returns a list of Coda docs accessible by the user. These are returned in the same order as on the docs page: reverse chronological by the latest event relevant to the user (last viewed, edited, or shared).
isOwner | boolean Show only docs owned by the user. |
isPublished | boolean Show only published docs. |
query | string Example: query=Supercalifragilisticexpialidocious Search term used to filter down results. |
sourceDoc | string Show only docs copied from the specified doc ID. |
isStarred | boolean If true, returns docs that are starred. If false, returns docs that are not starred. |
inGallery | boolean Show only docs visible within the gallery. |
workspaceId | string Show only docs belonging to the given workspace. |
folderId | string Show only docs belonging to the given folder. |
limit | integer >= 1 Default: 25 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
required | Array of objects (Doc) |
href | string <url> API link to these results |
nextPageToken | string (nextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/v1/docs' params = { 'isOwner': True, 'query': 'New', } res = requests.get(uri, headers=headers, params=params).json() print(f'First doc is: {res["items"][0]["name"]}') # => First doc is: New Document
{- "items": [
- {
- "id": "AbCDeFGH",
- "type": "doc",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH",
- "browserLink": "https://coda.io/d/_dAbCDeFGH",
- "icon": {
- "name": "string",
- "type": "string",
}, - "name": "Product Launch Hub",
- "ownerName": "Some User",
- "docSize": {
- "totalRowCount": 31337,
- "tableAndViewCount": 42,
- "pageCount": 10,
- "overApiSizeLimit": false
}, - "sourceDoc": {
- "id": "AbCDeFGH",
- "type": "doc",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH",
- "browserLink": "https://coda.io/d/_dAbCDeFGH"
}, - "createdAt": "2018-04-11T00:18:57.946Z",
- "updatedAt": "2018-04-11T00:18:57.946Z",
- "published": {
- "description": "Hello World!",
- "browserLink": "https://coda.io/@coda/hello-world",
- "imageLink": "string",
- "discoverable": true,
- "earnCredit": true,
- "mode": "view",
- "categories": [
- "Project Management"
]
}, - "folder": {
- "id": "fl-1Ab234",
- "type": "folder",
- "browserLink": "https://coda.io/docs?folderId=fl-1Ab234",
- "name": "My docs"
}, - "workspace": {
- "id": "ws-1Ab234",
- "type": "workspace",
- "organizationId": "org-2Bc456",
- "browserLink": "https://coda.io/docs?workspaceId=ws-1Ab234",
- "name": "My workspace"
}, - "workspaceId": "ws-1Ab234",
- "folderId": "fl-1Ab234"
}
], - "href": "https://coda.io/apis/v1/docs?limit=20",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/v1/docs?pageToken=eyJsaW1pd"
}
Creates a new Coda doc, optionally copying an existing doc. Note that creating a doc requires you to be a Doc Maker in the applicable workspace (or be auto-promoted to one).
Parameters for creating the doc.
title | string Title of the new doc. Defaults to 'Untitled'. |
sourceDoc | string An optional doc ID from which to create a copy. |
timezone | string The timezone to use for the newly created doc. |
folderId | string The ID of the folder within which to create this doc. Defaults to your "My docs" folder in the oldest workspace you joined; this is subject to change. You can get this ID by opening the folder in the docs list on your computer and grabbing the |
object The contents of the initial page of the doc. |
id required | string ID of the Coda doc. |
type required | string Value: "doc" The type of this resource. |
href required | string <url> API link to the Coda doc. |
browserLink required | string <url> Browser-friendly link to the Coda doc. |
name required | string Name of the doc. |
owner required | string <email> Email address of the doc owner. |
ownerName required | string Name of the doc owner. |
createdAt required | string <date-time> Timestamp for when the doc was created. |
updatedAt required | string <date-time> Timestamp for when the doc was last modified. |
required | object (WorkspaceReference) Reference to a Coda workspace. |
required | object (FolderReference) Reference to a Coda folder. |
workspaceId required | string Deprecated ID of the Coda workspace containing this doc. |
folderId required | string Deprecated ID of the Coda folder containing this doc. |
object (Icon) Info about the icon. | |
object (DocSize) The number of components within a Coda doc. | |
object Reference to a Coda doc from which this doc was copied, if any. | |
object (DocPublished) Information about the publishing state of the document. | |
requestId | string An arbitrary unique identifier for this request. |
{- "title": "Project Tracker",
- "sourceDoc": "iJKlm_noPq",
- "timezone": "America/Los_Angeles",
- "folderId": "fl-ABcdEFgHJi",
- "initialPage": {
- "name": "Launch Status",
- "subtitle": "See the status of launch-related tasks.",
- "iconName": "rocket",
- "parentPageId": "canvas-tuVwxYz",
- "pageContent": {
- "type": "canvas",
- "canvasContent": {
- "format": "html",
- "content": "<p><b>This</b> is rich text</p>"
}
}
}
}
{- "id": "AbCDeFGH",
- "type": "doc",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH",
- "browserLink": "https://coda.io/d/_dAbCDeFGH",
- "icon": {
- "name": "string",
- "type": "string",
}, - "name": "Product Launch Hub",
- "ownerName": "Some User",
- "docSize": {
- "totalRowCount": 31337,
- "tableAndViewCount": 42,
- "pageCount": 10,
- "overApiSizeLimit": false
}, - "sourceDoc": {
- "id": "AbCDeFGH",
- "type": "doc",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH",
- "browserLink": "https://coda.io/d/_dAbCDeFGH"
}, - "createdAt": "2018-04-11T00:18:57.946Z",
- "updatedAt": "2018-04-11T00:18:57.946Z",
- "published": {
- "description": "Hello World!",
- "browserLink": "https://coda.io/@coda/hello-world",
- "imageLink": "string",
- "discoverable": true,
- "earnCredit": true,
- "mode": "view",
- "categories": [
- "Project Management"
]
}, - "folder": {
- "id": "fl-1Ab234",
- "type": "folder",
- "browserLink": "https://coda.io/docs?folderId=fl-1Ab234",
- "name": "My docs"
}, - "workspace": {
- "id": "ws-1Ab234",
- "type": "workspace",
- "organizationId": "org-2Bc456",
- "browserLink": "https://coda.io/docs?workspaceId=ws-1Ab234",
- "name": "My workspace"
}, - "workspaceId": "ws-1Ab234",
- "folderId": "fl-1Ab234",
- "requestId": "abc-123-def-456"
}
Returns metadata for the specified doc.
docId required | string Example: AbCDeFGH ID of the doc. |
id required | string ID of the Coda doc. |
type required | string Value: "doc" The type of this resource. |
href required | string <url> API link to the Coda doc. |
browserLink required | string <url> Browser-friendly link to the Coda doc. |
name required | string Name of the doc. |
owner required | string <email> Email address of the doc owner. |
ownerName required | string Name of the doc owner. |
createdAt required | string <date-time> Timestamp for when the doc was created. |
updatedAt required | string <date-time> Timestamp for when the doc was last modified. |
required | object (WorkspaceReference) Reference to a Coda workspace. |
required | object (FolderReference) Reference to a Coda folder. |
workspaceId required | string Deprecated ID of the Coda workspace containing this doc. |
folderId required | string Deprecated ID of the Coda folder containing this doc. |
object (Icon) Info about the icon. | |
object (DocSize) The number of components within a Coda doc. | |
object Reference to a Coda doc from which this doc was copied, if any. | |
object (DocPublished) Information about the publishing state of the document. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>' res = requests.get(uri, headers=headers).json() print(f'The name of the doc is {res["name"]}') # => The name of the doc is New Document
{- "id": "AbCDeFGH",
- "type": "doc",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH",
- "browserLink": "https://coda.io/d/_dAbCDeFGH",
- "icon": {
- "name": "string",
- "type": "string",
}, - "name": "Product Launch Hub",
- "ownerName": "Some User",
- "docSize": {
- "totalRowCount": 31337,
- "tableAndViewCount": 42,
- "pageCount": 10,
- "overApiSizeLimit": false
}, - "sourceDoc": {
- "id": "AbCDeFGH",
- "type": "doc",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH",
- "browserLink": "https://coda.io/d/_dAbCDeFGH"
}, - "createdAt": "2018-04-11T00:18:57.946Z",
- "updatedAt": "2018-04-11T00:18:57.946Z",
- "published": {
- "description": "Hello World!",
- "browserLink": "https://coda.io/@coda/hello-world",
- "imageLink": "string",
- "discoverable": true,
- "earnCredit": true,
- "mode": "view",
- "categories": [
- "Project Management"
]
}, - "folder": {
- "id": "fl-1Ab234",
- "type": "folder",
- "browserLink": "https://coda.io/docs?folderId=fl-1Ab234",
- "name": "My docs"
}, - "workspace": {
- "id": "ws-1Ab234",
- "type": "workspace",
- "organizationId": "org-2Bc456",
- "browserLink": "https://coda.io/docs?workspaceId=ws-1Ab234",
- "name": "My workspace"
}, - "workspaceId": "ws-1Ab234",
- "folderId": "fl-1Ab234"
}
Deletes a doc.
docId required | string Example: AbCDeFGH ID of the doc. |
The result of a doc deletion.
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>' res = requests.delete(uri, headers=headers).json()
{ }
Updates metadata for a doc. Note that updating a doc title requires you to be a Doc Maker in the applicable workspace.
docId required | string Example: AbCDeFGH ID of the doc. |
Parameters for updating the doc.
title | string Title of the doc. |
iconName | string Name of the icon. |
The result of a doc update
{- "title": "Project Tracker",
- "iconName": "rocket"
}
{ }
Returns metadata associated with sharing for this Coda doc.
docId required | string Example: AbCDeFGH ID of the doc. |
canShare required | boolean When true, the user of the api can share |
canShareWithWorkspace required | boolean When true, the user of the api can share with the workspace |
canShareWithOrg required | boolean When true, the user of the api can share with the org |
canCopy required | boolean When true, the user of the api can copy the doc |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/acl/metadata' res = requests.get(uri, headers=headers).json() print(f'Can I share this doc with others? {res["canShare"]}') # => Can I share this doc with others? true
{- "canShare": true,
- "canShareWithWorkspace": true,
- "canShareWithOrg": true,
- "canCopy": true
}
Returns a list of permissions for this Coda doc.
docId required | string Example: AbCDeFGH ID of the doc. |
limit | integer >= 1 Default: 25 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
required | Array of objects (Permission) |
href required | string <url> API link to these results |
nextPageToken | string (nextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/acl/permissions' res = requests.get(uri, headers=headers).json() print(f'First user with access is {res["items"][0]["principal"]["email"]}') # => First user with access is [email protected]
{- "items": [
], - "href": "https://coda.io/apis/v1/docs/AbCDeFGH/acl?limit=20",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/v1/docs/AbCDeFGH/acl?pageToken=eyJsaW1pd"
}
Adds a new permission to the doc.
docId required | string Example: AbCDeFGH ID of the doc. |
Parameters for adding the new permission.
access required | string (AccessTypeNotNone) Enum: "readonly" "write" "comment" Type of access (excluding none). |
required | any (AddedPrincipal) Metadata about a principal to add to a doc. |
suppressEmail | boolean When true suppresses email notification |
The result of sharing a doc.
{- "access": "readonly",
- "suppressEmail": true
}
{ }
Deletes an existing permission.
docId required | string Example: AbCDeFGH ID of the doc. |
permissionId required | string Example: AbCDeFGH ID of a permission on a doc. |
The result of deleting a permission.
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/acl/permissions/<permission ID>' res = requests.delete(uri, headers=headers, json=payload) # => Revoke access to the doc
{ }
Searches for user and group principals matching the query that this doc can be shared with. At most 20 results will be returned for both users and groups. If no query is given then no results are returned.
docId required | string Example: AbCDeFGH ID of the doc. |
query | string Example: query=Supercalifragilisticexpialidocious Search term used to filter down results. |
required | Array of objects (UserSummary) |
required | Array of objects (GroupPrincipal) |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/acl/principals/search?search=foo' res = requests.get(uri, headers=headers).json() print(f'First user with access is {res["users"][0]["email"]}') # => First user with access is [email protected]
{- "users": [
- {
- "name": "John Doe",
- "type": "user",
}
], - "groups": [
- {
- "type": "group",
- "groupId": "grp-6SM9xrKcqW",
- "groupName": "Marketing team"
}
]
}
Returns settings associated with ACLs for this Coda doc.
docId required | string Example: AbCDeFGH ID of the doc. |
allowEditorsToChangePermissions required | boolean When true, allows editors to change doc permissions. When false, only doc owner can change doc permissions. |
allowCopying required | boolean When true, allows doc viewers to copy the doc. |
allowViewersToRequestEditing required | boolean When true, allows doc viewers to request editing permissions. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/acl/settings' res = requests.get(uri, headers=headers).json() print(f'Can editors change sharing permissions? {res["allowEditorsToChangePermissions"]}') # => Can editors change sharing permissions? false
{- "allowEditorsToChangePermissions": true,
- "allowCopying": true,
- "allowViewersToRequestEditing": true
}
Update settings associated with ACLs for this Coda doc.
docId required | string Example: AbCDeFGH ID of the doc. |
Parameters for updating the ACL settings.
allowEditorsToChangePermissions | boolean When true, allows editors to change doc permissions. When false, only doc owner can change doc permissions. |
allowCopying | boolean When true, allows doc viewers to copy the doc. |
allowViewersToRequestEditing | boolean When true, allows doc viewers to request editing permissions. |
allowEditorsToChangePermissions required | boolean When true, allows editors to change doc permissions. When false, only doc owner can change doc permissions. |
allowCopying required | boolean When true, allows doc viewers to copy the doc. |
allowViewersToRequestEditing required | boolean When true, allows doc viewers to request editing permissions. |
{- "allowEditorsToChangePermissions": true,
- "allowCopying": true,
- "allowViewersToRequestEditing": true
}
{- "allowEditorsToChangePermissions": true,
- "allowCopying": true,
- "allowViewersToRequestEditing": true
}
Coda docs can be published publicly and associated with categories to help the world discover them. This API lets you manage the publishing settings of your docs.
Gets all available doc categories.
required | Array of objects (DocCategory) Categories for the doc. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/categories' res = requests.get(uri, headers=headers).json() print(f'Category count: {res["categories"].length}') # => Category count: 10
{- "items": [
- {
- "name": "Project Management"
}
]
}
Update publish settings for a doc.
docId required | string Example: AbCDeFGH ID of the doc. |
Parameters for changing publish settings.
slug | string Slug for the published doc. |
discoverable | boolean If true, indicates that the doc is discoverable. |
earnCredit | boolean If true, new users may be required to sign in to view content within this document. You will receive Coda credit for each user who signs up via your doc. |
categoryNames | Array of strings The names of categories to apply to the document. |
mode | string (DocPublishMode) Enum: "view" "play" "edit" Which interaction mode the published doc should use. |
requestId required | string An arbitrary unique identifier for this request. |
{- "slug": "my-doc",
- "discoverable": true,
- "earnCredit": true,
- "categoryNames": [
- "Project management"
], - "mode": "view"
}
{- "requestId": "abc-123-def-456"
}
Unpublishes a doc.
docId required | string Example: AbCDeFGH ID of the doc. |
The result of unpublishing a doc.
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/publish' res = requests.unpublishDoc(uri, headers=headers).json()
{ }
Pages in Coda offer canvases containing rich text, tables, controls, and other objects. At this time, this API lets you list and access pages in a doc.
Returns a list of pages in a Coda doc.
docId required | string Example: AbCDeFGH ID of the doc. |
limit | integer >= 1 Default: 25 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
required | Array of objects (Page) |
href | string <url> API link to these results |
nextPageToken | string (nextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/pages' res = requests.get(uri, headers=headers).json() print(f'The name of the first page is {res["items"][0]["name"]}') # => The name of the first page is Page 1
{- "items": [
- {
- "id": "canvas-IjkLmnO",
- "type": "page",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status",
- "subtitle": "See the status of launch-related tasks.",
- "icon": {
- "name": "string",
- "type": "string",
}, - "image": {
- "type": "string",
- "width": 800,
- "height": 600
}, - "contentType": "canvas",
- "isHidden": true,
- "isEffectivelyHidden": true,
- "parent": {
- "id": "canvas-IjkLmnO",
- "type": "page",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status"
}, - "children": [
- {
- "id": "canvas-IjkLmnO",
- "type": "page",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status"
}
], - "authors": [
], - "createdAt": "2018-04-11T00:18:57.946Z",
- "createdBy": {
- "@type": "Person",
- "additionalType": "string",
- "name": "Alice Atkins",
- "email": "[email protected]"
}, - "updatedAt": "2018-04-11T00:18:57.946Z",
- "updatedBy": {
- "@type": "Person",
- "additionalType": "string",
- "name": "Alice Atkins",
- "email": "[email protected]"
}
}
], - "href": "https://coda.io/apis/v1/docs/AbCDeFGH/pages?limit=20",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/v1/docs/AbCDeFGH/pages?pageToken=eyJsaW1pd"
}
Create a new page in a doc. Note that creating a page requires you to be a Doc Maker in the applicable workspace.
docId required | string Example: AbCDeFGH ID of the doc. |
Parameters for creating a page.
name | string Name of the page. |
subtitle | string Subtitle of the page. |
iconName | string Name of the icon. |
imageUrl | string Url of the cover image to use. |
parentPageId | string The ID of this new page's parent, if creating a subpage. |
object or object or object or object (PageCreateContent) Content that can be added to a page at creation time, either text (or rich text) or a URL to create a full-page embed. |
requestId required | string An arbitrary unique identifier for this request. |
id required | string ID of the created page. |
{- "name": "Launch Status",
- "subtitle": "See the status of launch-related tasks.",
- "iconName": "rocket",
- "parentPageId": "canvas-tuVwxYz",
- "pageContent": {
- "type": "canvas",
- "canvasContent": {
- "format": "html",
- "content": "<p><b>This</b> is rich text</p>"
}
}
}
{- "requestId": "abc-123-def-456",
- "id": "canvas-tuVwxYz"
}
Returns details about a page.
docId required | string Example: AbCDeFGH ID of the doc. |
pageIdOrName required | string Example: canvas-IjkLmnO ID or name of the page. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected. |
id required | string ID of the page. |
type required | string Value: "page" The type of this resource. |
href required | string <url> API link to the page. |
name required | string Name of the page. |
isHidden required | boolean Whether the page is hidden in the UI. |
isEffectivelyHidden required | boolean Whether the page or any of its parents is hidden in the UI. |
browserLink required | string <url> Browser-friendly link to the page. |
required | Array of objects (PageReference) |
contentType required | string (PageType) Enum: "canvas" "embed" "syncPage" The type of a page in a doc. |
subtitle | string Subtitle of the page. |
object (Icon) Info about the icon. | |
object (Image) Info about the image. | |
object (PageReference) Reference to a page. | |
Array of objects (PersonValue) Authors of the page | |
createdAt | string <date-time> Timestamp for when the page was created. |
object (PersonValue) A named reference to a person, where the person is identified by email address. | |
updatedAt | string <date-time> Timestamp for when page content was last modified. |
object (PersonValue) A named reference to a person, where the person is identified by email address. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/pages/<page ID>' res = requests.get(uri, headers=headers).json() print(f'The name of this page is {res["name"]}') # => The name of this page is Page 1
{- "id": "canvas-IjkLmnO",
- "type": "page",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status",
- "subtitle": "See the status of launch-related tasks.",
- "icon": {
- "name": "string",
- "type": "string",
}, - "image": {
- "type": "string",
- "width": 800,
- "height": 600
}, - "contentType": "canvas",
- "isHidden": true,
- "isEffectivelyHidden": true,
- "parent": {
- "id": "canvas-IjkLmnO",
- "type": "page",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status"
}, - "children": [
- {
- "id": "canvas-IjkLmnO",
- "type": "page",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status"
}
], - "authors": [
], - "createdAt": "2018-04-11T00:18:57.946Z",
- "createdBy": {
- "@type": "Person",
- "additionalType": "string",
- "name": "Alice Atkins",
- "email": "[email protected]"
}, - "updatedAt": "2018-04-11T00:18:57.946Z",
- "updatedBy": {
- "@type": "Person",
- "additionalType": "string",
- "name": "Alice Atkins",
- "email": "[email protected]"
}
}
Update properties for a page. Note that updating a page title or icon requires you to be a Doc Maker in the applicable workspace.
docId required | string Example: AbCDeFGH ID of the doc. |
pageIdOrName required | string Example: canvas-IjkLmnO ID or name of the page. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected. |
Parameters for updating a page.
name | string Name of the page. |
subtitle | string Subtitle of the page. |
iconName | string Name of the icon. |
imageUrl | string Url of the cover image to use. |
isHidden | boolean Whether the page is hidden or not. Note that for pages that cannot be hidden, like the sole top-level page in a doc, this will be ignored. |
object Content with which to update an existing page. |
requestId required | string An arbitrary unique identifier for this request. |
id required | string ID of the updated page. |
{- "name": "Launch Status",
- "subtitle": "See the status of launch-related tasks.",
- "iconName": "rocket",
- "isHidden": true,
- "contentUpdate": {
- "insertionMode": "append",
- "canvasContent": {
- "format": "html",
- "content": "<p><b>This</b> is rich text</p>"
}
}
}
{- "requestId": "abc-123-def-456",
- "id": "canvas-tuVwxYz"
}
Deletes the specified page.
docId required | string Example: AbCDeFGH ID of the doc. |
pageIdOrName required | string Example: canvas-IjkLmnO ID or name of the page. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected. |
requestId required | string An arbitrary unique identifier for this request. |
id required | string ID of the page to be deleted. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/pages/<page ID>' req = requests.delete(uri, headers=headers) req.raise_for_status() # Throw if there was an error. res = req.json() print(f'Deleted page') # => Deleted page
{- "requestId": "abc-123-def-456",
- "id": "canvas-tuVwxYz"
}
Initiate an export of content for the given page.
docId required | string Example: AbCDeFGH ID of the doc. |
pageIdOrName required | string Example: canvas-IjkLmnO ID or name of the page. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected. |
Parameters for requesting a page content export.
outputFormat required | string (PageContentOutputFormat) Enum: "html" "markdown" Supported output content formats that can be requested for getting content for an existing page. |
id required | string The identifier of this export request. |
status required | string The status of this export. |
href required | string The URL that reports the status of this export. Poll this URL to get the content URL when the export has completed. |
{- "outputFormat": "html"
}
{- "id": "AbCDeFGH",
- "status": "complete",
- "href": "https://coda.io/apis/v1/docs/somedoc/pages/somepage/export/some-request-id"
}
Check the status of a page content export
docId required | string Example: AbCDeFGH ID of the doc. |
pageIdOrName required | string Example: canvas-IjkLmnO ID or name of the page. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If you provide a name and there are multiple pages with the same name, an arbitrary one will be selected. |
requestId required | string Example: abc-123-def-456 ID of the request. |
id required | string The identifier of this export request. |
status required | string The status of this export. |
href required | string The URL that reports the status of this export. |
downloadLink | string Once the export completes, the location where the resulting export file can be downloaded; this link typically expires after a short time. Call this method again to get a fresh link. |
error | string Message describing an error, if this export failed. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/pages/<page ID>/export/<request ID>' res = requests.get(uri, headers=headers).json() print(f'Request status: {res["status"]}') # => Request status: completed
{- "id": "AbCDeFGH",
- "status": "complete",
- "href": "https://coda.io/apis/v1/docs/somedoc/pages/somepage/export/some-request-id",
- "downloadLink": "https://coda.io/blobs/DOC_EXPORT_RENDERING/some-request-id",
- "error": "string"
}
Triggers webhook-invoked automation
docId required | string Example: AbCDeFGH ID of the doc. |
ruleId required | string Example: grid-auto-b3Jmey6jBS ID of the automation rule. |
Payload for webhook
property name* additional property | any |
requestId required | string An arbitrary unique identifier for this request. |
{- "message": "The doc that brings words, data, & teams together."
}
{- "requestId": "abc-123-def-456"
}
Returns a list of tables in a Coda doc.
docId required | string Example: AbCDeFGH ID of the doc. |
limit | integer >= 1 Default: 25 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
sortBy | string (SortBy) Value: "name" Example: sortBy=name Determines how to sort the given objects. |
tableTypes | Array of strings (TableType) Items Enum: "table" "view" Example: tableTypes=table,view Comma-separated list of table types to include in results. If omitted, includes both tables and views. |
required | Array of objects (TableReference) |
href | string <url> API link to these results |
nextPageToken | string (nextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/tables' res = requests.get(uri, headers=headers).json() print(f'The name of the first table is {res["items"][0]["name"]}') # => The name of the first table is To-do List
{- "items": [
- {
- "id": "grid-pqRst-U",
- "type": "table",
- "tableType": "table",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/#Teams-and-Tasks_tpqRst-U",
- "name": "Tasks",
- "parent": {
- "id": "canvas-IjkLmnO",
- "type": "page",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status"
}
}
], - "href": "https://coda.io/apis/v1/docs/AbCDeFGH/tables?limit=20",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/v1/docs/AbCDeFGH/tables?pageToken=eyJsaW1pd"
}
Returns details about a specific table or view.
docId required | string Example: AbCDeFGH ID of the doc. |
tableIdOrName required | string Example: grid-pqRst-U ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
useUpdatedTableLayouts | boolean Return "detail" and "form" for the |
id required | string ID of the table. |
type required | string Value: "table" The type of this resource. |
tableType required | string (TableType) Enum: "table" "view" |
href required | string <url> API link to the table. |
name required | string Name of the table. |
required | object (PageReference) Reference to a page. |
browserLink required | string <url> Browser-friendly link to the table. |
required | object (ColumnReference) Reference to a column. |
rowCount required | integer Total number of rows in the table. |
required | Array of objects (Sort) Any sorts applied to the table. |
layout required | string (Layout) Enum: "default" "areaChart" "barChart" "bubbleChart" "calendar" "card" "detail" "form" "ganttChart" "lineChart" "masterDetail" "pieChart" "scatterChart" "slide" "wordCloud" Layout type of the table or view. |
createdAt required | string <date-time> Timestamp for when the table was created. |
updatedAt required | string <date-time> Timestamp for when the table was last modified. |
object (TableReference) Reference to a table or view. | |
object Detailed information about the filter formula for the table, if applicable. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/tables/<table ID>' res = requests.get(uri, headers=headers).json() print(f'Table {res["name"]} has {res["rowCount"]} rows') # => Table To-do List has 2 rows
{- "id": "grid-pqRst-U",
- "type": "table",
- "tableType": "table",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/#Teams-and-Tasks_tpqRst-U",
- "name": "Tasks",
- "parent": {
- "id": "canvas-IjkLmnO",
- "type": "page",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status"
}, - "parentTable": {
- "id": "grid-pqRst-U",
- "type": "table",
- "tableType": "table",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/#Teams-and-Tasks_tpqRst-U",
- "name": "Tasks",
- "parent": {
- "id": "canvas-IjkLmnO",
- "type": "page",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status"
}
}, - "displayColumn": {
- "id": "c-tuVwxYz",
- "type": "column",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/columns/c-tuVwxYz"
}, - "rowCount": 130,
- "sorts": [
- {
- "column": {
- "id": "c-tuVwxYz",
- "type": "column",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/columns/c-tuVwxYz"
}, - "direction": "ascending"
}
], - "layout": "default",
- "filter": {
- "valid": true,
- "isVolatile": false,
- "hasUserFormula": false,
- "hasTodayFormula": false,
- "hasNowFormula": false
}, - "createdAt": "2018-04-11T00:18:57.946Z",
- "updatedAt": "2018-04-11T00:18:57.946Z"
}
While columns in Coda have user-friendly names, they also have immutable IDs that are used when reading and writing rows. These endpoints let you query the columns in a table and get basic information about them.
Returns a list of columns in a table.
docId required | string Example: AbCDeFGH ID of the doc. |
tableIdOrName required | string Example: grid-pqRst-U ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
limit | integer >= 1 Default: 25 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
visibleOnly | boolean Example: visibleOnly=true If true, returns only visible columns for the table. This parameter only applies to base tables, and not views. |
required | Array of objects (Column) |
href | string <url> API link to these results |
nextPageToken | string (nextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/tables/<table ID>/columns' res = requests.get(uri, headers=headers).json() print(f'This table\'s columns: {", ".join(c["name"] for c in res["items"])}') # => This table's columns: Task, Duration (hr), Duration (min)
{- "items": [
- {
- "id": "c-tuVwxYz",
- "type": "column",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/columns/c-tuVwxYz",
- "name": "Completed",
- "display": true,
- "calculated": true,
- "formula": "thisRow.Created()",
- "defaultValue": "Test",
- "format": {
- "type": "text",
- "isArray": true,
- "label": "Click me",
- "disableIf": "False()",
- "action": "OpenUrl(\"www.google.com\")"
}
}
], - "href": "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/columns?limit=20",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/columns?pageToken=eyJsaW1pd"
}
Returns details about a column in a table.
docId required | string Example: AbCDeFGH ID of the doc. |
tableIdOrName required | string Example: grid-pqRst-U ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
columnIdOrName required | string Example: c-tuVwxYz ID or name of the column. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
id required | string ID of the column. |
type required | string Value: "column" The type of this resource. |
href required | string <url> API link to the column. |
name required | string Name of the column. |
required | object (TableReference) Reference to a table or view. |
required | any (ColumnFormat) Format of a column. |
display | boolean Whether the column is the display column. |
calculated | boolean Whether the column has a formula set on it. |
formula | string Formula on the column. |
defaultValue | string Default value formula for the column. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/tables/<table ID>/columns/<column ID>' res = requests.get(uri, headers=headers).json() is_default = res.get("display", False) print(f'Column {res["name"]} {"is" if is_default else "is not"} the display column') # => Column Task is the display column
{- "id": "c-tuVwxYz",
- "type": "column",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/columns/c-tuVwxYz",
- "name": "Completed",
- "display": true,
- "calculated": true,
- "formula": "thisRow.Created()",
- "defaultValue": "Test",
- "format": {
- "type": "text",
- "isArray": true,
- "label": "Click me",
- "disableIf": "False()",
- "action": "OpenUrl(\"www.google.com\")"
}, - "parent": {
- "id": "grid-pqRst-U",
- "type": "table",
- "tableType": "table",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/#Teams-and-Tasks_tpqRst-U",
- "name": "Tasks",
- "parent": {
- "id": "canvas-IjkLmnO",
- "type": "page",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status"
}
}
}
You'll likely use this part of the API the most. These endpoints let you retrieve row data from tables in Coda as well as create, upsert, update, and delete them. Most of these endpoints work for both base tables and views, but for inserting/upsering rows, you must use a base table.
Returns a list of rows in a table.
The valueFormat
parameter dictates in what format the API should return values for individual cells.
simple
(default): Returns cell values as the following JSON values: string
, number
, or boolean
. Array values (like multiselects) are returned as comma-delimited strings.simpleWithArrays
: Singleton values are returned as simple
. Array values are returned as JSON arrays and the values within are simple
values (including nested arrays).rich
: If applicable, returns many values with further encoding, allowing API users to have lossless access to data in Coda.text
values, returns data in Markdown syntax. If the text field is simple text (e.g. has no formatting),
the field will be fully escaped with triple-ticks. E.g
```This is plain text```
currency
, lookup
, image
, person
and hyperlink
values, the value will be encoded in JSON-LD format. // Currency
{
"@context": "https://schema.org",
"@type": "MonetaryAmount",
"currency": "USD",
"amount": 42.42
}
// Lookup
{
"@context": "https://schema.org",
"@type": "StructuredValue",
"additionalType": "row",
"name": "Row Name",
"rowId": "i-123456789",
"tableId": "grid-123456789",
"tableUrl": "https://coda.io/d/_d123456789/grid-123456789",
"url": "https://coda.io/d/_d123456789/grid-123456789#_r42",
}
// Hyperlink
{
"@context": "https://schema.org",
"@type": "WebPage",
"name": "Coda",
"url": "https://coda.io"
}
// Image
{
"@context": "https://schema.org",
"@type": "ImageObject",
"name": "Coda logo",
"url": "https://coda.io/logo.jpg"
}
// People
{
"@context": "https://schema.org",
"@type": "Person",
"name": "Art Vandalay",
"email": "[email protected]"
}
docId required | string Example: AbCDeFGH ID of the doc. |
tableIdOrName required | string Example: grid-pqRst-U ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
query | string Example: query=c-tuVwxYz:"Apple" Query used to filter returned rows, specified as |
sortBy | string (RowsSortBy) Enum: "createdAt" "natural" "updatedAt" Specifies the sort order of the rows returned. If left unspecified, rows are returned by creation time ascending. "UpdatedAt" sort ordering is the order of rows based upon when they were last updated. This does not include updates to calculated values. "Natural" sort ordering is the order that the rows appear in the table view in the application. This ordering is only meaningfully defined for rows that are visible (unfiltered). Because of this, using this sort order will imply visibleOnly=true, that is, to only return visible rows. If you pass sortBy=natural and visibleOnly=false explicitly, this will result in a Bad Request error as this condition cannot be satisfied. |
useColumnNames | boolean Example: useColumnNames=true Use column names instead of column IDs in the returned output. This is generally discouraged as it is fragile. If columns are renamed, code using original names may throw errors. |
valueFormat | string (ValueFormat) Enum: "simple" "simpleWithArrays" "rich" The format that cell values are returned as. |
visibleOnly | boolean Example: visibleOnly=true If true, returns only visible rows and columns for the table. |
limit | integer >= 1 Default: 25 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
syncToken | string Example: syncToken=eyJsaW1pd An opaque token returned from a previous call that can be used to return results that are relevant to the query since the call where the syncToken was generated. |
required | Array of objects (Row) |
href | string <url> API link to these results |
nextPageToken | string (nextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
nextSyncToken | string (nextSyncToken) If specified, an opaque token that can be passed back later to retrieve new results that match the parameters specified when the sync token was created. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/tables/<table ID>/rows' params = { 'query': '<column ID>:"Work out"', } req = requests.get(uri, headers=headers, params=params) req.raise_for_status() # Throw if there was an error. res = req.json() print(f'Matching rows: {len(res["items"])}') # => Matching rows: 1
{- "items": [
- {
- "id": "i-tuVwxYz",
- "type": "row",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/rows/i-RstUv-W",
- "name": "Apple",
- "index": 7,
- "browserLink": "https://coda.io/d/_dAbCDeFGH#Teams-and-Tasks_tpqRst-U/_rui-tuVwxYz",
- "createdAt": "2018-04-11T00:18:57.946Z",
- "updatedAt": "2018-04-11T00:18:57.946Z",
- "values": {
- "c-tuVwxYz": "Apple",
- "c-bCdeFgh": [
- "$12.34",
- "$56.78"
]
}
}
], - "href": "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/rows?limit=20",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/rows?pageToken=eyJsaW1pd",
- "nextSyncToken": "eyJsaW1pd"
}
Inserts rows into a table, optionally updating existing rows if any upsert key columns are provided. This endpoint will always return a 202, so long as the doc and table exist and are accessible (and the update is structurally valid). Row inserts/upserts are generally processed within several seconds. Note: this endpoint only works for base tables, not views. When upserting, if multiple rows match the specified key column(s), they will all be updated with the specified value.
docId required | string Example: AbCDeFGH ID of the doc. |
tableIdOrName required | string Example: grid-pqRst-U ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
disableParsing | boolean Example: disableParsing=true If true, the API will not attempt to parse the data in any way. |
Rows to insert or upsert.
required | Array of objects (RowEdit) |
keyColumns | Array of strings Optional column IDs, URLs, or names (fragile and discouraged), specifying columns to be used as upsert keys. |
requestId required | string An arbitrary unique identifier for this request. |
addedRowIds | Array of strings Row IDs for rows that will be added. Only applicable when keyColumns is not set or empty. |
{- "rows": [
- {
- "cells": [
- {
- "column": "c-tuVwxYz",
- "value": "$12.34"
}
]
}
], - "keyColumns": [
- "c-bCdeFgh"
]
}
{- "requestId": "abc-123-def-456",
- "addedRowIds": [
- "i-bCdeFgh",
- "i-CdEfgHi"
]
}
Deletes the specified rows from the table or view. This endpoint will always return a 202. Row deletions are generally processed within several seconds.
docId required | string Example: AbCDeFGH ID of the doc. |
tableIdOrName required | string Example: grid-pqRst-U ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
Rows to delete.
rowIds required | Array of strings Row IDs to delete. |
requestId required | string An arbitrary unique identifier for this request. |
rowIds required | Array of strings Row IDs to delete. |
{- "rowIds": [
- "i-bCdeFgh",
- "i-CdEfgHi"
]
}
{- "requestId": "abc-123-def-456",
- "rowIds": [
- "i-bCdeFgh",
- "i-CdEfgHi"
]
}
Returns details about a row in a table.
docId required | string Example: AbCDeFGH ID of the doc. |
tableIdOrName required | string Example: grid-pqRst-U ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
rowIdOrName required | string Example: i-tuVwxYz ID or name of the row. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If there are multiple rows with the same value in the identifying column, an arbitrary one will be selected. |
useColumnNames | boolean Example: useColumnNames=true Use column names instead of column IDs in the returned output. This is generally discouraged as it is fragile. If columns are renamed, code using original names may throw errors. |
valueFormat | string (ValueFormat) Enum: "simple" "simpleWithArrays" "rich" The format that cell values are returned as. |
id required | string ID of the row. |
type required | string Value: "row" The type of this resource. |
href required | string <url> API link to the row. |
name required | string The display name of the row, based on its identifying column. |
index required | integer Index of the row within the table. |
browserLink required | string <url> Browser-friendly link to the row. |
createdAt required | string <date-time> Timestamp for when the row was created. |
updatedAt required | string <date-time> Timestamp for when the row was last modified. |
required | object Values for a specific row, represented as a hash of column IDs (or names with |
required | object (TableReference) Reference to a table or view. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/tables/<table ID>/rows/<row ID>' req = requests.get(uri, headers=headers) req.raise_for_status() # Throw if there was an error. res = req.json() print(f'Row values are: {", ".join(str(v) for v in res["values"].values())}') # => Row values are: Get groceries, 1, 60
{- "id": "i-tuVwxYz",
- "type": "row",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U/rows/i-RstUv-W",
- "name": "Apple",
- "index": 7,
- "browserLink": "https://coda.io/d/_dAbCDeFGH#Teams-and-Tasks_tpqRst-U/_rui-tuVwxYz",
- "createdAt": "2018-04-11T00:18:57.946Z",
- "updatedAt": "2018-04-11T00:18:57.946Z",
- "values": {
- "c-tuVwxYz": "Apple",
- "c-bCdeFgh": [
- "$12.34",
- "$56.78"
]
}, - "parent": {
- "id": "grid-pqRst-U",
- "type": "table",
- "tableType": "table",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/tables/grid-pqRst-U",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/#Teams-and-Tasks_tpqRst-U",
- "name": "Tasks",
- "parent": {
- "id": "canvas-IjkLmnO",
- "type": "page",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status"
}
}
}
Updates the specified row in the table. This endpoint will always return a 202, so long as the row exists and is accessible (and the update is structurally valid). Row updates are generally processed within several seconds. When updating using a name as opposed to an ID, an arbitrary row will be affected.
docId required | string Example: AbCDeFGH ID of the doc. |
tableIdOrName required | string Example: grid-pqRst-U ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
rowIdOrName required | string Example: i-tuVwxYz ID or name of the row. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If there are multiple rows with the same value in the identifying column, an arbitrary one will be selected. |
disableParsing | boolean Example: disableParsing=true If true, the API will not attempt to parse the data in any way. |
Row update.
required | object (RowEdit) An edit made to a particular row. |
requestId required | string An arbitrary unique identifier for this request. |
id required | string ID of the updated row. |
{- "row": {
- "cells": [
- {
- "column": "c-tuVwxYz",
- "value": "$12.34"
}
]
}
}
{- "requestId": "abc-123-def-456",
- "id": "i-tuVwxYz"
}
Deletes the specified row from the table or view. This endpoint will always return a 202, so long as the row exists and is accessible (and the update is structurally valid). Row deletions are generally processed within several seconds. When deleting using a name as opposed to an ID, an arbitrary row will be removed.
docId required | string Example: AbCDeFGH ID of the doc. |
tableIdOrName required | string Example: grid-pqRst-U ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
rowIdOrName required | string Example: i-tuVwxYz ID or name of the row. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If there are multiple rows with the same value in the identifying column, an arbitrary one will be selected. |
requestId required | string An arbitrary unique identifier for this request. |
id required | string ID of the row to be deleted. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/tables/<table ID>/rows/<row ID>' req = requests.delete(uri, headers=headers) req.raise_for_status() # Throw if there was an error. res = req.json() print(f'Deleted row {res["id"]}') # => Deleted row <row ID>
{- "requestId": "abc-123-def-456",
- "id": "i-tuVwxYz"
}
Pushes a button on a row in a table. Authorization note: This action is available to API tokens that are authorized to write to the table. However, the underlying button can perform any action on the document, including writing to other tables and performing Pack actions.
docId required | string Example: AbCDeFGH ID of the doc. |
tableIdOrName required | string Example: grid-pqRst-U ID or name of the table. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
rowIdOrName required | string Example: i-tuVwxYz ID or name of the row. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. If there are multiple rows with the same value in the identifying column, an arbitrary one will be selected. |
columnIdOrName required | string Example: c-tuVwxYz ID or name of the column. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
requestId required | string An arbitrary unique identifier for this request. |
rowId required | string ID of the row where the button exists. |
columnId required | string ID of the column where the button exists. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/tables/<table ID>/rows/<row ID>/buttons/<column ID>' req = requests.post(uri, headers=headers) req.raise_for_status() # Throw if there was an error. res = req.json() print(f'Pushed button') # => Pushed button
{- "requestId": "abc-123-def-456",
- "rowId": "i-tuVwxYz",
- "columnId": "i-tuVwxYz"
}
Formulas can be great for performing one-off computations, or used with tables and other formulas to compute a single value. With this API, you can discover formulas in a doc and obtain computed results.
Returns a list of named formulas in a Coda doc.
docId required | string Example: AbCDeFGH ID of the doc. |
limit | integer >= 1 Default: 25 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
sortBy | string (SortBy) Value: "name" Example: sortBy=name Determines how to sort the given objects. |
required | Array of objects (FormulaReference) |
href | string <url> API link to these results |
nextPageToken | string (nextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/formulas' res = requests.get(uri, headers=headers).json() print(f'This doc\'s formulas are: {", ".join(i["name"] for i in res["items"])}') # => This doc's formulas are: Total Duration, Time Now
{- "items": [
- {
- "id": "f-fgHijkLm",
- "type": "formula",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/formulas/f-fgHijkLm",
- "name": "Sum of expenses",
- "parent": {
- "id": "canvas-IjkLmnO",
- "type": "page",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status"
}
}
], - "href": "https://coda.io/apis/v1/docs/AbCDeFGH/formulas?limit=20",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/v1/docs/AbCDeFGH/formulas?pageToken=eyJsaW1pd"
}
Returns info on a formula.
docId required | string Example: AbCDeFGH ID of the doc. |
formulaIdOrName required | string Example: f-fgHijkLm ID or name of the formula. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
id required | string ID of the formula. |
type required | string Value: "formula" The type of this resource. |
href required | string <url> API link to the formula. |
name required | string Name of the formula. |
required | (ScalarValue (ScalarValue (string) or ScalarValue (number) or ScalarValue (boolean))) or (Array of (ScalarValue (ScalarValue (string) or ScalarValue (number) or ScalarValue (boolean))) or (Array of ScalarValue (strings or numbers or booleans))) (Value) A Coda result or entity expressed as a primitive type, or array of primitive types. |
object (PageReference) Reference to a page. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/formulas/<formula ID>' res = requests.get(uri, headers=headers).json() print(f'It will take {res["value"]} hours to complete everything') # => It will take 3 hours to complete everything
{- "id": "f-fgHijkLm",
- "type": "formula",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/formulas/f-fgHijkLm",
- "name": "Sum of expenses",
- "parent": {
- "id": "canvas-IjkLmnO",
- "type": "page",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status"
}, - "value": "$12.34"
}
Controls provide a user-friendly way to input a value that can affect other parts of the doc. This API lets you list controls and get their current values.
Returns a list of controls in a Coda doc.
docId required | string Example: AbCDeFGH ID of the doc. |
limit | integer >= 1 Default: 25 Example: limit=10 Maximum number of results to return in this query. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
sortBy | string (SortBy) Value: "name" Example: sortBy=name Determines how to sort the given objects. |
required | Array of objects (ControlReference) |
href | string <url> API link to these results |
nextPageToken | string (nextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/controls' res = requests.get(uri, headers=headers).json() print(f'Controls here are: {", ".join(i["name"] for i in res["items"])}') # => Controls here are: Control 1, Control 2
{- "items": [
- {
- "id": "ctrl-cDefGhij",
- "type": "control",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/controls/ctrl-cDefGhij",
- "name": "Cost",
- "parent": {
- "id": "canvas-IjkLmnO",
- "type": "page",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status"
}
}
], - "href": "https://coda.io/apis/v1/docs/AbCDeFGH/controls?limit=20",
- "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/v1/docs/AbCDeFGH/controls?pageToken=eyJsaW1pd"
}
Returns info on a control.
docId required | string Example: AbCDeFGH ID of the doc. |
controlIdOrName required | string Example: ctrl-cDefGhij ID or name of the control. Names are discouraged because they're easily prone to being changed by users. If you're using a name, be sure to URI-encode it. |
id required | string ID of the control. |
type required | string Value: "control" The type of this resource. |
href required | string <url> API link to the control. |
name required | string Name of the control. |
controlType required | string (ControlType) Enum: "button" "checkbox" "datePicker" "dateRangePicker" "dateTimePicker" "lookup" "multiselect" "select" "scale" "slider" "reaction" "textbox" "timePicker" Type of the control. |
required | (ScalarValue (ScalarValue (string) or ScalarValue (number) or ScalarValue (boolean))) or (Array of (ScalarValue (ScalarValue (string) or ScalarValue (number) or ScalarValue (boolean))) or (Array of ScalarValue (strings or numbers or booleans))) (Value) A Coda result or entity expressed as a primitive type, or array of primitive types. |
object (PageReference) Reference to a page. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = f'https://coda.io/apis/v1/docs/<doc ID>/controls/<control ID>' res = requests.get(uri, headers=headers).json() print(f'The control is a {res["controlType"]}') # => The control is a slider
{- "id": "ctrl-cDefGhij",
- "type": "control",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/controls/ctrl-cDefGhij",
- "name": "Cost",
- "parent": {
- "id": "canvas-IjkLmnO",
- "type": "page",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "name": "Launch Status"
}, - "controlType": "slider",
- "value": "$12.34"
}
At this time, the API exposes some limited information about your account. However, /whoami
is a good endpoint to hit to verify that you're hitting the API correctly and that your token is working as expected.
Returns basic info about the current user.
name required | string Name of the user. |
loginId required | string Email address of the user. |
type required | string Value: "user" The type of this resource. |
scoped required | boolean True if the token used to make this request has restricted/scoped access to the API. |
tokenName required | string Returns the name of the token used for this request. |
href required | string <url> API link to the user. |
required | object (WorkspaceReference) Reference to a Coda workspace. |
pictureLink | string <url> Browser-friendly link to the user's avatar image. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/v1/whoami' res = requests.get(uri, headers=headers).json() print(f'Your name is {res["name"]}') # => Your name is John Doe
{- "name": "John Doe",
- "type": "user",
- "scoped": false,
- "tokenName": "My API token",
- "href": "https://coda.io/apis/v1beta/whoami",
- "workspace": {
- "id": "ws-1Ab234",
- "type": "workspace",
- "organizationId": "org-2Bc456",
- "browserLink": "https://coda.io/docs?workspaceId=ws-1Ab234",
- "name": "My workspace"
}
}
Returns analytics data for available docs per day.
docIds | Array of strings List of docIds to fetch. |
workspaceId | string Example: workspaceId=ws-1Ab234 ID of the workspace. |
query | string Example: query=Supercalifragilisticexpialidocious Search term used to filter down results. |
isPublished | boolean Limit results to only published items. |
sinceDate | string <date> Example: sinceDate=2020-08-01 Limit results to activity on or after this date. |
untilDate | string <date> Example: untilDate=2020-08-05 Limit results to activity on or before this date. |
scale | string (AnalyticsScale) Enum: "daily" "cumulative" Example: scale=daily Quantization period over which to view analytics. Defaults to daily. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
orderBy | string (DocAnalyticsOrderBy) Enum: "date" "docId" "title" "createdAt" "publishedAt" "likes" "copies" "views" "sessionsDesktop" "sessionsMobile" "sessionsOther" "totalSessions" "aiCreditsChat" "aiCreditsBlock" "aiCreditsColumn" "aiCreditsAssistant" "aiCreditsReviewer" "aiCredits" Use this parameter to order the doc analytics returned. |
direction | string (SortDirection) Enum: "ascending" "descending" Direction to sort results in. |
limit | integer [ 1 .. 5000 ] Default: 1000 Example: limit=10 Maximum number of results to return in this query. |
required | Array of objects (DocAnalyticsItem) |
nextPageToken | string (nextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/v1/analytics/docs' params = { 'limit': 10, } res = requests.get(uri, headers=headers, params=params).json() print(f'First doc is: {res["items"][0]["doc"]["title"]}') # => First doc is: New Document
{- "items": [
- {
- "doc": {
- "id": "AbCDeFGH",
- "type": "doc",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH",
- "browserLink": "https://coda.io/d/_dAbCDeFGH",
- "title": "Cool Geometry Formulas",
- "icon": {
- "name": "string",
- "type": "string",
}, - "createdAt": "2022-04-11T00:18:57.946Z",
- "publishedAt": "2022-04-12T00:18:57.946Z"
}, - "metrics": [
- {
- "date": "2020-09-02",
- "views": 980,
- "copies": 24,
- "likes": 342,
- "sessionsMobile": 530,
- "sessionsDesktop": 212,
- "sessionsOther": 10,
- "totalSessions": 1000,
- "aiCreditsChat": 10,
- "aiCreditsBlock": 10,
- "aiCreditsColumn": 10,
- "aiCreditsAssistant": 10,
- "aiCreditsReviewer": 10,
- "aiCredits": 50
}
]
}
], - "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/v1/analytics/docs?pageToken=xyz"
}
Returns analytics data for a given doc within the day. This method will return a 401 if the given doc is not in an Enterprise workspace.
docId required | string Example: AbCDeFGH ID of the doc. |
sinceDate | string <date> Example: sinceDate=2020-08-01 Limit results to activity on or after this date. |
untilDate | string <date> Example: untilDate=2020-08-05 Limit results to activity on or before this date. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
limit | integer [ 1 .. 5000 ] Default: 1000 Example: limit=10 Maximum number of results to return in this query. |
required | Array of objects (PageAnalyticsItem) |
nextPageToken | string (nextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/v1/analytics/docs/abcdefghi/pages' params = { 'limit': 10, } res = requests.get(uri, headers=headers, params=params).json() print(f'First page is: {res["items"][0]["page"]["name"]}') # => First page is: My Page
{- "items": [
- {
- "page": {
- "id": "section-IjkLmnO",
- "name": "Launch Status",
- "icon": {
- "name": "string",
- "type": "string",
}
}, - "metrics": [
- {
- "date": "2022-06-03",
- "views": 980,
- "sessions": 24,
- "users": 42,
- "averageSecondsViewed": 42,
- "medianSecondsViewed": 42,
- "tabs": 10
}
]
}
], - "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/v1/analytics/docs/DOC_ID/pages?pageToken=xyz"
}
Returns summarized analytics data for available docs.
isPublished | boolean Limit results to only published items. |
sinceDate | string <date> Example: sinceDate=2020-08-01 Limit results to activity on or after this date. |
untilDate | string <date> Example: untilDate=2020-08-05 Limit results to activity on or before this date. |
workspaceId | string Example: workspaceId=ws-1Ab234 ID of the workspace. |
totalSessions required | integer Total number of sessions across all docs. |
{- "totalSessions": 1337
}
Returns analytics data for Packs the user can edit.
packIds | Array of integers Which Pack IDs to fetch. |
workspaceId | string Example: workspaceId=ws-1Ab234 ID of the workspace. |
query | string Example: query=Supercalifragilisticexpialidocious Search term used to filter down results. |
sinceDate | string <date> Example: sinceDate=2020-08-01 Limit results to activity on or after this date. |
untilDate | string <date> Example: untilDate=2020-08-05 Limit results to activity on or before this date. |
scale | string (AnalyticsScale) Enum: "daily" "cumulative" Example: scale=daily Quantization period over which to view analytics. Defaults to daily. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
orderBy | string (PackAnalyticsOrderBy) Enum: "date" "packId" "name" "createdAt" "docInstalls" "workspaceInstalls" "numFormulaInvocations" "numActionInvocations" "numSyncInvocations" "numMetadataInvocations" "docsActivelyUsing" "docsActivelyUsing7Day" "docsActivelyUsing30Day" "docsActivelyUsing90Day" "docsActivelyUsingAllTime" "workspacesActivelyUsing" "workspacesActivelyUsing7Day" "workspacesActivelyUsing30Day" "workspacesActivelyUsing90Day" "workspacesActivelyUsingAllTime" "workspacesWithActiveSubscriptions" "workspacesWithSuccessfulTrials" "revenueUsd" Use this parameter to order the Pack analytics returned. |
direction | string (SortDirection) Enum: "ascending" "descending" Direction to sort results in. |
isPublished | boolean Limit results to only published items. If false or unspecified, returns all items including published ones. |
limit | integer [ 1 .. 5000 ] Default: 1000 Example: limit=10 Maximum number of results to return in this query. |
required | Array of objects (PackAnalyticsItem) |
nextPageToken | string (nextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/v1/analytics/packs' params = { 'limit': 10, } res = requests.get(uri, headers=headers, params=params).json() print(f'First Pack is: {res["items"][0]["pack"]["name"]}') # => First Pack is: New Pack
{- "items": [
- {
- "pack": {
- "id": 1003,
- "name": "Cool Geometry Formulas",
- "logoUrl": "string",
- "createdAt": "2022-04-11T00:18:57.946Z"
}, - "metrics": [
- {
- "date": "2020-09-02",
- "docInstalls": 100,
- "workspaceInstalls": 10,
- "numFormulaInvocations": 100,
- "numActionInvocations": 100,
- "numSyncInvocations": 100,
- "numMetadataInvocations": 100,
- "docsActivelyUsing": 50,
- "docsActivelyUsing7Day": 100,
- "docsActivelyUsing30Day": 200,
- "docsActivelyUsing90Day": 300,
- "docsActivelyUsingAllTime": 500,
- "workspacesActivelyUsing": 10,
- "workspacesActivelyUsing7Day": 15,
- "workspacesActivelyUsing30Day": 20,
- "workspacesActivelyUsing90Day": 30,
- "workspacesActivelyUsingAllTime": 50,
- "workspacesActivelyTrialing": 0,
- "workspacesActivelyTrialing7Day": 0,
- "workspacesActivelyTrialing30Day": 0,
- "workspacesActivelyTrialing90Day": 0,
- "workspacesActivelyTrialingAllTime": 0,
- "workspacesNewlySubscribed": 0,
- "workspacesWithActiveSubscriptions": 0,
- "workspacesWithSuccessfulTrials": 0,
- "revenueUsd": "string"
}
]
}
], - "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/v1/analytics/packs?pageToken=xyz"
}
Returns summarized analytics data for Packs the user can edit.
packIds | Array of integers Which Pack IDs to fetch. |
workspaceId | string Example: workspaceId=ws-1Ab234 ID of the workspace. |
isPublished | boolean Limit results to only published items. If false or unspecified, returns all items including published ones. |
sinceDate | string <date> Example: sinceDate=2020-08-01 Limit results to activity on or after this date. |
untilDate | string <date> Example: untilDate=2020-08-05 Limit results to activity on or before this date. |
totalDocInstalls required | integer The number of times this Pack was installed in docs. |
totalWorkspaceInstalls required | integer The number of times this Pack was installed in workspaces. |
totalInvocations required | integer The number of times formulas in this Pack were invoked. |
{- "totalDocInstalls": 0,
- "totalWorkspaceInstalls": 0,
- "totalInvocations": 0
}
Returns analytics data for Pack formulas.
packId required | integer >= 1 Example: 123 ID of a Pack |
packFormulaNames | Array of strings Example: packFormulaNames=SquareRoot,CubeRoot A list of Pack formula names (case-sensitive) for which to retrieve analytics. |
packFormulaTypes | Array of strings (PackFormulaType) Items Enum: "action" "formula" "sync" "metadata" Example: packFormulaTypes=action,formula A list of Pack formula types corresponding to the |
sinceDate | string <date> Example: sinceDate=2020-08-01 Limit results to activity on or after this date. |
untilDate | string <date> Example: untilDate=2020-08-05 Limit results to activity on or before this date. |
scale | string (AnalyticsScale) Enum: "daily" "cumulative" Example: scale=daily Quantization period over which to view analytics. Defaults to daily. |
pageToken | string Example: pageToken=eyJsaW1pd An opaque token used to fetch the next page of results. |
orderBy | string (PackFormulaAnalyticsOrderBy) Enum: "date" "formulaName" "formulaType" "formulaInvocations" "medianLatencyMs" "medianResponseSizeBytes" "errors" "docsActivelyUsing" "docsActivelyUsing7Day" "docsActivelyUsing30Day" "docsActivelyUsing90Day" "docsActivelyUsingAllTime" "workspacesActivelyUsing" "workspacesActivelyUsing7Day" "workspacesActivelyUsing30Day" "workspacesActivelyUsing90Day" "workspacesActivelyUsingAllTime" Use this parameter to order the Pack formula analytics returned. |
direction | string (SortDirection) Enum: "ascending" "descending" Direction to sort results in. |
limit | integer [ 1 .. 5000 ] Default: 1000 Example: limit=10 Maximum number of results to return in this query. |
required | Array of objects (PackFormulaAnalyticsItem) |
nextPageToken | string (nextPageToken) If specified, an opaque token used to fetch the next page of results. |
nextPageLink | string <url> If specified, a link that can be used to fetch the next page of results. |
{- "items": [
- {
- "formula": {
- "name": "SquareRoot",
- "type": "action"
}, - "metrics": [
- {
- "date": "2020-09-02",
- "formulaInvocations": 123,
- "errors": 5,
- "medianLatencyMs": 500,
- "medianResponseSizeBytes": 300,
- "docsActivelyUsing": 50,
- "docsActivelyUsing7Day": 100,
- "docsActivelyUsing30Day": 200,
- "docsActivelyUsing90Day": 300,
- "docsActivelyUsingAllTime": 500,
- "workspacesActivelyUsing": 10,
- "workspacesActivelyUsing7Day": 15,
- "workspacesActivelyUsing30Day": 20,
- "workspacesActivelyUsing90Day": 30,
- "workspacesActivelyUsingAllTime": 50,
- "workspacesActivelyTrialing": 0,
- "workspacesActivelyTrialing7Day": 0,
- "workspacesActivelyTrialing30Day": 0,
- "workspacesActivelyTrialing90Day": 0,
- "workspacesActivelyTrialingAllTime": 0,
- "workspacesNewlySubscribed": 0,
- "workspacesWithActiveSubscriptions": 0,
- "workspacesWithSuccessfulTrials": 0,
- "revenueUsd": "string"
}
]
}
], - "nextPageToken": "eyJsaW1pd",
- "nextPageLink": "https://coda.io/apis/v1/analytics/packs/:packId/formulas?pageToken=xyz"
}
Returns days based on Pacific Standard Time when analytics were last updated.
docAnalyticsLastUpdated required | string <date> Date that doc analytics were last updated. |
packAnalyticsLastUpdated required | string <date> Date that Pack analytics were last updated. |
packFormulaAnalyticsLastUpdated required | string <date> Date that Pack formula analytics were last updated. |
{- "docAnalyticsLastUpdated": "2022-05-01",
- "packAnalyticsLastUpdated": "2022-05-01",
- "packFormulaAnalyticsLastUpdated": "2022-05-01"
}
These endpoints wouldn't fit anywhere else, but you may find them useful when working with Coda.
Given a browser link to a Coda object, attempts to find it and return metadata that can be used to get more info on it. Returns a 400 if the URL does not appear to be a Coda URL or a 404 if the resource cannot be located with the current credentials.
url required | string <url> Example: url=https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO The browser link to try to resolve. |
degradeGracefully | boolean Example: degradeGracefully=true By default, attempting to resolve the Coda URL of a deleted object will result in an error. If this flag is set, the next-available object, all the way up to the doc itself, will be resolved. |
type required | string Value: "apiLink" The type of this resource. |
href required | string <url> Self link to this query. |
required | object (ApiLinkResolvedResource) Reference to the resolved resource. |
browserLink | string <url> Canonical browser-friendly link to the resolved resource. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/v1/resolveBrowserLink' params = { 'url': 'https://coda.io/d/Some-Doc_d<doc ID>/#To-do-List_tu<table ID>', } res = requests.get(uri, headers=headers, params=params).json() resolved_uri = res["resource"]["href"] res = requests.get(resolved_uri, headers=headers).json() print(f'This link points to a {res["type"]} named {res["name"]}') # => This link points to a table named To-do List
{- "type": "apiLink",
- "href": "https://coda.io/apis/v1/resolveBrowserLink?url=https%3A%2F%2Fcoda.io%2Fd%2F_dAbCDeFGH%2FLaunch-Status_sumnO",
- "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
- "resource": {
- "type": "aclMetadata",
- "id": "canvas-IjkLmnO",
- "name": "My Page",
- "href": "https://coda.io/apis/v1/docs/AbCDeFGH/pages/canvas-IjkLmnO"
}
}
Get the status for an asynchronous mutation to know whether or not it has been completed. Each API endpoint that mutates a document will return a request id that you can pass to this endpoint to check the completion status. Status information is not guaranteed to be available for more than one day after the mutation was completed. It is intended to be used shortly after the request was made.
requestId required | string Example: abc-123-def-456 ID of the request. |
completed required | boolean Returns whether the mutation has completed. |
warning | string A warning if the mutation completed but with caveats. |
import requests headers = {'Authorization': 'Bearer <your API token>'} uri = 'https://coda.io/apis/v1/mutationStatus/some-request-id' res = requests.get(uri, headers=headers).json() print(f'Request has completed? {res["completed"]}') # => Request has completed? false
{- "completed": true,
- "warning": "Initial page HTML was invalid."
}