Coda Admin API (0.0.2)

Introduction

The Coda Admin API is a RESTful API that allows programmatic access to administrative reports & capabilities within Coda.

Access to the Admin API is limited to enterprise organizations. Only organization admins can use the Admin API for resources related to their organization.

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.

Using the Admin API

Coda's Admin REST API is designed to be straightforward to use. You can use the language and platform of your choice to make requests. To get a feel for the API, you can also use a tool like Postman or Insomnia.

API Endpoint

This API uses a base path of https://coda.io/apis/admin/v1.

Object Hierarchy

Organizations

Enterprise customers have access to the Organization, an object that contains policy, rules, and audit events for a set of workspaces and one or more domains. Users accessing Coda via an Organization-registered domain are subject to that Organization's policies including allowed forms of authentication, doc & pack sharing restrictions, etc.

Workspaces

A workspace is your home base for all things Coda. It will store your docs in an organized way, and you'll invite members into the workspace to help you get the job done. A workspace can be free or paid (depending on your plan), and as the workspace's Doc Maker or Doc Maker (Admin), you'll be able to dictate the rules for how it works.

Learn more about Workspaces in our help center.

Folders

We use folders to keep docs organized in the workspace (think departments, teams, and projects). Your docs are where the true work gets done with all of your tables, text, and app-like solutions. Folders contain docs within the workspace.

Learn more about Folders in our help center.

Docs

Coda docs are foundational, top-level collaborative projects that contain pages.

Pack configurations

Pack configurations are the settings that define how a Pack may be used within an organization.

Pack configuration permissions

Pack configuration permissions are the settings that define which principals may use a Pack configuration.

Pack requests

When Pack configurations are turned on inside an organization. Pack requests are requests to use a Pack submitted by users in the organization.

Pages

Individual pages within a doc offer canvases containing rich text, tables, controls, and other objects.

Audit events

Audit events contain records of user login/logout activities and other operations performed within a Coda organization. Audit events are critical to an enterprise’s Security Monitoring efforts. It enables Security professionals to proactively analyze the audit events for any suspicious behavior within a Coda organization and help them in forensic investigations in case of a security breach. Audit events also enable administrators to write their own applications to understand their users’ usage of Coda.

Audit event actions

The following entity types and actions are audited.

Entity Type Action Name Description
apiToken DeleteApiToken Delete an API token
apiToken GenerateApiToken Generate an API token
billingAccount AddBillingGroup Add a billing group to a billing account
billingAccount AddBillingGroupAdmin Assign a billing group admin
billingAccount DeleteBillingGroup Delete a billing group from a billing account
billingAccount RemoveBillingGroupAdmin Remove a billing group admin
billingAccount UpdateBillingAccountSettings Update settings for a billing account
brainQuery BrainStructuredQuery Query Coda Brain for structured data
brainQuery BrainUnstructuredQuery Query Coda Brain for unstructured data
doc AddDocPack Install a Pack within a doc
doc CopyDoc Copy a doc to a new location
doc CopyPages Copy pages and sub pages within a doc to a new location
doc CopyTemplate Copy template to an existing doc
doc CreateDoc Create a new doc
doc DeleteAllReferencingSyncPageTunnels Delete all sync page tunnels referencing a doc
doc DeleteDoc Delete a doc
doc DeleteDocPack Remove usage of a Pack from a doc
doc EditDoc Edit a doc
doc ExportDocContent Export doc content
doc MoveDoc Move a doc to a different folder
doc OpenDoc Opening a doc for reading, commenting or editing.
doc ReviveDoc Revive a deleted doc
doc SubmitForm Submit through a form
doc UpdateDocPermissions Update sharing permissions on a doc
folder CreateFolder Create a new folder
folder DeleteFolder Delete a folder
folder UpdateFolderMembership Update membership on a folder
folder UpdateFolderPermissions Update sharing permissions on a folder
folder UpdateFolderSettings Update folder settings
group CreateGroup Create a new group
group DeleteGroup Delete a group
group UpdateGroup Update group properties
ingestion CreateIngestion Create a new Coda Brain ingestion
ingestion CreateIngestionPermissions Create Coda Brain ingestion permissions
ingestion DeleteIngestion Delete a Coda Brain ingestion
ingestion DeleteIngestionPermissions Delete Coda Brain ingestion permissions
ingestion UpdateIngestion Update a Coda Brain ingestion
legalHold CreateLegalHold Create a new legal hold
legalHold DeleteLegalHold Delete a legal hold
legalHold UpdateLegalHold Update legal hold
legalHoldExport CreateLegalHoldExport Create a new legal hold export
legalHoldExport DeleteLegalHoldExport Delete a legal hold export
organization OrganizationPackAccessRequested A user requested access to a Pack
organization TransferDocs Transfer docs from one user to another
organization UpdateOrganizationPackAccess Enable or disable usage of a Pack within an organization
organization UpdateOrganizationSettings Update organization settings
organization UpdateOrganizationUserActivation Update a user's activation status in an organization
organization UpdateOrganizationUserRole Add or remove user from organization roles
pack AddPackConfigurationPermission Add a Pack configuration permission
pack CreatePack Create a new Pack
pack CreatePackConfiguration Create a new Pack configuration
pack DeleteAllConfigurationsOnPack Delete all configurations for a Pack
pack DeletePack Delete a Pack
pack DeletePackConfiguration Delete a Pack configuration
pack DeletePackConfigurationOAuth Delete OAuth configuration metadata associated with a Pack configuration
pack RemovePackConfigurationPermission Delete a Pack configuration permission
pack SetPackConfigurationOAuth Set OAuth configuration metadata associated with the Pack configuration
pack SetPackConfigurationPermissions Set permissions for a Pack configuration
pack UpdatePackConfiguration Update a Pack configuration
pack UpdatePackPermissions Update Pack permissions
packControl SetPackControl Set Pack control for an organization
syncPage OpenSyncPage Opening a sync page for reading.
syncPageTunnel CreateSyncPageTunnel Create a sync page tunnel
syncPageTunnel DeleteSyncPageTunnel Delete a sync page tunnel
syncPageTunnel UpdateSyncPageTunnel Update a sync page tunnel
user CreateUser Create a new user
user DeleteUser Delete an existing user
user LogInUser Login activity of a user
user LogOutUser Logout activity of a user
user ResetUserPassword Reset a user's password
user UpdateUserAccount Update a user's account details
user UpdateUserPassword Update a user's password
webhook CreateWebhook Create a new webhook subscription
webhook DeleteWebhook Delete a webhook subscription
webhook ResetWebhook Resets a webhook subscription
webhook UpdateWebhook Updates parameters for an existing webhook subscription
workspace CreateCustomIcon Create a custom icon in a workspace
workspace CreateWorkspace Create a new workspace
workspace DeleteCustomIcon Delete a custom icon in a workspace
workspace DeleteWorkspace Delete a workspace
workspace OffboardWorkspaceUser Offboard a removed user from a workspace
workspace PinDocToWorkspace Pin a doc to a workspace
workspace ReinstateWorkspaceUser Allow a user to be re-added to a workspace
workspace UnpinDocFromWorkspace Unpin a doc from a workspace
workspace UpdateWorkspaceSettings Update workspace settings
workspace UpdateWorkspaceUserRole Update a user's role in a workspace

More information

For more information about the Coda Admin API and these events, detailed information and examples are available.

Webhooks

Webhooks enable an application to receive notifications of audit events in Coda as they occur.

Rather than having to "poll" repeatedly for new audit events, a webhook will "push" events to your internet-accessible endpoint via HTTP POST requests. This can be much more efficient and convenient for an internet-accessible service.

It is important to note that webhooks do require a server or server-like endpoint accesible on the internet at all times to receive these notifications. For simpler scenarios, it may be easier to just poll for audit events rather than host and maintain a server on the internet.

Webhook Considerations

This webhook implementation aims to deliver events within a few minutes of occurring under normal operating conditions.

The system will attempt retries when it detects failures, so it will be possible for you to receive the same events more than once depending on errors or timeouts occurring in your server or in the network infrastructure between Coda and your server. Once delivered successfully, it is not possible to replay webhook notifications.

Targets are expected to respond within 10 seconds before delivery times out and is considered a failure.

Failures are retried using exponential backoff timing; after 8 hours of consecutive failures, Coda will give up and place the webhook into a disabled state.

Webhook Setup

Once a new webhook connection is established, an initial handshake will be attempted in order to prove that the target is available on the internet and is owned by the registering entity. In addition, any time the webhook is updated to point to a new target URL, the handshake procedure will be kicked off.

After the initial handshake completes successfully, new audit events will immediately begin to flow to the target.

In the event that the handshake fails, the reset API can be used to force the webhook to retry the handshake process.

Webhook Handshake details

To prove that the target URL is available on the internet and is a valid webhook target, a handshake process is started anytime a new target URL is set on on a webhook. This process is asynchronous to the webhook setup API call.

Coda will send a HTTP GET request to the registered target URL with a HTTP header named X-Webhook-Code. The target must respond with a standard 200 or 204 HTTP response code and echo back the same header key and its value.

Webhook Payload details

Once the webhook handshake has completed successfully, Coda will send batches of audit events to the target URL using HTTP POST requests.

Each notifications the target receives will include:

  • A X-Webhook-Signature header which enables the server to verify the payload is genuine and originated from Coda. This code is a SHA-256 HMAC of the stringified body of the POST request using the Coda-generated secret key available on the webhook object.
  • A JSON body with key events which contains an array of audit events using the same format as returned by the listEvents endpoint detailed below.

Payload verification

Sample javascript code fragment for verifying a webhook payload originated from Coda:

const crypto = require('crypto');

// This field is available on the Coda webhook object.
const signatureKey = 'some value';

// These come from the webhook `POST` request to your server
const headers = {'X-Webhook-Signature': 'abc123'};
const body = {events: []};

const calculatedSignature = crypto
  .createHmac('SHA256', signatureKey)
  .update(JSON.stringify(body))
  .digest("hex");

const isValidSignature = crypto.timingSafeEqual(
  Buffer.from(calculatedSignature),
  Buffer.from(headers['X-Webhook-Signature']),
);

List Endpoints

Endpoints supporting listing of resources have the following fields:

  • items: An array containing the listed resources, limited by the limit or pageToken query parameters
  • nextPageLink: If more results are available, an API link to the next page of results
  • nextPageToken: If more results are available, a page token that can be passed into the pageToken query parameter

The 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.

Rate Limiting

The Coda Admin 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.

OpenAPI/Swagger Spec

In an effort to standardize our API and make it accessible, we offer an OpenAPI 3.0 specification:

API Tokens

View and revoke individual user API tokens within an organization.

List API tokens for organization users

Returns a list of API tokens created by users within an organization.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

query Parameters
limit
integer [ 1 .. 500 ]
Default: 100
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.

Responses

Response Schema: application/json
required
Array of objects (OrgUserApiToken)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/apiTokens'
res = requests.get(uri, headers=headers, params=params).json()

print(f'First token is: {res["items"][0]["name"]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/apiTokens",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/apiTokens?pageToken=eyJsaW1pd"
}

Revoke the given API token

Revokes the given API token and prevents future use.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

apiTokenId
required
string <uuid>
Example: afe84ebf-4d06-44c5-b545-a8af5036bebf

ID of the API token.

Responses

Response Schema: application/json
object (OrgUserApiTokenRevoke)

The result of an API token revocation.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/apiTokens/<api token id>'
res = requests.delete(uri, headers=headers, params=params).json()

print(f'Token was revoked')

Response samples

Content type
application/json
{ }

Docs

Coda docs are foundational, top-level collaborative projects that contain pages. The API lets you list and search your docs.

List docs

Returns a list of docs in the organization

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

query Parameters
limit
integer [ 1 .. 500 ]
Default: 100
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.

query
string
Example: query=feature%parity

Search terms used to narrow down results.

docIds
Array of strings
Example: docIds=Wd6s6JvqOg,2D3VqCFAyt

List of IDs of docs to retrieve.

folderIds
Array of strings
Example: folderIds=fl-AbCDeFGHIj

Comma-separated list of folder IDs

workspaceIds
Array of strings
Example: workspaceIds=ws-AbCDeFGHIj

Comma-separated list of workspace IDs

docAvailabilityState
string (DocAvailabilityState)
Enum: "online" "deleted"

If specified, filter docs by availability state.

docTypes
Array of strings (DocType)
Items Enum: "doc" "form" "template"
Example: docTypes=doc,template

Comma-separated list of doc types to include in results. If omitted, defaults to Doc.

dateActivity
string (DateActivity)
Enum: "lastModified" "created"

Activity type to apply the date range filter to. Only available if a search query is provided.

since
string

Return docs with the specified date activity on or after the given date. Only available if a search query is provided.

until
string

Return docs with the specified date activity on or before the given date. Only available if a search query is provided.

ownerUserEmails
Array of strings <email>
Example: ownerUserEmails=april@example.com,june@example.com

List of emails of doc owners whose docs to retrieve.

title
string

If specified, filter docs whose title contains this string.

sharedWithWorkspace
boolean

If true, filter docs shared with their workspace. All sharedWith params are ORed together.

sharedWithDomains
Array of strings <domain>
Example: sharedWithDomains=example.com

Filter docs shared with the specified domains. All sharedWith params are ORed together.

sharedWithAnyone
string (SharedWithAnyoneFilter)
Enum: "all" "linkOnly" "discoverableViaWeb"

Filter docs shared publicly if specified. All sharedWith params are ORed together.

sharedWithExternalDomain
boolean or null (SharedWithExternalDomainFilter)

Filter docs shared with a user external to the organization. All sharedWith params are ORed together.

sortField
string (DocListSortField)
Enum: "name" "createdAt" "lastActiveDate" "numPages" "numPageViewsLast90Days" "numCollaboratorsLast90Days"

Sort the list of docs by the specified field.

sortDirection
string (SortDirection)
Enum: "asc" "desc"

Sort by the specified direction.

includeInstalledPackCount
boolean

Include the count of installed packs in the response.

fetchPermissionsMode
string (FetchPermissionsMode)
Enum: "list" "summary" "none"

How to fetch permissions for a doc. Defaults to list all permissions.

Responses

Response Schema: application/json
required
Array of objects (Doc)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs'
res = requests.get(uri, headers=headers).json()

print(f'First doc is: {res["items"][0]["name"]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs?pageToken=eyJsaW1pd"
}

Get doc metadata

Returns metadata for a specific doc

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

docId
required
string
Example: d-AbCDeFGHIj

ID of the doc.

Responses

Response Schema: application/json
type
required
string
Value: "doc"

The type of this resource.

id
required
string

ID of the Coda doc.

name
required
string

Name of the doc.

href
required
string <url>

API link to the Coda doc.

browserLink
required
string <url>

Browser-friendly link to the Coda doc.

folderId
required
string

ID of the Coda doc's folder.

workspaceId
required
string

ID of the Coda doc's workspace.

icon
string

Name of the icon.

owner
string <email>

Email address of the doc owner

ownerName
string

Name of the doc owner

createdAt
string <date-time>

Timestamp for when the doc was created.

updatedAt
string <date-time>

Timestamp for when the doc was last modified.

Array of objects (Permission)
truncatedAcl
boolean

True if the inline ACL field was truncated; use a paginated ACL query to fetch all permissions.

object (PermissionsSummary)

Summary of permissions.

object (DocSearchHit)

Details on where the search query appeared in the doc.

docUsersLast90Days
number
Deprecated

Deprecated, use documentAnalytics instead.

isDeleted
boolean

True if the doc has been deleted.

installedPackCount
number

Number of Packs installed in the doc.

discoverableViaWeb
boolean

True if the doc is published and discoverable via the web.

object (DocumentAnalytics)

Metrics for a doc.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>'
res = requests.get(uri, headers=headers).json()

print(f'Doc name is: {res["name"]}')

Response samples

Content type
application/json
{
  • "type": "doc",
  • "id": "AbCDeFGH",
  • "name": "Product Launch Hub",
  • "icon": "exclamation-circle-filled",
  • "href": "https://coda.io/apis/admin/v1/docs/AbCDeFGH",
  • "browserLink": "https://coda.io/d/_dAbCDeFGH",
  • "folderId": "fl-es129308",
  • "workspaceId": "ws-sdfmsdf9",
  • "owner": "april@example.com",
  • "ownerName": "April Jane",
  • "createdAt": "2018-04-11T00:18:57.946Z",
  • "updatedAt": "2018-04-11T00:18:57.946Z",
  • "acl": [
    ],
  • "truncatedAcl": true,
  • "aclSummary": {
    },
  • "searchHit": {
    },
  • "docUsersLast90Days": 42,
  • "isDeleted": false,
  • "installedPackCount": 3,
  • "discoverableViaWeb": true,
  • "documentAnalytics": {
    }
}

Delete doc

Deletes an existing doc

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

docId
required
string
Example: d-AbCDeFGHIj

ID of the doc.

Responses

Response Schema: application/json
object (DeleteDocResult)

The result of deleting a doc.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>'
res = requests.delete(uri, headers=headers).json()

# => Delete the doc

Response samples

Content type
application/json
{ }

Revive doc

Revives a deleted doc in the organization

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

docId
required
string
Example: d-AbCDeFGHIj

ID of the doc.

Responses

Response Schema: application/json
docUrl
required
string

URL of the revived doc

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/revive'
res = requests.post(uri, headers=headers, json=payload)
res = requests.delete(uri, headers=headers).json()

# => Revive the deleted doc

Response samples

Content type
application/json
{
  • "docUrl": "string"
}

Move doc

Moves a doc to another folder within the organization

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

docId
required
string
Example: d-AbCDeFGHIj

ID of the doc.

Request Body schema: application/json

Parameters for moving the doc.

destinationFolderId
required
string

The ID of the folder to move the doc to.

Responses

Response Schema: application/json
object (MoveDocResult)

The result of moving a doc.

Request samples

Content type
application/json
{
  • "destinationFolderId": "fl-AbCDeFGHIj"
}

Response samples

Content type
application/json
{ }

Doc Permissions

This API lets you manage sharing and permissions for your docs.

List doc permissions

Returns a list of permissions for this doc

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

docId
required
string
Example: d-AbCDeFGHIj

ID of the doc.

query Parameters
limit
integer [ 1 .. 500 ]
Default: 100
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.

Responses

Response Schema: application/json
required
Array of objects (Permission)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your 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 foo@bar.com

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "string",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "string"
}

Add permission to a doc

Adds a new permission to the doc.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

docId
required
string
Example: d-AbCDeFGHIj

ID of the doc.

Request Body schema: application/json

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

Responses

Response Schema: application/json
object (AddPermissionResult)

The result of adding a permission.

Request samples

Content type
application/json
{
  • "access": "readonly",
  • "principal": {
    },
  • "suppressEmail": true
}

Response samples

Content type
application/json
{ }

Delete doc permission

Deletes an existing permission.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

docId
required
string
Example: d-AbCDeFGHIj

ID of the doc.

docPermissionId
required
string <uuid>
Example: f88ba9d9-037d-41df-a49c-49798701ed41

ID of a permission on an doc.

Responses

Response Schema: application/json
object (DeletePermissionResult)

The result of deleting a permission.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = f'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<doc ID>/acl/permissions/<permission ID>'
res = requests.delete(uri, headers=headers, json=payload)

# => Revoke access to the doc

Response samples

Content type
application/json
{ }

Doc Export

Export docs for backup or ingestion into a DLP or eDiscovery system.

Launch request to export a doc

Begins the export process for a doc; the response carries the request ID that can be polled for status & used to download the exported file once ready.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

docId
required
string
Example: d-AbCDeFGHIj

ID of the doc.

Request Body schema: application/json

Parameters for the export.

format
required
string (DocExportFormat)
Enum: "PDF" "Plaintext" "HTML"

Format of the doc export

orientation
string (DocExportOrientation)
Enum: "Landscape" "Portrait"

Orientation of the doc export. Defaults to Portrait.

paperSize
string (DocExportPaperSize)
Enum: "A0" "A1" "A2" "A3" "A4" "A5" "A6" "Letter" "Legal" "Tabloid"

Size of pages in the resulting export, if supported by the export format. Defaults to Letter.

exportDocAsUserEmail
string

The email address of the user to export the doc as.

Responses

Response Schema: application/json
id
required
string

ID of the export request.

status
required
string (DocExportStatus)
Enum: "InProgress" "Failed" "Complete"

Status of a doc export request

href
string <url>

API link to these results

error
string

If the export failed, this field includes the reason.

downloadLink
string

Once the export completes, the location where the resulting file can be downloaded; this link typically expires after a short time. Call this method again to get a fresh link.

Request samples

Content type
application/json
{
  • "format": "PDF",
  • "orientation": "Landscape",
  • "paperSize": "A0",
  • "exportDocAsUserEmail": "joe@example.com"
}

Response samples

Content type
application/json
{
  • "id": "AbCDeFGH",
  • "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/export/<your export request id>",
  • "status": "InProgress",
  • "error": "string",
  • "downloadLink": "string"
}

Determine the status of a doc export request

Returns the status of a previous doc export request, including a file download link once ready. Download links are valid for 5 minutes and a new download link is returned on each call to this API once the export has completed.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

docId
required
string
Example: d-AbCDeFGHIj

ID of the doc.

exportId
required
string <uuid>
Example: 85d2fb03-2747-44c4-8b3b-7a05d37eec04

ID of the doc export request.

Responses

Response Schema: application/json
id
required
string

ID of the export request.

status
required
string (DocExportStatus)
Enum: "InProgress" "Failed" "Complete"

Status of a doc export request

href
string <url>

API link to these results

error
string

If the export failed, this field includes the reason.

downloadLink
string

Once the export completes, the location where the resulting file can be downloaded; this link typically expires after a short time. Call this method again to get a fresh link.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/export/<export id>'
res = requests.get(uri, headers=headers).json()

print(f'Export status is {res["status"]}')
# => Export status is InProgress

Response samples

Content type
application/json
{
  • "id": "AbCDeFGH",
  • "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/export/<your export request id>",
  • "status": "InProgress",
  • "error": "string",
  • "downloadLink": "string"
}

Pages

Pages in Coda offer canvases containing rich text, tables, controls, and other objects.

List pages

Returns a list of pages in the doc

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

docId
required
string
Example: d-AbCDeFGHIj

ID of the doc.

query Parameters
limit
integer [ 1 .. 500 ]
Default: 100
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.

Responses

Response Schema: application/json
required
Array of objects (Page)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/pages'
res = requests.get(uri, headers=headers).json()

print(f'First page is: {res["items"][0]["name"]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/pages",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/pages?pageToken=eyJsaW1pd"
}

Get page information

Returns information for a specific page

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

docId
required
string
Example: d-AbCDeFGHIj

ID of the doc.

pageId
required
string
Example: canvas-AbCDeFGHIj

ID of the page.

query Parameters
outputFormat
string (OutputFormat)
Default: "None"
Enum: "None" "LossyPlainText"
Example: outputFormat=LossyPlainText

If specified, the format of the page or doc content to be returned. See export APIs for more output format options.

Responses

Response Schema: application/json
type
required
string
Value: "page"

The type of this resource.

id
required
string

ID of the page.

name
required
string

Name of the page.

href
required
string <url>

API link to the page.

browserLink
required
string <url>

Browser-friendly link to the page.

subtitle
string

Subtitle of the page.

object (PageReference)

Reference to a page.

object (PageContent)

Content of a page

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/pages/<your page id>'
res = requests.get(uri, headers=headers).json()

print(f'Page name is: {res["name"]}')

Response samples

Content type
application/json
{
  • "type": "page",
  • "id": "canvas-IjkLmnO",
  • "href": "https://coda.io/apis/admin/v1/organizations/<your org id>/docs/<doc id>/pages/<page id>",
  • "browserLink": "https://coda.io/d/_dAbCDeFGH/Launch-Status_sumnO",
  • "name": "Launch Status",
  • "subtitle": "See the status of launch-related tasks.",
  • "parent": {
    },
  • "pageContent": {
    }
}

List page viewers

Returns users who viewed the pages in a doc in a given time range

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

docId
required
string
Example: d-AbCDeFGHIj

ID of the doc.

query Parameters
sinceDate
required
string <date>
Example: sinceDate=2020-08-01

Limit results to activity on or after this date.

untilDate
required
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 .. 500 ]
Default: 100
Example: limit=10

Maximum number of results to return in this query.

pageViewersLimit
integer [ 1 .. 500 ]
Default: 100

Limit number of users returned per page.

Responses

Response Schema: application/json
required
Array of objects (PageViewersItem)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/pageViewers'
res = requests.get(uri, headers=headers).json()

print(f'Page name is: {res["name"]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/pageViewers",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/<your doc id>/pageViewers?pageToken=eyJsaW1pd"
}

Events

Provides access to audit events within an organization.

List audit events

Returns a list of audit events within an organization.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

query Parameters
startTime
integer

Return audit events created on or after the given Unix timestamp.

endTime
integer

Return audit events created on or before the given Unix timestamp.

action
Array of strings

Name of the action(s) performed.

userId
number

The Coda ID of the user who initiated the action.

email
Array of strings <email>

The email address(es) of the user(s) who initiated the action.

entityType
string (Type)
Enum: "apiToken" "billingAccount" "brainQuery" "doc" "docPackConnection" "event" "folder" "group" "ingestion" "legalHold" "legalHoldExport" "organization" "pack" "packControl" "packConfiguration" "packConfigurationOauth" "packConfigurationPermission" "packRequest" "page" "permission" "syncPage" "syncPageTunnel" "user" "webhook" "workspace"

Target entity type of the action.

entityId
string

Target entity ID of the action.

containerWorkspaceId
string

ID of the workspace that contained the entity at the time the event was generated.

containerFolderId
string

ID of the folder that contained the entity at the time the event was generated.

containerBillingAccountId
string

ID of the billing account that contained the entity at the time the event was generated.

order
string
Enum: "asc" "desc"

Defines the ordering of results. If unspecified, will default to 'asc' (ascending) order from oldest to most recent events.

limit
integer [ 1 .. 500 ]
Default: 100
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.

Responses

Response Schema: application/json
required
Array of objects (Event)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/audit/events'
params = {
  'action': 'docAccessDenied',
}
res = requests.get(uri, headers=headers, params=params).json()

print(f'First event is: {res["items"][0]["action"]}')
# => TODO: add response

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "https://coda.io/apis/admin/v1/organizations/org-1AbcdeFgh1/audit/events?limit=20",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "https://coda.io/apis/admin/v1/organizations/org-1AbcdeFgh1/audit/events?pageToken=eyJsaW1pd"
}

Folders

Folders contain docs and enable folder members to access those docs.

List folders

Returns a list of folders in the workspace

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

workspaceId
required
string
Example: ws-AbCDeFGHIj

ID of the workspace.

query Parameters
limit
integer [ 1 .. 500 ]
Default: 100
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.

folderIds
Array of strings
Example: folderIds=fl-AbCDeFGHIj

Comma-separated list of folder IDs

folderType
string (FolderType)
Enum: "Standard" "Personal"
Example: folderType=Standard

Type of the folder

query
string
Example: query=feature%parity

Search terms used to narrow down results.

includeAcl
boolean

Include permissions metadata on each folder.

includeDeleted
boolean

Include deleted folders

Responses

Response Schema: application/json
required
Array of objects (Folder)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces<your workspace id>/folders'
res = requests.get(uri, headers=headers).json()

print(f'First folder is: {res["items"][0]["name"]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces/<your workspace id>/folders",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces/<your workspace id>/folders?pageToken=eyJsaW1pd"
}

Get folder

Returns the requested folder.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

workspaceId
required
string
Example: ws-AbCDeFGHIj

ID of the workspace.

folderId
required
string
Example: fl-AbCDeFGHIj

ID of the folder.

Responses

Response Schema: application/json
type
required
string
Value: "folder"

The type of this resource.

id
required
string

ID of the Coda folder.

name
required
string

Name of the Coda folder.

folderType
required
string (FolderType)
Enum: "Standard" "Personal"
icon
string

Name of the Coda folder icon.

description
string

Description of the Coda folder.

isPrivate
boolean
Deprecated

Deprecated, use folder permissions instead.

Array of objects (Permission)
truncatedAcl
boolean

True if the inline ACL field was truncated; use a paginated ACL query to fetch all permissions.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces/<your workspace id>/folders/<your folder id>'
res = requests.get(uri, headers=headers).json()

print(f'Folder name is: {res["name"]}')

Response samples

Content type
application/json
{
  • "type": "folder",
  • "id": "fl-1Ab234",
  • "name": "My docs",
  • "icon": "exclamation-circle-filled",
  • "description": "This folder holds my important docs.",
  • "folderType": "Standard",
  • "isPrivate": true,
  • "acl": [
    ],
  • "truncatedAcl": true
}

Folder Permissions

This API lets you manage sharing and permissions for your folders.

List folder permissions

Returns a list of permissions for this folder

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

workspaceId
required
string
Example: ws-AbCDeFGHIj

ID of the workspace.

folderId
required
string
Example: fl-AbCDeFGHIj

ID of the folder.

query Parameters
limit
integer [ 1 .. 500 ]
Default: 100
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.

Responses

Response Schema: application/json
required
Array of objects (Permission)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces/<your workspace id>/folders/<your folder 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 foo@bar.com

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "string",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "string"
}

Add permission to a folder

Adds a new permission to the folder.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

workspaceId
required
string
Example: ws-AbCDeFGHIj

ID of the workspace.

folderId
required
string
Example: fl-AbCDeFGHIj

ID of the folder.

Request Body schema: application/json

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

Responses

Response Schema: application/json
object (AddPermissionResult)

The result of adding a permission.

Request samples

Content type
application/json
{
  • "access": "readonly",
  • "principal": {
    },
  • "suppressEmail": true
}

Response samples

Content type
application/json
{ }

Delete folder permission

Deletes an existing permission.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

workspaceId
required
string
Example: ws-AbCDeFGHIj

ID of the workspace.

folderId
required
string
Example: fl-AbCDeFGHIj

ID of the folder.

permissionId
required
string
Example: AbCDeFGH

ID of a permission on an object.

Responses

Response Schema: application/json
object (DeletePermissionResult)

The result of deleting a permission.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = f'https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces/<your workspace id>/folders/<your folder id>/acl/permissions/<permission ID>'
res = requests.delete(uri, headers=headers, json=payload)

# => Revoke access to the folder

Response samples

Content type
application/json
{ }

Groups

This API lets you enumerate groups and group membership.

List groups

Returns a list of groups in the organization

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

query Parameters
limit
integer [ 1 .. 500 ]
Default: 100
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.

Responses

Response Schema: application/json
required
Array of objects (Group)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/groups'
res = requests.get(uri, headers=headers).json()

print(f'First group is: {res["items"][0]["name"]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/groups",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/groups?pageToken=eyJsaW1pd"
}

Get group

Returns the requested group.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

groupId
required
string
Example: grp-AbCDeFGHIj

ID of the group.

Responses

Response Schema: application/json
type
required
string
Value: "group"

The type of this resource.

id
required
string

ID of the group.

name
required
string

Name of the group.

description
string

Description of the group.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/groups/<your group id>'
res = requests.get(uri, headers=headers).json()

print(f'Group name is: {res["name"]}')

Response samples

Content type
application/json
{
  • "type": "group",
  • "id": "grp-6SM9xrKcqW",
  • "name": "Engineering",
  • "description": "All engineers."
}

List group members

Returns a list of members for this group

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

groupId
required
string
Example: grp-AbCDeFGHIj

ID of the group.

query Parameters
limit
integer [ 1 .. 500 ]
Default: 100
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.

Responses

Response Schema: application/json
required
Array of objects (User)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/groups/<your group id>/members'
res = requests.get(uri, headers=headers).json()

print(f'First user in the group is {res["items"][0]["email"]}')
# => First user in the group is foo@bar.com

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "https://coda.io/apis/admin/v1/organizations/org-1AbcdeFgh1/groups/grp-1AbcdeFgh1/members?limit=20",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "https://coda.io/apis/admin/v1/organizations/org-1AbcdeFgh1/groups/grp-1AbcdeFgh1/members?pageToken=eyJsaW1pd"
}

LegalHolds

Legal holds are used to ensure a given set of docs cannot be deleted and enables simplified export management of doc content.

List legal holds

Returns a list of legal holds in the organization

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

query Parameters
limit
integer [ 1 .. 500 ]
Default: 100
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.

query
string
Example: query=feature%parity

Search terms used to narrow down results.

Responses

Response Schema: application/json
required
Array of objects (LegalHold)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds'
res = requests.get(uri, headers=headers).json()

print(f'First legal hold's name is: {res["items"][0]["name"]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds?pageToken=eyJsaW1pd"
}

Create a new legal hold

Creates a new legal hold in the Organization.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

Request Body schema: application/json

Parameters for adding the new legal hold.

name
required
string

The name of the new legal hold

rangeStart
required
string <date-time>

Timestamp of the beginning of the hold range

userEmails
required
Array of strings <email>

List of email addresses of users to include in the hold.

description
string

Description of the new legal hold

rangeEnd
string <date-time>

Timestamp of the end of the hold range

Responses

Response Schema: application/json
id
required
string <uuid>

Id of the new legal hold

Request samples

Content type
application/json
{
  • "name": "Investigation Matter 123",
  • "description": "Holding docs for legal matter 123",
  • "rangeStart": "2024-01-08T00:00:00.000Z",
  • "rangeEnd": "2024-04-11T00:00:00.000Z",
  • "userEmails": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

Get legal hold

Returns metadata for a specific legal hold

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

legalHoldId
required
string <uuid>
Example: 0d470e5b-d145-4440-a897-df57f4d72dfb

ID of the legal hold.

Responses

Response Schema: application/json
type
required
string
Value: "legalHold"

The type of this resource.

id
required
string <uuid>

ID of the legal hold.

name
required
string

Name of the hold.

creator
required
string <email>

Email address of the legal hold creator

creatorName
required
string

Name of the legal hold creator

rangeStart
required
string <date-time>

Timestamp of the beginning of the hold range

userCount
required
number

Count of users included in the hold

state
required
string (LegalHoldState)
Enum: "indexing" "active"
createdAt
required
string <date-time>

Timestamp for when the legal hold was created.

updatedAt
required
string <date-time>

Timestamp for when the legal hold was last modified.

description
string

Description of the hold.

rangeEnd
string <date-time>

Timestamp of the end of the hold range

docCount
number

Count of docs included in the hold, after indexing has stabilized

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>'
res = requests.get(uri, headers=headers).json()

print(f'Legal hold's name is: {res["name"]}')

Response samples

Content type
application/json
{
  • "type": "legalHold",
  • "id": "0d470e5b-d145-4440-a897-df57f4d72dfb",
  • "name": "Investigation Matter 123",
  • "description": "Holding docs for legal matter 123",
  • "creator": "april@example.com",
  • "creatorName": "April Jane",
  • "rangeStart": "2024-01-08T00:00:00.000Z",
  • "rangeEnd": "2024-04-11T00:00:00.000Z",
  • "docCount": 143,
  • "userCount": 12,
  • "state": "indexing",
  • "createdAt": "2024-04-13T00:18:57.946Z",
  • "updatedAt": "2024-04-13T00:18:57.946Z"
}

Update legal hold

Updates the legal hold.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

legalHoldId
required
string <uuid>
Example: 0d470e5b-d145-4440-a897-df57f4d72dfb

ID of the legal hold.

Request Body schema: application/json

Parameters for the legal hold.

name
string

The name of the legal hold

description
string

Description of the legal hold

rangeStart
string <date-time>

Timestamp of the beginning of the hold range

rangeEnd
string or null <date-time>

Timestamp of the end of the hold range

Responses

Response Schema: application/json
object (UpdateLegalHoldResult)

The result of updating a legal hold.

Request samples

Content type
application/json
{
  • "name": "Investigation Matter 123",
  • "description": "string",
  • "rangeStart": "2024-01-08T00:00:00.000Z",
  • "rangeEnd": "2024-04-11T00:00:00.000Z"
}

Response samples

Content type
application/json
{ }

Delete the legal hold

Deletes an existing legal hold.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

legalHoldId
required
string <uuid>
Example: 0d470e5b-d145-4440-a897-df57f4d72dfb

ID of the legal hold.

Responses

Response Schema: application/json
object (DeleteLegalHoldResult)

The result of deleting a legal hold.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = f'https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>'
res = requests.delete(uri, headers=headers, json=payload)

# => Delete the legal hold

Response samples

Content type
application/json
{ }

List docs covered by the legal hold

Returns a list of docs held by the legal hold

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

legalHoldId
required
string <uuid>
Example: 0d470e5b-d145-4440-a897-df57f4d72dfb

ID of the legal hold.

query Parameters
limit
integer [ 1 .. 500 ]
Default: 100
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.

query
string
Example: query=feature%parity

Search terms used to narrow down results.

Responses

Response Schema: application/json
required
Array of objects (Doc)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>/docs'
res = requests.get(uri, headers=headers).json()

print(f'First legal hold doc's name is: {res["items"][0]["name"]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/docs?pageToken=eyJsaW1pd"
}

List exports for the legal hold

Returns a list of exports created for the legal hold

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

legalHoldId
required
string <uuid>
Example: 0d470e5b-d145-4440-a897-df57f4d72dfb

ID of the legal hold.

query Parameters
limit
integer [ 1 .. 500 ]
Default: 100
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.

query
string
Example: query=feature%parity

Search terms used to narrow down results.

Responses

Response Schema: application/json
required
Array of objects (LegalHoldExport)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>/exports'
res = requests.get(uri, headers=headers).json()

print(f'First legal hold export's name is: {res["items"][0]["name"]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>/exports",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>/exports?pageToken=eyJsaW1pd"
}

Create a new legal hold export

Creates a new legal hold export for the hold.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

legalHoldId
required
string <uuid>
Example: 0d470e5b-d145-4440-a897-df57f4d72dfb

ID of the legal hold.

Request Body schema: application/json

Parameters for adding the new legal hold export.

name
required
string

The name of the new legal hold export

exportAt
string <date-time>

Exports docs in the state they were in as of this timestamp

docIds
Array of strings

List of doc IDs to include in the export

Responses

Response Schema: application/json
id
required
string <uuid>

Id of the new legal hold export

Request samples

Content type
application/json
{
  • "name": "Export of docs for investigation matter 123",
  • "exportAt": "2024-01-08T00:00:00.000Z",
  • "docIds": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

Get legal hold export

Returns metadata for a specific legal hold export

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

legalHoldId
required
string <uuid>
Example: 0d470e5b-d145-4440-a897-df57f4d72dfb

ID of the legal hold.

legalHoldExportId
required
string <uuid>
Example: 0d470e5b-d145-4440-a897-df57f4d72dfb

ID of the legal hold export.

Responses

Response Schema: application/json
type
required
string
Value: "legalHoldExport"

The type of this resource.

id
required
string <uuid>

ID of the legal hold export.

name
required
string

Name of the export.

creator
required
string <email>

Email address of the legal hold export creator

creatorName
required
string

Name of the legal hold export creator

exportAt
required
string <date-time>

Docs are exported in the state corresponding to this timestamp

format
required
string (LegalHoldExportFormat)
Value: "pdfzip"
state
required
string (LegalHoldExportState)
Enum: "generating" "ready" "error"
createdAt
required
string <date-time>

Timestamp for when the legal hold export was created.

updatedAt
required
string <date-time>

Timestamp for when the legal hold export was last modified.

docCount
number

Count of docs included in the export

downloadUrl
string <url>

URL to download the exported doc package once the export is complete

downloadSize
number

Size of the exported doc package in bytes

error
string

Error message if the export failed

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>/exports/<your export id>'
res = requests.get(uri, headers=headers).json()

print(f'Legal hold export's name is: {res["name"]}')

Response samples

Content type
application/json
{
  • "type": "legalHoldExport",
  • "id": "0d470e5b-d145-4440-a897-df57f4d72dfb",
  • "name": "Export of docs for investigation matter 123",
  • "creator": "april@example.com",
  • "creatorName": "April Jane",
  • "exportAt": "2024-01-08T00:00:00.000Z",
  • "format": "pdfzip",
  • "docCount": 143,
  • "state": "generating",
  • "createdAt": "2024-04-13T00:18:57.946Z",
  • "updatedAt": "2024-04-13T00:18:57.946Z",
  • "downloadUrl": "string",
  • "downloadSize": 0,
  • "error": "string"
}

Delete the legal hold export

Deletes an existing legal hold export.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

legalHoldId
required
string <uuid>
Example: 0d470e5b-d145-4440-a897-df57f4d72dfb

ID of the legal hold.

legalHoldExportId
required
string <uuid>
Example: 0d470e5b-d145-4440-a897-df57f4d72dfb

ID of the legal hold export.

Responses

Response Schema: application/json
object (DeleteLegalHoldExportResult)

The result of deleting a legal hold export.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = f'https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>/exports/<your export id>'
res = requests.delete(uri, headers=headers, json=payload)

# => Delete the legal hold export

Response samples

Content type
application/json
{ }

List users included in the legal hold

Returns a list of users included in the legal hold

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

legalHoldId
required
string <uuid>
Example: 0d470e5b-d145-4440-a897-df57f4d72dfb

ID of the legal hold.

query Parameters
limit
integer [ 1 .. 500 ]
Default: 100
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.

Responses

Response Schema: application/json
required
Array of objects (OrgUser)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>/users'
res = requests.get(uri, headers=headers).json()

print(f'First legal hold user's email is: {res["items"][0]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>/users",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/legalHolds/<your legal hold id>/users?pageToken=eyJsaW1pd"
}

Update legal hold users

Updates the users included in the legal hold.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

legalHoldId
required
string <uuid>
Example: 0d470e5b-d145-4440-a897-df57f4d72dfb

ID of the legal hold.

Request Body schema: application/json

Parameters for the legal hold users update.

userEmailsToAdd
Array of strings <email>

List of email addresses of users to add to the hold.

userEmailsToRemove
Array of strings <email>

List of email addresses of users to remove from the hold.

Responses

Response Schema: application/json
object (UpdateLegalHoldUsersResult)

The result of updating a legal hold's users.

Request samples

Content type
application/json
{
  • "userEmailsToAdd": [
    ],
  • "userEmailsToRemove": [
    ]
}

Response samples

Content type
application/json
{ }

Organizations

Organizations are where Enterprise-level policy is set for users and workspaces.

List organizations

Returns a list of organizations the caller is an administrator for

Authorizations:
Bearer
query Parameters
limit
integer [ 1 .. 500 ]
Default: 100
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.

Responses

Response Schema: application/json
required
Array of objects (Organization)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations'
res = requests.get(uri, headers=headers).json()

print(f'First org is: {res["items"][0]["name"]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "https://coda.io/apis/admin/v1/organizations",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "https://coda.io/apis/admin/v1/organizations?pageToken=eyJsaW1pd"
}

Get organization

Returns the requested organization.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

Responses

Response Schema: application/json
type
required
string
Value: "organization"

The type of this resource.

id
required
string

ID of the Coda organization.

name
required
string

Name of the organization.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>'
res = requests.get(uri, headers=headers).json()

print(f'Org name is: {res["name"]}')

Response samples

Content type
application/json
{
  • "type": "organization",
  • "id": "org-1AbcdeFgh1",
  • "name": "Coda"
}

Organization Users

This API enables viewing and modifying user information at the Organization level.

List organization users

Returns a list of users within an organization, across all registered domains.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

query Parameters
limit
integer [ 1 .. 500 ]
Default: 100
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.

isActivated
boolean

Filter results to users based on their activation status

query
string
Example: query=feature%parity

Search terms used to narrow down results.

emails
Array of strings <email>
Example: emails=april@example.com,june@example.com

List of emails of users to retrieve.

deactivatedAfter
number

Return users deactivated at or after the given Unix timestamp.

includeOwnedDocCounts
boolean

Include the count of docs owned by each user.

Responses

Response Schema: application/json
required
Array of objects (OrgUser)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/users'
res = requests.get(uri, headers=headers, params=params).json()

print(f'First user is: {res["items"][0]["email"]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "https://coda.io/apis/admin/v1/organizations/org-1AbcdeFgh1/users?limit=20",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "https://coda.io/apis/admin/v1/organizations/org-1AbcdeFgh1/users?pageToken=eyJsaW1pd"
}

Transfer user resources

Transfers resources such as docs and workspace membership from a deactivated user to an active user.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

Request Body schema: application/json

Parameters for the resource transfer.

fromEmail
required
string

The email address of the user to transfer resources away from.

toEmail
required
string

The email address of the user to transfer resources to.

filterDocIds
Array of strings

List of IDs of docs to transfer. Must be owned by the from user. If unspecified transfers all docs the from user owns.

Responses

Response Schema: application/json
requestId
required
string

An opaque identifier that represents the request.

Request samples

Content type
application/json
{
  • "fromEmail": "joe@example.com",
  • "toEmail": "april@example.com",
  • "filterDocIds": [
    ]
}

Response samples

Content type
application/json
{
  • "requestId": "c5cb3278-800e-4ae3-be53-19b0b794f8e1"
}

Activate a user

Activates a deactivated user.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

userEmail
required
string <email>
Example: april@example.com

User to act upon.

Request Body schema: application/json

Parameters for activating a deactivated user.

bypassScim
boolean

By default, requests to update org users' activation state are rejected if SCIM is enabled for the organization. Updating membership here may cause Coda to be out of sync with your identity provider and/or refreshes from SCIM may overwrite your changes here. Set this flag to bypass this protection.

Responses

Response Schema: application/json
object (OrgUserActivationChangeResult)

The result of a change to an org user's state.

Request samples

Content type
application/json
{
  • "bypassScim": true
}

Response samples

Content type
application/json
{ }

Deactivate a user

Deactivates a user, ensuring the user is no longer paid and allowing their docs to be reassigned to a new owner.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

userEmail
required
string <email>
Example: april@example.com

User to act upon.

Request Body schema: application/json

Parameters for deactivating a user.

bypassScim
boolean

By default, requests to update org users' activation state are rejected if SCIM is enabled for the organization. Updating membership here may cause Coda to be out of sync with your identity provider and/or refreshes from SCIM may overwrite your changes here. Set this flag to bypass this protection.

Responses

Response Schema: application/json
object (OrgUserActivationChangeResult)

The result of a change to an org user's state.

Request samples

Content type
application/json
{
  • "bypassScim": true
}

Response samples

Content type
application/json
{ }

Pack Controls

Pack controls govern access to Packs within an organization.

List Pack controls for an organization

Returns a list of Pack controls for the organization

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

query Parameters
limit
integer [ 1 .. 500 ]
Default: 100
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.

Responses

Response Schema: application/json
required
Array of objects (PackControl)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organization/<your organization id>/packs/controls'
res = requests.get(uri, headers=headers).json()

print(f'First Pack request is from: {res["items"][0]["pack"]["name"]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "string"
}

Sets pack control for an Pack

Sets pack control for an Pack

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

packId
required
integer >= 1
Example: 123

ID of a Pack

Request Body schema: application/json

Parameters for setting a Pack control for a pack.

access
required
string (PackAccess)
Enum: "allow" "deny" "requiresConfiguration"

Determines how the Pack can be used in the context of the organization.

Responses

Response Schema: application/json
type
required
string
Value: "packControl"

The type of this resource.

organizationId
required
string

ID of the Coda organization.

required
object (Pack)

Info about a Pack.

access
required
string (PackAccess)
Enum: "allow" "deny" "requiresConfiguration"

Determines how the Pack can be used in the context of the organization.

creationTimestamp
required
number

Timestamp when the Pack configuration was created.

modificationTimestamp
required
number

Timestamp when the Pack configuration was last modified.

Request samples

Content type
application/json
{
  • "access": "allow"
}

Response samples

Content type
application/json
{
  • "type": "packControl",
  • "organizationId": "org-1AbcdeFgh1",
  • "pack": {
    },
  • "access": "allow",
  • "creationTimestamp": 0,
  • "modificationTimestamp": 0
}

Pack Configurations

Pack configurations control fine grained access, scopes, feature sets, shareability of docs with installed Packs, and more settings.

List Pack requests for an organization

Returns a list of Pack requests for the organization

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

query Parameters
packIds
Array of integers
Example: packIds=123,456

Comma-separated list of Pack IDs

limit
integer [ 1 .. 500 ]
Default: 100
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.

Responses

Response Schema: application/json
required
Array of objects (PackRequest)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organization/<your organization id>/packs/requests'
res = requests.get(uri, headers=headers).json()

print(f'First Pack request is from: {res["items"][0]["requestingUserName"]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "string"
}

List Pack configurations for an organization

Returns a list of Pack configurations for the organization

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

query Parameters
packId
integer >= 1
Example: packId=123

ID of a Pack

limit
integer [ 1 .. 500 ]
Default: 100
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.

Responses

Response Schema: application/json
required
Array of objects (PackConfiguration)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organization/<your organization id>/packs/configurations'
res = requests.get(uri, headers=headers).json()

print(f'First Pack configuration is: {res["items"][0]["name"]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "string"
}

Adds Pack configuration

Adds a Pack configuration for a Pack to an organization

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

Request Body schema: application/json

Parameters for adding a Pack configuration.

name
required
string

The name for the Pack configuration

policy
required
object (Policy)

The Pack configuration policy that governs connection details and Pack resources that a principal is allowed to use. It also defines if doc sharing permissions will be enforced to match principals allowed to use this policy.

packId
required
number

The ID of the Pack.

Responses

Response Schema: application/json
type
required
string
Value: "packConfiguration"

The type of this resource.

organizationId
required
string

ID of the Coda organization.

packConfigurationId
required
string

ID of the Pack configuration.

packId
required
number

The ID of the Pack.

name
required
string

Name of the Pack configuration.

policy
required
object (Policy)

The Pack configuration policy that governs connection details and Pack resources that a principal is allowed to use. It also defines if doc sharing permissions will be enforced to match principals allowed to use this policy.

broadestSharing
required
string (BroadestSharedWith)
Enum: "user" "group" "organization" "nobody"

Broadest type of principal a Pack configuration is shared with.

creationTimestamp
required
number

Timestamp when the Pack configuration was created.

modificationTimestamp
required
number

Timestamp when the Pack configuration was last modified.

modificationUserId
required
number

ID of the user who last modified the Pack configuration.

Request samples

Content type
application/json
{
  • "name": "string",
  • "policy": { },
  • "packId": 123
}

Response samples

Content type
application/json
{
  • "type": "packConfiguration",
  • "organizationId": "org-1AbcdeFgh1",
  • "packConfigurationId": "string",
  • "packId": 123,
  • "name": "string",
  • "policy": { },
  • "broadestSharing": "user",
  • "creationTimestamp": 0,
  • "modificationTimestamp": 0,
  • "modificationUserId": 0
}

Get a Pack configuration

Returns a Pack configuration

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

packConfigurationId
required
string
Example: afe84ebf-4d06-44c5-b545-a8af5036bebf

ID of the Pack configuration.

Responses

Response Schema: application/json
type
required
string
Value: "packConfiguration"

The type of this resource.

organizationId
required
string

ID of the Coda organization.

packConfigurationId
required
string

ID of the Pack configuration.

packId
required
number

The ID of the Pack.

name
required
string

Name of the Pack configuration.

policy
required
object (Policy)

The Pack configuration policy that governs connection details and Pack resources that a principal is allowed to use. It also defines if doc sharing permissions will be enforced to match principals allowed to use this policy.

broadestSharing
required
string (BroadestSharedWith)
Enum: "user" "group" "organization" "nobody"

Broadest type of principal a Pack configuration is shared with.

creationTimestamp
required
number

Timestamp when the Pack configuration was created.

modificationTimestamp
required
number

Timestamp when the Pack configuration was last modified.

modificationUserId
required
number

ID of the user who last modified the Pack configuration.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/packs/configurations/<the Pack configuration id>'
res = requests.get(uri, headers=headers).json()

print(f'Pack configuration name is: {res["name"]}')

Response samples

Content type
application/json
{
  • "type": "packConfiguration",
  • "organizationId": "org-1AbcdeFgh1",
  • "packConfigurationId": "string",
  • "packId": 123,
  • "name": "string",
  • "policy": { },
  • "broadestSharing": "user",
  • "creationTimestamp": 0,
  • "modificationTimestamp": 0,
  • "modificationUserId": 0
}

Updates a Pack configuration

Updates a Pack configuration and asynchronously applies to the organization by updating any existing Pack installations using the now updated Pack configuration.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

packConfigurationId
required
string
Example: afe84ebf-4d06-44c5-b545-a8af5036bebf

ID of the Pack configuration.

Request Body schema: application/json

Parameters for updating a Pack configuration.

name
string

The name for the Pack configuration

policy
object (Policy)

The Pack configuration policy that governs connection details and Pack resources that a principal is allowed to use. It also defines if doc sharing permissions will be enforced to match principals allowed to use this policy.

Responses

Response Schema: application/json
type
required
string
Value: "packConfiguration"

The type of this resource.

organizationId
required
string

ID of the Coda organization.

packConfigurationId
required
string

ID of the Pack configuration.

packId
required
number

The ID of the Pack.

name
required
string

Name of the Pack configuration.

policy
required
object (Policy)

The Pack configuration policy that governs connection details and Pack resources that a principal is allowed to use. It also defines if doc sharing permissions will be enforced to match principals allowed to use this policy.

broadestSharing
required
string (BroadestSharedWith)
Enum: "user" "group" "organization" "nobody"

Broadest type of principal a Pack configuration is shared with.

creationTimestamp
required
number

Timestamp when the Pack configuration was created.

modificationTimestamp
required
number

Timestamp when the Pack configuration was last modified.

modificationUserId
required
number

ID of the user who last modified the Pack configuration.

Request samples

Content type
application/json
{
  • "name": "string",
  • "policy": { }
}

Response samples

Content type
application/json
{
  • "type": "packConfiguration",
  • "organizationId": "org-1AbcdeFgh1",
  • "packConfigurationId": "string",
  • "packId": 123,
  • "name": "string",
  • "policy": { },
  • "broadestSharing": "user",
  • "creationTimestamp": 0,
  • "modificationTimestamp": 0,
  • "modificationUserId": 0
}

Delete the given Pack configuration

Deletes the given Pack configuration and asynchronously applies to the organization by updating any existing Pack installations using the deleted Pack configuration.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

packConfigurationId
required
string
Example: afe84ebf-4d06-44c5-b545-a8af5036bebf

ID of the Pack configuration.

Responses

Response Schema: application/json
object (DeletePackConfigurationResponse)

Response indication a request to delete a Pack configuration was successful.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/packs/configurations/<the configuration id>'
res = requests.delete(uri, headers=headers, params=params).json()

print(f'Pack configuration was deleted')

Response samples

Content type
application/json
{ }

List permissions assigned to a Pack configuration

Returns a list of Pack configuration permissions

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

packConfigurationId
required
string
Example: afe84ebf-4d06-44c5-b545-a8af5036bebf

ID of the Pack configuration.

query Parameters
limit
integer [ 1 .. 500 ]
Default: 100
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.

Responses

Response Schema: application/json
required
Array of objects (PackConfigurationPermission)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/packs/configurations/<the configuration id>/permissions'
res = requests.get(uri, headers=headers).json()

print(f'First Pack configuration permission has id: {res["items"][0]["permissionId"]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "string"
}

Adds a permission to use a Pack configuration

Adds a permission to use a Pack configuration

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

packConfigurationId
required
string
Example: afe84ebf-4d06-44c5-b545-a8af5036bebf

ID of the Pack configuration.

Request Body schema: application/json

Parameters for adding a permission to use a Pack configuration.

required
any (AddedPrincipal)

Metadata about a principal to add to a doc.

Responses

Response Schema: application/json
required
any (Principal)

Metadata about a principal.

id
required
string

ID for the Permission

access
required
string
Value: "readonly"

Type of access. Only readonly is supported for Pack configuration permissions.

creationTimestamp
required
number

Timestamp when the Pack configuration permission was created.

modificationUserId
required
number

ID of the user who last modified the Pack configuration permission.

Request samples

Content type
application/json
{
  • "principal": {
    }
}

Response samples

Content type
application/json
{
  • "principal": {
    },
  • "id": "string",
  • "access": "readonly",
  • "creationTimestamp": 0,
  • "modificationUserId": 0
}

Replaces the permissions to use a Pack configuration

Replaces the permissions to use a Pack configuration

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

packConfigurationId
required
string
Example: afe84ebf-4d06-44c5-b545-a8af5036bebf

ID of the Pack configuration.

Request Body schema: application/json

Parameters for setting permissions to use a Pack configuration.

required
Array of any (AddedPrincipal)

Responses

Response Schema: application/json
required
Array of objects (PackConfigurationPermission)

Request samples

Content type
application/json
{
  • "principals": [
    ]
}

Response samples

Content type
application/json
{
  • "permissions": [
    ]
}

Delete the given Pack configuration permission

Deletes the given Pack configuration and triggers necessarily workflows to update docs with the policy

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

packConfigurationId
required
string
Example: afe84ebf-4d06-44c5-b545-a8af5036bebf

ID of the Pack configuration.

packConfigurationPermissionId
required
string
Example: afe84ebf-4d06-44c5-b545-a8af5036bebf

ID of the Pack configuration permission.

Responses

Response Schema: application/json
object (DeletePackConfigurationPermissionResponse)

The result of deleting a Pack configuration permission.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/packs/configurations/<the configuration id>/permissions/<the permission id>'
res = requests.delete(uri, headers=headers, params=params).json()

print(f'Pack configuration permission was deleted')

Response samples

Content type
application/json
{ }

Gets OAuth configuration metadata

Returns OAuth configuration metadata associated with the pack configuration

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

packConfigurationId
required
string
Example: afe84ebf-4d06-44c5-b545-a8af5036bebf

ID of the Pack configuration.

Responses

Response Schema: application/json
maskedClientId
required
string

Masked OAuth client id. If not set, empty string will be returned.

maskedClientSecret
required
string

Masked OAuth client secret. If not set, empty string will be returned.

authorizationUrl
required
string

Authorization URL of the OAuth provider.

tokenUrl
required
string

Token URL of the OAuth provider.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/packs/configurations/<the configuration id>/oauth'
res = requests.get(uri, headers=headers).json()

print(f'Masked client ID: {res["maskedClientId"]}')

Response samples

Content type
application/json
{
  • "maskedClientId": "string",
  • "maskedClientSecret": "string",
  • "authorizationUrl": "string",
  • "tokenUrl": "string"
}

Sets OAuth configuration metadata

Sets OAuth configuration metadata associated with the pack configuration

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

packConfigurationId
required
string
Example: afe84ebf-4d06-44c5-b545-a8af5036bebf

ID of the Pack configuration.

Request Body schema: application/json

Parameters for adding a permission to use a Pack configuration.

clientId
string
clientSecret
string
authorizationUrl
string
tokenUrl
string

Responses

Response Schema: application/json
maskedClientId
required
string

Masked OAuth client id. If not set, empty string will be returned.

maskedClientSecret
required
string

Masked OAuth client secret. If not set, empty string will be returned.

authorizationUrl
required
string

Authorization URL of the OAuth provider.

tokenUrl
required
string

Token URL of the OAuth provider.

Request samples

Content type
application/json
{
  • "clientId": "string",
  • "clientSecret": "string",
  • "authorizationUrl": "string",
  • "tokenUrl": "string"
}

Response samples

Content type
application/json
{
  • "maskedClientId": "string",
  • "maskedClientSecret": "string",
  • "authorizationUrl": "string",
  • "tokenUrl": "string"
}

Removes OAuth configuration metadata

Removes any OAuth configuration metadata associated with the pack configuration

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

packConfigurationId
required
string
Example: afe84ebf-4d06-44c5-b545-a8af5036bebf

ID of the Pack configuration.

Responses

Response Schema: application/json
object (DeletePackConfigurationOauthConfigResult)

The result of deleting OAuth configuration metadata associated with a Pack configuration.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/packs/configurations/<the configuration id>/oauth'

res = requests.delete(uri, headers=headers, params=params).json()

Response samples

Content type
application/json
{ }

Packs

Packs are integrations connecting Coda to external data sources.

List doc Pack connections

Returns a list of Pack connections linked to docs across the organization.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

query Parameters
workspaceId
string
Example: workspaceId=ws-1Ab234

Filter down connections to docs within this workspace.

readAccess
string (DocPackConnectionReadAccess)
Enum: "Anyone" "None"
Example: readAccess=Anyone

Filter down connections to those with the specified access to pull in data.

writeAccess
string (DocPackConnectionWriteAccess)
Enum: "Anyone" "Self" "None"
Example: writeAccess=Anyone

Filter down connections to those with the specified access to perform actions.

limit
integer [ 1 .. 500 ]
Default: 100
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.

Responses

Response Schema: application/json
required
Array of objects (DocPackConnection)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/docs/packConnections'
params = {
  'readAccess': 'Anyone',
}
res = requests.get(uri, headers=headers, params=params).json()

print(f'First connection is for Pack: {res["items"][0]["pack"]["id"]}')
# => First connection is for Pack: 1003

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "https://coda.io/apis/admin/v1/organizations/{organizationId}/docs/packConnections",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "https://coda.io/apis/admin/v1/organizations/{organizationId}/docs/packConnections?pageToken=eyJsaW1pd"
}

Webhooks

List webhooks

Returns a list of webhooks in the organization

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

query Parameters
limit
integer [ 1 .. 500 ]
Default: 100
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.

Responses

Response Schema: application/json
required
Array of objects (Webhook)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/webhooks'
res = requests.get(uri, headers=headers).json()

print(f'First webhook is: {res["items"][0]["name"]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/webhooks",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/webhooks?pageToken=eyJsaW1pd"
}

Create new webhook subscription

Creates a new webhook subscription for the organization.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

Request Body schema: application/json

Parameters for adding the new webhook subscription.

resource
required
string (WebhookWatchedResource)
Value: "auditEvents"

Type of resource a webhook is subscribed to.

target
required
string <url>

The target URL where webhook payloads will be sent

name
string

Name of the webhook subscription.

object (WebhookFilter)

Filter set for the webhook subscription.

Responses

Response Schema: application/json
type
required
string
Value: "webhook"

The type of this resource.

id
required
string

ID of the Coda webhook subscription.

resource
required
string (WebhookWatchedResource)
Value: "auditEvents"

Type of resource a webhook is subscribed to.

target
required
string <url>

The target URL where webhook payloads will be sent

createdAt
required
string <date-time>

Timestamp for when the webhook subscription was created.

state
required
string

The current state of the webhook subscription.

name
string

Name of the webhook subscription.

signatureKey
string

Key used to generate HMAC payload signatures; should be used to verify the signature of incoming webhook notifications.

object (WebhookFilter)

Filter set for the webhook subscription.

lastFailureAt
string <date-time>

Timestamp for when the webhook last received an error while attempting to send a payload to the target.

lastFailureContent
string

Last error reported by the target.

lastSuccessAt
string <date-time>

Timestamp for when the webhook last successfully sent a payload to the target.

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "type": "webhook",
  • "id": "f88ba9d9-037d-41df-a49c-49798701ed41",
  • "name": "My webhook",
  • "signatureKey": "string",
  • "resource": "auditEvents",
  • "filters": {
    },
  • "createdAt": "2018-04-11T00:18:57.946Z",
  • "state": "Active",
  • "lastFailureAt": "2018-04-11T00:18:57.946Z",
  • "lastFailureContent": "500 Server Error",
  • "lastSuccessAt": "2018-04-11T00:18:57.946Z"
}

Get a webhook subscription

Returns the requested webhook subscription.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

webhookId
required
string <uuid>
Example: f88ba9d9-037d-41df-a49c-49798701ed41

ID of the webhook subscription.

Responses

Response Schema: application/json
type
required
string
Value: "webhook"

The type of this resource.

id
required
string

ID of the Coda webhook subscription.

resource
required
string (WebhookWatchedResource)
Value: "auditEvents"

Type of resource a webhook is subscribed to.

target
required
string <url>

The target URL where webhook payloads will be sent

createdAt
required
string <date-time>

Timestamp for when the webhook subscription was created.

state
required
string

The current state of the webhook subscription.

name
string

Name of the webhook subscription.

signatureKey
string

Key used to generate HMAC payload signatures; should be used to verify the signature of incoming webhook notifications.

object (WebhookFilter)

Filter set for the webhook subscription.

lastFailureAt
string <date-time>

Timestamp for when the webhook last received an error while attempting to send a payload to the target.

lastFailureContent
string

Last error reported by the target.

lastSuccessAt
string <date-time>

Timestamp for when the webhook last successfully sent a payload to the target.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/webhooks/<your webhook id>'
res = requests.get(uri, headers=headers).json()

print(f'Webhook name is: {res["name"]}')

Response samples

Content type
application/json
{
  • "type": "webhook",
  • "id": "f88ba9d9-037d-41df-a49c-49798701ed41",
  • "name": "My webhook",
  • "signatureKey": "string",
  • "resource": "auditEvents",
  • "filters": {
    },
  • "createdAt": "2018-04-11T00:18:57.946Z",
  • "state": "Active",
  • "lastFailureAt": "2018-04-11T00:18:57.946Z",
  • "lastFailureContent": "500 Server Error",
  • "lastSuccessAt": "2018-04-11T00:18:57.946Z"
}

Update a webhook subscription

Updates parameters for an existing webhook subscription.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

webhookId
required
string <uuid>
Example: f88ba9d9-037d-41df-a49c-49798701ed41

ID of the webhook subscription.

Request Body schema: application/json

Parameters for the webhook subscription.

name
string

Name of the webhook subscription.

target
string <url>

The target URL where webhook payloads will be sent

object (WebhookFilter)

Filter set for the webhook subscription.

Responses

Response Schema: application/json
type
required
string
Value: "webhook"

The type of this resource.

id
required
string

ID of the Coda webhook subscription.

resource
required
string (WebhookWatchedResource)
Value: "auditEvents"

Type of resource a webhook is subscribed to.

target
required
string <url>

The target URL where webhook payloads will be sent

createdAt
required
string <date-time>

Timestamp for when the webhook subscription was created.

state
required
string

The current state of the webhook subscription.

name
string

Name of the webhook subscription.

signatureKey
string

Key used to generate HMAC payload signatures; should be used to verify the signature of incoming webhook notifications.

object (WebhookFilter)

Filter set for the webhook subscription.

lastFailureAt
string <date-time>

Timestamp for when the webhook last received an error while attempting to send a payload to the target.

lastFailureContent
string

Last error reported by the target.

lastSuccessAt
string <date-time>

Timestamp for when the webhook last successfully sent a payload to the target.

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "type": "webhook",
  • "id": "f88ba9d9-037d-41df-a49c-49798701ed41",
  • "name": "My webhook",
  • "signatureKey": "string",
  • "resource": "auditEvents",
  • "filters": {
    },
  • "createdAt": "2018-04-11T00:18:57.946Z",
  • "state": "Active",
  • "lastFailureAt": "2018-04-11T00:18:57.946Z",
  • "lastFailureContent": "500 Server Error",
  • "lastSuccessAt": "2018-04-11T00:18:57.946Z"
}

Deletes a webhook subscription

Deletes a webhook subscription.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

webhookId
required
string <uuid>
Example: f88ba9d9-037d-41df-a49c-49798701ed41

ID of the webhook subscription.

Responses

Response Schema: application/json
object (DeleteWebhookResult)

The result of deleting a webhook subscription.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/webhooks/<your webhook id>'
res = requests.delete(uri, headers=headers, params=params, json=body).json()

print(f'Deleted the webhook subscription')

Response samples

Content type
application/json
{ }

Reset a webhook subscription

Resets a webhook subscription. Will force re-initialization of the webhook subscription, including the initial handshake process. Used to re-start a webhook that previously failed the initial handshake or that has become disabled due to the target failing too many consecutive webhook payloads.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

webhookId
required
string <uuid>
Example: f88ba9d9-037d-41df-a49c-49798701ed41

ID of the webhook subscription.

Responses

Response Schema: application/json
type
required
string
Value: "webhook"

The type of this resource.

id
required
string

ID of the Coda webhook subscription.

resource
required
string (WebhookWatchedResource)
Value: "auditEvents"

Type of resource a webhook is subscribed to.

target
required
string <url>

The target URL where webhook payloads will be sent

createdAt
required
string <date-time>

Timestamp for when the webhook subscription was created.

state
required
string

The current state of the webhook subscription.

name
string

Name of the webhook subscription.

signatureKey
string

Key used to generate HMAC payload signatures; should be used to verify the signature of incoming webhook notifications.

object (WebhookFilter)

Filter set for the webhook subscription.

lastFailureAt
string <date-time>

Timestamp for when the webhook last received an error while attempting to send a payload to the target.

lastFailureContent
string

Last error reported by the target.

lastSuccessAt
string <date-time>

Timestamp for when the webhook last successfully sent a payload to the target.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/webhooks/<your webhook id>/reset'
res = requests.post(uri, headers=headers).json()

print(f'Webhook subscription has been reset')

Response samples

Content type
application/json
{
  • "type": "webhook",
  • "id": "f88ba9d9-037d-41df-a49c-49798701ed41",
  • "name": "My webhook",
  • "signatureKey": "string",
  • "resource": "auditEvents",
  • "filters": {
    },
  • "createdAt": "2018-04-11T00:18:57.946Z",
  • "state": "Active",
  • "lastFailureAt": "2018-04-11T00:18:57.946Z",
  • "lastFailureContent": "500 Server Error",
  • "lastSuccessAt": "2018-04-11T00:18:57.946Z"
}

Workspaces

This API allows you to list and view your organization's workspaces.

List workspaces

Returns a list of workspaces in the organization

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

query Parameters
workspaceIds
Array of strings
Example: workspaceIds=ws-AbCDeFGHIj

Comma-separated list of workspace IDs

limit
integer [ 1 .. 500 ]
Default: 100
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.

query
string
Example: query=feature%parity

Search terms used to narrow down results.

includeAllWorkspaceData
boolean

Include optional workspace data in the response.

Responses

Response Schema: application/json
required
Array of objects (Workspace)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces'
res = requests.get(uri, headers=headers).json()

print(f'First workspace is: {res["items"][0]["name"]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces?pageToken=eyJsaW1pd"
}

Get workspace

Returns the requested workspace.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

workspaceId
required
string
Example: ws-AbCDeFGHIj

ID of the workspace.

Responses

Response Schema: application/json
type
required
string
Value: "workspace"

The type of this resource.

id
required
string

ID of the Coda workspace.

name
required
string

Name of the workspace.

featureSet
string (FeatureSet)
Deprecated
Enum: "Free" "Pro" "Team" "Enterprise"

Pricing plan associated with a workspace.

autoJoinDomains
Array of strings <domain>

When enabled for the org new users matching the specified auto-join domains will get added as workspace members.

truncatedAutoJoinDomains
boolean

Whether the auto-join domains list is truncated; if true use a paginated query to fetch all domains.

numDocMakerAdmins
integer

Number of Doc Maker Admins in the workspace.

numDocMakers
integer

Number of Doc Makers in the workspace.

numEditors
integer

Number of Editors in the workspace.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces/<your workspace id>'
res = requests.get(uri, headers=headers).json()

print(f'Workspace name is: {res["name"]}')

Response samples

Content type
application/json
{
  • "type": "workspace",
  • "id": "ws-1Ab234",
  • "name": "coda.io",
  • "featureSet": "Free",
  • "autoJoinDomains": [
    ],
  • "truncatedAutoJoinDomains": false,
  • "numDocMakerAdmins": 3,
  • "numDocMakers": 13,
  • "numEditors": 5
}

Workspace Users

This API enables viewing and modifying user membership within a workspace.

List workspace users

Returns a list of users within a workspace.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

workspaceId
required
string
Example: ws-AbCDeFGHIj

ID of the workspace.

query Parameters
limit
integer [ 1 .. 500 ]
Default: 100
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.

workspaceUserRoles
Array of strings (WorkspaceUserRole)
Items Enum: "Admin" "DocMaker" "Editor"

Filter results to users based on their role in the workspace

Responses

Response Schema: application/json
required
Array of objects (WorkspaceUser)
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.

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces/<your workspace id>/users'
res = requests.get(uri, headers=headers, params=params).json()

print(f'First user is: {res["items"][0]["email"]}')

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "href": "https://coda.io/apis/admin/v1/organizations/org-1AbcdeFgh1/workspaces/ws-n123897sfd/users?limit=20",
  • "nextPageToken": "eyJsaW1pd",
  • "nextPageLink": "https://coda.io/apis/admin/v1/organizations/org-1AbcdeFgh1/workspaces/ws-n123897sfd/users?pageToken=eyJsaW1pd"
}

Add workspace user

Adds an existing user to a workspace.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

workspaceId
required
string
Example: ws-AbCDeFGHIj

ID of the workspace.

Request Body schema: application/json

Parameters for the workspace user.

email
required
string

The email address of the existing user to add to the workspace.

role
required
string (WorkspaceUserRole)
Enum: "Admin" "DocMaker" "Editor"

Responses

Response Schema: application/json
id
required
number

Unique id of the user.

email
required
string

Email of the user.

role
required
string (WorkspaceUserRole)
Enum: "Admin" "DocMaker" "Editor"
name
required
string

Name of the user.

registeredAt
required
string <date-time>

Timestamp for when the user registered in this workspace

pictureUrl
string <url>

Picture url of the user.

roleChangedAt
string <date-time>

Timestamp for when the user's role last changed in this workspace.

lastActiveAt
string <date-time>

Member's last login date to Coda.

docsLastActiveAt
string <date-time>

The last date anyone used any of the member's Total docs.

totalDocs
number

Docs the member owns, is an admin of, or has taken a Doc Maker action on in the last 90 days.

totalCollaborators
number

Unique members who have viewed any of the member's Total docs in the last 90 days.

Request samples

Content type
application/json
{
  • "email": "joe@example.com",
  • "role": "Admin"
}

Response samples

Content type
application/json
{
  • "id": 12345,
  • "email": "hello@coda.io",
  • "role": "Admin",
  • "name": "Sally Jane",
  • "pictureUrl": "codahosted.io/123",
  • "registeredAt": "2018-04-11T00:18:57.946Z",
  • "roleChangedAt": "2018-04-11T00:18:57.946Z",
  • "lastActiveAt": "2018-04-11T00:18:57.946Z",
  • "docsLastActiveAt": "2018-04-11T00:18:57.946Z",
  • "totalDocs": 2,
  • "totalCollaborators": 5
}

Update workspace user role

Updates the role of the given user in the workspace.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

workspaceId
required
string
Example: ws-AbCDeFGHIj

ID of the workspace.

userEmail
required
string <email>
Example: april@example.com

User to act upon.

Request Body schema: application/json

Parameters for the workspace user.

role
required
string (WorkspaceUserRole)
Enum: "Admin" "DocMaker" "Editor"

Responses

Response Schema: application/json
id
required
number

Unique id of the user.

email
required
string

Email of the user.

role
required
string (WorkspaceUserRole)
Enum: "Admin" "DocMaker" "Editor"
name
required
string

Name of the user.

registeredAt
required
string <date-time>

Timestamp for when the user registered in this workspace

pictureUrl
string <url>

Picture url of the user.

roleChangedAt
string <date-time>

Timestamp for when the user's role last changed in this workspace.

lastActiveAt
string <date-time>

Member's last login date to Coda.

docsLastActiveAt
string <date-time>

The last date anyone used any of the member's Total docs.

totalDocs
number

Docs the member owns, is an admin of, or has taken a Doc Maker action on in the last 90 days.

totalCollaborators
number

Unique members who have viewed any of the member's Total docs in the last 90 days.

Request samples

Content type
application/json
{
  • "role": "Admin"
}

Response samples

Content type
application/json
{
  • "id": 12345,
  • "email": "hello@coda.io",
  • "role": "Admin",
  • "name": "Sally Jane",
  • "pictureUrl": "codahosted.io/123",
  • "registeredAt": "2018-04-11T00:18:57.946Z",
  • "roleChangedAt": "2018-04-11T00:18:57.946Z",
  • "lastActiveAt": "2018-04-11T00:18:57.946Z",
  • "docsLastActiveAt": "2018-04-11T00:18:57.946Z",
  • "totalDocs": 2,
  • "totalCollaborators": 5
}

Removes a user from a workspace

Removes a user from a workspace. Note this does not remove the user from Coda or from other workspaces.

Authorizations:
Bearer
path Parameters
organizationId
required
string
Example: org-AbCDeFGHIj

ID of the organization.

workspaceId
required
string
Example: ws-AbCDeFGHIj

ID of the workspace.

userEmail
required
string <email>
Example: april@example.com

User to act upon.

Responses

Response Schema: application/json
object (RemoveWorkspaceUserResponse)

Result of the user workspace removal request

Request samples

import requests

headers = {'Authorization': 'Bearer <your API token>'}
uri = 'https://coda.io/apis/admin/v1/organizations/<your organization id>/workspaces/<your workspace id>/users/<user email>'
res = requests.delete(uri, headers=headers, params=params, json=body).json()

print(f'Removed the user from the workspace')

Response samples

Content type
application/json
{ }