REST API

The Donotname REST API lets you create, read, update, and delete records programmatically. Use it to integrate with external applications, build custom workflows, or sync data between systems.

Authentication

Personal Access Token page

All API requests require an access token. To create one:

  1. Go to Settings > API Tokens
  2. Click "Create Token"
  3. Name your token and select the scopes (permissions) it needs
  4. Copy the generated token -- it is shown only once

Include the token in the Authorization header of every request:

Authorization: Bearer <your-access-token>

Security tips:

  • Store tokens securely -- never commit them to source control
  • Use the minimum required scopes
  • Rotate tokens periodically
  • Revoke tokens that are no longer needed

Base URL

All API endpoints are relative to:

https://app.donotname.com/api

Records

List Records

Retrieve records from a table with optional filtering, sorting, and pagination.

GET /api/table/{tableId}/record

Query parameters:

ParameterTypeDescription
viewIdstringOptional. Use the filters and sorts of a specific view.
filterstringOptional. JSON filter object (see Filtering below).
orderBystringOptional. JSON sort specification.
takenumberOptional. Number of records to return (default 100, max 2000).
skipnumberOptional. Number of records to skip (for pagination).
fieldKeyTypestringOptional. "name" to use field names as keys instead of field IDs.

Example request:

curl "https://app.donotname.com/api/table/tbl_abc123/record?take=10&fieldKeyType=name" \
  -H "Authorization: Bearer YOUR_TOKEN"

Example response:

{
  "records": [
    {
      "id": "rec_xyz789",
      "fields": {
        "Name": "Acme Corp",
        "Status": "Active",
        "Revenue": 50000
      },
      "createdTime": "2025-03-15T10:30:00.000Z"
    }
  ],
  "offset": null
}

Get a Single Record

GET /api/table/{tableId}/record/{recordId}

Example:

curl "https://app.donotname.com/api/table/tbl_abc123/record/rec_xyz789?fieldKeyType=name" \
  -H "Authorization: Bearer YOUR_TOKEN"

Create Records

Create one or more records in a single request.

POST /api/table/{tableId}/record

Request body:

{
  "records": [
    {
      "fields": {
        "Name": "New Company",
        "Status": "Lead",
        "Revenue": 0
      }
    },
    {
      "fields": {
        "Name": "Another Company",
        "Status": "Active",
        "Revenue": 25000
      }
    }
  ],
  "fieldKeyType": "name"
}

Example:

curl -X POST "https://app.donotname.com/api/table/tbl_abc123/record" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "records": [{"fields": {"Name": "New Lead", "Status": "Lead"}}],
    "fieldKeyType": "name"
  }'

Response: Returns the created records with their generated IDs.

Update a Single Record

PATCH /api/table/{tableId}/record/{recordId}

Request body:

{
  "record": {
    "fields": {
      "Status": "Closed Won",
      "Revenue": 75000
    }
  },
  "fieldKeyType": "name"
}

Example:

curl -X PATCH "https://app.donotname.com/api/table/tbl_abc123/record/rec_xyz789" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"record": {"fields": {"Status": "Active"}}, "fieldKeyType": "name"}'

Update Multiple Records

Update several records in a single request.

PATCH /api/table/{tableId}/record

Request body:

{
  "records": [
    {
      "id": "rec_xyz789",
      "fields": {
        "Status": "Active"
      }
    },
    {
      "id": "rec_abc456",
      "fields": {
        "Status": "Inactive"
      }
    }
  ],
  "fieldKeyType": "name"
}

Delete a Record

DELETE /api/table/{tableId}/record/{recordId}

Example:

curl -X DELETE "https://app.donotname.com/api/table/tbl_abc123/record/rec_xyz789" \
  -H "Authorization: Bearer YOUR_TOKEN"

Delete Multiple Records

DELETE /api/table/{tableId}/record?recordIds=rec_xyz789&recordIds=rec_abc456

Duplicate a Record

POST /api/table/{tableId}/record/{recordId}/duplicate

Creates a copy of the specified record with all its field values.

Attachments

Upload a File

Upload a file to an attachment field on a specific record.

POST /api/table/{tableId}/record/{recordId}/{fieldId}/uploadAttachment

Send the file as multipart/form-data with the field name file:

curl -X POST "https://app.donotname.com/api/table/tbl_abc123/record/rec_xyz789/fld_attach1/uploadAttachment" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -F "file=@/path/to/document.pdf"

Alternatively, provide a URL to download:

curl -X POST "https://app.donotname.com/api/table/tbl_abc123/record/rec_xyz789/fld_attach1/uploadAttachment" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"fileUrl": "https://example.com/image.png"}'

Filtering

Use the filter query parameter to retrieve only records matching specific conditions. The filter is a JSON string.

Filter Structure

{
  "filterSet": [
    {
      "fieldId": "fld_abc123",
      "operator": "is",
      "value": "Active"
    }
  ],
  "conjunction": "and"
}

Available Operators

OperatorDescriptionField Types
isExact matchText, Select, Checkbox
isNotNot equalText, Select, Checkbox
containsContains substringText
doesNotContainDoes not containText
isEmptyField is emptyAll
isNotEmptyField is not emptyAll
isGreaterGreater thanNumber, Date
isLessLess thanNumber, Date
isGreaterEqualGreater than or equalNumber, Date
isLessEqualLess than or equalNumber, Date
isBeforeBefore dateDate
isAfterAfter dateDate
isWithInWithin date rangeDate

Combining Filters

Use conjunction to combine multiple conditions:

  • "and" -- all conditions must match
  • "or" -- any condition must match
{
  "filterSet": [
    {"fieldId": "fld_status", "operator": "is", "value": "Active"},
    {"fieldId": "fld_revenue", "operator": "isGreater", "value": 10000}
  ],
  "conjunction": "and"
}

Sorting

Use the orderBy query parameter to sort results:

[
  {"fieldId": "fld_revenue", "order": "desc"},
  {"fieldId": "fld_name", "order": "asc"}
]

Pagination

Use take and skip to paginate through large result sets:

# First page (records 1-100)
GET /api/table/{tableId}/record?take=100&skip=0

# Second page (records 101-200)
GET /api/table/{tableId}/record?take=100&skip=100

Record History

Retrieve the change history for a specific record or for all records in a table.

GET /api/table/{tableId}/record/{recordId}/history
GET /api/table/{tableId}/record/history

Button Click

Trigger a button field programmatically:

POST /api/table/{tableId}/record/{recordId}/{fieldId}/button-click

This runs the automation attached to the button field.

Field Key Types

By default, the API uses field IDs (e.g., fld_abc123) as keys in the fields object. To use human-readable field names instead, add fieldKeyType=name to your requests.

With field IDs (default):

{"fields": {"fld_abc123": "Acme Corp", "fld_def456": "Active"}}

With field names:

{"fields": {"Company Name": "Acme Corp", "Status": "Active"}}

Rate Limits

The API enforces rate limits to ensure fair usage:

  • Standard: 10 requests per second per token
  • Batch operations: Each record in a batch counts as one operation

If you exceed the rate limit, the API returns 429 Too Many Requests. Implement exponential backoff in your client code.

Error Handling

The API returns standard HTTP status codes:

CodeMeaning
200Success
201Created
400Bad request (invalid parameters)
401Unauthorized (invalid or missing token)
403Forbidden (insufficient permissions)
404Not found (invalid table or record ID)
429Rate limited
500Internal server error

Error responses include a JSON body with details:

{
  "message": "Record not found",
  "statusCode": 404
}

Example: Sync External Data

This example fetches leads from an external CRM and creates records in Donotname:

const API_BASE = "https://app.donotname.com/api";
const TABLE_ID = "tbl_abc123";
const TOKEN = process.env.DNN_API_TOKEN;

async function syncLeads(leads) {
  const records = leads.map(lead => ({
    fields: {
      "Name": lead.name,
      "Email": lead.email,
      "Phone": lead.phone,
      "Source": "External CRM",
      "Status": "New Lead"
    }
  }));

  const response = await fetch(`${API_BASE}/table/${TABLE_ID}/record`, {
    method: "POST",
    headers: {
      "Authorization": `Bearer ${TOKEN}`,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({ records, fieldKeyType: "name" })
  });

  if (!response.ok) {
    throw new Error(`API error: ${response.status}`);
  }

  return response.json();
}