Authentication overview

Authentication for the Monday.com API centers on the use of Personal Access Tokens (PATs). These tokens are alphanumeric strings that serve as unique identifiers and authenticators for API requests, linking the programmatic access to a specific user's account and their associated permissions within Monday.com. When an application makes a request to the Monday.com API, it includes the PAT in the request header, allowing the API to verify the identity of the requester and authorize access to the requested resources, such as boards, items, and users. This method ensures that API interactions are performed securely and within the boundaries of the token holder's privileges.

The Monday.com API is a GraphQL API, which influences how authentication is integrated into requests. Unlike REST APIs that often use different endpoints for various resources, GraphQL typically uses a single endpoint, with the query or mutation defining the action. The authentication token is consistently applied to all requests made to this endpoint, regardless of the specific data being fetched or modified. This unified approach simplifies client-side implementation once the token is obtained and configured, as the same authentication mechanism applies across all API operations.

Understanding the permissions associated with the user account that generates the PAT is critical. The API token inherits the permissions of the user who created it, meaning if a user can only view certain boards, an API token generated by that user will also only be able to view those boards. Conversely, if a user has administrative privileges, their PAT will grant similar broad access programmatically. Developers are advised to generate tokens with the minimum necessary permissions to adhere to the principle of least privilege, enhancing the security posture of integrations.

Supported authentication methods

The primary and recommended authentication method for the Monday.com API is the use of Personal Access Tokens (PATs). While Monday.com is an expansive platform with various integrations, its direct API access for custom applications relies on these tokens for security and simplicity. Other authentication methods, such as OAuth 2.0, are typically employed when building public-facing applications or integrations for the Monday.com Apps Marketplace, where user consent and delegated access are paramount. For direct server-to-server or private application integrations, PATs are the standard.

Personal Access Tokens (PATs)

Personal Access Tokens are long-lived credentials that provide direct access to your Monday.com account via the API. Each PAT is associated with a specific user account and inherits that user's permissions. When creating a PAT, users have the option to define its scope, limiting the token's access to specific actions (e.g., read-only access to boards, ability to create items, etc.). This granular control enhances security by allowing developers to restrict what an application can do even if the token is compromised.

The table below summarizes the primary authentication method:

Method When to Use Security Level
Personal Access Token (PAT)
  • Private integrations
  • Server-side applications
  • Scripts automating personal workflows
  • Internal tools that manage Monday.com data
  • High (when scopes are correctly applied)
  • Requires secure storage and handling
  • Tied to user permissions
OAuth 2.0
  • Public Monday.com Apps Marketplace integrations
  • Third-party applications requiring user consent
  • When delegated authorization is necessary
  • High (industry standard for delegated access)
  • Tokens are short-lived and refreshable
  • Requires more complex implementation

Getting your credentials

To obtain a Personal Access Token for the Monday.com API, you must navigate to your Monday.com account settings. The process generally involves logging into your Monday.com account and accessing the developer or API section within your profile. Specific steps for generating a token are available in the Monday.com API authentication documentation.

Steps to generate a Personal Access Token:

  1. Log in to your Monday.com account.
  2. Click on your profile picture (avatar) in the bottom-left corner.
  3. Select "Admin" (if you are an admin) or "Developers" from the menu.
  4. Navigate to the "My Access Tokens" tab or equivalent section.
  5. Click "Generate new token" or "Create token".
  6. Provide a descriptive name for your token (e.g., "My Integration App").
  7. (Optional but recommended) Define the scopes or permissions for the token. This limits what the token can do.
  8. Click "Generate" or "Create" to generate the token.
  9. Copy the displayed token immediately. Monday.com typically shows the token only once upon creation, and you will not be able to retrieve it again. If lost, you will need to generate a new one.

It's crucial to store this token securely, as anyone with access to it can perform actions on your Monday.com account within the token's defined permissions. Treat PATs with the same level of security as you would a password or private key.

Authenticated request example

Once you have obtained your Personal Access Token, you can include it in your API requests. For the Monday.com GraphQL API, the token is typically sent in the Authorization header of your HTTP request. The header should be formatted as Bearer YOUR_PERSONAL_ACCESS_TOKEN.

Here's an example using curl to query a board's items, demonstrating how to include the authentication token:

curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: YOUR_PERSONAL_ACCESS_TOKEN" \
  -d '{"query": "query { boards(ids: 123456789) { items { name column_values { title text } } } }"}' \
  https://api.monday.com/v2

In this example:

  • YOUR_PERSONAL_ACCESS_TOKEN should be replaced with the actual token you generated.
  • 123456789 should be replaced with the actual ID of your Monday.com board.
  • The -H "Authorization: YOUR_PERSONAL_ACCESS_TOKEN" header is where the token is passed.
  • The -d flag contains the GraphQL query as a JSON string.

For programmatic access using one of the Monday.com SDKs (JavaScript, Python, Ruby), the SDKs handle the underlying HTTP request and header formatting. You typically initialize the SDK client with your token, and it then manages authentication for subsequent API calls. For instance, in JavaScript:

const mondaySdk = require("monday-sdk-js");
const monday = mondaySdk();

monday.set("token", "YOUR_PERSONAL_ACCESS_TOKEN");

// Example query
async function getBoardItems(boardId) {
  try {
    const { data } = await monday.api(
      `query { boards(ids: ${boardId}) { items { name column_values { title text } } } }`
    );
    console(data);
  } catch (err) {
    console("Error fetching board items:", err);
  }
}

getBoardItems(123456789);

Remember to install the Monday.com SDK for your chosen language (e.g., npm install monday-sdk-js for JavaScript) before running such code.

Security best practices

Securing your Monday.com API integrations is paramount to protect your data and prevent unauthorized access. Adhering to established security best practices for API keys and tokens is essential.

1. Secure storage of Personal Access Tokens

  • Environment Variables: Never hardcode PATs directly into your application's source code. Instead, store them in environment variables. This keeps sensitive information out of version control and allows for easy rotation without code changes.
  • Secrets Management Systems: For production environments, utilize dedicated secrets management services like Google Cloud Secret Manager, AWS Secrets Manager, or Azure Key Vault. These services provide secure storage, access control, and auditing capabilities for your API credentials.
  • Local Development: During local development, use .env files or similar mechanisms to manage tokens, ensuring these files are excluded from version control (e.g., via .gitignore).

2. Principle of Least Privilege

  • When generating a PAT, grant it only the minimum necessary permissions required for your application to function. If an application only needs to read items, do not grant it permission to create or delete items. This limits the damage if a token is compromised.
  • Regularly review the permissions associated with your tokens and adjust them as your application's needs evolve.

3. Token rotation and expiration

  • While Monday.com PATs do not inherently expire, it is a good security practice to implement a strategy for regular token rotation. This means generating a new token and replacing the old one periodically (e.g., every 90 days).
  • If a token is suspected of being compromised, immediately revoke it from your Monday.com account settings and generate a new one.

4. HTTPS/TLS encryption

  • All communication with the Monday.com API occurs over HTTPS, ensuring that data transmitted between your application and the API is encrypted in transit. Verify that your application is configured to enforce HTTPS for all API calls to prevent man-in-the-middle attacks.

5. Error handling and logging

  • Implement robust error handling in your application to gracefully manage authentication failures. Avoid logging tokens or sensitive authentication details in plain text in your application logs.
  • Log authentication attempts and failures (without exposing tokens) to monitor for suspicious activity and aid in incident response.

6. IP whitelisting (if available/applicable)

  • Check if Monday.com offers IP whitelisting capabilities for API access. If so, restrict API access to a predefined set of trusted IP addresses. This adds an extra layer of security, ensuring that even if a token is stolen, it can only be used from authorized locations.

7. Code review and security testing

  • Regularly review your codebase for any accidental exposure of API tokens.
  • Conduct security testing (e.g., penetration testing, vulnerability scanning) on your applications that integrate with the Monday.com API to identify and remediate potential security weaknesses.