hamburger icon "
curl node python java php ruby

Overview

Helpful code snippets will show up in this column.

curl https://app.asana.com/api/1.0/users/me \
  -H "Authorization: Bearer 0/a7f89e98g007e0s07da763a"

The Asana API is a RESTful interface, providing programmatic access to much of the data in the system. It provides predictable URLs for accessing resources, and uses built-in HTTP features to receive commands and return responses. This makes it easy to communicate from a wide variety of environments: command-line utilities, gadgets, and even the browser URL bar itself.

The API accepts JSON or form-encoded content in requests and returns JSON content in all of its responses, including errors. Only UTF-8 character encoding is supported for both requests and responses.

For quick access to REST API resources and object schemas, see:

Was this section helpful? Yes No


Object hierarchy

Asana object hierarchy

Asana is a work tracking and collaboration tool. This guide is designed to give developers a brief overview of how Asana is structured. It is not meant to be exhaustive, as the intention is to describe the fundamental elements of Asana to help you scope apps and avoid common points of confusion.

How work is organized

Tasks

Tasks are the basic unit of action in Asana. Tasks have many fields including a single assignee, name, notes, followers (i.e., collaborators), likes, and comments (among others). Tasks inherit custom fields from their parent project(s). Custom fields values are set for each individual task.

In addition to standard Create / Read / Update / Delete operations, there are a few things to watch out for when working with tasks:

  1. Tasks can be orphaned and belong to no projects, they can belong to one project, or they can be multi-homed across two or more projects. The memberships field is a collection of the projects with which the task is associated.
  2. Tasks can be multi-homed as subtasks. For example, task A can be in project B and the same task A can also be a subtask of task C.

Projects

A project is a collection of tasks that can be viewed as a list, board, timeline, and calendar. Projects can only exist in a single organization or workplace and only belong to a single team. Projects can be public in the team or private to project members. Among the many fields associated with projects, they can have global (shared across the organization) or local (project-specific) custom fields. A project’s custom fields will be displayed on each task within the project.

Portfolios

Portfolios are collections of projects (or other portfolios). Custom fields can be added to portfolios in addition to standard fields that are displayed on every portfolio. These fields provide a high-level overview of the status of each project within the portfolio.

Sections

A section is a group of tasks within a project. Sections let you divide tasks into categories, workflow stages, priorities, and more.

Subtasks

A subtask is exactly the same as tasks in a project, except that one (and only one) of its parents is a task (although subtasks can also simultaneously be organized into projects). To check if a task has a subtask, include the num_subtasks field when fetching the parent task.

Things to note when working with subtasks:

  1. Subtasks do not inherit the projects of their parent tasks.
  2. There can be up to 5 levels of subtasks below a task. We do not recommend making sub-subtasks.
  3. There is no way to fetch all subtasks of all tasks in a project in a single request.


How users are organized

Workspaces

A workspace is the highest-level organizational unit in Asana. All projects, tasks, and teams have an associated workspace.

Organizations

An organization is a special kind of workspace that represents a company. Organizations connect all the employees at a company using Asana in a single space based on the company’s shared email domain. In an organization, you can group your projects into teams.

Teams

Teams are a subset of users in an organization who collaborate on projects together. Every project in an organization is associated with one team. Team messages are not currently available in the API.

Users

A user object represents an account in Asana that can be given access to various workspaces, projects, and tasks. Asana accounts are free and tied to individuals; Asana accounts grant access to one or more shared workspaces and organizations to collaborate with other Asana users.

Guest users

Users can invite clients, contractors, customers, or anyone else who does not have an email address at an approved organization email domain. These users join as organization guests. Guests have limited access in an organization. That is, guests can only see what is explicitly shared with them.

Note: it can be advantageous to use guests to create "bot" accounts. Due to the access restrictions, bots created from a guest account personal access token can be given fine-grained access to only the data that it needs to use.

Was this section helpful? Yes No


Developer sandbox

Before moving forward with making sample API requests or building apps that leverage that Asana API, we recommend first getting an Asana developer sandbox. A developer sandbox is a temporary Asana domain with limited users. This is a standard Asana account where you can test Asana Premium features during development.

Developer sandboxes are intended for:

  • Developers building or maintaining a third-party integration with Asana (i.e., submit your completed integration to get listed in our app directory)
  • Existing Asana Premium customers or higher tiers who require a separate environment to perform risk-free testing on the API
  • Sandboxes can include Enterprise, Business, and Premium features upon request and valid for a maximum of one year
  • Extensions requested after one year will go through Legal review. Approval is not guaranteed but you may be eligible to request a new sandbox

To request a developer sandbox, please fill out and submit this form.

Was this section helpful? Yes No


How to use the API

Request

https://app.asana.com/api/1.0/users/me

If you are familiar with building against APIs, you make skip this section and review our code examples.

If you are new to developing on APIs, you may begin here. In this guide, you'll learn how to make a simple Asana API request: getting your user information.

To get started:

  1. Be logged into Asana.
  2. Go to this URL: https://app.asana.com/api/1.0/users/me

me is a user identifier that refers to the logged-in user. A user identifier can be either me, an email_address, or the GID of the user.

Response

{
  "data": {
    "gid": "12e345a67b8910c11",
    "email": "jonsnow@example.com",
    "name": "Jon Snow",
    "photo": {
      "image_21x21": "https://s3.amazonaws.com/profile_photos/121110987654321.hJGlskahcKA5hdslf4FS_21x21.png",
      "image_27x27": "https://s3.amazonaws.com/profile_photos/121110987654321.hJGlskahcKA5hdslf4FS_27x27.png",
      "image_36x36": "https://s3.amazonaws.com/profile_photos/121110987654321.hJGlskahcKA5hdslf4FS_36x36.png",
      "image_60x60": "https://s3.amazonaws.com/profile_photos/121110987654321.hJGlskahcKA5hdslf4FS_60x60.png",
      "image_128x128": "https://s3.amazonaws.com/profile_photos/121110987654321.hJGlskahcKA5hdslf4FS_128x128.png"
    },
    "resource_type": "user"
  }
}

Congratulations! You’ve just made your first Asana API request (for which you've received a response). Let’s explore what just happened.

Making a request

The base URL for all requests to the Asana API is https://app.asana.com/api/1.0. We want information about users, so we go down a level to the https://app.asana.com/api/1.0/users resource. Then, within the set of all users in Asana, we’re specifically looking to get information about our own account. We do so by adding /me to get https://app.asana.com/api/1.0/users/me. The /me part would ordinarily be an identifier (i.e., a long number) or email address of the user, but we've created this shorthand for getting the current user of Asana's API, whomever that may be. With everything put together, the result is the URL to get your user information from Asana: https://app.asana.com/api/1.0/users/me.

Since every API request you make will start with the same base URL (https://app.asana.com/api/1.0), in this documentation we'll generally refer to the URL by its resoruce or relative path. For instance, when we say /users/me, we are using this as a shorthand for the entire URL: https://app.asana.com/api/1.0/users/me.

Note that for requests that query for multiple objects, pagination is highly recommended. Requests with large result sets may timeout or be truncated; therefore, pagination is strongly encouraged to ensure both you and your users have the best experience when using the Asana API.

Receiving a response

After requesting information from the API, you will receive a response in JSON format, which can be read and understood by both humans and computers. The response is structured in a particular way so programs can rely on a consistent format for the data.

Our API is documented for what resources are available and what sort of return data to expect. For example, here is the documentation for the /users endpoint, which we just called (i.e., requested) earlier. This is where you can discover what is possible with our API.

Next steps

In the next section, we'll make the same request to /users/me more like software would. Before we do so, we’ll need to get access outside of your web browser to the API.

Was this section helpful? Yes No


Authenticating

Similar to entering your username/password into a website or logging into Asana with Google, when you access your Asana data via the API, you need to authenticate. In the above example, you were already logged into Asana in your browser, so you were able to authenticate to the API with credentials stored by your browser.

If you want to write a script that interacts with the Asana API, a quick method is to first get a personal access token (PAT), which you can think of as your unique password for accessing the API.

App or PAT?

If your app needs to perform actions on behalf of users, you should use OAuth.

Getting a personal access token (PAT)

Example PAT

0/68a9e79b868c6789e79a124c30b0
  1. Open the developer console (also accessible by clicking on your profile photo in the Asana app, then selecting "My Settings" > Apps > "Manage Developer Apps").

  2. Select + Create new token.

  3. Enter a description (i.e., you’ll use the personal access token for).

  4. Click Create token.

  5. Copy your token and store it securely. You will only see this token displayed one time, but you can always create another PAT later.

Note: Treat your PAT like you would a password. Do not share it and do not display it online.

Was this section helpful? Yes No


Using cURL

cURL request

curl https://app.asana.com/api/1.0/users/me \
  -H "Authorization: Bearer 0/123456789abcdef"

You may use cURL, a command line program to make HTTP requests. MacOS and many Linux distributions have cURL pre-installed, and it is also available for download on Windows and many other operating systems. For more information about the tool, you visit cURL's documentation.

To begin:

Response

{
  data: {
    gid: "<your gid>",
    email: "<your email>"
    name: "<your name>",
    ...
  }
}
  1. Open a terminal (instructions for Mac and Windows).

  2. Copy/paste the cURL request on the right (make sure to enter your personal access token instead of the placeholder after the word "Bearer", otherwise you will see a "Not Authorized" message):

  3. Press Enter/Return on your keyboard.

You should see the response in your terminal! In our API documentation, we will often write examples as cURL commands, since it is a "middle-of-the-road" approach to accessing our API -- more flexible than using a browser, but user-friendly enough to be functional right out-of-the-box.

At this point, you are ready to begin development against the API! Asana has client libraries in several popular coding languages. Using these libraries has several advantages (e.g., managing authorization, retrying errors, etc.) that make them a good place to go from here. In the examples section, feel free to see how you can make the same /users/me request in Python, JavaScript, and Ruby.

Was this section helpful? Yes No


Using Postman

You can quickly get started on Asana's API with the API explorer. However, if you want a more comprehensive experience making API requests, we recommend using Postman. You can get started with the Run in Postman button!

Once you have the collection, you should create an environment.

You should then set:

  1. An authentication_token to a personal access token (PAT). If you don't have one yet, visit personal access token for details.
  2. A workspace to your workspace's GID. You can find this value via a logged-in browser by going to https://app.asana.com/api/1.0/users/me/workspaces, or you can make a request to that endpoint using your PAT.
  3. Any other GIDs you want to easily access. For example, you can set task to the GID of a task that you regularly test with, project to the GID of a private sandbox project, and user to the string 'me'.

There is no need to edit your environment for requests on different objects. You may simply navigate to the endpoint you want to use, then change the {{object}} to any GID you want.

Note: Importing this collection gives you a snapshot of the API at this time. To stay up to date with API changes, you'll have to re-import the collection by selecting the 'Run in Postman' button, and choosing to override your existing collection. As such, if you want to save custom requests, you should do so in a different collection.

Was this section helpful? Yes No


API explorer

The Asana API explorer is a tool to easily make API requests in your browser and quickly test various routes, fields, and parameters.

The explorer is not meant to be an exhaustive tool with every endpoint in the API. Instead, the API explorer is designed to be a simple tool to help developers quickly access the API and see examples of requests and responses fetching real Asana data. You should use the Postman Collection if you prefer a tool with complete coverage.

To get started, follow these steps:

  1. Visit the API explorer site: https://developers.asana.com/explorer

  2. Click the large button that says Click to authorize API Explorer. This will use your Asana credentials to provide cookie authentication for the requests you make in the explorer. Because the explorer uses your Asana account, it only allows read requests (i.e., GET) to protect against unintentionally changing your Asana data.

  3. Choose the resource you wish to query from the drop-down.

  4. In the next drop-down, choose your desired route for that resource.

  5. Under Include Fields, you have the option to select only the fields you would like to include in the response (see more about input/output options).

  6. The default response limit is 10. You can increase it up to 100.

  7. Add the required Attribute parameters. Note that task and project gids are in URLs when viewing those resources in the Asana web product (e.g., when viewing a task in a project: https://app.asana.com/0/'project-gid'/'task-gid').

  8. In subsequent requests, you may have a pagination token to paste into the Offset field.

  9. You have the option to include additional parameters in your request.

  10. Click Submit to send your request to the API. You will receive a JSON pretty-formatted response.

Was this section helpful? Yes No


Client libraries

Asana is committed to delivering a feature-rich API and developer experience. Part of this effort is through providing high-quality libraries you can use to access the API. The official libraries available are listed below, and more are in development. If you don't see what you need, please let us know in the developer forum or send us feedback.

Was this section helpful? Yes No


JavaScript (Node)

npm install asana

For use in the Node server-side JavaScript runtime.

Installation: Install with npm


JavaScript (browser)

<script src="asana-min.js"></script>

This is built with our Node library, so you get the same interface.

Installation: Visit the releases page to download the latest full or minified JS bundle, then include the script in your web page.


Python

pip install asana

Installation: Install with pip


Ruby

gem install asana

Installation: Install with gem


Java

<dependency>
  <groupId>com.asana</groupId>
  <artifactId>asana</artifactId>
  <version>0.10.1</version>
</dependency>

Installation: If you use Maven for dependency management simply include the following in your pom.xml.


PHP

"require": {
  "asana/asana": "^0.10.0"
}

Installation: If you use Composer to manage dependencies, you can include the "asana/asana" package as a dependency.


Common use cases

Collaboration across teams and tools works best when everyone stays in sync and processes flow easily and without friction. This is why we have Asana's API: it is a platform to ensure all of your information is up-to-date and that your teams stay efficient and informed.

Asana’s API provides a means for software and scripts to read information from inside Asana, input information from outside Asana, and automatically react when things change. This can include:

  • Consistently doing repetitive or tedious tasks.
  • Chaining a process together by responding to changes.
  • Creating reports on the state of tasks and projects.
  • Staying in sync with other software such as Slack or Salesforce used in your organization.
  • Pulling information from other locations like email or Evernote into Asana.
  • Adding new features on top of Asana.
  • Customizing Asana for your team’s processes and workflows.

The role of Asana's platform is to allow Asana to meet your team where you are and how you work. Asana is built to be flexible and powerful, to be intuitive enough for all teams to adopt and maintain clarity on who is doing what by when. Asana’s platform enables you to specialize this flexibility to maximize efficiency.

Here are some ideas for what you can build by leveraging the API:

Doing repetitive work

Integrations and bots are great for making sure that repetitive tasks are handled efficiently. Running a script with Asana's API can quickly take care of work such as moving cards between board columns, setting assignees or due dates based on the state of the task, or asking that all custom fields are set before work can begin on a task. This can save time and reduce overhead when trying to keep your projects clear and correct.

Reacting to changes

Workflows with Asana often follow a model of "when this task changes, do something." An example is moving tasks between projects based on its subtasks: if one team completes a subtask, move the parent task to the next team's project. Integrations can be built to respond in near-real time to changes in Asana, which helps move work forward.

Generating reports

Fetching the state of the tasks in a project or for your teammates can unlock the ability to create simple (or complex) metrics around how you are progressing. For example, you may want to track:

  • How many open tasks are there in the project?
  • Who has the most tasks assigned?
  • How often does the due date of each task get shifted back?

Our platform enables pulling data from Asana to make customized metrics to track your work.

Keeping in sync

Teams frequently use a multitude of software tools to accomplish work, from email to asset management to file storage. These specialized tools are often used with colleagues who don't track their work with Asana; and even if they do, keeping all of your tools in sync makes the transitions between tools straightforward to minimize "work about work."

Some of our integration partners, like Tray.io, Unito, and Zapier, offer syncing solutions out of the box with common workplace tools. You may also wish to build your own solution in cases where you need more flexibility, such as when connecting to customized or internally-built software.

Capturing work

Asana is built for teamwork and knowing who is doing what by when. Having an easy way to capture information in Asana makes it less likely that work will accidentally overlooked. For example, when communicating with people who work in other companies who aren't members of your Asana organization, an integration like we built for Gmail lets you create follow-up tasks with just a few clicks. Asana’s platform is a great way to pull information from many channels into Asana with minimum hassle.

Extending Asana

Asana is built to be a tool that works well for all teams. We build features into our core product that aren't overly opinionated about how you get work done. At the same time, there is opportunity for teams to use Asana in a specialized way or with specific additional features. When there are features that you'd like Asana to have, our platform is a resource to make them happen. For example, one of the goals for the popular app Instagantt is to provide additional features to Asana.

Customizing workflows

Integrations or scripts work great to maintain a custom workflow, saving a team member from having to continually pay attention to the state of tasks in Asana.

Whether it's ensuring that custom fields are filled out, tasks are completed, tasks live in the correct board-view column, or automatically assigning tasks at certain stages in your process, integrations can react to changes in Asana to ensure that everyone is up to date. When processes mature around how you get work done, it's a great time to use Asana's platform to make sure everything stays consistent and clear.

Check out some examples of integrations we've built on Asana in examples.

Was this section helpful? Yes No


Examples

Python Hello World


# Import the library
import asana

# Note: Replace this value with your own personal access token
personal_access_token = '0/123456789....'

# Construct an Asana client
client = asana.Client.access_token(personal_access_token)

# Set things up to send the name of this script to us to show that you succeeded! This is optional.
client.options['client_name'] = "hello_world_python"

# Get your user info
me = client.users.me()

# Print out your information
print("Hello world! " + "My name is " + me['name'] + "!")

In this brief tutorial, we'll build a GET request to /users/me using the Python client library. To get started, first run pip install asana or follow the detailed installation instructions on the GitHub page for the Python client library. Then, once the library is installed:

  1. Copy the example code on the right.

  2. Open a text editor and save this code in a file (i.e., a descriptive file name such as hello_world.py).

  3. Run this script in your console by passing it as an argument to the Python interpreter: python hello_world.py. You must execute this command in the same directory as the file.

  4. You should see the response outputted to the console.

As an aside, for clarity python-asana will also work with Python 3.x (with minor changes to the above example to make it compatible.)

All of the built-in functions can be found in the /gen folder of the client library.

You can see a variant of this script, and other useful Asana API scripts, in our open-source GitHub examples repository.

Was this section helpful? Yes No


Node Hello World

// Import the library
var asana = require('asana');

// Note: Replace this value with your own personal access token
var personalAccessToken = '0/123456789....';

// Construct an Asana client
var client = asana.Client.create().useAccessToken(personalAccessToken);

// Get your user info
client.users.me()
  .then(function(me) {
    // Print out your information
    console.log('Hello world! ' + 'My name is ' + me.name + '!');
});

In this brief tutorial, we'll build a GET request to /users/me using the Node client library. To get started, first run npm install asana or follow the detailed installation instructions on the GitHub page for the Node client library. Then, once the library is installed:

To get started, npm install asana or follow the detailed installation instructions on the GitHub page for the Node client library.

  1. Copy the example code on the right.

  2. Open a text editor and save this code in a file (i.e., a descriptive file name such as hello_world.js).

  3. Run this script in your console by passing it as an argument to the Python interpreter: node hello_world.js. You must execute this command in the same directory as the file.

  4. You should see the response outputted to the console.

All of the built-in functions can be found in the /gen folder of the client library.

You can see a variant of this script, and other useful Asana API scripts, in our open-source GitHub examples repository.

Was this section helpful? Yes No


Ruby Hello World

# Import the library (gem)
require 'asana'

# Note: Replace this value with your own personal access token
personal_access_token = '0/123456789....'

# Construct an Asana client
client = Asana::Client.new do |c|
  c.authentication :access_token, personal_access_token
end

# Get your user info
me = client.users.me

# Print out your information
puts "Hello world! " + "My name is " + me.name + "!"

In this brief tutorial, we'll build a GET request to /users/me using the Ruby client library. To get started, first run gem install asana or follow the detailed installation instructions on the GitHub page for the Ruby client library. Then, once the library is installed:

  1. Copy the example code on the right.

  2. Open a text editor and save this code in a file (i.e., a descriptive file name such as hello_world.rb).

  3. Run this script in your console by passing it as an argument to the Ruby interpreter: ruby hello_world.rb. You must execute this command in the same directory as the file.

  4. You should see the response outputted to the console.

All of the built-in methods can be found in the /resources folder of the client library.

You can see a variant of this script, and other useful Asana API scripts, in our open-source GitHub examples repository.


Workflow automation script

Asana's API enables customization and automation of your organization’s workflow through scripts built to specialize your use of Asana. Using Asana to track your work and leveraging Asana’s API to automate your processes is a powerful combination which can make your team much more efficient. Here's one example of how we do it at Asana.

Tracking timely responses to support questions

Asana’s developer relations team manages technical support for our API through a number of channels: support tickets, questions about our API and integrations forwarded on from our colleagues, the developer forum, Stack Overflow, pull requests, and bug reports from open-source GitHub projects like our client libraries, and more. Staying on top of all of these channels can be daunting, but we want our users to reach us however works best for them. At the same time, we want to isolate the noise of incoming requests for our colleagues at Asana who are involved with only one channel.

Additionally, the management of the question and answer process, triaging the incoming requests, troubleshooting with our engineers, and measuring our response performance are all internal processes. Even if we have a workflow in place to support our developer relations team, we want the experience for other teams to be easy and lightweight. We want to ensure our coworkers do the right things by default, without hindering the consistency of our work and our ability to track progress.

Our solution: automation and reporting through our API to provide consistent management of the whole process.

To do this, we wrote an integration with the following goals in mind:

  • Maintain clarity amongst our teams by tracking work in Asana.
  • Have only one place we have to look to stay in the loop.
  • Ensure that no questions get missed (i.e., a reminder bot.
  • Let our API users know that they've been heard in a timely fashion.
  • Track our performance in remaining responsive.
  • Automate some of the bookkeeping required to maintain a consistent workflow.
  • Separate the specifics of how we track our performance from our colleagues’ workflows.

The script we built does the following for us:

  1. Integrate with external sources to put incoming questions into Asana, one project per channel.
  2. Add question tasks from each incoming project into a single combined project.
  3. Acknowledge a question has been received and begin tracking response times.
  4. Upon first response, complete a task to signal relevant followers that we've reached out.

Maintain focus

We use webhooks to get notified in near-real time when new tasks are created in any of several Asana projects, one per incoming channel. Some of these projects are automatically synced with outside sources, others are available for our coworkers to create tasks in. Keeping tasks in their source channel helps keep us organized for where to go to respond. These projects are what our colleagues follow in order to remain focused on their own channels.

Our script responds to these webhook notifications from each project by adding these tasks into a single "Developer Questions" project. Our developer relations team can then see outstanding questions about our API in a single place. This is a key part offor reaching our service level agreement (SLA) goals: not having to cycle through many projects and channels to see how we're progressing.

Ensure timely responses

Once a question gets added to our Developer Questions project, our integration creates a subtask on it. This signals to our colleagues that we have received the question and will begin to triage and investigate. The subtask is completed when we first respond to our users to inform them that we're investigating. Completion of the question task itself signals that we've achieved a resolution for the party who reached out to us.

Track progress

Our script can generate a simple report to see which questions are still open, how long they’ve been open, and how much time we have left to answer before we miss our service level agreement limits. A simple webpage that the integration creates enables a high level view of what's still in progress and how timely we've been in the past.

Keep the process moving, automatically

Our integration also helps automate some of the routine steps to ensure questions get answered. After a task gets triaged for priority, our integration sets an appropriate due date. It can also set an assignee and followers based on current workload and by matching certain keywords in the task description. If the task approaches its due date and it has not received a response, the script comments on the task to alert us that the question is about to reach our SLA limit. This helps us keep the right people in the loop with minimal overhead and maximum clarity of what needs to be done by when.

By managing this routine and specialized workflow with automation through Asana’s API, our team is more efficient, more effective, and less likely to make a mistake. We know how responsive we've been and can see how we're doing at any time. We're better able to minimize the number of questions which may become overlooked. The result is better support for outside developers and increased focus on core work, rather than "work about work."

Over time, we've continuously optimized how our integration behaves to evolve our process, empowering us to adjust and iterate our approach. This is one of the key opportunities that Asana's API provides: ownership and control over how work gets done. Incremental improvements provide the chance to try out new workflows and settle on one that works well for everyone, leading to a more consistent and customized experience of using Asana.

For support or to generate ideas of how your team can work more effectively with Asana, visit the developer forum to chat with the community.

Was this section helpful? Yes No


Triage bot

Let’s start coding!

Follow along below in the right pane to see the terminal commands and code for this tutorial. We will use a very basic file structure for the purposes of this guide. Start by making a project directory, moving into it, and running npm init.

$ mkdir triage-bot
$ cd triage-bot
$ npm init

Install the Node Asana client library and create config and app files:

$ npm install asana
$ touch config.js app.js

Add GIDs (global identifiers) for the workspace, design request project, and designers that will be assigned requests (note that all GIDs in Asana should be strings). You can get a project’s GID from its URL in the Asana web product (e.g., the structure of links for a task is www.asana.com/0/{project_gid}/{task_gid}). Similarly, you can get user’s GID from the URL of their task list (i.e., click on their name in Asana). To get your workspace GID(s), go to https://app.asana.com/api/1.0/users/me/workspaces.

let config = {
  workspaceId: "15793206719",
  designRequestProjectId: "180350018127066",
  // GIDs of designers who are fulfilling design requests
  designers: ["180015866142449", "180015866142454", "180015886142844"]
};

module.exports = config;

Next, let’s get started on our app.js file. Include the Asana node client library and the config file:

let asana = require('asana');
let config = require('./config');

Get your access token and use it to create an Asana client. At the time of writing this guide, the Asana API is going through two deprecations (moving to string GIDs and changing how sections function). You can learn about our deprecations framework in our docs. To prevent my app from breaking when the deprecations are finalized, I'm passing headers to enable the new API behavior for string GIDs and sections. We will also set a delay to determine how quickly our parallel requests are sent.

// Get personal access token (PAT) from environment variables.
const accessToken = process.env.triage_bot_pat;

const deprecationHeaders = {"defaultHeaders": {"asana-enable": "new_sections,string_ids"}};

// Create Asana client using PAT and deprecation headers.
const client = asana.Client.create(deprecationHeaders).useAccessToken(accessToken);

// Request delay in ms
const delay = 200;

Use the search API to fetch unassigned tasks from the design requests project. Note that the search API doesn’t return paginated results so you need to pass the max limit which is 100. If there are often more than 100 unassigned tasks, you can add a function to keep running the script until there are no more unassigned tasks.

function getUnassignedTasks() {
  let workspaceId = config.workspaceId;
  let params = {
    "projects.any" : config.designRequestProjectId,
    "assignee.any" : "null",
    "resource_subtype": "default_task",
    "fields": "gid",
    "limit": 100
  };
  client.tasks.searchInWorkspace(workspaceId, params).then(tasks => {
    randomAssigner(tasks.data);
  });
}

We’ll need a few helper functions: one to shuffle an array and another to assign tasks.

function shuffleArray(array) {
  for (let i = array.length - 1; i > 0; i--) {
      let j = Math.floor(Math.random() * (i + 1));
      let temp = array[i];
      array[i] = array[j];
      array[j] = temp;
    }
  return array;
}

function assignTask(taskStringId, assigneeStringId) {
  client.tasks.update(taskStringId, {assignee: assigneeStringId})
}

Our final function will take the array of unassigned tasks and round-robin assign them to the group of shuffled designers from the config file. We will use an interval to loop so we can control the speed of the requests. You can change the delay with the const you declared earlier. This is a balance between speed and staying within our rate limits. In Node, a normal loop would send all requests at once, which doesn’t work in larger projects.

function randomAssigner(unassignedTasks) {
  let shuffledDesigners = shuffleArray(config.designers);
  let numDesigners = shuffledDesigners.length;

  // Let's use an interval to loop, so we control how quickly requests are sent
  let index = 0;
  let interval = setInterval(function() {
    assignTask(unassignedTasks[index].gid, shuffledDesigners[index % numDesigners]);
    index++;

    // When our index reaches the end, we're done
    if (index >= unassignedTasks.length) {
      clearInterval(interval);

      console.log("You've assigned " + unassignedTasks.length + " new design requests");
    }
  }, delay);
}

Then we just need to call our getUnassignedTasks() function to run the script:

getUnassignedTask();

Now run your script, sit back, and watch the bot do your work.

$ node app.js

Why build a bot?

When processes get complex in Asana, there can begin to be "work about work." This could be happening to you if you find yourself spending time doing repetitive work such as triaging tasks, reminding people to do something, or adding/removing followers as you move a task through a workflow.

What we’re going to build

In this guide, we will build a simple triage bot that will assign tasks. This is a common Asana use case among users who work with support inboxes or request projects.

If you want to skip ahead and see the code for the triage bot, you can visit the project within the devrel-examples repo.

For this guide, let’s suppose a design team has a requests project where people from the marketing team fill out an Asana form to request graphics from the design team. The form creates a task in the design requests project that needs to be assigned to a designer.

Our triage bot will gather all unassigned tasks in the design request project and then randomly distribute the requests across a group of designers.

For the purposes of this guide, we will keep it this simple, however, you could add more complex logic to your bot. For instance, you could check custom field values on the request task to see what type of request it is (e.g., video, graphic, logo, etc.) and then assign it to the designer who has those skills. You could go even further and check the designers workload to see who currently has the least amount of work already assigned to them (this could be determined by a point value for tasks assigned to them in the project). You could then have the bot "ping" the design request task as it approaches the due date to ensure that the designer will have it completed on deadline.

Before we get started, here are some helpful links for building on the Asana API:

Create your bot user in Asana

Create a new Asana account for your bot (instructions for inviting users). You will want to create a separate, distinct Asana account for your bot because any action it takes in Asana will be attributed to this user. Give your bot a name and photo that will be recognizable to other users in Asana who may encounter it. Note that if your bot is a guest member in Asana, it will need to be added to every project you need it to work in. Bots based on guest Asana accounts will also not have access to some API features such as defining new custom fields or modifying their settings.

Authenticating your bot

We will authenticate our bot using a personal access token (PAT). Log in to the Asana account that will be used for the bot and navigate to the developer console. You can get to the developer console directly here.

Next, click + Create new token and follow the instructions to get your token. Treat this token like a username and password. Do not share it with anyone and never publish it to a public repository. You may also wish to save the token as an environment variable (instructions on how to do this on Mac). For this guide, the personal access token was saved as an environment variable called triage_bot_pat.

Create a "sandbox" project

Before we start coding, create a project in Asana to use as a sandbox. While not required, you can set the project to private while developing. To get some users in the project, add your main Asana user as well as your bot account. You may also invite a personal email as a guest user.

Choose an Asana client library

The Asana API has official client libraries in several popular languages. For most developers, we recommend using one of our client libraries, because they help with some of the complexities of using an API such as authentication, pagination, and deprecations.

For this guide, we will use the Asana Node client library. However, you can follow along in any language of your choice.

Each library has an examples folder in addition to the README, which can be helpful for getting started. The methods for each resource can be found in the gen folder of each client library (e.g., node-asana/lib/resources/gen/).

At this point, head to the top of the right pane to start building your bot ----->

Congratulations! Now go above and beyond

You’ve created an Asana triage bot. Let’s explore a few ideas on how to make it even better.

Deploy your app

While you can run your bot from the command line, that seems like a lot of work to run a bot that’s supposed to eliminate work about work.

One option is to use launchd to automatically execute your script (launchd is like cron but better). Here’s a tutorial to get you started with launchd.

The next step would be to deploy to a hosted server. Here’s a guide exploring some of the popular hosting providers. Hosting your app makes it more resilient and allows you to create more sophisticated apps (e.g. use webhooks).

Use Asana as your config file

To take your bot’s accessibility to the next level, put your configuration in an Asana task(s) and then have your script read that task(s) for instructions. This allows you (or anyone else) to make config changes without touching any code. For example, if a designer is on vacation, you can easily remove them from the group that gets assigned requests. Similarly, if a designer joins or leaves the team, this change could be easily configured in a task instead of having to change the bot’s code.

To see this approach in the wild, checkout Ohmega, an automation framework we created. Here’s the configuration service that reads a tree of tasks for its configuration.

Use webhooks for real-time triaging

If you need your bot to react to changes in real time, then you’ll need to use webhooks. We built a Yython webhook inspector to help developers get started using Asana webhooks.

Was this section helpful? Yes No


Other bot examples

Reminder bot

Even the most conscientious and best-intentioned teammate can get overloaded and occasionally forget a task. For project managers, team leads, or coordinators, it can be draining to check in on everyone to make sure that everything is going according to schedule. To stay on track and minimize the work-about-work use, you can Asana’s API to create a bot (i.e., a script that performs a task automatically) for automatic reminders. In this case, a "ping bot" takes action when due dates are approaching (or for any other specified trigger). This can act as a more intelligent version of the reminders that Asana already sends when due dates approach. For example, the bot could comment with reminders further in advance, ask assignees or followers to take some action (e.g., setting a custom field), reassign the work, and/or modify due dates. With a bot handling the schedule and reminders, people can spend their time on the work that needs human attention, such as ideation and feedback.

Recruiting bot

At Asana, we use a bot to help automate the process for evaluating engineering candidates. The bot helps ensure that applicant coding tests are graded in a timely manner by the right engineer.

When candidates have submitted their coding test, the bot uses the Asana API to assign the test to a grader based on specific criteria tracked in Asana, such as their preferred programming languages and number of previous evaluations. Graders are given x days to grade tests (the bot takes into account when graders are out-of-office). If tests have not been graded by the due date, graders are pinged (i.e., notified) by the bot with a comment on the task to either grade the test or to reassign it to someone else. After y days, the bot automatically re-assigns the test to the next grader to keep the process moving.

Bugs bot

Our engineering teams handle triaging bug reports by creating a task in a "Bugs" project. A bot then adds the project manager of the relevant team in Asana as a follower, moves the task into a "needs triage" section, and requests assistance. The project manager can then evaluate the bug and triage it.

Since the evaluation of the severity of the bug is important for understanding how urgent the fix is, the bugs bot will remain persistent, commenting every few days until the task has been moved out of the triage section and into a section of the relevant priority. This process ensures that we are aware of the impact of bugs and helps us accidentally overlooking severe bugs.

Was this section helpful? Yes No


News and changelog

To keep up to date on changes to the API, subscribe to Platform News in our developer forum.

To subscribe to updates:

  1. Go to Platform News.
  2. Select Log In in the top right and log in with your Asana account.
  3. Go back to Platform News and change the bell icon in the top right to "Watching First Post" or "Tracking".

Here are the most recent updates:

Was this section helpful? Yes No


Input/output options

GET URL params

?opt_pretty
?opt_fields=followers,assignee

PUT or POST body options

options: { 
  pretty: true,
  fields: ["followers", "assignee"]
}

In addition to providing fields and their values in a request, you may also specify options to control how your request is interpreted and how the response is generated.

For GET requests, options are specified as URL parameters prefixed with opt_. For POST or PUT requests, options are specified in the body.

If the body uses the application/x-www-form-urlencoded content type, then options are prefixed with opt_ just like for GET requests. If the body uses the application/json content type, then options are specified inside the top-level options object (a sibling of the data object).

?opt_fields=name,notes&opt_pretty response

HTTP/1.1 200
{
  "data": {
    "name": "Make a list",
    "notes": "Check it twice!",
    "gid": 1224
  }
}

These options can be used in combination in a single request, though some of them may conflict in their impact on the response.

OptionDescription
prettyProvides the response in "pretty" output. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.
fieldsSome requests return compact representations of objects, to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below.

The gid of included objects will always be returned, regardless of the field options.

Selecting fields

opt_fields nesting

"data": {                       < this
  "gid": 1001,
  "name": "Feed the cat",       < this.name
  "workspace": {                < this.workspace
    "gid": 14916,
    "name": "Shared Projects",  < this.workspace.name
  },
  "followers": [{               < this.followers
    "gid": 1234,
    "email": "tbizarro@…",      < this.followers.email
  }, {
    "gid": 5678,
    "email": "gsanchez@…",      < this.followers.email
  }]
}

Some output options allow you to reference fields of objects to include in the response. The way to specify a field is by path. A path is made up of a sequence of terms separated by the dot (.) operator. It takes the form this.a.b… where this refers to an object returned at the top level of the response, a the name of a field on a root object, b a field on a child object referred to by a, and so on.

For example, when retrieving a task or tasks, the path this.followers.email refers to the email field of all users mentioned in the followers field of the task or tasks returned (see the annotated output on the right).

There are also some advanced operators you can use for shorter syntax in selecting fields:

( .. | .. )

The group operator can be used in place of any whole term in a path, and will match any of a group of terms. For example:

this.(followers|assignee).email will match the email field of the assignee object or any of the followers.

Was this section helpful? Yes No


Pagination

Paginating requests for object sets that may be large is highly recommended. For requests that will return large result sets, the API may truncate the result or timeout attempting to gather the data. Pagination ensures a more reliable experience by limiting requests to a smaller number of objects at a time, ultimately getting you the results faster. Should there be more results, the API will return an offset that will allow you to access the next page.

Strongly prefer paginated requests

For all new features in the Asana API, we're making pagination required by specifying a value for the limit parameter. Though they may return more results, our current unpaginated requests are still ultimately subject to a timeout limit, which means requests that work successfully one day may fail later due to factors such as server load and network latency.

Pagination limits provide a mechanism to specify a page size that we should always be able to serve regardless of these factors. To prevent current integrations from breaking, pagination is not enabled by default on "grandfathered" endpoints; instead, you can request paginated results by providing the optional limit parameter in your query. We will be working to deprecate requests to these endpoints in the future.

Request

curl "https://app.asana.com/api/1.0/tasks?project=1337&limit=5&offset=eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9" \
  -H "Authorization: Bearer <personal_access_token>"

Response

{
  "data": [
    {
      "id": 1000,
      "name": "Task 1",
      ...
    },
    ...
  ],
  "next_page": {
    "offset": "yJ0eXAiOiJKV1QiLCJhbGciOiJIRzI1NiJ9",
    "path": "/tasks?project=1337&limit=5&offset=yJ0eXAiOiJKV1QiLCJhbGciOiJIRzI1NiJ9",
    "uri": "https://app.asana.com/api/1.0/tasks?project=1337&limit=5&offset=yJ0eXAiOiJKV1QiLCJhbGciOiJIRzI1NiJ9"
  }
}

Note that all of Asana's official client libraries support pagination by default.

When making a paginated request, the API will return a number of results as specified by the limit parameter. If more results exist, then the response will contain a next_page attribute, which will include an offset, a relative path attribute, and a full uri attribute. If there are no more pages available, next_page will be null and no offset will be provided. Note that an offset token will expire after some time, as data may have changed.

When making paginated requests, you are able to "page through" all objects for a particular query up to 100 objects at a time. Alternatively, your query will be truncated at about 1,000 objects. In addition, when issuing non-paginated requests to organizations with a large number of objects, queries may time out before returning. For these reasons, we recommend that you paginate all requests to the API.

ParameterDescription
limit20 The number of objects to return per page. The value must be between 1 and 100.
offseteyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9 An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results.

Note: You can only pass in an offset that was returned to you via a previously paginated request.

This method returns paginated results for tasks from a project.

Was this section helpful? Yes No


Errors

Missing authorization header

GET https://app.asana.com/api/1.0/users/me HTTP/1.1
HTTP/1.1 401 Not Authorized
{
  "errors": [
  {
    "message": "Not Authorized"
  }
  ]
}

HTTP status codes

Unfortunately, sometimes requests to the API are not successful. Failures can occur for a wide range of reasons. In all cases, the API should return an HTTP response status code that indicates the nature of the failure (below), with a response body in JSON format containing additional information.

In the event of a server error, the response body will contain an error phrase. These phrases are automatically generated using the node-asana-phrase library and can be used by Asana support to quickly look up the incident that caused the server error.

Bad request parameters

GET https://app.asana.com/api/1.0/tasks HTTP/1.1
Authorization: Bearer <personal_access_token>
HTTP/1.1 400 Bad Request
{
  "errors": [
  {
    "message": "workspace: Missing input"
  }
  ]
}

Asana had a problem

GET https://app.asana.com/api/1.0/users/me HTTP/1.1
Authorization: Bearer <personal_access_token>
HTTP/1.1 500 Server Error
{
  "errors": [
  {
    "message": "Server Error",
    "phrase": "6 sad squid snuggle softly"
  }
  ]
}



CodeMeaningDescription
200SuccessIf data was requested, it will be available in the data field at the top level of the response body.
201Created
(for object creation)
Its information is available in the data field at the top level of the response body. The API URL where the object can be retrieved is also returned in the Location header of the response.
400Bad RequestThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401UnauthorizedA valid authentication token was not provided with the request, so the API could not associate a user with the request. This error also occurs if an app makes a request to a workspace that has disabled that particular app.
402Payment RequiredThe request was valid, but the queried object or object mutation specified in the request is only available to premium organizations and workspaces.
403ForbiddenThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404Not FoundEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
429Too Many RequestsYou have exceeded one of the enforced rate limits in the API. See the documentation on rate limiting for more information.
451Unavailable For Legal ReasonsThis request was blocked for legal reasons, commonly caused by embargoed IP addresses.
500Internal Server ErrorThere was a problem on Asana's end.



In the event of an error, the response body will contain an errors field at the top level. This contains an array of at least one error object, described below:

ExampleDescription
messageproject: Missing input Message providing more detail about the error that occurred, if available.
phrase6 sad squid snuggle softly 500 errors only. A unique error phrase which can be used when contacting developer support to help identify the exact occurrence of the problem in Asana's logs.

API limits

API queries that run on very large result sets – on the order of tens of thousands of items – may have their results truncated even when you use pagination, use a filter on dates, or you don’t have access to all of those objects.

If your query hits this limit – on the last page of results, the API will respond with a 400 error rather than returning additional data. The 400 error will include a message that indicates a truncated data set.

Note that this limit concerns objects of all resource types (projects, tasks, teams, etc.). This limit also applies to:

  • Result sets generated by a single (i.e., canonical) API request (e.g., GET /projects to fetch all projects in a workspace), prior to pagination, and following the application of any query filters provided in the request
  • Result sets that would otherwise return a very large number of objects, but you only have access to a subset of them (e.g., guest permissions)

Workarounds

To help you retrieve these very large data sets, there are a number of workaround solutions you can take.

Split API requests

In most cases, you can break down your query into multiple canonical requests based on the hierarchical structure of the object you’re querying. For example:

Export data

If you are unable to use other methods and need an automated export, you can request data using an organization export. This feature is only available to Service Accounts of an Enterprise organization.

Additionally, admins can export subsets of organization data as CSV, such as tasks in a project.

Was this section helpful? Yes No


Rate limits

To protect the stability of the API and keep it available to all users, Asana enforces multiple kinds of rate limiting. Requests that hit any of our rate limits will receive a 429 Too Many Requests response, which contains the standard Retry-After header indicating how many seconds the client should wait before retrying the request.

Limits are allocated per authorization token. Different tokens will have independent limits.

The client libraries respect the rate-limited responses and will wait the appropriate amount of time before automatically retrying the request, up to a configurable maximum number of retries.


Standard rate limits

Request

GET https://app.asana.com/api/1.0/users/me HTTP/1.1
Authorization: Bearer <personal_access_token>

Response

HTTP/1.1 429 Too Many Requests
Content-Type: application/json
Retry-After: 30

{
  "errors": [
  {
    "message": "You've made too many requests and hit a rate limit. Please retry after the given amount of time."
  }
  ]
}

Our standard rate limiter imposes a quota on how many requests can be made in a given window of time. Our limits are based on minute-long windows, and differ depending on whether the domain is premium or not. We may change these quotas or add new quotas (such as maximum requests per hour) in the future.

Domain typeMaximum requests per minute
Free150
Premium1500

In addition, calls to the search API are limited to 60 requests per minute. The duplication endpoints are limited to 5 concurrent jobs.

Although the quota is defined per minute, it is evaluated more frequently than once per minute. As such, you may not need to wait for a full minute before retrying your request. For requests rejected by this limiter, the Retry-After header has the result of this calculation.

Requests rejected by this limiter still count against the quotas, so that ignoring the Retry-After header will result in fewer and fewer requests being accepted during the subsequent time windows.


Concurrent request limits

In addition to limiting the total number of requests in a given time window, we also limit the number of requests being handled at any given instant. We may change these limits or add new limits in the future.

Request typeMaximum concurrent requests
Reads GET50
Writes POST, PUT, PATCH, DELETE15

For example, if you have 50 read requests in-flight and attempt to make another read request, the API will return a 429 Too Many Requests error. The read and write limits are independent of each other, so the number of read requests you make at one time will have no impact on the number of write requests you can make.

Responses for requests rejected by this concurrent request limiter will contain a Retry-After header, which specifies a duration long enough (in seconds) such that the other in-flight requests are guaranteed to have either completed or timed out.


Cost limits

Objects in Asana are connected to each other in a graph. Some examples of "links" in this graph are:

  • A task object is linked to a user object as the assignee
  • A user is linked to the projects it is following
  • A tag is linked to all its tasks
  • A task is linked to all its subtasks
  • A task is linked to all its custom field values

Depending on the kind of requests you make to our API, our servers traverse different parts of the graph. The sizes of these parts directly influence how expensive it is for our servers to build the API responses. For example, fetching just the name and gid of a task requires very few resources and no traversal of the graph, but fetching all tasks in a project and all their attributes (assignee, followers, custom_fields, likes) can require following several thousand links in the graph.

Because there can be a wide range in the cost of any given API request in terms of the computational resources and database load, the standard rate limits are not always enough to maintain stability of the API. In the past, when we’ve received bursts of expensive requests, our typical course of action has been to block the offending authorization token and reject all future requests, resulting in confusion for both the user and the app developer. Instead, to protect against the extreme cases where API requests require inordinate traversal of the graph, we impose an additional limit based on the computational cost.

The cost we associate with a request isn't equivalent to the number of links in the subset of the graph involved, but it is roughly proportional. The cost of a request is calculated after the response has been fully built and we know how much data we needed to fetch from our databases to build it. This cost is then deducted from a quota, and the response is returned. Because the cost of a request is not known until we’ve built the response, we allow this deduction to result in a net negative quota. The request that causes the quota to become negative will receive the expected response and not be rejected.

When a request is received, if the remaining quota is not positive, the new request is rejected with a 429 Too Many Requests. As with the standard rate limits, this quota is defined per-minute but is updated on a more frequent interval. The Retry-After header will specify how long you must wait for the quota to become positive again.

The vast majority of developers will be unaffected by the cost limit, and the quota is set sufficiently high that it only affects users making requests that would compromise the stability of the API. Rather than unconditionally blocking their token from the API, this cost limiter will permit them to continue operation at a slower but safe and stable rate.


Common issues and pathological cases to avoid

  • Deeply nested subtasks (i.e., working sub-subtasks, sub-sub-subtasks, etc.)
  • Projects with a large number of tasks (i.e, projects with over 1,000 tasks)
  • Too many unreadable tags in a workspace
  • Domains with too many projects for typeahead to work well
  • Undeleted webhooks

Was this section helpful? Yes No


Rich text

Note: We are actively adding new rich texts formats to various objects in Asana. This may break existing apps. New apps should be built using parsers and display logic that is forward compatible with the forthcoming rich text formats. More details and ongoing updates can be found in this post in the developer forum.

Example rich text

<body>All these new tasks are <em>really</em> getting disorganized, so <a data-asana-gid="4168112"/> just made the new <a data-asana-gid="5732985"/> project to help keep them organized. <strong>Everyone</strong> should start using the <a data-asana-gid="6489418" data-asana-project="5732985"/> when adding new tasks there.</body>

The web product offers a number of rich formatting features when writing task notes, comments, project descriptions, and project status updates. These features include bold, italic, underlined, and monospaced text, as well as bulleted and numbered lists. Additionally, users can "@-mention" other users, tasks, projects, and many other objects within Asana to create links.

The rich text field name for an object is equivalent to its plain text field name prefixed with html_. The following object types in Asana support rich text:

ObjectPlain text fieldRich text field
Tasksnoteshtml_notes
Projectsnoteshtml_notes
Storiestexthtml_text
Project status updatestexthtml_text
Project briefstexthtml_text
Teamsdescriptionhtml_description


Reading rich text

Python

from lxml import etree

html_text = "<body>...</body>"
root = etree.HTML(html_text)
user_ids = root.xpath('//a[@data-asana-type="user"]/@data-asana-gid')
for user_id in user_ids:
    print(user_id)

Java

import com.jcabi.xml.XML;
import com.jcabi.xml.XMLDocument;
import java.util.List;

XML root = new XMLDocument("<body>...</body>");
List<String> userIds = root.xpath("//a[@data-asana-type=\"user\"]/@data-asana-gid");
for (String userId : userIds) {
    System.out.println(userId);
}

JavaScript

var htmlText = '<body>...</body>'
var parser = new DOMParser()
var doc = parser.parseFromString(htmlText, "text/html")
var iterator = doc.evaluate(
    '//a[@data-asana-type="user"]/@data-asana-gid', doc, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE)
var node = iterator.iterateNext()
while (node) {
    console.log(node.nodeValue);
    node = iterator.iterateNext();
}

Rich text in the API is formatted as an HTML fragment, which is wrapped in a root <body> tag. Rich text is guaranteed to be valid XML; there will always be a root element, all tags will be closed, balanced, and case-sensitive, and all attribute values will be quoted. The following is a list of all the tags that are currently returned by the API:

TagMeaning in Asana
<body>None
<strong>Bold text
<em>Italic text
<u>Underlined text
<s>Strikethrough text
<code>Monospaced text
<ol>Ordered list
<ul>Unordered list
<li>List item
<a>Link

In addition, the following tags are supported in the rich text of only some objects:

TagMeaning in AsanaObjects Supported
<h1>, <h2>HeaderProject briefs, tasks
<hr>Horizontal ruleProject briefs, tasks
<img>Inline imageProject briefs
<table>, <tr>, <td>TableProject briefs
<object type="application/vnd.asana.external_media">External media embed (iframe)Project briefs
<object type="application/vnd.asana.Project_milestones">List of milestonesProject briefs
<object type="application/vnd.asana.Project_goals">List of goalsproject briefs

Note: The above lists will expand as new features are introduced to the Asana web product. Treat rich text as you would treat arbitrary HTML, and ensure that your code does not break when it encounters a tag not on this list.

Links

While links are intuitive to understand when users view the rendered result in the Asana web product, an <a> tag and its href alone are insufficient to programmatically understand what the target of the link is. This is confused further by the fact that the formats of these links are frequently ambiguous. For example, an @-mention to a user generates a link to their "My Tasks", which looks identical to a link to a normal project.

Because of this, the API will return additional attributes in <a> tags to convey meaningful information about the target. The following is a complete list of attributes we may return inside an <a> tag, in addition to the usual href:

AttributeMeaning
data-asana-accessibleBoolean, representing whether or not the linked object is accessible to the current user. If the resource is inaccessible, no other data-asana-* attributes will be included in the tag.
data-asana-dynamicBoolean, represents if contents of the a tag is the canonical name of the object in Asana. If you want to set custom text that links to an Asana object, set data-asana-dynamic="false" when creating the tag.
data-asana-typeThe type of the referenced object. One of user, task, project, tag, conversation, project_status, team, or search.
data-asana-gidThe GID of the referenced object. If the referenced object is a user, this is the user's GID.
data-asana-projectIf the type of the referenced object is a task, and the link references that task in a particular project, this is the GID of that project.
data-asana-tagIf the type of the referenced object is a task, and the link references that task in a particular tag, this is the GID of that tag.

Here are some examples of how this behavior manifests:

  • Suppose a user with a name of "Tim" and a user GID of "53421" is @-mentioned. This will create a link to their "My Tasks" which is a project with a GID of "56789"
    • The raw link generated in Asana will be https://app.asana.com/0/56789/list.
    • The <a> tag returned in the API will be <a href="https://app.asana.com/0/56789/list" data-asana-accessible="true" data-asana-dynamic="true" data-asana-type="user" data-asana-gid="54321">@Tim</a>.
  • Suppose a link to a task with name "Buy milk" and GID "1234" being viewed in a project with GID "5678" is copied from the address bar and pasted into a comment.
    • The raw link generated in Asana will be https://app.asana.com/0/5678/1234.
    • The <a> tag returned in the API will be <a href="https://app.asana.com/0/5678/1234" data-asana-accessible="true" data-asana-dynamic="true" data-asana-type="task" data-asana-gid="1234" data-asana-project="5678">Buy milk</a>
  • Suppose another user @-mentions a project with GID "5678" that is private and not visible to you in the web product.
    • The raw link generated in Asana will be https://app.asana.com/0/5678/list.
    • The <a> tag returned in the API will be <a href="https://app.asana.com/0/5678/list" data-asana-accessible="false" data-asana-dynamic="true">Private Link</a>

Here is an example of what a complete rich comment might look like in the API:

<body>All these new tasks are <em>really</em> getting disorganized, so <a href="https://app.asana.com/0/4168466/list" data-asana-accessible="true" data-asana-dynamic="true" data-asana-type="user" data-asana-gid="4168112">@Tim Bizzaro</a> just made the new <a href="https://app.asana.com/0/5732985/list" data-asana-accessible="true" data-asana-dynamic="true" data-asana-type="project" data-asana-gid="5732985">Work Requests</a> project to help keep them organized. <strong>Everyone</strong> should start using the <a href="https://app.asana.com/0/5732985/6489418" data-asana-accessible="true" data-asana-dynamic="true" data-asana-type="task" data-asana-gid="6489418" data-asana-project="5732985">Request template</a> when adding new tasks there.</body>

Inline images

Reading an inline image

<img
  data-asana-gid="1234"
  src="..."
  data-src-width="..."
  data-src-height="..."
  data-thumbnail-url="..."
  data-thumbnail-width="..."
  data-thumbnail-height="..."
  [data-asana-deleted="true"]
  data-asana-type="attachment"
  alt="title of the image"
  style="...">

Rich text can contain inline images. The image is stored as an attachment.

If the attachment has been deleted, the HTML will contain data-asana-deleted="true", and some of the other attributes, such as the URLs, will not be present.

The image URLs expire after a few minutes.

External media embeds (iFrames)

Reading an external media embed

<object
  type="application/vnd.asana.external_media"
  data-asana-type="attachment"
  data-asana-gid="1234"
  data="{embeddable-url}"
>
  <a href="{linkable-url}">{linkable-url}</a>
</object>

You can embed Figma, Loom, YouTube, etc. within rich text. The effect is similar to an HTML iFrame. There is a fixed, predefined list of external media sources that are supported:

  • Adobe XD
  • Canva
  • Figma
  • InVision
  • Loom
  • LucidChart
  • Miro
  • Vimeo
  • Whimsical
  • Wistia

Milestones and goals

Reading milestones

<object
  type="application/vnd.asana.project_milestones"
  data-asana-gid="<gid-of-project>"
  data-asana-type="project">[...]</object>

Reading goals

<object
  type="application/vnd.asana.project_goals"
  data-asana-gid="<gid-of-project>"
  data-asana-type="project">[...]</object>

Rich text can contain:

  • A list of all milestones in the specified project
  • A list of all goals that are supported by the specified project

When reading, the inner HTML of the <object> tag will contain a list of the first five milestones/goals, followed by "..." if there are more than five in total. When writing, the inner HTML is ignored and can be empty.

Reading defensively

Custom handling external media <object>

const richText = '<body><object style="display:block" type="application/vnd.asana.external_media" data="https://www.youtube.com/embed/VqnMA3K6-e0"><a href="https://www.youtube.com/embed/VqnMA3K6-e0">https://www.youtube.com/embed/VqnMA3K6-e0</a></object></body>'
const parser = new DOMParser();
const richTextDocument = parser.parseFromString(richText, "text/html");

const objects = richTextDocument.querySelectorAll("object");

for (let i = 0; i < objects.length; i++) {
    replacement = null;

    switch(objects[i].type) {
        case "application/vnd.asana.external_media":
            replacement = richTextDocument.createElement('iframe');
            replacement.width = 420;
            replacement.height = 315;
            replacement.src = objects[i].data;
            break;
        default:
            replacement = richTextDocument.createElement('div');
            replacement.innerHtml = objects[i].innerHTML;
    }

    if (replacement) {
        objects[i].parentElement.replaceChild(replacement, objects[i]);
    }
}

richTextDocument.body.childNodes.forEach (child => {
    document.body.append(child);
});

We are actively adding new rich text formats to various objects in Asana. An existing app will break if not built defensively. Apps should use parsers and display logic that is forward compatible with unknown future rich text formats.

To do this, Asana provides two mechanisms to parse and display tags that the app doesn't explicitly support:

  • Defaults that render in a WebView
  • Guidelines for how to handle new tags

You can read more about rich text changes in this forum post.

Render rich text in a WebView

You can expect the rich text HTML to render reasonably in a WebView if you apply the following CSS style to the wrapping DOM node: overflow-wrap: break-word; white-space: pre-wrap;. This won't look exactly like it does in Asana, but it will ensure users read it in the same way.

How to handle new tags (no WebView)

An <object> with an unhandled type

Render the <object> tag as a block and render the contained HTML with the same behavior as if it were not inside an <object>. We will never send an <object> tag nested inside another <object> tag.

An <img>

Fall back to either the alt text or the src link if the image can’t be displayed. Wrap the text with newlines like \n<alt text>\n since <img> tags are blocks.

Empty elements except <img> and <hr>

Empty tags are described here. It is ok to omit them. Render as a new line if the tag is a block.

Other semantic non-terminal tags

Ignore the tag and render whatever is inside. Follow the HTML convention for whether it is a block or not.


Writing rich text

When writing rich text to the API, you must provide similarly structured, valid XML. The text must be wrapped in a <body> tag, all tags must be closed, balanced, and match the case of supported tags, and attributes must be quoted. Invalid XML, as well as unsupported tags, will be rejected with a 400 Bad Request error. Only <a> tags support attributes, and any attributes on other tags will be similarly rejected.

Links

For <a> tags specifically, to make it easier to create @-mentions through the API, we only require that you provide the GID of the object you wish to reference. If you have access to that object, the API will automatically generate the appropriate href and other attributes for you. For example, to create a link to a task with GID "123", you can send the tag <a data-asana-gid="123"/> which will then be expanded to <a href="https://app.asana.com/0/0/123/f" data-asana-accessible="true" data-asana-dynamic="true" data-asana-type="task" data-asana-gid="123">Task Name</a>. You can also generate a link to a task in a specific project or tag by including a data-asana-project or data-asana-tag attribute in the <a> tag. All other attributes, as well as the contents of the tag, are ignored.

To keep the contents of your tag and make a custom vanity link, include the property data-asana-dynamic="false" when setting the contents of the tag. You would send <a data-asana-gid="123" data-asana-dynamic="false">This is some custom text!</a> and receive <a data-asana-accessible="true" data-asana-dynamic="false" data-asana-type="task" data-asana-gid="123">This is some custom text!</a>

If you do not have access to the referenced object when you try to create a link, the API will not generate an href for you, but will instead look for an href you provide. This allows you to write back <a> tags unmodified even if you do not have access to the resource. If you do not have access to the referenced object and no href is provided, your request will be rejected with a 400 Bad Request error. Similarly, if you provide neither a GID nor a valid href, the request will be rejected with the same error.

Inline images

Writing an inline image (after uploading the attachment)

<img data-asana-gid="1234">

When writing an inline image, you don't need most of the attributes; all you need is the data-asana-gid. To write HTML that includes a new inline image:

  1. Upload the image as an attachment with a call to POST /attachments.
  2. Make a second API call to write the rich text, using the returned GID as the data-asana-gid field of the <img> tag.

External media embeds

Writing an external media embed

<object
  type="application/vnd.asana.external_media"
  data-asana-gid="1234"
></object>

To write rich text that contains a new external media embed:

  1. Create URL attachment with a call to POST /attachments, with { ..., "resource_subtype": "external", "url": "<your_url>" }. Important: Use the URL that would appear in the browser address bar (e.g. https://youtube.com/watch?v=...), NOT the embeddable URL (e.g. https://youtube.com/embed/...).

  2. Make a second API call to write the rich text, using the returned GID as the data-asana-gid field of the <object> tag. You don't need the inner HTML and you only need a couple of the <object> tag attributes: All that is needed is <object type="application/vnd.asana.external_media" data-asana-gid="..."></object>


Writing defensively

When processing rich text and sending it back

It is okay to ignore tags or attributes on tags that are unknown for rendering/processing. It is important to send everything back (attributes and inner content) to avoid data loss.

Note: <object> is an exception where it is acceptable to not send any inner content back (all inner content in <object> will be ignored).

If you plan to write an editor

If the tag and attributes are known, but it contains unknown attributes, it must be treated as unknown.

If a tag is unknown, first determine if the tag is block or inline, then render it as a block or inline atomic and non-copiable (and non-cut-and-paste-able) editor node (all inner content is non-editable). This is because we don’t know if the unknown node has constraints on inner content or where it can appear. The node must also keep track of all attributes and inner content to be serialized back.

Was this section helpful? Yes No


SCIM

Asana supports SCIM 2.0 operations at https://app.asana.com/api/1.0/scim. Okta provides documentation for understanding SCIM.

Only Service Accounts in Enterprise Domains can access SCIM endpoints.


Service provider configuration endpoints

HTTP methodAPI endpointAsana behavior
GET/ServiceProviderConfigRead-only meta information.
GET/ResourceTypesRead-only meta information.
GET/SchemasRead-only meta information.


User endpoints

Examples

Request: GET https://app.asana.com/api/1.0/scim/Users?filter=userName eq "johnsmith@example.com"

Response: 200 OK

{
    "Resources": [
        {
            "id": "1",
            "name": {
                "familyName": "John",
                "givenName": "Smith",
                "formatted": "John Smith"
            },
            "userName": "johnsmith@example.com",
            "emails": [
                {
                    "value": "johnsmith@example.com",
                    "primary": true,
                    "type": "work"
                }
            ],
            "active": true,
            "schemas": [
                "urn:ietf:params:scim:schemas:core:2.0:User",
                "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
            ],
            "title": "Software Engineer",
            "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
                "department": "R&D"
            }
        }
    ],
    "totalResults": 1,
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:ListResponse"
    ]
}
Request: POST https://app.asana.com/api/1.0/scim/Users

{
    "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User",
        "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
    ],
    "userName": "johnsmith@example.com",
    "name": {
        "formatted": "John Smith"
    },
    "emails": [
        {
            "primary": true,
            "value": "johnsmith@example.com"
        }
    ],
    "active": true,
    "title": "Software Engineer",
    "preferredLanguage": "en",
    "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
        "department": "R&D"
    }
}

Response: 201 Created

{
    "id": "1",
    "name": {
        "familyName": "John",
        "givenName": "Smith",
        "formatted": "John Smith"
    },
    "userName": "johnsmith@example.com",
    "emails": [
        {
            "value": "johnsmith@example.com",
            "primary": true,
            "type": "work"
        }
    ],
    "active": true,
    "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User",
        "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
    ],
    "title": "Software Engineer",
    "preferredLanguage": "en",
    "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
        "department": "R&D"
    }
}
Request: PATCH https://app.asana.com/api/1.0/scim/Users/1

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
            "op": "replace",
            "value": {
                "title": "Senior Software Engineer"
            }
        }
    ]
}

Response: 200 OK

{
    "id": "1",
    "name": {
        "familyName": "John",
        "givenName": "Smith",
        "formatted": "John Smith"
    },
    "userName": "johnsmith@example.com",
    "emails": [
        {
            "primary": true,
            "value": "johnsmith@example.com",
            "type": "work"
        }
    ],
    "active": true,
    "preferredLanguage": "en",
    "title": "Senior Software Engineer",
    "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
        "department": "R&D"
    },
    "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User",
        "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
    ]
}

HTTP methodAPI endpointAsana behavior
GET/UsersReturn full list of users in the domain. Does not return Asana guest users.
The accepted query parameters are:
1. filter for userName.
GET/Users/:idReturn specific user in the domain. Does not return Asana guest users.
POST/UsersCreate a new user if the User does not exist.
PUT/Users/:idUpdate / remove attributes for a User. Deprovision user (zombify) in Asana if active=false.
PATCH/Users/:idAdd / update attributes for a user. Deprovision user (zombify) in Asana if active=false.
DELETE/Users/:idDeprovision user (zombify) in Asana.

Accepted attributes:

AttributeTypeInfo
userNamestringUnique identifier for the user, typically used by the user to directly authenticate to the service provider. Each user MUST include a non-empty userName value, and it must be an email address. Required.
namecomplexThe user's name.
name.givenNamestringUnsupported for PATCH request, use name.formatted.
name.familyNamestringUnsupported for PATCH request, use name.formatted.
name.formattedstringThe full name of the user.
emailsmulti-valued complexEmail addresses for the user.
emails.valuestringEmail address for the user.
email.primarystringWhether this email address is the preferred email address for this user. true may only appear once for this attribute.
activebooleanIndicates whether the user's account is active in Asana.
titlestringThe user's title, such as "Vice President".
preferredLanguagestringThe user's preferred language. Used for selecting the localized User interface.
"urn:ietf:params:scim:
schemas:extension:enterprise:
2.0:User"
complexThe Enterprise User Schema Extension attribute.
"urn:ietf:params:scim:
schemas:extension:enterprise:
2.0:User.department"
stringThe department the user belongs to.


Group endpoints

Examples

Request: GET https://app.asanac.om/api/1.0/scim/Groups?filter=displayName eq "Marketing"

Response: 200 OK

{
    "Resources": [
        {
            "id": "1",
            "displayName": "Marketing",
            "schemas": [
                "urn:ietf:params:scim:schemas:core:2.0:Group"
            ],
            "meta": {
                "resourceType": "Group"
            }
        }
    ],
    "totalResults": 1,
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:ListResponse"
    ]
}
Request: POST https://app.asana.com/api/1.0/scim/Groups

{
    "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:Group"
    ],
    "displayName": "Marketing",
    "members": [
        {"value": "1"},
        {"value": "2"}
    ]
}

Response: 201 Created

{
    "id": 1,
    "displayName": "Marketing",
    "members": [
        {"value": "1"},
        {"value": "2"}
    ],
    "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:Group"
    ],
    "meta": {
        "resourceType": "Group"
    }
}
Request: PATCH https://app.asana.com/api/1.0/scim/Groups/1

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
            "op": "add",
            "path": "members",
            "value": [
                {
                    "value": "3"
                }
            ]
        }
    ]
}

Response: 204 No Content

SCIM Groups are equivalent to Asana teams.

HTTP methodAPI endpointAsana behavior
GET/GroupsReturn full list of team in the domain, including private team.
The accepted query parameters are:
1. filter for displayName.
GET/Groups/:idReturn a specific team in the domain.
POST/GroupsCreate a new team.
PUT/Groups/:idReplace the team's attributes.
PATCH/Groups/:idUpdate the team's attributes.

Accepted attributes:

AttributeTypeInfo
displayNamestringUnique identifier for the team. Required.
membersmulti-valued complexThe members of the team.
members.valuestringThe team member's user ID.


Audit log events

Asana’s audit log API allows you to monitor and act upon critical events in your organization's Asana instance.

Only Service Accounts in Enterprise domains can access audit log API endpoints. Authentication with a Service Account's personal access token is required.

To get started with the audit log API, visit the API reference.

Supported AuditLogEvents

The following tables list our currently supported AuditLogEvent event_types, organized by event_category. Audit log events are retained for 90 days from the date of capture. If an event that you are looking to monitor isn't listed below, please send us your feedback.

Logins

All login events operate on the user resource type.

Event TypeDescription
user_login_succeededA user successfully logged in to their Asana account.
user_login_failedA user failed to log in to their Asana account.
user_logged_outA user logged out of their Asana account.

User updates

All user events operate on the user resource type.

Event TypeDescription
user_invitedA new user was invited to or auto-joined the workspace.
user_deprovisionedA user was removed from the workspace.
user_reprovisionedA deprovisioned user was added back to the workspace.
user_forgot_password_startedA user requested a forgot password link.
user_password_resetA user's password was reset.
user_password_changedA user changed their password.
user_two_factor_auth_enabledA user’s two factor authentication was enabled.
user_two_factor_auth_disabledA user’s two factor authentication was disabled.

Admin settings

All admin settings events operate on the workspace resource type except for workspace_announcement_created and workspace_announcement_removed that operate on the workspace announcement resource type.

Event TypeDescription
workspace_security_contact_email_changedThe workspace's security contact e-mail was changed.
workspace_google_sso_settings_changedThe workspace's Google SSO settings were changed.
workspace_saml_settings_changedThe workspace's SAML settings were changed.
workspace_saml_url_changedThe workspace's SAML url was changed.
workspace_password_requirements_changedThe workspace's password strength requirements were changed.
workspace_force_password_resetAll users in the workspace were forced to reset their password.
workspace_guest_invite_permissions_changedThe workspace’s guest invite permissions were changed.
workspace_file_attachment_options_changedFile attachment options were enabled or disabled for the workspace.
workspace_default_team_privacy_settings_changedThe workspace's default team privacy settings were changed.
workspace_wide_reporting_enabledWorkspace wide reporting was enabled.
workspace_wide_reporting_disabledWorkspace wide reporting was disabled.
workspace_associated_email_domain_addedAn email domain was added to the workspace.
workspace_associated_email_domain_removedAn email domain was removed from the workspace.
workspace_require_two_factor_auth_enabledTwo factor authentication was set as required for the workspace.
workspace_require_two_factor_auth_disabledTwo factor authentication was set as not required for the workspace.
workspace_app_recipient_emails_changedA list of recipients for app approval requests was changed.
workspace_view_links_enabledRead-only link sharing was enabled for the workspace.
workspace_view_links_disabledRead-only link sharing was disabled for the workspace.
workspace_default_session_duration_changedThe workspace's default session duration was changed.
workspace_announcement_createdAn announcement was created and published in the workspace.
workspace_announcement_removedAn announcement was removed from the workspace.
workspace_form_link_authentication_required_enabledFor this workspace, form link authentication was set as required, so all viewers need to authenticate with Asana in order to open forms links.
workspace_form_link_authentication_required_disabledFor this workspace, form link authentication was set as not required, however authentication may still be required for individual links. Some viewers may not need to authenticate with Asana in order to open forms links.
workspace_personal_access_token_enabledThe workspace's global personal access token setting was enabled.
workspace_personal_access_token_disabledThe workspace's global personal access token setting was disabled.
workspace_app_admin_approval_setting_changedThe workspace's specific app approval setting was changed.
workspace_require_app_approvals_of_type_changedThe workspace's global app approval setting was changed.
workspace_form_is_embeddable_forms_enabledEmbeddable forms is enabled in admin
workspace_form_is_embeddable_forms_disabledEmbeddable forms is disabled in admin
workspace_logged_out_view_authentication_required_enabledFor this workspace, logged out view link authentication was set as required, so all viewers need to authenticate with Asana in order to open logged out view links.
workspace_logged_out_view_authentication_required_disabledFor this workspace, logged out view link authentication was set as not required, however authentication may still be required for individual links. Some viewers may not need to authenticate with Asana in order to open logged out view links.
workspace_baa_signedThe workspaces’s Business Associate Addendum (BAA) was signed.

Roles

All role events operate on the user resource type.

Event TypeDescription
user_workspace_admin_role_changedA user’s workspace admin role was changed.
user_division_admin_role_changedA user’s division admin role was changed.

Content export

Event TypeResource TypeDescription
workspace_export_startedWorkspaceAn organization export was started.
search_report_export_startedSearchA search report CSV export was started.
workspace_teams_export_startedWorkspaceA team CSV export for the workspace was started.
division_teams_export_startedDivisionA team CSV export for the division was started.
workspace_members_export_startedWorkspaceA member CSV export was started for the workspace.
project_csv_export_startedProjectA project CSV export was started.
attachment_downloadedAttachmentAn attachment was downloaded.
workspace_attachment_export_startedAttachmentAn attachment export was started.
object_export_startedWorkspaceA workspace wide object export was started.

Access control

Event TypeResource TypeDescription
project_share_link_enabledProjectA link allowing workspace members and auto-join users to join a project was enabled.
project_share_link_disabledProjectA link allowing workspace members and auto-join users to join a project was disabled.
project_view_link_enabledProjectA read-only link for a project was enabled.
project_view_link_disabledProjectA read-only link for a project was disabled.
team_privacy_settings_changedTeamA team’s privacy settings were changed.
team_member_addedTeamA user was added to a team.
team_member_removedTeamA user was removed from a team.
project_member_addedProjectA user was added to a project.
project_member_removedProjectA user was removed from a project.
project_privacy_settings_changedProjectA project’s privacy settings were changed.
portfolio_member_addedPortfolioA user was added to a portfolio.
portfolio_member_removedPortfolioA user was removed from a portfolio.

Apps

Event TypeResource TypeDescription
team_harvest_integration_enabledTeamThe Harvest time tracking integration was enabled for a team.
team_harvest_integration_disabledTeamThe Harvest time tracking integration was disabled for a team.
user_app_authorizedUserAn app was authorized by a user in the workspace.
user_app_revokedUserAn app was deauthorized by a user in the workspace.
user_personal_access_token_authorizedUserA new personal access token was authorized by the user in the workspace.
user_personal_access_token_revokedUserA personal access token was deauthorized by the user in the workspace.
service_account_createdUserA service account was created or reprovisioned.
service_account_deletedUserA service account was deleted.
service_account_name_changedUserA service account’s name was changed.

Creation

Event TypeResource TypeDescription
team_createdTeamA new team was created.
attachment_uploadedAttachmentAn attachment was uploaded.

Deletion

Event TypeResource TypeDescription
task_deletedTaskA task was deleted.
task_permanently_deletedTaskA task was permanently deleted.
task_undeletedTaskA task was undeleted.
project_deletedProjectA project was deleted.
project_undeletedProjectA project was undeleted.
portfolio_deletedPortfolioA portfolio was deleted.
portfolio_undeletedPortfolioA portfolio was undeleted.
goal_deletedGoalA goal was deleted.
goal_undeletedGoalA goal was undeleted.
custom_field_deletedCustom FieldA custom field was deleted.
custom_field_undeletedCustom FieldA custom field was undeleted.
message_deletedMessageA message was deleted.
message_permanently_deletedMessageA message was permanently deleted.
message_undeletedMessageA message was undeleted.
team_deletedTeamA team was deleted.
team_undeletedTeamA team was undeleted.
attachment_deletedAttachmentAn attachment was deleted.
attachment_undeletedAttachmentAn attachment was undeleted.
comment_deletedStoryA comment was deleted.
comment_undeletedStoryA comment was undeleted.
status_update_deletedStatus UpdateA status update was deleted.
status_update_permanently_deletedStatus UpdateA status update was permanently deleted.
status_update_undeletedStatus UpdateA status update was undeleted.
task_template_deletedTask TemplateA task template was deleted.
task_template_undeletedTask TemplateA task template was undeleted.
project_template_deletedProject TemplateA project template was deleted.
project_template_undeletedProject TemplateA project template was undeleted.
story_deletedStoryA story was deleted.
story_undeletedStoryA story was undeleted.


Deprecations

What is a breaking change?

In general, a breaking change refers to a change in an API that may require you to update your application or integration in order to avoid disruption. These changes may include:

Expanding the space of types or values that clients must handle, e.g.,

  • Adding a new value to a built-in enum field
  • Allowing a reference to be null, where it could not before

Changing the structure or meaning behind existing information, e.g.,

  • Migrating a property to have a new type (such as boolean to enum)

Adding new restrictions to perform an existing operation in the system, e.g.,

  • Only allowing a method to be called if some new condition is met, where this was not true before

Removing the types or values that clients can provide, e.g.,

  • No longer allowing a value to be null where it could before
  • Newly enforcing that a numeric value is nonzero
  • Removing a property

Removing a capability of the system, e.g.,

  • Removing a mutation or some of its behavior


Communicating about breaking changes

Whenever possible, the Asana API aims to preserve backwards compatibility for its users. Apps you write on top of the API now should, in ideal situations, continue to work indefinitely. However, there are a few rare cases where breaking changes are required. For example:

  • When we identify a stability threat, we may need to partially limit or entirely deprecate the culprit feature in the API.
  • When making a change in a backwards compatible way results in a cluttered, brittle, and confusing interface to Asana.
  • When not making a breaking change poses a security vulnerability, such as when we migrated from SSLv3 to TLS 1.0.

If a breaking change is required, the API team will provide a number of resources to help our developers get through the change:

  • We will communicate early, and through a variety of channels. We recommend that you join the developer community forum to learn about changes to the API.
  • We will provide a clear description of the change, how it affects your requests, and a migration plan to follow to transition through the deprecation.
  • We will designate a deprecation period during which you will be able to choose between both old and new behavior from the API, allowing you to test out the change without having to put your entire app at risk.


Response header notifications

While the previously-mentioned communication channels are the best place to learn about upcoming changes, the API itself will also alert you of upcoming changes. Shortly after we post communication, the API will begin sending Asana-Change headers in the responses. These headers will have two or three pieces of information:

  • The unique name of the change
  • A URL to our blog post describing the change
  • Optionally, a flag indicating that your specific request would be affected.

This header may be present multiple times in the response if there are multiple ongoing changes. Here's an example of one of these headers:

Asana-Change: name=security_headers;info=https://asa.na/api-sh;affected=true
Asana-Change: name=other_change;info=https://asa.na/api-oc

Note: If your request is not affected, we will not claim affected=false. This is in case, during the deprecation, we detect that the change has a larger scope than initially thought. A request going from "you may be affected" to "you definitely are affected" is an acceptable update, but a request going from "you definitely are not affected" to "you definitely are affected" is not an acceptable update.


Request header options

During the deprecation period, you can test out how the API will behave by sending additional headers in your requests. Sending an Asana-Enable header including comma-separated names of features will turn those features on for that request. Sending an Asana-Disable header will do the opposite and turn those features off for that request.

If no header is specified, the default behavior will be determined by how far into the deprecation period we are:

  • Before the start of the deprecation period (the "start date") the feature will be disabled, and it will not be possible to enable it.
  • After the start date, the feature will be disabled by default, but you can begin choosing whether to enable or disable it.
  • In roughly the middle of the deprecation period (the "activation date") the default behavior will switch and the feature will be enabled by default. You can continue to disable it with the appropriate header.
  • At the end of the deprecation period (the "end date") the feature will be enabled and you will no longer be able to manually disable it.

The start, activation, and end dates will clearly be documented in our communications. These days may be pushed into the future if we discover that developers need more time to migrate their apps, but they are guaranteed to never occur sooner than documented.

These dates are arranged such that, if a developer happens to miss our communication and their app breaks when the default behavior changes on the activation date, they can begin sending the Asana-Disable header to restore the old behavior and use the remaining half of the deprecation period to make their app compatible.

Here is an example of how these headers would look:

Asana-Enable: security_headers,another_change
Asana-Disable: a_third_change

Aside from reserving the right to push the date of changes to a future date, the precise time during the activation date is not specified. However, since the default will only affect your integration if you do not pass either the Asana-Enable or Asana-Disable headers for a particular deprecation, you can ensure predictable behavior of our API for your app during the entire period, including throughout the activation date.

The way we recommend you implement these changes in your integration is this:

  • Whenever you detect a new Asana-Change header, log these requests and be sure to take note that a change is coming. Recall that the info key in the header will contain a link with the details.
  • Identify the nature of the upcoming deprecation and decide if your integration is sensitive to the change, paying particular attention to the cases where we return affected=true.
  • If changes are necessary in your integration, test the new behavior manually by making requests with Asana-Enable set to the name of the deprecation. This should provide a clear example of the new behavior as it is implemented in our API.
  • Implement the changes in your integration in such a way that it can handle the new behavior and be sure to pass the Asana-Enable header when you make requests. This will ensure that you will always get the new behavior regardless of when the default behavior changes.

At this point, your integration has been migrated to the new behavior. At any point after the end date the Asana-Enable header will be ignored by the Asana API and you can feel free to remove it. We strongly recommend keeping it all the way through the end date in case of unforseen circumstances that cause us to temporarily reset the default behavior from the new implementation to the deprecated behavior.


Client library support

The latest version of our official client libraries for Python, Java, PHP, and JavaScript all support sending custom headers and are able to use our deprecations framework. Consult the individual libraries for how to send headers with each request.

Was this section helpful? Yes No


Building a custom app

Note: To build an app for installation and use in the Asana platform, see the overview of app components

Unlike third-party apps and integrations used by many companies, custom apps are designed to only be used within a single domain. For example, an Asana customer may want to use the API to create a bot, integrate Asana with a homegrown tool, or generate custom reports. For more ideas on what you can accomplish through custom apps, here are some common use cases.

Here is a brief list of what to consider when building a custom app:

API explorer

If you are unfamiliar with our API, it may be helpful to start by playing around with our API explorer. The API explorer is a quick and easy way to test various read endpoints and see how various parameters affect responses. You will also find guides and code examples in our documentation and as well as client libraries that are helpful when getting started.

To make API requests against a more comprehensive collection of endpoints, you may wish to use our Postman Collection.

Authentication

Most custom apps use persona access token (PATs) for authentication. In general, PATs are best for projects that don't require multiple users to log in. For example, it is advisable to use PATs to auth scripts, bots, or anything else that doesn’t require taking action on behalf of multiple Asana users. If your custom app requires users to sign in to use it, then you should consider using OAuth.

Client libraries

You should consider using one of our API client libraries for your custom app. They simplify some of the more technically challenging aspects of development such as authentication and pagination. There are code examples for each library to help you get started. The client libraries also help developers navigate API deprecations, which will help you avoid unexpected breaking changes and reduce the overall time required for maintenance.

Note that client library functions are not documented. You need to check the lib/resources/gen folder of each library to see the built-in functions.

API support

If have questions about the API, need help developing your custom app, or just want to meet other Asana developers, you may join our active developer community. On the forum, you can find answers to many technical questions. In addition to community support, internal Asana engineers also help troubleshoot issues on the forum. If you have found an API bug, you can either post it to the community or email the issue to api-support at Asana dot com.

Deployment

Once you’ve created a custom app, you will likely want to host it somewhere. While you could run your script from the command line, doing so is tedious and time consuming.

A simple, automated option is to use launchd to programmatically execute your app on your machine (launchd is like cron but better). Here’s a tutorial to get you started with launchd.

A more robust option would be to deploy your custom app to a hosted server. Here’s a guide exploring some of the popular hosting providers. Hosting your app makes it more resilient and allows you to add more sophisticated features (e.g., webhooks and app components).

Remember to securely store your PAT and any other sensitive data. Never expose a PAT in a public repository.

Maintenance

Be sure that the email address associated with your custom app is being actively monitored. We only email developers for critical issues (e.g., API bans). If you are using a PAT to authenticate, you should confirm that the email address associated with the Asana account that generated the PAT is being actively monitored by one or more people.

We also recommend all developers join the Asana developer forum. This is where we will communicate new API features as well as announce upcoming breaking changes. To ensure you don’t miss these announcements, we encourage you to turn on notifications for the Platform News section of the community.

If your app is having issues, here are some steps to help you troubleshoot the issue:

  1. Carefully read any error messages (see error codes for more details).
  2. Check the status of the Asana API to confirm any potential disruptions.
  3. Check for any issues with the server that is hosting your app.
  4. Check the developer forum to see if others are having the same issue.
  5. If you can't find an answer in the community, post your issue and someone will likely help. Please include all of the required information to reproduce the issue (e.g. verbose cURL request with full response). Never post a PAT to the forum (or share it anywhere else).

Was this section helpful? Yes No


Managing your app

Duplicating an app

You can quickly create a brand new app with the same configurations of an existing one by selecting Duplicate app in the developer console.

duplicate app

This feature can help streamline the creation and management of different versions (e.g., staging, beta, production, etc.) of your application. As a result of this operation, the newly-generated app will retain the configurations of the original app, including:

  • Basic information (e.g., app name, descriptions, authentication URL, etc.)
  • Configurations of app components

Because the newly-generated app is its own unique app, the following will not be carried over from the original app:

  • App credentials (i.e., a new client ID and client secret will be generated)
  • Users who have completed OAuth
  • Organizations in which the app is available
  • Published listings in the app directory or app gallery


Editing a published app

Developers have the ability to submit edits to a published app.

To begin the process, first duplicate your app:

duplicate app modal

After duplicating the original app, provide any edits to any configurations as needed.

When you are ready to submit your app for review, navigate to Submit for review in the sidebar when managing your app. On the app submission page, select I'm submitting changes to a published app in the Submission type dropdown:

editing a published app

Upon submission, your app will follow the standard review process. If the edits are accepted, the original (i.e., previous) app will reflect the new updates, while the duplicate app can be used again for testing.

Transfering app ownership

Domain administrators can request for Asana to transfer an OAuth application to another user in the domain. To begin the process, please complete and submit this form.

Was this section helpful? Yes No


Submit your app

If you've built an application that you wish to share with the Asana community, you can visit the developer console to begin the app submission process.

By submitting an app for review, you'll have the opportunity to distribute your app publicly by listing it in the app directory (as well as in the in-product app gallery for apps with app components).

Submit for review

When managing your app in the developer console, select Submit for review in the sidebar to access the app submission form:

submit My Test App

From there, you'll review an interactive "pre-flight" checklist of app features before submitting an app. This includes:

  • Adding an app icon that uniquely represents your app.
  • Setting up OAuth by adding a redirect URL.
  • Adding app images that show what your app can do.
  • Adding a short description to summarize what your app can do at a glance.
  • Adding a longer description (at least 250 characters) to tell users about the features of your app.
  • Adding information about your company to build trust with users.
  • Adding a support page URL so that users can seek help.
  • Adding your app’s privacy policy URL.

Along with building or providing the above features, you'll be able to submit additional app details through the submit form, such as setup instructions, a screencast video link, and other listing details.

App review process

Once your app has been submitted through the developer console, the review process will begin. At this point, the app will no longer be open for further edits. Note that if your app uses app components, your submission will go through a security review and QA process before it’s listed in the in-product app gallery.

You can track the status of your app submission on the same Submit for review page. If your app submission passes requirements, you'll receive an email notification that your app is ready to publish. At this point, you can select the Publish app button in the developer console to share your app:

approved application screen

If your app submission does not meet requirements, you will receive an email regarding the next steps (i.e., any changes required) to get your app ready for re-review.

Was this section helpful? Yes No


App server

Sample server code (do not use in production)

(an app server cannot be handled via curl)

An app server is required for working with webhooks and app components. An app server refers to the server Asana directly sends requests to. This is different from the service it may be connecting to in the end (e.g., Slack, Jira).


App server requirements

For some features, Asana needs to send requests to an app. In order for an app to use these features, they will need to implement an app server. App servers are simply servers that an app controls. The server needs to be accessible via HTTP requests, successfully return response codes, and sometimes return valid JSON bodies to requests from Asana. Some requests will be sent from the client (i.e., an Asana user's browser), while other requests will be sent from Asana's servers.

App servers define their own paths. Apps will need to declare the endpoints for Asana. For webhooks, this happens when you create a new webhook. For app components, some are declared on app creation while others are dynamically declared in responses to requests from Asana.

You should test/debug your app server with a tool like Postman or Insomnia.

In short:

  • App Servers need to accept HTTP requests and be accessible via URLs.
  • Request payloads will be JSON and app servers should respond with JSON (if a response is needed).
  • Successful requests should respond with either a 200 or 204 status code. Some app components have additional error handling for codes like 400.
  • If an app server is down or throws a 500, we will likely retry the request.


Error handling and retry

If we attempt to send a request to an app server and we receive an error status code, or the request times out, we will retry delivery with exponential backoff.

The tolerance threshold for retries vary between webhooks and app components. Refer to the documentation for each for detailed tutorials.


Authentication

Asana supports a few methods of authenticating with the API. Simple cases are usually handled with a personal access token, while multi-user apps utilize OAuth.

"Authorization: Bearer ACCESS_TOKEN"
  • OAuth 2.0: We require that applications designed to access the Asana API on behalf of multiple users implement OAuth 2.0.
  • Personal access tokens are designed for accessing the API from the command line or from personal applications.


OAuth

Most of the time, OAuth is the preferred method of authentication for developers, users, and Asana as a platform. If you are new to OAuth, take a moment to learn about it with this guide.

In addition to learning about how to use OAuth on the Asana platform, feel free to review the official OAuth spec.

At its core, OAuth is a mechanism for applications to access the Asana API on behalf of a user without the application having access to the username and password. Instead, apps get a token which they can use along with their own application credentials to make API requests.

What is OAuth?

While we recommend using a library to handle the details of OAuth, the following section describes the OAuth process. If you are already using a library or have a deep understanding of OAuth (and have registered an OAuth application), you may want to skip ahead to the quick reference.

  1. If you have not already, you will need to register an application. Take note of the client ID, an application's username, and the client secret (which should be protected as a password).

  2. A user will arrive at your application and click a button that says "Connect with Asana."

  3. This takes the customer to the user authorization endpoint, which displays a page that asks the user if they would like to grant access to your third-party application.

  4. If the customer clicks "Allow", they are redirected back to the application, bringing along a special code as a query parameter. (We are assuming the authorization code grant flow, which is the most common.)

  5. The application can now use the token exchange endpoint to exchange the code, together with the client secret, for a bearer token (which lasts an hour) and a refresh token (which can be used to fetch new bearer token when the current one expires).

  6. The application can make requests of the API using this bearer token for the next hour.

  7. Once the bearer token expires, the application can again use the token exchange endpoint to exchange the refresh token for a new bearer token. This can be repeated for as long as the user has authorized the application.

Register an application

You must first register your application with Asana to receive a client ID and client secret. To do so, first visit the developer console and select Create new app.

You should supply your new application with:

  • App name - A name for your application. A user will see this name when your application requests permission to access their account as well as when they review the list of apps they have authorized.
  • Authentication URL - This is where users will be sent when they authenticate your app.
  • Redirect URL - As described in the OAuth specification, this is where the user will be redirected upon successful or failed authentications. Native or command line applications should use the special redirect URL urn:ietf:wg:oauth:2.0:oob. For security reasons, non-native applications must supply a "https" URL (more on this below).

Optionally, you can upload an icon, a description, and other basic information about your application. Note that all of these attributes can be changed later, as well.

Once you have created an app, the OAuth tab in the sidebar will include a client ID, needed to uniquely identify your app to the Asana API, as well as a client secret.

Note: your client secret is a secret, and it should never be shared with anyone or checked into source code that others could gain access to.

Quick reference

  • Applications can be created from the developer console.
  • The endpoint for user authorization is https://app.asana.com/-/oauth_authorize
  • The endpoint for token exchange is https://app.asana.com/-/oauth_token
  • The endpoint for revoking a token is https://app.asana.com/-/oauth_revoke
  • Asana supports the authorization code grant flow.
  • Once an access token has been obtained, your application can make requests on behalf of the user.

User authorization grant

Request

Send a user to oauth_authorize

<a href="https://app.asana.com/-/oauth_authorize
?client_id=753482910
&redirect_uri=https://my.app.com
&response_type=code
&state=thisIsARandomString
&code_challenge_method=S256
&code_challenge=671608a33392cee13585063953a86d396dffd15222d83ef958f43a2804ac7fb2
&scope=default">Authenticate with Asana</a>

Your app redirects the user to https://app.asana.com/-/oauth_authorize, passing parameters along as a standard query string:

ParameterDescription
client_idrequired The client ID uniquely identifies the application making the request.
redirect_urirequired The URI to redirect to on success or error. This must match the redirect URL specified in the application settings.
response_typerequired Must be either code or id_token, or the space-delimited combination code id_token.
staterequired Encodes state of the app, which will be returned verbatim in the response and can be used to match the response up to a given request.
code_challenge_methodPKCE The hash method used to generate the challenge. Typically S256.
code_challengePKCE The code challenge used for PKCE.
scopeoptional A space-delimited set of one or more scopes to get the user's permission to access. Defaults to the default OAuth scope if no scopes are specified.

Response

If either the client_id or redirect_uri do not match, the user will simply see a plain-text error. Otherwise, all errors will be sent back to the redirect_uri specified.

The user then sees a screen giving them the opportunity to accept or reject the request for authorization. In either case, the user will be redirected back to the redirect_uri.

User is redirected to the redirect_uri

https://my.app.com?code=325797325&state=thisIsARandomString
ParameterDescription
codeIf response_type=code in the request, this is the code your app can exchange for a token
stateThe state parameter that was sent with the authorizing request
Preventing CSRF attacks

The state parameter is necessary to prevent CSRF attacks. As such, you must check that the state is the same in this response as it was in the request. If the state parameter is not used, or not tied to the user's session, then attackers can initiate an OAuth flow themselves before tricking a user's browser into completing it. That is, users can unknowingly bind their accounts to an attacker account.

Requirements

The state parameter must contain an unguessable value tied to the user's session, which can be the hash of something tied to their session when the OAuth flow is first initiated (e.g., their session cookie). This value is then passed back and forth between the client application and the OAuth service as a form of CSRF token for the client application.

Additional resources

OAuth scopes

The Asana API supports a small set of OAuth scopes you can request using the scope parameter during the user authorization step of your authentication flow. Multiple scopes can be requested at once as a space-delimited list of scopes. An exhaustive list of the supported scopes is provided here:

ScopeAccess provided
defaultProvides access to all endpoints documented in our API reference. If no scopes are requested, this scope is assumed by default.
openidProvides access to OpenID Connect ID tokens and the OpenID Connect user info endpoint.
emailProvides access to the user's email through the OpenID Connect user info endpoint.
profileProvides access to the user's name and profile photo through the OpenID Connect user info endpoint.

Token exchange endpoint

Request

When your app receives a code from the authorization endpoint, it can now be exchanged for a proper token.

If you have a client_secret, this request should be sent from your secure server. The browser should never see your client_secret.

App sends request to oauth_token

{
  "grant_type": "authorization_code",
  "client_id": "753482910",
  "client_secret": "6572195638271537892521",
  "redirect_uri": "https://my.app.com",
  "code": "325797325",
  "code_verifier": "fdsuiafhjbkewbfnmdxzvbuicxlhkvnemwavx"
}

Your app should make a POST request to https://app.asana.com/-/oauth_token, passing the parameters as part of a standard form-encoded post body.

ParameterDescription
grant_typerequired One of authorization_code or refresh_token. See below for more details.
client_idrequired The client ID uniquely identifies the application making the request.
client_secretrequired The client secret belonging to the app, found in the details pane of the developer console.
redirect_urirequired Must match the redirect_uri specified in the original request.
coderequired This is the code you are exchanging for an authorization token.
refresh_tokensometimes required If grant_type=refresh_token this is the refresh token you are using to be granted a new access token.
code_verifierPKCE This is the string previously used to generate the code_challenge.

The token exchange endpoint is used to exchange a code or refresh token for an access token.

Response

In the response, you will receive a JSON payload with the following parameters:

{
  "access_token": "f6ds7fdsa69ags7ag9sd5a",
  "expires_in": 3600,
  "token_type": "bearer",
  "refresh_token": "hjkl325hjkl4325hj4kl32fjds",
  "data": {
    "id": "4673218951",
    "name": "Greg Sanchez",
    "email": "gsanchez@example.com"
  }
}
ParameterDescription
access_tokenThe token to use in future requests against the API
expires_inThe number of seconds the token is valid, typically 3600 (one hour)
token_typeThe type of token, in our case, bearer
refresh_tokenIf exchanging a code, a long-lived token that can be used to get new access tokens when old ones expire.
dataA JSON object encoding a few key fields about the logged-in user, currently id, name, and email.

Authorization code grant

To implement the authorization code grant flow (the most typical flow for most applications), there are three steps:

  1. Send the user to the authorization endpoint so that they can approve access of your app to their Asana account

  2. Receive a redirect back from the authorization endpoint with a code embedded in the parameters

  3. Exchange the code via the token exchange endpoint for a **refresh_token** and, for convenience, an initial access_token.

  4. When the short-lived access_token expires, the **refresh_token** can be used with the token exchange endpoint, without user intervention, to get a fresh access_token.

The token that you have at the end can be used to make requests to the Asana API on the user's behalf.

Proof key for code exchange (PKCE) OAuth extension

User authorization endpoint

{
  ...
  "code_challenge": "671608a33392cee13585063953a86d396dffd15222d83ef958f43a2804ac7fb2",
  "code_challenge_method": "S256"
}

Token exchange endpoint

{
  ...
  "code_verifier": "fdsuiafhjbkewbfnmdxzvbuicxlhkvnemwavx"
}

PKCE proves the app that started the authorization flow is the same app that finishes the flow. You can read more about it here. In short, the process is as follows:

  1. Whenever a user wants to OAuth with Asana, your app server should generate a random string called the code_verifier. This string should be saved to the user (as every code_verifier should be unique per user). This should stay on the app server and only be sent to the token exchange endpoint.

  2. Your app server will hash the code_verifier with SHA256 to get a string called the code_challenge. Your server will give the browser only the code_challenge & code_challenge_method. The code_challenge_method should be the string "S256" to tell Asana we hashed with SHA256. More specifically, code_challenge = BASE64URL-ENCODE(SHA256(ASCII(code_verifier))).

  3. The browser includes code_challenge & code_challenge_method when redirecting to the user authorization endpoint.

  4. The app server should include the code_verifier in its request to the token exchange endpoint.

Asana confirms that hashing the code_verifier with the code_challenge_method results in the code_challenge. This proves to Asana the app that hit the user authorization endpoint is the same app that hit the token exchange endpoint.

Secure redirect endpoint

As the redirect from the authorization endpoint in either grant procedure contains a code that is secret between Asana's authorization servers and your application, this response should not occur in plaintext over an unencrypted http connection. Because of this, we enforce the use of https redirect endpoints for application registrations.

For non-production or personal use, you may wish to check out stunnel, which can act as a proxy to receive an encrypted connection, decrypt it, and forward it on to your application. For development work, you may wish to create a self-signed SSL/TLS certificate for use with your web server; for production work we recommend purchasing a certificate from a certificate authority. You may review a short summary of the steps for each of these processes here.

Your application will need to be configured to accept SSL/TLS connections for your redirect endpoint when users become authenticated, but for many apps, this will simply require a configuration update of your application server. Instructions for Apache and Nginx can be found on their respective websites, and most popular application servers will contain documentation on how to proceed.

Token deauthorization endpoint

Request

An authorization token can be deauthorized or invalidated by making a request to Asana's API.

Your app should make a POST request to https://app.asana.com/-/oauth_revoke, passing the parameters as part of a standard form-encoded post body.

ParameterDescription
client_idrequired The client ID uniquely identifies the application making the request.
client_secretrequired The client secret belonging to the app, found in the details pane of the developer console.
tokenrequired The refresh token that should be deauthorized. Bearer tokens will be rejected.

The body should include a valid refresh token, which will cause the refresh token and any associated bearer tokens to be deauthorized. Bearer tokens are not accepted in the request body since a new bearer token can always be obtained by reusing an authorized refresh token.

Response

A successful response with a 200 status code indicates that the token was deauthorized or not found. An unsuccessful response with a 400 status code will be returned if the request was malformed due to missing any required fields or specifying an invalid token (such as a bearer access token).


Personal access token

Personal access tokens (PATs) are a useful mechanism for accessing the API in scenarios where OAuth would be considered overkill, such as access from the command line and personal scripts or applications. A user can create many, but not unlimited, personal access tokens. When creating a token, you must give it a description to help you remember what you created the token for.

Personal access tokens should be used similarly to OAuth access tokens when accessing the API (i.e., passing them in the Authorization header)

Example cURL request authenticating with a PAT

curl https://app.asana.com/api/1.0/users/me \
  -H "Authorization: Bearer ACCESS_TOKEN"

You can generate a personal access token from the Asana developer console. See the authenticating section for detailed instructions on getting started with PATs.

For security, you should regularly review the list of personal access tokens you have created and deauthorize those that you no longer need.

Remember to keep your tokens secret and treat them just like passwords. Your tokens act on your behalf when interacting with the API. As such, do not hardcode them into your programs. Instead, opt to use them as environment variables.


OpenID Connect

Asana also supports the OpenID Connect protocol for authenticating Asana users with your applications. That is, in addition to the normal code and token response types for the OAuth flow, you can also use the id_token response type.

For this response type, you are not granted an access token for the API, but rather given a signed JSON Web Token containing the user's ID along with some metadata. If you want to allow users to log into your services using their Asana account, the OpenID Connect protocol is an ideal way to authenticate an Asana user. To obtain an ID token, you must request the openid scope during the authentication flow.

It is also possible to obtain an ID token alongside an authorization code in the authorization code grant flow by using the (space-delimited) code id_token response type. If you do, the redirect parameters will include the ID token in addition to everything you would normally receive.

To access additional information about the user in a standardized format, we also expose a user info endpoint that can provide the user's name, email address, and profile photo. This data is available by making a GET request to https://app.asana.com/api/1.0/openid_connect/userinfo with an OAuth access token that has the openid scope. Depending on the scopes tied to that token, you will receive different pieces of data. Refer to our list of OAuth scopes to determine which additional scopes you need to get the data you want.

Metadata about our OpenID Connect implementation is also made available through OpenID Connect's discovery protocol. Making an unauthenticated GET request to https://app.asana.com/api/1.0/.well-known/openid-configuration will provide all the details of our implementation necessary for you to use OpenID Connect with Asana's API.

Was this section helpful? Yes No


Custom external data

Custom external data allows a client application to add app-specific metadata to tasks in the API. The custom data includes a string gid that can be used to retrieve objects and a data blob that can store character strings.

The blob may store unicode-safe serialized data such as JSON or YAML. The external gid is capped at 1,024 characters, while data blobs are capped at 32,768 characters. Each object supporting external data can have one gid and one data blob stored with it. You can also use either or both of those fields.

The external gid field is a good choice to create a reference between a resource in Asana and another database, such as cross-referencing an Asana task with a customer record in a CRM, or a bug in a dedicated bug tracker. Since it is just a unicode string, this field can store numeric IDs as well as URIs. However, when using URIs, extra care must be taken that the parameter is escaped correctly when forming queries . By assigning an external gid, you can use the notation external:custom_id to reference your object anywhere that you may use the original object gid.

Note: You will need to authenticate with OAuth, as the gid and data are app-specific, and these fields are not visible in the UI. This also means that external data set by one Oauth app will be invisible to all other Oauth apps. However, the data is visible to all users of the same app that can view the resource to which the data is attached, so this should not be used for private user data.

ParameterDescription
gid"contractor_name" The external gid. Max size is 1024 characters. Can be a URI.
data"{ \"time_estimate\": 3600, \"time_spent\": 1482 }" The external data blob. Max size is 32,786 characters.

Was this section helpful? Yes No


Overview of webhooks

Webhooks allow an application to be notified of changes in Asana.

This is similar to our events resource, but webhooks "push" events via HTTP POST rather than expecting integrations to repeatedly "poll" for them. For services that are already accessible on the internet, this is often more convenient and efficient.

However, webhooks require a server to be accessible over the internet at all times to receive the event. For most simple integrations, events provide much of the same benefits while using a significantly simpler implementation which does not require maintaining an internet-accessible server.

Webhooks and events streams are served from the same infrastructure, where, on average, events are delivered within a minute of occurring. This system is designed for at most once delivery, meaning in exceptional circumstances we may fail to deliver events. Furthermore, webhooks cannot be replayed once delivered. For these reasons, if your use case requires strong guarantees about processing all changes on a resource and cannot tolerate any missing events, regardless of how rare that might be, we recommend building a fallback polling system that fetches the resource periodically as well. Note that, if your server does not respond to a webhook with a successful HTTP status code within 10 seconds, Asana will try to resend the webhook for up to 24 hours before giving up.


Setting up a webhook

In order to start receiving webhook events about an Asana resource, you will need to establish a webhook connnection and complete the initial handshake. This requires that you create and host an internet-accessible webhook server.

The following video tutorial walks you through the process of:

  1. Setting up an example webhook server [1:58]
  2. Setting up business logic for the webhook handshake [3:45]
  3. Establishing a webhook on an Asana resource [6:45]
  4. Verifying and receiving webhook events[9:02]

You can find the tutorial source code here.


The webhook handshake

In order to ensure that the receiving server is available to receive incoming events from a webhook Asana will POST to the requested target endpoint during the webhook creation request. In other words, the outgoing webhook creation request will wait to return until another full POST request from Asana's servers to the target has been completed, then the webhook creation request can return with a successful response.

Note: This means that your server must be able to handle being blocked on the outgoing create request while still being able to receive and handle an incoming request. A common reason that webhook handshakes fail is that servers are not able to asynchronously handle the handshake request.

Included in the webhook handshake is a HTTP header called X-Hook-Secret. To successfully complete the handshake, the receiving server should echo back the same header with the same value and a 200 OK or 204 No Content response code.

The purpose of this header is to provide a shared secret that both Asana and the receiving server both store. This is the only time it will be transmitted. In future webhook events, Asana will use this key to compute a signature over the webhook callback request's body which can be used to verify that the incoming request was genuine (details below). We strongly recommend that you take advantage of this security feature and reject webhooks that have an invalid signature.

Webhook handshake

For an example of how this might be implemented in code, see our sample implementation in Node.js and Python


Filtering

Webhook events will "propagate up" from contained objects through to parent objects. For example, changes to comments will be sent to webhooks on the parent task and to ones on the task's projects. This way, a webhook on a project will be notified of all changes that occur in all of its tasks, subtasks of those tasks, and comments on those tasks and subtasks.

This can be a lot of data, some of which might not be relevant to a particular integration, so Asana's webhooks have a filtering feature which allows integrations to specify only the types of changes that they care about. By specifying the list of WebhookFilters on webhook creation an integration can select just the subset of events it wants to receive. When filters are specified on the webhook, events will only be delivered if they pass any of the filters specified when creating the webhook.

To reduce the volume of data to transfer, webhooks created on teams, portfolios, and workspaces must specify filters. In addition, the set of event filters that can be placed on a team-level or workspace-level webhook is more limited than filters for webhooks that are created on lower-level resources:

  • Webhook events from tasks, subtasks, and stories won't be propagated to these higher-level webhooks, so all changes on these resources are automatically filtered out.
  • Webhook events from project resources can be filtered for these actions: added, removed, deleted, undeleted, and changed.
  • Webhook events from team_membership resources can be filtered to actions added and removed.
  • Webhook events from workspace_membership resources can be filtered to added and removed.


Actions

Actions define the type of action that was taken on the resource to trigger an event for your webhook. When you receive a webhook event, there will be an associated action in the event response that indicates the action that triggered the event. Additionally, actions are used in webhook filters. You can specify an action and a resource_type in the filters parameter when establishing a webhook so that you will only receive events matching the action specified for the resource in your filter.

The following is a list of actions that we support:

  • added - a new resource was created
  • changed - the resource was modified
  • deleted - the resource itself was deleted
  • removed - the resource was removed from a parent
  • undeleted - the deletion of the resource was undone


Resources and actions

Below is a list of resources and actions that can trigger an event for those resources. This is not an exhaustive list, but should cover the most common use cases.

  • Attachment - deleted, undeleted
  • Portfolio - added, deleted, removed
  • Project - added, changed, deleted, removed, undeleted
  • Project Membership - added, removed
  • Project Template Configuration - added, deleted, removed
  • Project Template Configuration Membership - added, removed
  • Section - added, changed, deleted, undeleted
  • Story: type: <all other types> added, removed, undeleted
  • Story: type: comment added, changed, removed, undeleted
  • Tag - added, changed, deleted, undeleted
  • Task - added, changed, deleted, removed, undeleted
  • Team - added, changed, deleted
  • Team Membership - added, removed
  • Workspace - added, removed, changed
  • Workspace Memberships - added, removed

For example, let's say you establish a webhook for an attachement by providing the GID of an attacment in your resource parameter. This means that based on the resource and action definition for attachment above, a deleted or an undeleted action will trigger your attachement webhook.


Example webhook servers

The following are example webhook servers that demonstrates the features of Asana webhooks. This includes how to handle the webhook handshake as well as how to receive and verify webhook events.

To try out this demo out for yourself, be sure to generate a new personal access token, then follow the instructions in README.


Webhook events

Receiving events

Because multiple events often happen in short succession, a webhook payload is designed to be able to transmit multiple events at once. The schema of these events is described in event.

The HTTP POST that the target receives contains:

  • An X-Hook-Signature header, which allows verifying that the payload is genuine. The signature is a SHA256 HMAC signature computed on the request body using the shared secret transmitted during the handshake. Verification is strongly recommended, as it would otherwise be possible for an attacker to POST a malicious payload to the same endpoint.
  • A JSON body with a single key, events, containing an array of the events that have occurred since the last webhook delivery. Note: this list may be empty, as periodically we send a "heartbeat" webhook to verify that the endpoint is still available.

Note that events are "compact" and contain only some basic details of the change, not the whole resource. We expect integrations to make additional requests to the API to retrieve the latest state from Asana.

Webhook receiving events


Errors and retries

If we attempt to send a webhook payload and we receive an error status code, or the request times out, we will retry delivery with exponential backoff. In general, if your servers are not available for an hour, you can expect it to take no longer than approximately an hour after they come back before the paused delivery resumes. However, if we are unable to deliver a message for 24 hours, the webhook will be deleted.


Webhook heartbeat events

Webhooks keep track of the last time that delivery succeeded, and this time is updated with each success (i.e, last_success_at). A delivery succeeds when your webhook server responds to a webhook event with a 200 OK or 204 No Content response code. To help facilitate this delivery succeeded tracking, webhooks have a “heartbeat” that will deliver an empty payload to your webhook server at the initial handshake, and then at every eight hours. This way, even if there is no activity on the resource, the last success time (i.e last_success_at) will still be updated continuously.

Note that if we do not receive a response to a "heartbeat" after 24 hours we will delete that webhook connection. This means that specific webhook route will not receive future events from Asana. Additionally, if you make a request for that specific webhook (GET /webhooks/{webhook_gid}), that webhook will no longer be available.

Scenario 1: successful heartbeat (after intial handshake)

Successful webhook heartbeat (After initial handshake)

Scenario 2: failed heartbeat (after intial handshake)

Failed webhook heartbeat (After initial handshake)


Webhook security

In order to receive webhook events, your webhook endpoint needs to be accessible over the internet. As such, because your webhook endpoint is publicly accessible over the internet, it is vulnerable to receiving events that are not from Asana. To ensure that your webhook endpoint receives events from Asana, it is important to verify each request.

Request verification can be done by comparing an HMAC signature generated from the X-Hook-Secret and request body to the X-Hook-Signature. When you first establish a webhook with Asana, we send your webhook endpoint an X-Hook-Secret. Once received, this X-Hook-Secret should be stored by your webhook server.

When a webhook event is triggered, Asana sends along a X-Hook-Signature in the request header. At this point, your webhook server should extract the body from the request and use it along with the stored X-Hook-Secret to generate an HMAC signature. HMAC signatures can be generated using a HMAC library in your language of development and passing in the X-Hook-Secret as the secret and in the request body as the message. The generated HMAC signature should match the X-Hook-Signature sent in the request header. If these signatures differ, it can indicate that the event received was not from Asana.

To read more about our X-Hook-Signature see receiving events. For examples of servers configured to verify HMAC signatures, see our example webhook servers.


Webhook limits

Webhooks have two different limits:

  • 1k limit per resource in Asana. (If 10 apps each have 100 webhooks watching the same resource, no more webhooks can be placed on the webhook. /events streams count towards this limit)
  • 10k per user-app (An app can have 10k webhooks for EACH user)


Webhook troubleshooting

Webhook stopped receiving events

This can happen when your registered webhook endpoint ignores incoming heartbeat events. We send periodic heartbeat events to your webhook endpoint every 8 hours to keep track of the last time that delivery succeeded. If we receive no response to heartbeat events after 24 hours, we will delete the registered webhook connection.

To fix this, you will need to modify your webhook endpoint code to respond to heartbeat events and re-establish a webhook connection.

Computed webhook signature differs from X-Hook-Signature

When computing your SHA256 HMAC signature, make sure to utilize the X-Hook-Secret and the full body of the request. The X-Hook-Secret can be found in the header of the initial request sent to your webhook endpoint during the initial handshake process. The full body of the request should also be used, not just a portion of the data inside the request body.

Additionally, check the documentation of the library you are using to compute the SHA256 HMAC signature, as it may require you to convert the request body from an object into a string.


Overview of app components

An important step in maintaining flow at work is having all the information you need in one place. Asana is for teams to track projects, to provide clarity on who is doing what by when, and to automate repetitive processes. With app components, it's now easier than ever to see key work information from other tools on the surface of tasks, as well as automate cross-tool processes.

Apps can use app components to display customized widgets, forms, and rules within Asana's user interface. Under the hood, requests are made from Asana directly to your app server. Your App Server controls the information within these customized widgets, as well what happens when a user takes actions within these components.

Using app components, you can build customizable in-product experiences for apps within Asana by leveraging capabilities such as:

For a visual tour on getting started with app components, feel free to review the following video. Then, when you're ready, visit our getting started guide to begin building right away.

You can find the tutorial source code here.

To test and render the different capabilities of app components dynamically, you may access the UI builder.


Widget

Request to the app server

https://app-server.com/widget?workspace=12345&task=23456&user=34567&locale=en&attachment=45678&asset=56789&expires_at=2011-10-05T14%3A48%3A00.000Z&resource_url=https%3A%2F%2Fcompany.atlassian.net%2Fissue%2F1254

Response from the app server

{
  "template": "summary_with_details_v0",
  "metadata": {
    "title": "My Widget",
    "subtitle": "Subtitle text",
    "subicon_url": "https://www.fillmurray.com/16/16",
    "fields": [
      {
        "name": "Pill",
        "type": "pill",
        "text": "Some text",
        "color": "green"
      },
      {
        "name": "Date & time",
        "type": "datetime_with_icon",
        "datetime": "2016-01-15T22:20:54.722Z",
        "icon_url": "https://www.fillmurray.com/16/16"
      },
      {
        "name": "Text",
        "type": "text_with_icon",
        "text": "Some text",
        "icon_url": "https://www.fillmurray.com/16/16"
      },
      {
        "name": "Text",
        "type": "text_with_icon",
        "text": "Some text"
      }
    ],
    "footer": {
      "footer_type": "custom_text",
      "text": "Last updated today",
      "icon_url": "https://www.fillmurray.com/16/16"
    },
    "num_comments": 2
  }
}

A widget is a card that is used to show data about an external resource. Currently, widget appear inside of tasks. While the contents of a widget may change, the overall format stays consistent across apps. Apps can control what layout they prefer by supplying their preferred template. You can see the available templates in the Enumerated Values section of response schema.

The app server controls the content of this Widget. When an Asana user's browser navigates to a widget, Asana sends a request to the registered app server. As long as the response from the server is valid (like the example on the right), the widget will display.

How does Asana determine when a widget should be shown? When a task is opened in Asana, it checks each attachment on the task. If an attachment has a URL that fits with an app's registered match URL pattern (ex: https:\/\/.*.atlassian.net\/.*) then it shows a Widget. A GET request is sent to the app's widget metadata URL, including URL parameters like task, user, and workspace.

UI builder: widget

Visit the UI Builder to configure a Widget in an interactive test environment. For an overview of the UI Builder, see this guide.

Widget configurations

PropertyDescription
Widget metadata URLA URL that Asana uses to make requests for the data needed to load a Widget, which displays information about a third party resource.
Match URL patternA regex which allows Asana to compute whether a URL attachment is supported by an activated app on the project in order to render a widget.


Request to the app server

https://app-server.com/form?workspace=12345&task=23456&user=34567&locale=en&expires_at=2011-10-05T14%3A48%3A00.000Z

Response from the app server

{
  "template": "form_metadata_v0",
  "metadata": {
    "title": "Create new resource",
    "submit_button_text": "Submit",
    "on_submit_callback": "https://www.example.com/create/action/onsubmit",
    "on_change_callback": "https://www.example.com/create/action/onchange",
    "fields": [
      {
        "type": "single_line_text",
        "id": "single_line_text_full_width",
        "name": "Single-line text field",
        "value": "",
        "is_required": true,
        "placeholder": "Type something...",
        "width": "full"
      },
      {
        "type": "multi_line_text",
        "id": "multi_line_text",
        "name": "Multi-line text field",
        "value": "",
        "is_required": false,
        "placeholder": "Type something...",
        "width": "full"
      },
      {
        "type": "rich_text",
        "id": "rich_text",
        "name": "Rich text field",
        "is_required": false,
        "value": ""
      },
      {
        "type": "dropdown",
        "id": "dropdown_half_width",
        "name": "Dropdown field",
        "is_required": false,
        "options": [
          {
            "id": "1",
            "label": "Option 1",
            "icon_url": "https://www.fillmurray.com/16/16"
          },
          {
            "id": "2",
            "label": "Option 2",
            "icon_url": "https://www.fillmurray.com/16/16"
          }
        ],
        "width": "half"
      },
      {
        "type": "typeahead",
        "id": "typeahead_half_width",
        "name": "Typeahead field",
        "is_required": false,
        "typeahead_url": "https://www.example.com/typeahead",
        "placeholder": "Search for something...",
        "width": "half"
      },
      {
        "type": "date",
        "id": "date",
        "name": "Date field",
        "placeholder": "MM/DD/YYYY",
        "is_required": false
      },
      {
        "type": "datetime",
        "id": "datetime",
        "name": "Date & time field",
        "placeholder": "MM/DD/YYYY HH:MM am/pm",
        "is_required": false
      },
      {
        "type": "checkbox",
        "id": "checkbox",
        "name": "Checkbox field",
        "is_required": true,
        "options": [
          {
            "id": "1",
            "label": "Choice 1"
          },
          {
            "id": "2",
            "label": "Choice 2"
          }
        ]
      },
      {
        "type": "radio_button",
        "id": "radio_button",
        "name": "Radio button field",
        "value": "1",
        "is_required": true,
        "options": [
          {
            "id": "1",
            "label": "Choice 1"
          },
          {
            "id": "2",
            "label": "Choice 2"
          }
        ]
      }
    ]
  }
}

A modal form allows users to fill out a dynamic app-controlled list of fields. The number of fields can range from 0-20. Once a form is submitted, the information is sent to the app server and Asana will perform different functions depending on what the server responded with. If the app wants to cause additional changes within Asana, the app server will need to make the changes via the API.

An advanced feature of modal forms is live on_change events. While a user is filling out a form, the app server can receive on_change requests. These requests include what the user has changed, and allow the app server to respond with an updated form. Apps can build complex branching logic depending on changes that a user makes.

To take advantage of on_change events, you may set a form field's is_watched value to true and an on_change_callback endpoint to hit with updates. See the on_change field in the response to the form metadata request. The request sent to that endpoint is the on change callback request.

UI builder: modal form

Visit the UI builder to configure a modal form in an interactive test environment. For an overview of the UI Builder, see this guide.

PropertyDescription
Form metadata URLA URL that Asana uses to request data from the app about fields it should display in the modal form.


Lookup

Request to the app server

https://app-server.com/lookup?value=Item&workspace=12345&task=23456&user=34567&locale=en&expires_at=2011-10-05T14%3A48%3A00.000Z

Response from the app server

{
  "header": "Optional header",
  "items": [
    {
      "title": "Item title",
      "subtitle": "Item subtitle",
      "value": "searchResult1",
      "icon_url": "https://www.fillmurray.com/16/16"
    },
    {
      "title": "Item title",
      "subtitle": "Item subtitle",
      "value": "searchResult2",
      "icon_url": "https://www.fillmurray.com/16/16"
    },
    {
      "title": "Item title",
      "subtitle": "Item subtitle",
      "value": "searchResult3",
      "icon_url": "https://www.fillmurray.com/16/16"
    },
    {
      "title": "Item title",
      "subtitle": "Item subtitle",
      "value": "searchResult4",
      "icon_url": "https://www.fillmurray.com/16/16"
    }
  ]
}

Users can send a search term to the app server. The term is often a URL or the title of an external resource. The app server then responds with a resource or an error.

UI builder: lookup

Visit the UI builder to configure a lookup in an interactive test environment. For an overview of the UI builder, see this guide.

Lookup configurations

PropertyDescription
Resource attach URLA URL that Asana will make a request to when a user submits a value to attach (i.e., when clicking Add).
Placeholder textOptional. Placeholder action text that appears in the lookup input field after the user clicks on the lookup action text.
Resource typeahead URLA URL that Asana will make a request to when a user types into a lookup field.


Rule action

Request to the app server

https://app-server.com/rule?workspace=12345&project=23456&action_type=45678&action=56789&user=34567&locale=en&expires_at=2011-10-05T14%3A48%3A00.000Z

Response from the app server

{
  "template": "form_metadata_v0",
  "metadata": {
    "on_submit_callback": "https://www.example.com/create/action/onsubmit",
    "on_change_callback": "https://www.example.com/create/action/onchange",
    "fields": [
      {
        "type": "typeahead",
        "id": "typeahead",
        "name": "Typeahead field",
        "is_required": false,
        "typeahead_url": "https://www.example.com/typeahead",
        "placeholder": "Search for something...",
        "width": "full"
      },
      {
        "type": "multi_line_text",
        "id": "multi_line_text",
        "name": "Multi-line text field",
        "value": "",
        "is_required": false,
        "placeholder": "Type something...",
        "width": "full"
      },
      {
        "type": "single_line_text",
        "id": "single_line_text_full_width",
        "name": "Single-line text field",
        "value": "",
        "is_required": true,
        "placeholder": "Type something...",
        "width": "full"
      },
      {
        "type": "dropdown",
        "id": "dropdown",
        "name": "Dropdown field",
        "is_required": false,
        "options": [
          {
            "id": "1",
            "label": "Option 1",
            "icon_url": "https://www.fillmurray.com/16/16"
          },
          {
            "id": "2",
            "label": "Option 2",
            "icon_url": "https://www.fillmurray.com/16/16"
          }
        ],
        "width": "full"
      },
      {
        "type": "date",
        "id": "date",
        "name": "Date field",
        "placeholder": "MM/DD/YYYY",
        "is_required": false
      },
      {
        "type": "datetime",
        "id": "datetime",
        "name": "Date & time field",
        "placeholder": "MM/DD/YYYY HH:MM am/pm",
        "is_required": false
      },
      {
        "type": "checkbox",
        "id": "checkbox",
        "is_required": true,
        "options": [
          {
            "id": "1",
            "label": "Checkbox field"
          }
        ]
      },
      {
        "type": "radio_button",
        "id": "radio_button",
        "name": "Radio button field",
        "value": "1",
        "is_required": true,
        "options": [
          {
            "id": "1",
            "label": "Choice 1"
          },
          {
            "id": "2",
            "label": "Choice 2"
          }
        ]
      },
      {
        "name": "This is a static block of text.",
        "type": "static_text",
        "id": "static_text"
      }
    ]
  }
}

A rule action allows users to customize actions triggered by Asana's rule engine. They function similarly to a modal form, as Asana requests a form definition from the app server. The app controls the form fields, handles on_change events, and stores the inputs of the form. When a rule is created, Asana sends a request to the app server with the user-specified inputs. When the rule is triggered, Asana sends an event to the app server.

Rule actions are a part of Asana rules.

Note: An app server must be hosted in order for rule actions to function. For a brief list of popular hosting options, see hosting.

To see an example app server written for rule actions, see our app-components-rule-action-example-app on GitHub.

UI builder: rule action

Visit the UI builder to configure a rule action in an interactive test environment. For an overview of the UI builder, see this guide.

Rule action Configurations

PropertyDescription
Display nameThe Rule Action name visible to end users in the rule builder (e.g., "Create a Jira issue").
Run action URLA URL that Asana will make a request to when the rule is triggered.
Form metadata URLA URL that Asana will make a request to to display the configuration form.


Entry point

Entry point

The entry point allows users to initiate the lookup and modal form components from tasks.

To configure the entry point, one or both of the above capabilities must be configured first. If only one of these capabilities is configured, the entry point takes the form of a button. If both of these capabilities above are configured, the entry point is rendered as a dropdown menu.

Entry point configurations

PropertyDescription
Lookup action textClickable action text that allows users to initiate a lookup.
Modal form action textClickable action text that allows users to initiate a modal form.


Getting started

This guide will show you how to begin building with app components. To make best use of the following tutorials, be sure you've already reviewed the overview of app components.


Overview of build steps

The overall development process for app components involves the following:

  1. Create the app in the developer console.
  2. Configure the app in the developer console.
  3. Build the app server.
  4. Get the app ready for publishing.
  5. Submit the app for review.

The tutorials in this guide will cover the first two steps of the overall build process: creating and configuring the app. By the end of this guide, you will have an app ready to interact with your app server.


Before you begin

Get a sandbox

To get started with app components, you'll need an Asana account. This will give you a workspace to access the developer console, through which you can create and configure apps directly in Asana's user interface.

While you can sign up for an account if you don't already have one, we actually recommend using a developer sandbox to help you build in a separate, dedicated environment. You'll still be able to access the developer console this way, but the developer sandbox will also grant you access to the example app components app, where you can explore the capabilities and features of app components in-depth.

Consider the app's user experience

Each app built with app components is unique, and will leverage different capabilities of app components. For example, the Zoom app lets users create a new meeting or attach an existing meeting to an Asana task. Under the hood, these actions are made possible by using a modal form to create new meetings, lookup to search and connect existing meetings, and a widget to display the external meeting data in a task. Meanwhile, a different app may forego such functionalities, and instead exclusively use rule actions to automate workflows between Asana and another tool. Overall, we encourage you to experiment with different capabilities and decide how you want your end user's experience to be.

To see visual documentation for how you can design your app, check out the app components toolkit. For further inspiration, feel free to navigate to the app directory.

Start building the app server

Because app components allow your end users to interact with resources outside of Asana's user interface, an app server is required for building with app components. While it isn't necessary to have a complete app server before moving forward, it's a good idea to at least know the URLs to any server endpoints you want to configure ahead of time (e.g., your URL to get the metadata for a widget), though these can be configured or changed at any time.

Feel free to review the app-components-example-app on GitHub to see an example server written in Express.js. This server is also used in the example app.


Create the app

The first step is to create the app in your developer console. Navigate to Create new app and provide a name for your app. If your app is published, this name will appear in the Asana app for users to see, including in both the app gallery and app directory.

My apps


Configure the app

Once your app has been created, you'll automatically be brought to the new app's settings. From here, you can make the configurations necessary to define your app.

Note: To see these settings again, navigate to your app in the developer console.

Configure app listing details

On the App listing details tab, provide some information about your app.

App listing details

These details will be accessible to the end user, and are meant to help them identify and learn more about your application.

PropertyDescription
App iconYour app's icon, shown to users to identify your application.
App nameYour app's name, shown to users to identify your application.
Short descriptionA short description of the app.
Long descriptionAn extended description of the functionality of the app. Shown in the app details page.
App imagesImages of your application. Shown in the app details page.
Company nameYour company name.
Company URLURL of the page where users can learn more about your company.
App landing page URLURL of the page where users can learn more about this app and install it.
Support URLURL of the page where users can read documentation or get support.
Privacy policy URLURL of the page where users can read your app's privacy policy.

Configure capabilities

The next set of configurations you make will differ depending on what functionality and user experience you're looking to build. Each of the capabilities below are configured separately in the App Components tab in the developer console:

App Components configuration

Follow the links in the table below to view the configurations required to build each capability (e.g., Widget).

CapabilityDescription
WidgetDisplay a dynamic, custom widget card in tasks that shows data from an attached resource.
Modal formBuild a custom form to allow users to create new resources. This form gets shown in a modal when a user clicks the entry point on a task.
LookupShow a text input to allow users to find and attach resources to tasks. Users can paste a URL, ID, or pick from an optional typeahead.
Rule actionsBuild one or more custom action for Asana’s Rules engine to help users automate their work. Users can create rules that run your action when triggered.
Entry pointConfigure the button in tasks that initiates the lookup and modal form. To configure this, one or both of these capabilities must be configured first.

Configure the installation flow

When a user connects an app with app components to Asana for the first time, they will go through an installation flow. There are a number of configurations that can be made here, including:

PropertyDescription
HeadlineText that appears as a title on the overview of features (i.e., "value props").
SubheadText that appears as a subtitle on the overview of features.
Feature imageThe image representing a feature. For the best user experience, we recommend providing three feature images.
Caption textText below the image of a feature.
Image alt textAlt text for image of feature.
Authentication URLA URL which informs Asana where to make requests for authenticating and authorizing users. This is called during installation or when the app returns a response indicating the user must authenticate to continue.

To make these configurations, navigate to the Install your app tab and provide your configurations:

Install your app configs

For an in-depth overview of the installation flow (including its customizations), see the installation flow.


Next steps

At this point, your app has been created and fully configured. For further configurations (e.g., updating a URL, replacing button text, etc.), you can head back into the developer console to make any necessary changes.

Next, you can explore how to build the UI of your application via the UI builder, which will help you finish building your app server. By leveraging the URLs configured earlier in the sections above, your app server is what enables your end users to interact with resources external to Asana (i.e., via requests to endpoints exposed on the app server).

When both your app and your app server are complete, you can move forward with getting your app ready for publishing.


UI builder

By building with app components, applications can display customized widgets, forms, and rules within Asana's user interface. The UI builder is a place for developers to build the user interface of these capabilities in a dynamic, interactive test environment.

Use the UI builder to see how your:

Note: The UI builder is a front end tool that allows you to test building your app component application's user interface. The UI builder itself is not capable of making HTTP requests, and as such, certain features cannot be displayed dynamically (e.g., watched fields, Typeahead, etc.).

UI Builder


Preset configurations

The UI builder allows you to view preset UI configurations for the capabilities of app components:

UI builder capability selection

Likewise, within each selected capability, you are able to select and view Minimalist, Normal, and Everything levels of preset configuration (i.e., with Everything being the highest level of configuration):

UI builder preset configurations


Custom configurations

Beyond the preset "template" configurations, you are also able to interact with the UI builder's code editor directly. The result of the properties and values that you input in the editor will be dynamically rendered in the left panel:

UI builder custom configurations


Copying configurations

As you use the UI builder to test and build your server responses (e.g., getting form metadata), use the Copy to clipboard button to quickly copy the resulting metadata. You may choose to paste this metadata directly into your app server code.

UI builder copy button

To get started with the UI builder, visit App Components in the sidebar of your app in the developer console, then select View UI builder. Alternatively, you may access the UI builder directly.


Building the app server

Because apps built with app components allow end users to interact with resources external to Asana, an app server is required in order for your app to function. Asana will make requests directly to endpoints exposed on the app server, which controls, for example, what the user sees in a Widget or what happens when the user takes certain actions.

To see an example server written in Express.js, check out the app-components-example-app on GitHub. This server is also used in the example app.

As a final note, we recommend creating and configuring your app before moving forward with building the app server. You may also leverage the UI Builder to test and render the user interface of your application.

After you have completed building both the app and app server, you will be ready to begin the publishing process.


Authorization

<!-- Example: an app might return this HTML in response to the 
Authentication URL request after the Oauth flow is completed:
 -->

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>You have successfully connected Asana to the app</title>
  </head>
  <body>
    Success!
    <script>
      window.opener.postMessage("success", "https://app.asana.com");
      window.close();
    </script>
  </body>
</html>

Overview

The Asana platform needs confirmation from the app components app that authentication has completed successfully. When an app is added to a project, the user adding that app is sent to its Authentication URL (see the installation flow). The app may perform OAuth with Asana, OAuth with a different app, perform both, or perform none. For apps intended for multi-user usage, OAuth with Asana is required to securely determine the identity of the user performing the authorization. Otherwise, as long as the app confirms the flow was complete, Asana will successfully add the app to the project. This will allow requests to be sent to the app's predefined endpoints.

How it works

Under the hood, we carry this out by listening for a message from the authentication popup window containing the string "success". When we make a request to the app's Authentication URL, the browser opens a popup or "child" window and waits for it to respond with "success" using window.postMessage. The target window for this postMessage call should be the opener, accessible via window.opener.

Note that for security purposes, the origin of the event (which is added to the event by the browser) needs to match the root of the Authentication URL registered to the app. That is, the authentication success message must be initiated from the same origin that receives the authentication request. This is different from the targetOrigin of the window.opener.postMessage call, which must be exactly "https://app.asana.com".

Additional notes

If the app wants additional data from Asana or wants to make changes within Asana, the app should have the user complete an OAuth flow against Asana.

Keep in mind that this authorization provides the app server with a single user's auth token. Multiple users of Asana will view external resources attached by a user who has authenticated and send requests to the app server, but the server will likely only have the token for one user. You may want to suggest users to authenticate with a bot account.


Security

When handling requests from Asana, an app components app should:

  • Add cross-origin resource sharing (CORS) headers to responses. In order to update the Asana user interface (e.g., populating a Widget with external data), requests are made from the client to your app server. As such, enabling and configuring CORS is required. Feel free to use your browser's developer tools to debug during development.
  • Reject requests with missing or incorrect signatures. See message integrity for more details.
  • Reject requests with an expires_at time in the past.
    • Note: Make sure to use the correct units for this. expires_at is in milliseconds. If you compare the expiration time to a timestamp in seconds, it will always look like the request expires thousands of years in the future.

If an app uses OAuth for authentication, the app should:

  • Prevent OAuth CSRF attacks. A one-time CSRF token in the state parameter is required in order to implement a secure OAuth flow. Omitting the state parameter is a security risk. If the state parameter is not used, or not tied to the user's session, then attackers can initiate an OAuth flow themselves before tricking a user's browser into completing it. For more information about the state parameter, see OAuth.

If an app doesn't use OAuth for authentication, the Asana security team should manually review the authentication scheme the app uses. In particular, we will try to verify that:

  • An attacker can't authenticate themselves as someone else
  • An attacker can't force a victim to authenticate as another user (e.g., with a CSRF attack)


Message integrity

The burden of verifying the request is on the app. Without this check, attackers can send requests to the app server pretending to be Asana.

Message integrity is provided by a SHA-256 HMAC signature on the contents of the request. For GET requests, the "message" used to generate the signature is the query string of the request with escaped characters, omitting the leading ? of the query string. For POST requests, the "message" is the JSON blob in the data field of the request body. For both types of requests, the secret used to compute the signature is your app's client secret which can be found in the OAuth tab for the app in the developer console.

Note that the signature is transmitted via a header in the request body, particularly the value of x-asana-request-signature. The app server calculates the same signature and compares that to the value in the header. The app server should reject the request if the two do not match. The signature must be on the exact parameter string that will be passed to the app, since the signature will change if something as trivial as spacing changes.

To see an example of how the signature is computed, you can view an open source example app server in the app-components-example-app repository.


Timeliness

Timeliness is provided by the addition of an expiration parameter: expires_at. If this parameter were not added, then a recorded request (e.g., a log), could be reused to continue requesting information from the app at a later time.

The burden of verifying the request has not expired is on the app. Without this check, the app server is vulnerable to replay attacks.


Hosting

Apps built with app components allow end users to interact with resources external to Asana. As such an app server is required in order for your app to function.

The following list includes providers and services commonly used for hosting an app server:

During development, you may choose to use ngrok, which creates a public URL that "tunnels" into localhost. We do not advise the use of ngrok beyond testing and debugging purposes.


Final steps

As you finish building the app server, you may find it necessary to update certain configurations such as URLs, image links, etc. These configurations can be updated at any time in the developer console.

After you have finished building both your app and app server, you are now ready to begin the publishing process!


Publishing an app

After creating and configuring your app to function alongside your app server, you may begin the app review process.

Apps built on app components are manually reviewed before they are accessible within Asana. To ensure a smooth review process and user experience, here are some guidelines you can follow before submitting the app for review.


Publishing checklist

When configuring your app, you should:

  • Add necessary images (e.g., feature images, icon, logo, etc.)
  • Add links to supporting information and/or documentation (e.g., app landing page URL, support URL, etc.)
  • Proofread marketing-related text (e.g., description, extended description, features)
  • Make sure button text has 3-4 words or fewer and start with a verb
  • Use consistent language for similar concepts where applicable
  • Use sentence case by default and capitalize proper nouns

When testing your application, you should:

  • Try to "break" your forms (e.g., test watched fields, limit invalid submissions, test typeahead fetches, etc.)
  • Test and proof-read any custom error messages
  • Test the auth flow from both the web browser and desktop app
    • You can enter the installation flow manually by navigating to https://app.asana.com/-/install_platform_ui_app?app_id=<app_client_id>
  • Test rule actions with a variety of trigger combinations

For additional details, an interactive checklist can be found on the Submit for review page when managing your app through the developer console.


Installation flow

When the end user connects an app with App Components to Asana for the first time, they will go through an installation flow. This involves authorizing the app, and adding it to projects in Asana.

The installation flow can be configured in the developer console. Note that a list of all possible configurations can also be found in the configure the app section of the getting started guide.

For the end user, the installation flow can be triggered through either one of two ways:

  1. The in-product app gallery. Users can access the app gallery by going into a project (in which they want to install an app), then navigating to Customize > + Add App.

    app gallery

  2. The Asana app directory:

    app directory

Note that subsequent interactions with the same application by the same user will not trigger the following installation flow. To force the installation flow in its entirety again (e.g., for QA purposes), you can visit https://app.asana.com/-/install_platform_ui_app?app_id=<app_client_id>, replacing the value of the app_id query parameter with the application's client ID (accessible via the developer console).


App details

If the user installs the app via the in-product app gallery (i.e., the first scenario above), the user can see more details about the app:

app details page

The information on this page can be customized in the App listing details tab of the developer console:

app listing details page

For more information, see the configure the app section of the getting started guide.


Features

After entering the installation flow, the first screen that users see are the app's features, or value props.

features

As part of the customizations, a Headline and Subhead can be shown at the top of the screen. Additionally, up to three Feature images can be displayed on the screen, each containing the image itself, accompanying Caption text to display under each image, as well as Image alt text text. We recommend configuring all three Feature images for the best user experience.


Authenticating

On the next screen, the user will be directed to the auth screen, which will ask them to connect to the external app.

authentication

When the user clicks the button to continue, Asana will make a request to the application's specified Authentication URL in a pop-up window. From here, it is developer's discretion as to how the user proceeds with authentication. In most cases, this authentication step usually involves completing the Asana OAuth flow, as well as the third-party (i.e., external) OAuth flow.

authentication with Asana

authentication with external app

Additionally, you may choose to present custom screens, forms, or otherwise logic to prompt the user for additional information needed to set up the application.

The authentication flow is concluded when the app confirms that authentication is complete with a "success" message using window.postMessage. For more information, feel free to review authorization requirements when publishing an app.


Adding to a project

Once the user has successully granted permissions, they'll be taken to different screens depending on how they entered the installation flow:

  1. If the user began the installation flow from outside of a project (e.g., through the Asana app directory), the user will be shown an additional screen that prompts them to add the app to any necessary projects. This screen will not be shown otherwise.

    add app to projects

    From here, the user may choose to add the app to one or more projects, or even skip adding the app for the time being. Once the user has made their choice, the final screen will confirm the user's choices, and the installation flow will be completed.

  2. If the user began the installation flow from within a project, the user will see a confirmation of the app they've added, and the installation flow will be completed.

    installation flow finish


App submission

After you have completed development of your app (and you have addressed the guidelines above), you can begin the process to have your app published on Asana.


Troubleshooting

Common issues

App component shows "Something went wrong. Try again later."

This typically happens when we receive a response from the app server that we do not understand. To ensure that Asana is able to read the response from the app server, check that the app server is returning the required properties listed in the corresponding schema of the endpoint being called (see the app component schemas). Additionally, for certain properties like color and width, check that the value the app server is returning is a valid option under the Enumerated Values dropdown of an App Component schema.

Another reason that you may be seeing this message is when your app server is not using CORS. In order to update the Asana user interface (e.g., populating a widget with external data), requests are made from the client to your app server. As such, enabling and configuring CORS is required. See security for more information.

App server endpoints are not being triggered

Check that the endpoint paths saved for your app in the developer console match the endpoint paths that you created for your app server. For example, your app server's endpoint to GET form metadata might be https://app.example.com/form/metadata, while in your app's settings it is saved as https://app.example.com/metadata. Since these paths are non-matching, when Asana makes a request to GET form metadata, it will be making requests to https://app.example.com/metadata instead of https://app.example.com/form/metadata.

Additionally, some app server responses may contain an on_change_callback and an on_submit_callback property. Check that the endpoints provided for these values are what you expected.

Unable to trigger installation process again

In the event that you would like to test your app's installation flow again, you can visit https://app.asana.com/-/install_platform_ui_app?app_id=<app_client_id>. You can find your app_client_id in the URL of your app in the developer console.

Rule actions: app server is not receiving a response back from Asana

The app server for rule action must be hosted in order for rule actions to function. For a brief list of popular hosting options, see hosting.

Ensure that your app is added to your organization. This can be done in your app's setting in the developer console under Install your app > + Add organization.



For any questions on app components, as well as an opportunity to engage with other developers in the community, feel free to visit our app components forum


Additional resources

Configurations

The following tables represent a master list of all the configurations you can make to define your app components app. Further context for these configurations can be found in the configure the app section of the getting started guide. Feel free to also review the toolkit for a visual documentation of these configurations. To make these configurations, visit the developer console.

Note: You must first create an app in order to be able to configure it. To begin, see the getting started guide.

Configurations for app listing details

PropertyDescription
App iconYour app's icon, shown to users to identify your application.
App nameYour app's name, shown to users to identify your application.
Short descriptionA short description of the app.
Long descriptionAn extended description of the functionality of the app. Shown in the app details page.
Company nameYour company name.
Company URLURL of the page where users can learn more about your company.
App landing page URLURL of the page where users can learn more about this app and install it.
Support URLURL of the page where users can read documentation or get support.
Privacy policy URLURL of the page where users can read your app's privacy policy.

Configurations for widget

PropertyDescription
Widget metadata URLA URL that Asana uses to make requests for the data needed to load a Widget, which displays information about a third party resource.
Match URL patternA regex which allows Asana to compute whether a URL attachment is supported by an activated app on the project in order to render a widget.

Configurations for modal form

PropertyDescription
Form metadata URLA URL that Asana uses to request data from the app about fields it should display in the modal form.

Configurations for lookup

PropertyDescription
Resource attach URLA URL that Asana will make a request to when a user submits a value to attach (i.e., when clicking "Add").
Placeholder textOptional. Placeholder action text that appears in the lookup input field after the user clicks on the lookup action text.
Resource typeahead URLA URL that Asana will make a request to when a user types into a lookup field.

Configurations for rule action

PropertyDescription
Display nameThe rule action name visible to end users in the rule builder (e.g., "Create a Jira issue").
Run action URLA URL that Asana will make a request to when the rule is triggered.
Form metadata URLA URL that Asana will make a request to to display the configuration form.

Configurations for entry point

PropertyDescription
Lookup action textClickable action text that allows users to initiate a lookup.
Modal Form action textClickable action text that allows users to initiate a modal form.

Configurations for the installation flow

PropertyDescription
HeadlineText that appears as a title on the overview of features (i.e., "value props").
SubheadText that appears as a subtitle on the overview of features.
Feature imageThe image representing a feature. For the best user experience, we recommend providing three Feature images.
Caption textText below the image of a feature.
Image alt textAlt text for image of feature.
Authentication URLA URL which informs Asana where to make requests for authenticating and authorizing users. This is called during installation or when the app returns a response indicating the user must authenticate to continue.


Example apps

Example modal form & widget

The example app offers a quick way for developers to explore the capabilities and features of app components. By following the steps below, you'll gain an understanding of how to install app component apps to your developer sandbox, as well as how an example app communicates with endpoints exposed on a pre-built local server.

Note that for the app components apps that you create, you'll be able to configure your own images, descriptions, URLs, and other content. Many of the values for these fields are marked by {curly braces} in the example app.

Before you begin, be sure you already have a developer sandbox, as this will give you access the "External Example App" in the app gallery. To start using the example app:

  1. Clone this repository containing an example Express server.
  2. Follow the instructions in the README to run the server. This server needs to remain on as you use the example app.
  3. Open the developer sandbox in your browser.
  4. In an existing project, go to Customize > + Add App > External Example App to install the app components example app.
    • Important: The installation flow this takes you through is only shown once per user. To see it a second time, navigate to https://app.asana.com/-/install_platform_ui_app?app_id=<app_client_id>, replacing the value of the app_id query parameter with the application's client ID (accessible via the developer console).



  5. Once the example app is installed, create a task in your project. In the task's {Example} custom field, go to {Add Example Resource} > {Open form} to see examples of customizable inputs. Click Submit.



  6. View the newly-generated widget on your task. You can begin editing index.js to modify the contents of the widget. Note that you'll need to restart the local server and reload the page to see your changes.



    That's it! At this point, feel free to keep exploring how changes in the server affects data in the task's widget. Once you're ready to define an app, click here to create your own app with app components.


Example rule actions

To explore the capabilities of rule actions, see our app-components-rule-action-example-app on GitHub. Follow the instructions outlined in the repository's README.md to get started.


Toolkit

Note: for a more dynamic, interactive experience, we recommend using the UI builder to create and test your app's user interface.

Our app components toolkit in Figma provides a visual documentation of app components. You'll see at-a-glance how the different features and capabilities surface within Asana, including how they fit together and what you can do with them. Feel free to use the toolkit to supplement the process of designing and building your apps with app components.


Forum

For the latest news on app components, as well as opportunity to engage with other developers in the community, feel free to visit our app components forum.


App component reference

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

This is the interface for handling requests for app components. This reference is generated from an OpenAPI spec.

Base URLs:

  • {siteUrl}

Note that {siteUrl} refers to the base URL for your app server endpoints.

Additional resources:


Modal forms

GET /form_metadata_url_path_placeholder
GET /modal_form_typeahead_url_path_placeholder
POST /on_change_callback_path_placeholder
POST /on_submit_callback_path_placeholder

The modal form is displayed when the user starts the flow to create a resource. Asana will make a signed request to the specified form_metadata_url in the configuration, and expect a response with the metadata needed to create the form. This process is also used for forms within rule actions.


Get form metadata

200 Response

{
  "metadata": {
    "fields": [],
    "on_change_callback": "https://www.example.com/on_change",
    "on_submit_callback": "https://www.example.com/on_submit",
    "submit_button_text": "Create New Issue",
    "title": "Create New Issue"
  },
  "template": "form_metadata_v0"
}

See input/output options to include more fields in your response.

GET /form_metadata_url_path_placeholder

Note: The path is a placeholder. The actual path is determined by the configuration of the app component.

Get the metadata from the app server to render a form.

App components form metadata request flow

Parameters

NameDescription
?workspace string
required
The workspace GID this hook is coming from.
?task string
required
The task GID this hook is coming from.
?user string
required
The user GID` this hook is coming from.
?expires_at string
required
The time (in ISO 8601 date format) when the request should expire.

Responses

StatusDescription
200 FormMetadataSuccessfully retrieved the metadata for a single form.
400 BadRequestBad request
401 UnauthorizedUnauthorized
403 ForbiddenForbidden
404 NotFoundNot found
500 InternalServerErrorServer error
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get modal form typeahead results

Body parameter

{
  "expires_at": "2019-04-15T01:01:46.055Z",
  "query": "Messages",
  "task": "67890",
  "user": "54321",
  "workspace": "12345"
}

200 Response

{
  "header": "List of messages",
  "items": [
    {
      "icon_url": "https://example-icon.png",
      "subtitle": "OTP",
      "title": "OTP Team PF",
      "value": "OTP"
    }
  ]
}

See input/output options to include more fields in your response.

GET /modal_form_typeahead_url_path_placeholder

Note: The path is a placeholder. The actual path is determined by the configuration of the app component.

If a modal form field is of type typehead, this operation gets typeahead results to render as a dropdown list.

When the user types into a modal form form field, Asana will send a request containing the entered string to the application's typeahead_url. The list of TypeaheadItems in the response will then be rendered in a dropdown list.

App components form typeahead request flow

Parameters

NameDescription
body object
required
Request to retrieve typeahead results in a modal form typeahead form field.
expires_at stringThe time (in ISO 8601 format) when the request should expire.
query stringThe user's input in the typeahead text input.
task stringConditional. The task GID this hook is coming from. task is only present in the modal form (as there is a "context task"), but not in the rule action (as rules are associated with a project).
user stringThe user GID this hook is coming from.
workspace stringThe workspace GID this hook is coming from.

Responses

StatusDescription
200 TypeaheadListSuccessfully retrieved typeahead results.
400 BadRequestBad request
401 UnauthorizedUnauthorized
403 ForbiddenForbidden
404 NotFoundNot found
500 InternalServerErrorServer error
↓ Show Common Responses ↓↑ Hide Common Responses ↑


On change callback

Body parameter

{
  "changed_field": "checkbox_field_1",
  "expires_at": "2019-04-15T01:01:46.055Z",
  "task": "67890",
  "user": "54321",
  "values": {
    "checkbox_field_1": [
      "opt-in"
    ],
    "date_field_1": "2021-12-31T08:00:00.000Z",
    "datetime_field_1": "2023-01-01T00:00:00.000Z",
    "dropdown_field_1": "red",
    "multi_line_text_field_1": "Multiline Text",
    "radio_button_field_1": "blue",
    "rich_text_field_1": "<BODY>Rich Text</BODY>",
    "single_line_text_field_1": "Single Line Text",
    "static_text_field_1": "Static Text",
    "typeahead_field_1": {
      "icon_url": "https://example.com/icon.png",
      "subtitle": "Subtitle",
      "title": "Title",
      "value": "Typeahead"
    }
  },
  "workspace": "12345"
}

200 Response

{
  "metadata": {
    "fields": [],
    "on_change_callback": "https://www.example.com/on_change",
    "on_submit_callback": "https://www.example.com/on_submit",
    "submit_button_text": "Create New Issue",
    "title": "Create New Issue"
  },
  "template": "form_metadata_v0"
}

See input/output options to include more fields in your response.

POST /on_change_callback_path_placeholder

Note: The path is a placeholder. The actual path is determined by the configuration of the app component.

The callback request made to an app server when a watched field's value changes within a form. The request is subject to a 10-second timeout if no response is received from the app server.

App components form on change request flow

Parameters

NameDescription
body object
required
Request to notify of an on change event.
changed_field stringThe name of the changed FormField.
expires_at stringThe time (in ISO 8601 date format) when the request should expire.
task stringThe task GID this hook is coming from.
user stringThe user GID this hook is coming from.
values objectAn object that maps each FormField’s GID to its value.
workspace stringThe workspace GID this hook is coming from.

Detailed descriptions

values: An object that maps each FormField’s GID to its value. Refer to the value property on the FormField schema: FormField-Checkbox, FormField-Date, FormField-Datetime, FormField-Dropdown, FormField-MultiLineText, FormField-RadioButton, FormField-RichText, FormField-SingleLineText, FormField-StaticText, FormField-Typeahead

Responses

StatusDescription
200 FormMetadataSuccessfully returned the new state of the form.
400 FormMetadataSomething was wrong with the form data.
401 UnauthorizedUnauthorized
403 ForbiddenForbidden
404 NotFoundNot found
500 InternalServerErrorServer error
↓ Show Common Responses ↓↑ Hide Common Responses ↑


On submit callback

Body parameter

{
  "expires_at": "2019-04-15T01:01:46.055Z",
  "task": "67890",
  "user": "54321",
  "values": {
    "checkbox_field_1": [
      "opt-in"
    ],
    "date_field_1": "2021-12-31T08:00:00.000Z",
    "datetime_field_1": "2023-01-01T00:00:00.000Z",
    "dropdown_field_1": "red",
    "multi_line_text_field_1": "Multiline Text",
    "radio_button_field_1": "blue",
    "rich_text_field_1": "<BODY>Rich Text</BODY>",
    "single_line_text_field_1": "Single Line Text",
    "static_text_field_1": "Static Text",
    "typeahead_field_1": {
      "icon_url": "https://example.com/icon.png",
      "subtitle": "Subtitle",
      "title": "Title",
      "value": "Typeahead"
    }
  },
  "workspace": "12345"
}

200 Response

{
  "error": "No resource matched that input",
  "resource_name": "Build the Thing",
  "resource_url": "https://example.atlassian.net/browse/CP-1"
}

See input/output options to include more fields in your response.

POST /on_submit_callback_path_placeholder

Note: The path is a placeholder. The actual path is determined by the configuration of the app component.

The callback request made to an app server when a form is submitted. The request is subject to a 10-second timeout if no response is received from the app server.

App components form on submit request flow

Parameters

NameDescription
body object
required
Request to notify of a form submission.
expires_at stringThe time (in ISO 8601 date format) when the request should expire.
task stringThe task GID this hook is coming from.
user stringThe user GID this hook is coming from.
values objectAn object that maps each FormField’s GID to its value.
workspace stringThe workspace GID this hook is coming from.

Detailed descriptions

values: An object that maps each FormField’s GID to its value. Refer to the value property on the FormField schema: FormField-Checkbox, FormField-Date, FormField-Datetime, FormField-Dropdown, FormField-MultiLineText, FormField-RadioButton, FormField-RichText, FormField-SingleLineText, FormField-StaticText, FormField-Typeahead

Responses

StatusDescription
200 AttachedResourceSuccessfully attached the resource created by the form.
400 FormMetadataSomething was wrong with the form data.
401 UnauthorizedUnauthorized
403 ForbiddenForbidden
404 NotFoundNot found
500 InternalServerErrorServer error
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Rule actions

GET /rule_action_typeahead_url_path_placeholder
POST /run_action_url_path_placeholder
GET /action.metadata_url_path_placeholder
POST /action.on_change_callback_path_placeholder
POST /action.on_submit_callback_path_placeholder

When a rule containing a rule action is triggered, the rules engine will make a request to the app to inform the app to run the configured rule action. The resulting status code will indicate to the rules engine whether the action was successfully completed and, if not, specify a cause for the error.

Note: An app server must be hosted in order for rule actions to function. For a brief list of popular hosting options, see hosting.


Get rule action typeahead results

Body parameter

{
  "expires_at": "2019-04-15T01:01:46.055Z",
  "query": "Messages",
  "task": "67890",
  "user": "54321",
  "workspace": "12345"
}

200 Response

{
  "header": "List of messages",
  "items": [
    {
      "icon_url": "https://example-icon.png",
      "subtitle": "OTP",
      "title": "OTP Team PF",
      "value": "OTP"
    }
  ]
}

See input/output options to include more fields in your response.

GET /rule_action_typeahead_url_path_placeholder

Note: The path is a placeholder. The actual path is determined by the configuration of the app component.

In a rule action typeahead form field, this operation gets typeahead results to render as a dropdown list. Typeahead results are limited to 50 items.

When the user types into a rule action form field, Asana will send a request containing the entered string to the application's typeahead_url. The list of TypeaheadItems in the response will then be rendered in a dropdown list.

App components rule typeahead request flow

Parameters

NameDescription
body object
required
Request to retrieve typeahead results in a rule action typeahead form field.
expires_at stringThe time (in ISO 8601 format) when the request should expire.
query stringThe user's input in the typeahead text input.
task stringConditional. The task GID this hook is coming from. task is only present in the modal form (as there is a "context task"), but not in the rule action (as rules are associated with a project).
user stringThe user GID this hook is coming from.
workspace stringThe workspace GID this hook is coming from.

Responses

StatusDescription
200 TypeaheadListSuccessfully retrieved typeahead results.
400 BadRequestBad request
401 UnauthorizedUnauthorized
403 ForbiddenForbidden
404 NotFoundNot found
500 InternalServerErrorServer error
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Run action

Body parameter

{
  "action": "string",
  "action_type": "string",
  "expires_at": "2019-04-15T01:01:46.055Z",
  "idempotency_key": "string",
  "target_object": "string",
  "user": "54321",
  "workspace": "12345"
}

200 Response

{
  "action_result": "ok",
  "error": "That resource no longer exists",
  "resources_created": [
    {
      "error": "No resource matched that input",
      "resource_name": "Build the Thing",
      "resource_url": "https://example.atlassian.net/browse/CP-1"
    }
  ]
}

See input/output options to include more fields in your response.

POST /run_action_url_path_placeholder

Note: The path is a placeholder. The actual path is determined by the configuration of the app component.

The request made when an action is triggered. Rule actions in rules containing a "Task added to this project" trigger have a 2 minute delay for newly created tasks in that project. This is to provide time for the creating user to fill out task details (name, description, etc.) before the rule action is triggered.

An app server must be hosted in order for rule actions to function. For a brief list of popular hosting options, see hosting.

App components rule run action request flow

Parameters

NameDescription
body object
required
Request to notify of an action running.
action stringThe action ID generated from rule creation.
action_type stringThe ID from the configuration used to create the rule action.
expires_at stringThe time (in ISO 8601 date format) when the request should expire.
idempotency_key string
required
A unique key associated with the "run action" request. App servers should use this key to implement idempotency.
target_object stringThe ID of the target object that the rule action is acting on. Currently, this value is always a task GID.
user stringThe user GID this hook is coming from.
workspace stringThe workspace GID this hook is coming from.

Responses

StatusDescription
200 RanActionSuccessfully attached the resource created by the form.
400 BadRequestBad request
401 UnauthorizedUnauthorized
403 ForbiddenForbidden
404 NotFoundNot found
410 NoneGone
500 InternalServerErrorServer error
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get action metadata

200 Response

{
  "metadata": {
    "fields": [],
    "on_change_callback": "https://www.example.com/on_change",
    "on_submit_callback": "https://www.example.com/on_submit",
    "submit_button_text": "Create New Issue",
    "title": "Create New Issue"
  },
  "template": "form_metadata_v0"
}

See input/output options to include more fields in your response.

GET /action.metadata_url_path_placeholder

Note: The path is a placeholder. The actual path is determined by the configuration of the app component.

When a user has navigated to the custom rule builder UI and selected a rule action (either through the sidebar or via a rule preset), Asana will make a request to the app to get the configuration form definition for the chosen rule action. This will initiate the flow to configure a new rule action or edit the configuration of an existing rule action. This is the endpoint and schema for updating rule actions; app triggers (V2) will be analogous.

App components rule metadata request flow

Parameters

NameDescription
?action stringThe ID of an existing rule action that is being edited. Should be omitted when configuring a new rule action.
?action_type string
required
The ID of the configuration used to create the rule action.
?project string
required
The project GID this hook is coming from.
?workspace string
required
The workspace GID this hook is coming from.
?user string
required
The user GID` this hook is coming from.
?expires_at string
required
The time (in ISO 8601 date format) when the request should expire.

Responses

StatusDescription
200 FormMetadataSuccessfully retrieved the metadata for a single action.
400 BadRequestBad request
401 UnauthorizedUnauthorized
403 ForbiddenForbidden
404 NotFoundNot found
500 InternalServerErrorServer error
↓ Show Common Responses ↓↑ Hide Common Responses ↑


On action change callback

Body parameter

{
  "action": "12345",
  "action_type": "45678",
  "changed_field": "checkbox_field_1",
  "expires_at": "2019-04-15T01:01:46.055Z",
  "project": "12345",
  "user": "54321",
  "values": {
    "checkbox_field_1": [
      "opt-in"
    ],
    "date_field_1": "2021-12-31T08:00:00.000Z",
    "datetime_field_1": "2023-01-01T00:00:00.000Z",
    "dropdown_field_1": "red",
    "multi_line_text_field_1": "Multiline Text",
    "radio_button_field_1": "blue",
    "rich_text_field_1": "<BODY>Rich Text</BODY>",
    "single_line_text_field_1": "Single Line Text",
    "static_text_field_1": "Static Text",
    "typeahead_field_1": {
      "icon_url": "https://example.com/icon.png",
      "subtitle": "Subtitle",
      "title": "Title",
      "value": "Typeahead"
    }
  },
  "workspace": "12345"
}

200 Response

{
  "metadata": {
    "fields": [],
    "on_change_callback": "https://www.example.com/on_change",
    "on_submit_callback": "https://www.example.com/on_submit",
    "submit_button_text": "Create New Issue",
    "title": "Create New Issue"
  },
  "template": "form_metadata_v0"
}

See input/output options to include more fields in your response.

POST /action.on_change_callback_path_placeholder

Note: The path is a placeholder. The actual path is determined by the configuration of the app component.

The callback request made to an app server when a watched field's value changes within an action form. The request is subject to a 10-second timeout if no response is received from the app server.

App components rule on change request flow

Parameters

NameDescription
body object
required
Request to notify of an on change event.
action stringThe ID of an existing rule action that is being edited.
action_type stringThe ID of the configuration used to create the rule action.
changed_field stringThe name of the changed FormField.
expires_at stringThe time (in ISO 8601 date format) when the request should expire.
project stringThe project GID this hook is coming from.
user stringThe user GID this hook is coming from.
values objectAn object that maps each FormField’s GID to its value.
workspace stringThe workspace GID this hook is coming from.

Detailed descriptions

values: An object that maps each FormField’s GID to its value. Refer to the value property on the FormField schema: FormField-Checkbox, FormField-Date, FormField-Datetime, FormField-Dropdown, FormField-MultiLineText, FormField-RadioButton, FormField-RichText, FormField-SingleLineText, FormField-StaticText, FormField-Typeahead

Responses

StatusDescription
200 FormMetadataSuccessfully returned the new state of the form.
400 FormMetadataSomething was wrong with the form data.
401 UnauthorizedUnauthorized
403 ForbiddenForbidden
404 NotFoundNot found
500 InternalServerErrorServer error
↓ Show Common Responses ↓↑ Hide Common Responses ↑


On action submit callback

Body parameter

{
  "action": "12345",
  "action_type": "45678",
  "expires_at": "2019-04-15T01:01:46.055Z",
  "project": "12345",
  "rule_name": "rule name",
  "task": "67890",
  "user": "54321",
  "values": {
    "checkbox_field_1": [
      "opt-in"
    ],
    "date_field_1": "2021-12-31T08:00:00.000Z",
    "datetime_field_1": "2023-01-01T00:00:00.000Z",
    "dropdown_field_1": "red",
    "multi_line_text_field_1": "Multiline Text",
    "radio_button_field_1": "blue",
    "rich_text_field_1": "<BODY>Rich Text</BODY>",
    "single_line_text_field_1": "Single Line Text",
    "static_text_field_1": "Static Text",
    "typeahead_field_1": {
      "icon_url": "https://example.com/icon.png",
      "subtitle": "Subtitle",
      "title": "Title",
      "value": "Typeahead"
    }
  },
  "workspace": "12345"
}

400 Response

{
  "metadata": {
    "fields": [],
    "on_change_callback": "https://www.example.com/on_change",
    "on_submit_callback": "https://www.example.com/on_submit",
    "submit_button_text": "Create New Issue",
    "title": "Create New Issue"
  },
  "template": "form_metadata_v0"
}

See input/output options to include more fields in your response.

POST /action.on_submit_callback_path_placeholder

Note: The path is a placeholder. The actual path is determined by the configuration of the app component.

The form is submitted when the user chooses to create their rule. Asana will create the rule action data model object and make a signed request to the on_submit_callback specified in the form metadata returned from the fetch/update rule action form endpoints. Information about the created rule action should be included in the response if it was successfully created. This is the endpoint and schema for updating rule actions; app triggers (V2) will be analogous.

The request is subject to a 10-second timeout if no response is received from the app server.

App components rule on submit request flow

Parameters

NameDescription
body object
required
Request to submit an action form.
action stringThe ID of an existing rule action that is being edited
action_type stringThe ID of the configuration used to create the rule action.
expires_at stringThe time (in ISO 8601 date format) when the request should expire.
project stringThe project GID this hook is coming from.
rule_name stringThe name of the rule being created
task stringThe task GID this hook is coming from.
user stringThe user GID this hook is coming from.
values objectAn object that maps each FormField’s GID to its value.
workspace stringThe workspace GID this hook is coming from.

Detailed descriptions

values: An object that maps each FormField’s GID to its value. Refer to the value property on the FormField schema: FormField-Checkbox, FormField-Date, FormField-Datetime, FormField-Dropdown, FormField-MultiLineText, FormField-RadioButton, FormField-RichText, FormField-SingleLineText, FormField-StaticText, FormField-Typeahead

Responses

StatusDescription
200 NoneSuccessfully handled form submission.
400 FormMetadataSomething was wrong with the form data.
401 UnauthorizedUnauthorized
403 ForbiddenForbidden
404 NotFoundNot found
500 InternalServerErrorServer error
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Lookups

POST /resource_attach_url_path_placeholder
GET /resource_typeahead_url_path_placeholder

If the app defined a resource attach URL, tasks without a widget offer the lookup functionality. This appears as a text input to the user. When the user submits the text, the app responds with either a resource attachment or with an error.


Attach resource

Body parameter

{
  "attachment": "string",
  "expires_at": "2019-04-15T01:01:46.055Z",
  "query": "string",
  "task": "string",
  "user": "54321",
  "workspace": "12345"
}

200 Response

{
  "error": "No resource matched that input",
  "resource_name": "Build the Thing",
  "resource_url": "https://example.atlassian.net/browse/CP-1"
}

See input/output options to include more fields in your response.

POST /resource_attach_url_path_placeholder

Note: The path is a placeholder. The actual path is determined by the configuration of the app component.

When the user attaches a resource URL to a task, Asana will make a signed request to the specified resource_attach_url in the app configuration. Information about the attached resource should be included in the response.

Parameters

NameDescription
body object
required
Request to attach a resource.
attachment stringThe attachment ID of the URL attachment
expires_at stringThe time (in ISO 8601 date format) when the request should expire.
query stringThe user’s input in the lookup text input. This is often a resource URL or resource key, such as "CP-1" or "https://abcde.atlassian.net/browse/CP-1"
task stringThe task GID this hook is coming from.
user stringThe user GID this hook is coming from.
workspace stringThe workspace GID this hook is coming from.

Responses

StatusDescription
200 AttachedResourceSuccessfully attached the resource to the given object.
400 BadRequestBad request
401 UnauthorizedUnauthorized
403 ForbiddenForbidden
404 NotFoundNot found
500 InternalServerErrorServer error
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get lookup typeahead results

Body parameter

{
  "expires_at": "2019-04-15T01:01:46.055Z",
  "query": "Messages",
  "task": "67890",
  "user": "54321",
  "workspace": "12345"
}

200 Response

{
  "header": "List of messages",
  "items": [
    {
      "icon_url": "https://example-icon.png",
      "subtitle": "OTP",
      "title": "OTP Team PF",
      "value": "OTP"
    }
  ]
}

See input/output options to include more fields in your response.

GET /resource_typeahead_url_path_placeholder

Note: The path is a placeholder. The actual path is determined by the configuration of the app component.

Gets typeahead results to render as a dropdown list in the resource lookup input field.

When the user types into the lookup input field, Asana will send a request containing the entered string to the application's typeahead_url. The list of TypeaheadItems in the response will then be rendered in a dropdown list. When the user selects an item from the list, Asana will send a resource attach request to the app server, then process the response and render the attached resource in the widget.

Parameters

NameDescription
body object
required
Request to retrieve typeahead results for a resource lookup query.
expires_at stringThe time (in ISO 8601 format) when the request should expire.
query stringThe user's input in the typeahead text input.
task stringConditional. The task GID this hook is coming from. task is only present in the modal form (as there is a "context task"), but not in the rule action (as rules are associated with a project).
user stringThe user GID this hook is coming from.
workspace stringThe workspace GID this hook is coming from.

Responses

StatusDescription
200 TypeaheadListSuccessfully retrieved typeahead results.
400 BadRequestBad request
401 UnauthorizedUnauthorized
403 ForbiddenForbidden
404 NotFoundNot found
500 InternalServerErrorServer error
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Widgets

GET /widget_metadata_url_path_placeholder

The widget is displayed when the user views a task with an attachment with a resource URL matching your capability’s match_resource_url_pattern. When this happens, Asana will make a signed request to your widget_metadata_url, and expect a response with information to render in the widget.


Get widget metadata

200 Response

{
  "metadata": {
    "error": "The resource cannot be accessed",
    "fields": [],
    "footer": {},
    "num_comments": 2,
    "subicon_url": "https://example-icon.png",
    "subtitle": "Custom App Story · Open in Custom App",
    "title": "Status"
  },
  "template": "summary_with_details_v0"
}

See input/output options to include more fields in your response.

GET /widget_metadata_url_path_placeholder

Note: The path is a placeholder. The actual path is determined by the configuration of the app component.

Get the metadata from the app server to render a widget.

App components widget metadata request flow

Parameters

NameDescription
?resource_url string
required
The URL of the URL attachment on the task (i.e., Jira issue, GitHub pull request)
?workspace string
required
The workspace GID this hook is coming from.
?task string
required
The task GID this hook is coming from.
?user string
required
The user GID` this hook is coming from.
?attachment string
required
The attachment ID of the URL attachment.
?expires_at string
required
The time (in ISO 8601 date format) when the request should expire.

Responses

StatusDescription
200 WidgetMetadataSuccessfully retrieved the metadata for a single widget.
400 BadRequestBad request
401 UnauthorizedUnauthorized
403 ForbiddenForbidden
404 NotFoundNot found
418 UnauthorizedUnauthorized
500 InternalServerErrorServer error
↓ Show Common Responses ↓↑ Hide Common Responses ↑


App component schemas

The schema definitions for each object requested or returned from Asana's API. Some fields are not returned by default and you'll need to use input/output options to include them.


AttachedResource

{
  "error": "No resource matched that input",
  "resource_name": "Build the Thing",
  "resource_url": "https://example.atlassian.net/browse/CP-1"
}

The response to a successful lookup request.

Properties

NameDescription
error stringThe error that should be displayed to the user
resource_name string
required
The name of the attached resource
resource_url string
required
The URL of the attached resource


BadRequest

{
  "data": {
    "error": "Illegal or malformed request."
  }
}

An error response object indicating a bad request (i.e., a status code of 400).

Properties

NameDescription
data objectAn object containing an error string to display to the user.
error stringThe error to display.


Forbidden

{
  "data": {
    "error": "Access forbidden."
  }
}

An error response object indicating a forbidden request (i.e., a status code of 403).

Properties

NameDescription
data objectAn object containing an error string to display to the user.
error stringThe error to display.


FormField-Checkbox

{
  "error": "Please review and change your input",
  "id": "checkbox_field_1",
  "is_required": true,
  "is_watched": true,
  "name": "Resource name",
  "options": [
    {
      "id": "opt-in",
      "label": "Opt in"
    }
  ],
  "type": "checkbox",
  "value": [
    "opt-in"
  ]
}

A modal form field that accepts checkbox input. Limit 10 options.

Properties

NameDescription
error stringOptional. The developer-specified error message displayed to the user if there is an error with the chosen value.
id string
required
The ID of the field, which is used to reference the field. These should be unique across the entire form.
is_required booleanOptional. Indicates whether the field is required to submit the form. If this property is not specified, the value is assumed false.
is_watched booleanOptional. Indicates whether the field should be watched. Fields that are watched send requests to the on_change URL specified in the form metadata to get updated form information. If this property is not specified, the value is assumed false.
name stringThe text (i.e., label) to show in the title of the field. Limit 50 characters.
options [object]
required
An array (minimum length: 1) of CheckboxOption objects.
id string
required
The ID of the option.
label string
required
The label of the option. Limit 80 characters.
type string
required
The type of modal form field.
value [string]Optional. The values for the form field, which are the IDs of the chosen CheckboxOption objects.

Enumerated Values

PropertyValue
typecheckbox


FormField-Date

{
  "error": "Please review and change your input",
  "id": "date_field_1",
  "is_required": true,
  "is_watched": true,
  "name": "Date",
  "placeholder": "2022-02-01",
  "type": "date",
  "value": "2022-02-01"
}

A modal form field that accepts date input.

Properties

NameDescription
error stringOptional. The developer-specified error message displayed to the user if there is an error with the chosen value.
id string
required
The ID of the field, which is used to reference the field. These should be unique across the entire form.
is_required booleanOptional. Indicates whether the field is required to submit the form. If this property is not specified, the value is assumed false.
is_watched booleanOptional. Indicates whether the field should be watched. Fields that are watched send requests to the on_change URL specified in the form metadata to get updated form information. If this property is not specified, the value is assumed false.
name stringThe text (i.e., label) to show in the title of the field. Limit 50 characters.
placeholder stringThe placeholder for the input, which is shown if the field has no value. If not provided, there will be no placeholder.
type string
required
The type of modal form field.
value string(date)¦nullThe value of the field. This takes a date with format YYYY-MM-DD or ISO 8601 date string in UTC.

Enumerated Values

PropertyValue
typedate


FormField-Datetime

{
  "error": "Please review and change your input",
  "id": "datetime_field_1",
  "is_required": true,
  "is_watched": true,
  "name": "Datetime",
  "placeholder": "2022-02-01T14:48:00.000Z",
  "type": "datetime",
  "value": "2022-02-01T14:48:00.000Z"
}

A modal form field that accepts datetime input.

Properties

NameDescription
error stringOptional. The developer-specified error message displayed to the user if there is an error with the chosen value.
id string
required
The ID of the field, which is used to reference the field. These should be unique across the entire form.
is_required booleanOptional. Indicates whether the field is required to submit the form. If this property is not specified, the value is assumed false.
is_watched booleanOptional. Indicates whether the field should be watched. Fields that are watched send requests to the on_change URL specified in the form metadata to get updated form information. If this property is not specified, the value is assumed false.
name stringThe text (i.e., label) to show in the title of the field. Limit 50 characters.
placeholder stringThe placeholder for the input, which is shown if the field has no value. If not provided, there will be no placeholder.
type string
required
The type of modal form field.
value string(date-time)¦nullThe value of the field. This value takes the form of an ISO 8601 date string in UTC.

Enumerated Values

PropertyValue
typedatetime


FormField-Dropdown

{
  "error": "Please review and change your input",
  "id": "dropdown_field_1",
  "is_required": true,
  "is_watched": true,
  "name": "Resource name",
  "options": [
    {
      "icon_url": "https://example.com/red.png",
      "id": "red",
      "label": "Red"
    }
  ],
  "type": "dropdown",
  "value": "dropdown_option_1",
  "width": "full"
}

A modal form field that accepts input via a dropdown list. Limit 50 options.

Properties

NameDescription
error stringOptional. The developer-specified error message displayed to the user if there is an error with the chosen value.
id string
required
The ID of the field, which is used to reference the field. These should be unique across the entire form.
is_required booleanOptional. Indicates whether the field is required to submit the form. If this property is not specified, the value is assumed false.
is_watched booleanOptional. Indicates whether the field should be watched. Fields that are watched send requests to the on_change URL specified in the form metadata to get updated form information. If this property is not specified, the value is assumed false.
name stringThe text (i.e., label) to show in the title of the field. Limit 50 characters.
options [object]
required
An array (minimum length: 1) of DropdownOption objects.
icon_url stringOptional. The URL for the icon beside the label. If not present, no icon will be displayed.
id string
required
The ID of the option.
label string
required
The label of the option. Limit 80 characters.
type string
required
The type of modal form field.
value stringOptional. The value for the form field, which is the ID of the chosen DropdownOption object.
width stringOptional. The width of the form field. If not provided, the default value will be "full".

Enumerated Values

PropertyValue
typedropdown
widthfull
widthhalf


FormField-MultiLineText

{
  "error": "Please review and change your input",
  "id": "multi_line_text_field_1",
  "is_required": true,
  "is_watched": true,
  "name": "Resource name",
  "placeholder": "Enter the full title of the resource here",
  "type": "multi_line_text",
  "value": "Annual Kick-Off Meeting"
}

A modal form field that accepts multi-line text input.

Properties

NameDescription
error stringOptional. The developer-specified error message displayed to the user if there is an error with the chosen value.
id string
required
The ID of the field, which is used to reference the field. These should be unique across the entire form.
is_required booleanOptional. Indicates whether the field is required to submit the form. If this property is not specified, the value is assumed false.
is_watched booleanOptional. Indicates whether the field should be watched. Fields that are watched send requests to the on_change URL specified in the form metadata to get updated form information. If this property is not specified, the value is assumed false.
name stringThe text (i.e., label) to show in the title of the field. Limit 50 characters.
placeholder stringThe placeholder for the input, which is shown if the field has no value. If not provided, there will be no placeholder.
type string
required
The type of modal form field.
value stringThe value of the field. If not provided, the field will be empty and the form cannot be submitted if it is required. Limit 3000 characters.

Enumerated Values

PropertyValue
typemulti_line_text


FormField-RadioButton

{
  "error": "Please review and change your input",
  "id": "radio_button_field_1",
  "is_required": true,
  "is_watched": true,
  "name": "Resource name",
  "options": [
    {
      "id": "radio_option_1",
      "label": "Radio Option 1",
      "sub_label": "#0000FF"
    }
  ],
  "type": "radio_button",
  "value": "radio_option_1"
}

A modal form field that accepts radio button input. Limit 5 options.

Properties

NameDescription
error stringOptional. The developer-specified error message displayed to the user if there is an error with the chosen value.
id string
required
The ID of the field, which is used to reference the field. These should be unique across the entire form.
is_required booleanOptional. Indicates whether the field is required to submit the form. If this property is not specified, the value is assumed false.
is_watched booleanOptional. Indicates whether the field should be watched. Fields that are watched send requests to the on_change URL specified in the form metadata to get updated form information. If this property is not specified, the value is assumed false.
name stringThe text (i.e., label) to show in the title of the field. Limit 50 characters.
options [object]
required
An array (minimum length: 1) of RadioOption objects.
id string
required
The ID of the option.
label string
required
The label of the option. Limit 80 characters.
sub_label stringOptional. The label to display as subtext for the label.
type string
required
The type of modal form field.
value stringOptional. The value for the form field, which is the ID of the chosen RadioOption object.

Enumerated Values

PropertyValue
typeradio_button


FormField-RichText

{
  "error": "Please review and change your input",
  "id": "rich_text_field_1",
  "is_required": true,
  "is_watched": true,
  "name": "Resource name",
  "placeholder": "Enter the full title of the resource here",
  "type": "rich_text",
  "value": "Annual Kick-Off Meeting"
}

A modal form field that accepts rich text input.

Properties

NameDescription
error stringOptional. The developer-specified error message displayed to the user if there is an error with the chosen value.
id string
required
The ID of the field, which is used to reference the field. These should be unique across the entire form.
is_required booleanOptional. Indicates whether the field is required to submit the form. If this property is not specified, the value is assumed false.
is_watched booleanOptional. Indicates whether the field should be watched. Fields that are watched send requests to the on_change URL specified in the form metadata to get updated form information. If this property is not specified, the value is assumed false.
name stringThe text (i.e., label) to show in the title of the field. Limit 50 characters.
placeholder stringThe placeholder for the input, which is shown if the field has no value. If not provided, there will be no placeholder.
type string
required
The type of modal form field.
value stringThe value of the field. If not provided, the field will be empty and the form cannot be submitted if it is required. Limit 3000 characters.

Enumerated Values

PropertyValue
typerich_text


FormField-SingleLineText

{
  "error": "Please review and change your input",
  "id": "single_line_text_field_1",
  "is_required": true,
  "is_watched": true,
  "name": "Resource name",
  "placeholder": "Enter the full title of the resource here",
  "type": "single_line_text",
  "value": "Annual Kick-Off Meeting",
  "width": "full"
}

A modal form field that accepts single-line text input.

Properties

NameDescription
error stringOptional. The developer-specified error message displayed to the user if there is an error with the chosen value.
id string
required
The ID of the field, which is used to reference the field. These should be unique across the entire form.
is_required booleanOptional. Indicates whether the field is required to submit the form. If this property is not specified, the value is assumed false.
is_watched booleanOptional. Indicates whether the field should be watched. Fields that are watched send requests to the on_change URL specified in the form metadata to get updated form information. If this property is not specified, the value is assumed false.
name stringThe text (i.e., label) to show in the title of the field. Limit 50 characters.
placeholder stringThe placeholder for the input, which is shown if the field has no value. If not provided, there will be no placeholder.
type string
required
The type of modal form field.
value stringThe value of the field. If not provided, the field will be empty and the form cannot be submitted if it is required. Limit 200 characters.
width stringOptional. The width of the form field. If not provided, the default value will be "full".

Enumerated Values

PropertyValue
typesingle_line_text
widthfull
widthhalf


FormField-StaticText

{
  "id": "static_text_field_1",
  "name": "Please enter the following details:",
  "type": "static_text"
}

A modal form "field" that displays static text. Fields of this type do not collect user input.

Properties

NameDescription
id string
required
The ID of the field, which is used to reference the field. These should be unique across the entire form.
name string
required
The text (i.e., label) for the field. Limit 50 characters.
type string
required
The type of modal form field.

Enumerated Values

PropertyValue
typestatic_text


FormField-Typeahead

{
  "error": "Please review and change your input",
  "id": "typeahead_field_1",
  "is_required": true,
  "is_watched": true,
  "name": "Statuses",
  "type": "typeahead",
  "typeahead_url": "https://www.app-server.com/app/typeahead",
  "value": {
    "icon_url": "https://example-icon.png",
    "subtitle": "OTP",
    "title": "OTP Team PF",
    "value": "OTP"
  },
  "width": "full"
}

A modal form field that accepts typeahead input.

Properties

NameDescription
error stringOptional. The developer-specified error message displayed to the user if there is an error with the chosen value.
id string
required
The ID of the field, which is used to reference the field. These should be unique across the entire form.
is_required booleanOptional. Indicates whether the field is required to submit the form. If this property is not specified, the value is assumed false.
is_watched booleanOptional. Indicates whether the field should be watched. Fields that are watched send requests to the on_change URL specified in the form metadata to get updated form information. If this property is not specified, the value is assumed false.
name stringThe text (i.e., label) to show in the title of the field. Limit 50 characters.
type string
required
The type of modal form field.
typeahead_url string
required
The URL that Asana uses to request typehead results from the application server.
value objectOptional. The value for the form field, which is the chosen TypeaheadItem object.
icon_url stringThe URL of the icon to display next to the title.
subtitle stringThe subtitle of the typeahead item.
title string
required
The title of the typeahead item.
value string
required
The value of the typeahead item.
width stringOptional. The width of the form field. If not provided, the default value will be "full".

Enumerated Values

PropertyValue
typetypeahead
widthfull
widthhalf


FormMetadata

{
  "metadata": {
    "fields": [],
    "on_change_callback": "https://www.example.com/on_change",
    "on_submit_callback": "https://www.example.com/on_submit",
    "submit_button_text": "Create New Issue",
    "title": "Create New Issue"
  },
  "template": "form_metadata_v0"
}

Contains the metadata that describes how to display and manage a form.

Properties

NameDescription
metadata object
required
The metadata (i.e., underlying definition) of a form. metadata must exist alongside a template, and its schema must be specific to the value of that template.
fields array
required
An array of form field objects that are rendered in the order they are in the array. Limit of 30 fields.

Valid object schemas: FormField-Checkbox, FormField-Date, FormField-Datetime, FormField-Dropdown, FormField-MultiLineText, FormField-RadioButton, FormField-RichText, FormField-SingleLineText, FormField-StaticText, FormField-Typeahead
on_change_callback stringThe URL to POST the form to whenever watched field values are changed.
on_submit_callback stringThe URL to POST the form to when the user clicks the submit button. If this is field is omitted then the submission button will be disabled. This is useful if the user must enter information in a watched field first, such as to show additional fields.
submit_button_text stringThe text to display on the form’s submit button. If not provided, the default text “Submit” will be displayed on the button.
title string
required
The title of the form, which is displayed at the top of the creation form
template string
required
The interface name and version of a distinct form UI layout. A template is directly associated with a particular metadata schema.

Enumerated Values

PropertyValue
templateform_metadata_v0


InternalServerError

{
  "data": {
    "error": "Internal server error."
  }
}

An error response object indicating a request that could not be found (i.e., a status code of 500).

Properties

NameDescription
data objectAn object containing an error string to display to the user.
error stringThe error to display.


NotFound

{
  "data": {
    "error": "Not found."
  }
}

An error response object indicating a request that could not be found (i.e., a status code of 404).

Properties

NameDescription
data objectAn object containing an error string to display to the user.
error stringThe error to display.


RanAction

{
  "action_result": "ok",
  "error": "That resource no longer exists",
  "resources_created": [
    {
      "error": "No resource matched that input",
      "resource_name": "Build the Thing",
      "resource_url": "https://example.atlassian.net/browse/CP-1"
    }
  ]
}

The response to an action request.

Properties

NameDescription
action_result string
required
Specifies any additional information that the app wants to send to Asana on completion of the action. Can only be resources_created or ok.
error stringThe error that should be displayed to the user.
resources_created [object]A field with the data corresponding to the action_result value. Each action_result has its own data field shape that Asana expects. resources_created expects the name and URL of the resources that the action created.
error stringThe error that should be displayed to the user
resource_name string
required
The name of the attached resource
resource_url string
required
The URL of the attached resource

Enumerated Values

PropertyValue
action_resultresources_created
action_resultok


TypeaheadItem

{
  "icon_url": "https://example-icon.png",
  "subtitle": "OTP",
  "title": "OTP Team PF",
  "value": "OTP"
}

An object describing a typeahead result.

Properties

NameDescription
icon_url stringThe URL of the icon to display next to the title.
subtitle stringThe subtitle of the typeahead item.
title string
required
The title of the typeahead item.
value string
required
The value of the typeahead item.


TypeaheadList

{
  "header": "List of messages",
  "items": [
    {
      "icon_url": "https://example-icon.png",
      "subtitle": "OTP",
      "title": "OTP Team PF",
      "value": "OTP"
    }
  ]
}

The response to a successful typeahead request.

Properties

NameDescription
header stringOptional. Header text to display above the list of typeahead results. If no header is passed in or the value is an empty string, only the typeahead results with be rendered.
items [object]
required
Array of TypeaheadItem objects that indicate typeahead results.
icon_url stringThe URL of the icon to display next to the title.
subtitle stringThe subtitle of the typeahead item.
title string
required
The title of the typeahead item.
value string
required
The value of the typeahead item.


Unauthorized

{
  "data": {
    "error": "Authorization required."
  }
}

An error response object indicating a unauthorized request (i.e., a status code of 401).

Properties

NameDescription
data objectAn object containing an error string to display to the user.
error stringThe error to display.


WidgetField-DatetimeWithIcon

{
  "datetime": "2012-02-22T02:06:58.147Z",
  "icon_url": "https://example-icon.png",
  "name": "Status",
  "type": "datetime_with_icon"
}

A widget field that displays a timestamp and an optional icon.

Properties

NameDescription
datetime stringThe time (in ISO 8601 date format) to display next to the icon.
icon_url stringOptional. The URL of the icon to display next to the time.
name string
required
The text (i.e., label) to show in the title of the field. Limit 40 characters.
type string
required
The type of widget field.

Enumerated Values

PropertyValue
typedatetime_with_icon


WidgetField-Pill

{
  "color": "cool-gray",
  "name": "Status",
  "text": "In Progress",
  "type": "pill"
}

A widget field that displays custom text in a colored "pill" format.

Properties

NameDescription
color string
required
The color of the pill.
name string
required
The text (i.e., label) to show in the title of the field. Limit 40 characters.
text string
required
The text to show in the field. Limit 40 characters.
type string
required
The type of widget field.

Enumerated Values

PropertyValue
colornone
colorred
colororange
coloryellow-orange
coloryellow
coloryellow-green
colorgreen
colorblue-green
coloraqua
colorblue
colorindigo
colorpurple
colormagenta
colorhot-pink
colorpink
colorcool-gray
typepill


WidgetField-TextWithIcon

{
  "icon_url": "https://example-icon.png",
  "name": "Status",
  "text": "In Progress",
  "type": "text_with_icon"
}

A widget field that displays custom text with an optional icon.

Properties

NameDescription
icon_url stringOptional. The URL of the icon to display next to the text.
name string
required
The text (i.e., label) to show in the title of the field. Limit 40 characters.
text string
required
The text to show in the field. Limit 40 characters.
type string
required
The type of widget field.

Enumerated Values

PropertyValue
typetext_with_icon


{
  "created_at": "2012-02-22T02:06:58.147Z",
  "footer_type": "created"
}

A widget footer that displays the timestamp of the resource's creation time.

Properties

NameDescription
created_at string
required
The time (in ISO 8601 date format) to show in the footer.
footer_type string
required
The type of widget footer.

Enumerated Values

PropertyValue
footer_typecreated


{
  "footer_type": "custom_text",
  "icon_url": "https://example-icon.png",
  "text": "This is a custom footer message"
}

A widget footer that displays custom text and an optional icon.

Properties

NameDescription
footer_type string
required
The text to show in the footer.
icon_url stringOptional. The icon to show in the footer next to the text. If not provided, no icon will be shown.
text string
required
The text to show in the footer.

Enumerated Values

PropertyValue
footer_typecustom_text


{
  "footer_type": "updated",
  "last_updated_at": "2012-02-22T02:06:58.147Z"
}

A widget footer that displays the timestamp of the resource's last updated time.

Properties

NameDescription
footer_type string
required
The type of widget footer.
last_updated_at string
required
The time (in ISO 8601 date format) to show in the footer.

Enumerated Values

PropertyValue
footer_typeupdated


WidgetMetadata

{
  "metadata": {
    "error": "The resource cannot be accessed",
    "fields": [],
    "footer": {},
    "num_comments": 2,
    "subicon_url": "https://example-icon.png",
    "subtitle": "Custom App Story · Open in Custom App",
    "title": "Status"
  },
  "template": "summary_with_details_v0"
}

An object containing information about the widget.

Properties

NameDescription
metadata object
required
The metadata (i.e., underlying definition) of a widget. metadata must exist alongside a template, and its schema must be specific to the value of that template.
error stringThe error that should be displayed to the user.
fields array
required
A list of fields showing data from external resources (i.e., an array of WidgetField objects). A widget must contain at least 1 field and no more than 5 fields.

Valid object schemas: WidgetField-DatetimeWithIcon, WidgetField-Pill, WidgetField-TextWithIcon.
footer object
required
Contains the information to display a footer on the widget.

Valid schemas: WidgetFooter-Created, WidgetFooter-CustomText, WidgetFooter-Updated.
num_comments integerThe number of comments to display on the lower right corner of the widget. If not provided, no comment count will be shown
subicon_url stringThe URL of the subicon next to the subtitle . If not provided, no icon will be shown.
subtitle stringThe text to show under the title of the widget, next to "Open in {App Name}". If not provided, the resource_name from the app definition will be used as default.
title string
required
The text to show in the title of the widget. Max length of 200 characters.
template string
required
The interface name and version of a distinct widget UI layout. A template is directly associated with a particular metadata schema.

Enumerated Values

PropertyValue
templatesummary_with_details_v0


API reference

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

This is the interface for interacting with the Asana Platform. Our API reference is generated from our OpenAPI spec.

Base URLs:

Additional resources:


Attachments

GET /attachments/{attachment_gid}
DELETE /attachments/{attachment_gid}
GET /attachments
POST /attachments

An attachment object represents any file attached to a task in Asana, whether it’s an uploaded file or one associated via a third-party service such as Dropbox or Google Drive.


Get an attachment

Code samples

curl -X GET https://app.asana.com/api/1.0/attachments/{attachment_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "attachment",
    "name": "Screenshot.png",
    "resource_subtype": "dropbox",
    "connected_to_app": true,
    "created_at": "2012-02-22T02:06:58.147Z",
    "download_url": "https://s3.amazonaws.com/assets/123/Screenshot.png",
    "host": "dropbox",
    "parent": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "permanent_url": "https://s3.amazonaws.com/assets/123/Screenshot.png",
    "size": 12345,
    "view_url": "https://www.dropbox.com/s/123/Screenshot.png"
  }
}

See input/output options to include more fields in your response.

GET /attachments/{attachment_gid}

Get the full record for a single attachment.

Parameters

NameDescription
/attachment_gid string
required
Globally unique identifier for the attachment.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 AttachmentSuccessfully retrieved the record for a single attachment.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
402 ErrorThe request was valid, but the queried object or object mutation specified in the request is above your current premium level.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
424 ErrorYou have exceeded one of the enforced rate limits in the API. See the documentation on rate limiting for more information.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
501 ErrorThere is an issue between the load balancers and Asana's API.
503 ErrorEither the upstream service is unavailable to the API, or the API has been intentionally shut off.
504 ErrorThis request took too long to complete.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Delete an attachment

Code samples

curl -X DELETE https://app.asana.com/api/1.0/attachments/{attachment_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

DELETE /attachments/{attachment_gid}

Deletes a specific, existing attachment.

Returns an empty data record.

Parameters

NameDescription
/attachment_gid string
required
Globally unique identifier for the attachment.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully deleted the specified attachment.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Get attachments from an object

Code samples

curl -X GET https://app.asana.com/api/1.0/attachments?parent=159874 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "attachment",
      "name": "Screenshot.png",
      "resource_subtype": "dropbox"
    }
  ]
}

See input/output options to include more fields in your response.

GET /attachments

Returns the compact records for all attachments on the object.

There are three possible parent values for this request: project, project_brief, and task. For a project, an attachment refers to a file uploaded to the "Key resources" section in the project Overview. For a project brief, an attachment refers to inline files in the project brief itself. For a task, an attachment refers to a file directly associated to that task.

Parameters

NameDescription
?parent string
required
Globally unique identifier for object to fetch statuses from. Must be a GID for a project, project_brief, or task.
?limit integerResults per page.
?offset stringOffset token.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 AttachmentCompactSuccessfully retrieved the specified object's attachments.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Upload an attachment

Code samples

curl -X POST https://app.asana.com/api/1.0/attachments \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

connect_to_app: true
file: string
name: string
parent: string
resource_subtype: external
url: string

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "attachment",
    "name": "Screenshot.png",
    "resource_subtype": "dropbox",
    "connected_to_app": true,
    "created_at": "2012-02-22T02:06:58.147Z",
    "download_url": "https://s3.amazonaws.com/assets/123/Screenshot.png",
    "host": "dropbox",
    "parent": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "permanent_url": "https://s3.amazonaws.com/assets/123/Screenshot.png",
    "size": 12345,
    "view_url": "https://www.dropbox.com/s/123/Screenshot.png"
  }
}

See input/output options to include more fields in your response.

POST /attachments

Upload an attachment.

This method uploads an attachment on an object and returns the compact record for the created attachment object. This is possible by either:

  • Providing the URL of the external resource being attached, or
  • Downloading the file content first and then uploading it as any other attachment. Note that it is not possible to attach files from third party services such as Dropbox, Box, Vimeo & Google Drive via the API

The 100MB size limit on attachments in Asana is enforced on this endpoint.

This endpoint expects a multipart/form-data encoded request containing the full contents of the file to be uploaded.

Requests made should follow the HTTP/1.1 specification that line terminators are of the form CRLF or \r\n outlined here in order for the server to reliably and properly handle the request.

Parameters

NameDescription
body object
required
The file you want to upload.
connect_to_app booleanOptional. Only relevant for external attachments with a parent task. A boolean indicating whether the current app should be connected with the attachment for the purposes of showing an app components widget. Requires the app to have been added to a project the parent task is in.
file string(binary)Required for asana attachments.
name stringThe name of the external resource being attached. Required for attachments of type external.
parent stringRequired identifier of the parent task, project, or project_brief, as a string.
resource_subtype stringThe type of the attachment. Must be one of the given values. If not specified, a file attachment of type asana will be assumed. Note that if the value of resource_subtype is external, a parent, name, and url must also be provided.
url stringThe URL of the external resource being attached. Required for attachments of type external.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Detailed descriptions

body: The file you want to upload.

Note when using curl:

Be sure to add an ‘@’ before the file path, and use the --form option instead of the -d option.

When uploading PDFs with curl, force the content-type to be pdf by appending the content type to the file path: --form "file=@file.pdf;type=application/pdf".

Enumerated Values

ParameterValue
resource_subtypeasana
resource_subtypedropbox
resource_subtypegdrive
resource_subtypeonedrive
resource_subtypebox
resource_subtypevimeo
resource_subtypeexternal

Responses

StatusDescription
200 AttachmentSuccessfully uploaded the attachment to the parent object.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Audit log API

GET /workspaces/{workspace_gid}/audit_log_events

Asana's audit log is an immutable log of important events in your organization's Asana instance.

The audit log API allows you to monitor and act upon important security and compliance-related changes. Organizations might use this API endpoint to:

  • Set up proactive alerting with a Security Information and Event Management (SIEM) tool like Splunk
  • Conduct reactive investigations when a security incident takes place
  • Visualize key domain data in aggregate to identify security trends

Note that since the API provides insight into what is happening in an Asana instance, the data is read-only. That is, there are no "write" or "update" endpoints for audit log events.

Only Service Accounts in Enterprise Domains can access audit log API endpoints. Authentication with a Service Account's personal access token is required.

For a full list of supported events, see supported AuditLogEvents.


Get audit log events

Code samples

curl -X GET https://app.asana.com/api/1.0/workspaces/{workspace_gid}/audit_log_events \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "actor": {
        "actor_type": "user",
        "email": "gregsanchez@example.com",
        "gid": "1111",
        "name": "Greg Sanchez"
      },
      "context": {
        "api_authentication_method": "cookie",
        "client_ip_address": "1.1.1.1",
        "context_type": "web",
        "oauth_app_name": "string",
        "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
      },
      "created_at": "2021-01-01T00:00:00.000Z",
      "details": {},
      "event_category": "deletion",
      "event_type": "task_deleted",
      "resource": {
        "email": "string",
        "gid": "1111",
        "name": "Example Task",
        "resource_subtype": "milestone",
        "resource_type": "task"
      }
    }
  ]
}

See input/output options to include more fields in your response.

GET /workspaces/{workspace_gid}/audit_log_events

Retrieve the audit log events that have been captured in your domain.

This endpoint will return a list of AuditLogEvent objects, sorted by creation time in ascending order. Note that the Audit Log API captures events from October 8th, 2021 and later. Queries for events before this date will not return results.

There are a number of query parameters (below) that can be used to filter the set of AuditLogEvent objects that are returned in the response. Any combination of query parameters is valid. When no filters are provided, all of the events that have been captured in your domain will match.

The list of events will always be paginated. The default limit is 1000 events. The next set of events can be retrieved using the offset from the previous response. If there are no events that match the provided filters in your domain, the endpoint will return null for the next_page field. Querying again with the same filters may return new events if they were captured after the last request. Once a response includes a next_page with an offset, subsequent requests can be made with the latest offset to poll for new events that match the provided filters.

When no offset is provided, the response will begin with the oldest events that match the provided filters. It is important to note that AuditLogEvent objects will be permanently deleted from our systems after 90 days. If you wish to keep a permanent record of these events, we recommend using a SIEM tool to ingest and store these logs.

Parameters

NameDescription
/workspace_gid string
required
Globally unique identifier for the workspace or organization.
?start_at string(date-time)Filter to events created after this time (inclusive).
?end_at string(date-time)Filter to events created before this time (exclusive).
?event_type stringFilter to events of this type.
?actor_type stringFilter to events with an actor of this type.
?actor_gid stringFilter to events triggered by the actor with this ID.
?resource_gid stringFilter to events with this resource ID.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Detailed descriptions

event_type: Filter to events of this type. Refer to the Supported AuditLogEvents for a full list of values.

actor_type: Filter to events with an actor of this type. This only needs to be included if querying for actor types without an ID. If actor_gid is included, this should be excluded.

Enumerated Values

ParameterValue
actor_typeuser
actor_typeasana
actor_typeasana_support
actor_typeanonymous
actor_typeexternal_administrator

Responses

StatusDescription
200 AuditLogEventAuditLogEvents were successfully retrieved.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Batch API

POST /batch

There are many cases where you want to accomplish a variety of work in the Asana API but want to minimize the number of HTTP requests you make. For example:

  • Modern browsers limit the number of requests that a single web page can make at once.
  • Mobile apps will use more battery life to keep the cellular radio on when making a series of requests.
  • There is an overhead cost to developing software that can make multiple requests in parallel.
  • Some cloud platforms handle parallelism poorly, or disallow it entirely.

To make development easier in these use cases, Asana provides a batch API that enables developers to perform multiple “actions” by making only a single HTTP request.

Making a batch request

To make a batch request, send a POST request to /batch. Like other POST endpoints, the body should contain a data envelope. Inside this envelope should be a single actions field, containing a list of “action” objects. Each action represents a standard request to an existing endpoint in the Asana API.

The maximum number of actions allowed in a single batch request is 10. Making a batch request with no actions in it will result in a 400 Bad Request.

When the batch API receives the list of actions to execute, it will dispatch those actions to the already-implemented endpoints specified by the relative_path and method for each action. This happens in parallel, so all actions in the request will be processed simultaneously. There is no guarantee of the execution order for these actions, nor is there a way to use the output of one action as the input of another action (such as creating a task and then commenting on it).

The response to the batch request will contain (within the data envelope) a list of result objects, one for each action. The results are guaranteed to be in the same order as the actions in the request (e.g., the first result in the response corresponds to the first action in the request)

The batch API will always attempt to return a 200 Success response with individual result objects for each individual action in the request. Only in certain cases (such as missing authorization or malformed JSON in the body) will the entire request fail with another status code. Even if every individual action in the request fails, the batch API will still return a 200 Success response, and each result object in the response will contain the errors encountered with each action.

Rate limiting

The batch API fully respects all of our rate limiting. This means that a batch request counts against both the standard rate limiter and the concurrent request limiter as though you had made a separate HTTP request for every individual action. For example, a batch request with five actions counts as five separate requests in the standard rate limiter, and counts as five concurrent requests in the concurrent request limiter. The batch request itself incurs no cost.

If any of the actions in a batch request would exceed any of the enforced limits, the entire request will fail with a 429 Too Many Requests error. This is to prevent the unpredictability of which actions might succeed if not all of them could succeed.

Restrictions

Not every endpoint can be accessed through the batch API. Specifically, the following actions cannot be taken and will result in a 400 Bad Request for that action:

  • Uploading attachments
  • Creating, getting, or deleting organization exports
  • Any SCIM operations
  • Nested calls to the batch API


Submit parallel requests

Code samples

curl -X POST https://app.asana.com/api/1.0/batch \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "actions": [
      {
        "data": {
          "assignee": "me",
          "workspace": "1337"
        },
        "method": "get",
        "options": {
          "fields": [
            "name",
            "notes",
            "completed"
          ],
          "limit": 3
        },
        "relative_path": "/tasks/123"
      }
    ]
  }
}

200 Response

{
  "data": [
    {
      "body": {
        "data": {
          "completed": false,
          "gid": "1967",
          "name": "Hello, world!",
          "notes": "How are you today?"
        }
      },
      "headers": {
        "location": "/tasks/1234"
      },
      "status_code": 200
    }
  ]
}

See input/output options to include more fields in your response.

POST /batch

Make multiple requests in parallel to Asana's API.

Parameters

NameDescription
body object
required
The requests to batch together via the Batch API.
data objectA request object for use in a batch request.
actions [object]none
data objectFor GET requests, this should be a map of query parameters you would have normally passed in the URL. Options and pagination are not accepted here; put them in options instead. For POST, PATCH, and PUT methods, this should be the content you would have normally put in the data field of the body.
method string
required
The HTTP method you wish to emulate for the action.
options objectPagination (limit and offset) and output options (fields or expand) for the action. “Pretty” JSON output is not an available option on individual actions; if you want pretty output, specify that option on the parent request.
fields [string]The fields to retrieve in the request.
limit integerPagination limit for the request.
offset integerPagination offset for the request.
relative_path string
required
The path of the desired endpoint relative to the API’s base URL. Query parameters are not accepted here; put them in data instead.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Enumerated Values

ParameterValue
methodget
methodpost
methodput
methoddelete
methodpatch
methodhead

Responses

StatusDescription
200 BatchSuccessfully completed the requested batch API operations.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Custom fields

POST /custom_fields
GET /custom_fields/{custom_field_gid}
PUT /custom_fields/{custom_field_gid}
DELETE /custom_fields/{custom_field_gid}
GET /workspaces/{workspace_gid}/custom_fields
POST /custom_fields/{custom_field_gid}/enum_options
POST /custom_fields/{custom_field_gid}/enum_options/insert
PUT /enum_options/{enum_option_gid}

Note: Custom fields are a premium feature. Integrations which work with custom fields need to handle an assortment of use cases for free and premium users in context of free and premium organizations. For a detailed examination of which data users will have access in different circumstances, review the section below on access control.

In the Asana application, tasks, projects, and portfolios can hold user-specified custom fields which provide extra information (e.g., a "priority" property with an associated value, or a number representing the time required to complete a task). This lets a user define the type of information that each item within a project or portfolio can contain in addition to the built-in fields that Asana provides. display_value is a read-only field that will always be a string. For apps that use custom fields, this is a great way to safely display/export the value of a custom field, regardless of its type. We suggest apps use this field in order to future-proof for changes to custom fields.

Characteristics of custom fields

  • There is metadata that defines the custom field. This metadata can be shared across an entire workspace, or be specific to a project or portfolio.
  • Creating a custom field setting on a project or portfolio means each direct child will have the custom field. This is conceptually akin to adding columns in a database or a spreadsheet: every task (row) in the project (table) can contain information for that field, including "blank" values (i.e., null data). For portfolio custom fields, every project (row) in the portfolio (table) will contain information for the custom field.
  • Custom field settings only go one child deep. This means that a custom field setting on a portfolio will give each project the custom field, but not each task within those projects.
  • Tasks have custom field values assigned to them.

Types of custom fields

Integrations using custom fields need to be aware of the six basic types that a custom field can adopt. These types are:

  • text - an arbitrary, relatively short string of text
  • number - a number with a defined level of precision
  • enum - a selection of a single option from a defined list of options (i.e., mutually exclusive selections)
  • multi_enum - a selection of one or more options from a defined list of options (i.e., mutually inclusive selections)
  • date - a reference date with an optional time value
  • people - a list of active contributors (i.e., where their relationship to the work is defined in the custom field title)

Example use case

Consider an organization that has defined a custom field for "Priority". This field is of enum type and can have user-defined values of Low, Medium, or High. This is the field metadata, and it is visible within, and shared across, the entire organization.

A project is then created in the organization, called "Bugs", and the "Priority" custom field is associated with that project. This will allow all tasks within the "Bugs" project to have an associated "Priority".

A new task is created within "Bugs". This task, then, has a field named "Priority" which can take on the custom field value of one of [null], Low, Medium, and High.

Custom fields in the API

These custom fields are accessible via the API through a number of endpoints at the top level (e.g. /custom_fields and /custom_field_settings) and through requests on workspaces, portfolios, projects, and tasks resources. The API also provides a way to fetch both the metadata and data which define each particular custom field, so that a client application may render proper UI to display or edit the values.

Text fields are currently limited to 1024 characters. On tasks, their custom field value will have a text_value property to represent this field.

Number fields can have an arbitrary precision associated with them; for example, a precision of 2 would round its value to the second (hundredths) place (e.g., 1.2345 would round to 1.23). On tasks, the custom field value will have a number_value property to represent this field.

Enum fields

Enum fields represent a selection from a list of options. On the metadata, they will contain all of the options in an array. Each option has 4 properties:

  • gid - the GID of this enum option. Note that this is the GID of the individual option. The custom field itself has a separate gid.
  • name - the name of the option (e.g., "Choice #1")
  • enabled - whether this field is enabled. Disabled fields are not available to choose from when disabled, and are visually hidden in the Asana application, but they remain in the metadata for custom field values which were set to the option before the option was disabled.
  • color - a color associated with this choice.

On the task's custom field value, the enum will have an enum_value property which will be the same as one of the choices from the list defined in the custom field metadata.

Querying an organization for its custom fields

For custom fields shared across the workspace or organization, the workspace can be queried for its list of defined custom fields. Like other collection queries, the fields will be returned as a compact record; slightly different from most other compact records is the fact that the compact record for custom fields includes type as well as gid and name.

Accessing custom field definitions

The custom fields reference describes how the metadata which defines a custom field is accessed. A GET request with a gid can be issued on the /custom_fields endpoint to fetch the full definition of a single custom field given its gid from (for instance) listing all custom fields on a workspace, or getting the gid from a custom field settings object or a task.

Associating custom fields with a project or portfolio

A mapping between a custom field and a project or portfolio is handled with a custom field settings object. This object contains a reference for each of the custom fields and the project or portfolio, as well as additional information about the status of that particular custom field (e.g., is_important, which defines whether or not the custom field will appear in the list/grid on the Asana application).

Accessing custom field values on tasks or projects

The tasks reference has information on how custom fields look on tasks. custom fields will return as an array on the property custom_fields, and each entry will contain, side-by-side, the compact representation of the custom field metadata and a {typename}_value property that stores the value set for the custom field.

Of particular note is that the top-level gid of each entry in the custom_fields array is the gid of the custom field metadata, as it is the compact representation of this metadata. This can be used to refer to the full metadata by making a request to the /custom_fields/{custom_fields_id} endpoint as described above.

Custom fields can be set just as in the Asana-defined fields on a task via POST or PUT requests. You can see an example in the update a task endpoint.

Custom fields on projects follow this same pattern.

Warning: Program defensively with regards to custom field definitions

Asana application users have the ability to change the definitions of custom field metadata. This means that as you write scripts or applications to work with them, it is possible for the definitions to change at any time, which may cause an application using them to break or malfunction if it makes assumptions about the metadata for a particular custom field. When using custom fields, it is a good idea to program defensively, meaning you your application should double-check that the custom field metadata are what it expects.

Storing the state of the custom field metadata for too long if you dynamically create a model for it can cause your model to become out of sync with the model stored in Asana. For example, if you encounter an enum value on a task that does not match any option in your metadata model, your metadata model has become out of date with the custom field metadata.

Enabled and disabled values

When information that is contained in a custom field value loses a logical association with its metadata definition, the value becomes disabled. This can happen in a couple of simple ways, for example, if you remove the custom field metadata from a project, or move a task with a custom field to a different project which does not have the custom field metadata associated with it. The value remains on the task, and the custom field metadata can still be found and examined, but as the context in which the custom field makes sense is gone, the custom field cannot change its value; it can only be cleared.

Note: Tasks that are associated with multiple projects do not become disabled, so long as at least one of the projects is still associated with the custom field metadata. In other words, tasks with multiple projects will retain logically associated to the set of custom field metadata represented by all of their projects.

Moving the task back under a project with that custom field applied to it or applying the custom field metadata to the current project will return the custom field value to an enabled state. In this scenario, the custom field will be re-enabled and editable again.

In the Asana application, disabled fields are grayed out and not allowed to change, other than to be discarded. In the API, we return a property enabled: false to inform the external application that the value has been disabled.

Note that the API enforces the same operations on disabled custom field values as hold in the Asana application: they may not have their values changed, since the lack of context for the values of a custom field in general doesn't provide enough information to know what new values should be. Setting the custom field value to null will clear and remove the custom field value from the task.

Custom field access control

Custom fields are a complex feature of the Asana platform, and their access in the Asana application and in the API vary based on the status of the user and project. When building your application, it is best to be defensive and not assume the given user will have read or write access to a custom field, and fail gracefully when this occurs.


Create a custom field

Code samples

curl -X POST https://app.asana.com/api/1.0/custom_fields \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "currency_code": "EUR",
    "custom_label": "gold pieces",
    "custom_label_position": "suffix",
    "date_value": {
      "date": "2024-08-23",
      "date_time": "2024-08-23T22:00:00.000Z"
    },
    "description": "Development team priority",
    "enabled": true,
    "enum_options": [
      {
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "enum_value": {
      "color": "blue",
      "enabled": true,
      "name": "Low"
    },
    "format": "custom",
    "has_notifications_enabled": true,
    "multi_enum_values": [
      {
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "name": "Status",
    "number_value": 5.2,
    "people_value": [
      "12345"
    ],
    "precision": 2,
    "resource_subtype": "text",
    "text_value": "Some Value",
    "workspace": "1331"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "custom_field",
    "asana_created_field": "priority",
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "currency_code": "EUR",
    "custom_label": "gold pieces",
    "custom_label_position": "suffix",
    "date_value": {
      "date": "2024-08-23",
      "date_time": "2024-08-23T22:00:00.000Z"
    },
    "description": "Development team priority",
    "display_value": "blue",
    "enabled": true,
    "enum_options": [
      {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "enum_value": {
      "gid": "12345",
      "resource_type": "enum_option",
      "color": "blue",
      "enabled": true,
      "name": "Low"
    },
    "format": "custom",
    "has_notifications_enabled": true,
    "is_global_to_workspace": true,
    "multi_enum_values": [
      {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "name": "Status",
    "number_value": 5.2,
    "people_value": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "precision": 2,
    "resource_subtype": "text",
    "text_value": "Some Value",
    "type": "text"
  }
}

See input/output options to include more fields in your response.

POST /custom_fields

Creates a new custom field in a workspace. Every custom field is required to be created in a specific workspace, and this workspace cannot be changed once set.

A custom field’s name must be unique within a workspace and not conflict with names of existing task properties such as Due Date or Assignee. A custom field’s type must be one of text, enum, multi_enum, number, date, or people.

Returns the full record of the newly created custom field.

Parameters

NameDescription
body objectThe custom field object to create.
data objectCustom Fields store the metadata that is used in order to add user-specified information to tasks in Asana. Be sure to reference the Custom Fields developer documentation for more information about how custom fields relate to various resources in Asana.
currency_code string¦nullISO 4217 currency code to format this custom field. This will be null if the format is not currency.
custom_label string¦nullThis is the string that appears next to the custom field value. This will be null if the format is not custom.
custom_label_position stringOnly relevant for custom fields with custom format. This depicts where to place the custom label. This will be null if the format is not custom.
date_value objectConditional. Only relevant for custom fields of type date. This object reflects the chosen date (and optionally, time) value of a date custom field. If no date is selected, the value of date_value will be null.
date stringA string representing the date in YYYY-MM-DD format.
date_time stringA string representing the date in ISO 8601 format. If no time value is selected, the value of date-time will be null.
description stringOpt In. The description of the custom field.
enabled booleanConditional. Determines if the custom field is enabled or not.
enum_options [object]Conditional. Only relevant for custom fields of type enum. This array specifies the possible values which an enum custom field can adopt. To modify the enum options, refer to working with enum options.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
enum_value objectConditional. Only relevant for custom fields of type enum. This object is the chosen value of an enum custom field.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
format stringThe format of this custom field.
has_notifications_enabled booleanConditional. This flag describes whether a follower of a task with this field should receive inbox notifications from changes to this field.
multi_enum_values [object]Conditional. Only relevant for custom fields of type multi_enum. This object is the chosen values of a multi_enum custom field.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
name stringThe name of the custom field.
number_value numberConditional. This number is the value of a number custom field.
people_value [string]Conditional. Only relevant for custom fields of type people. This array of user GIDs reflects the users to be written to a people custom field. Note that write operations will replace existing users (if any) in the custom field with the users specified in this array.
precision integerOnly relevant for custom fields of type ‘Number’. This field dictates the number of places after the decimal to round to, i.e. 0 is integer values, 1 rounds to the nearest tenth, and so on. Must be between 0 and 6, inclusive.
resource_subtype stringThe type of the custom field. Must be one of the given values.
text_value stringConditional. This string is the value of a text custom field.
workspace string
required
Create-Only The workspace to create a custom field in.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Detailed descriptions

precision: Only relevant for custom fields of type ‘Number’. This field dictates the number of places after the decimal to round to, i.e. 0 is integer values, 1 rounds to the nearest tenth, and so on. Must be between 0 and 6, inclusive. For percentage format, this may be unintuitive, as a value of 0.25 has a precision of 0, while a value of 0.251 has a precision of 1. This is due to 0.25 being displayed as 25%. The identifier format will always have a precision of 0.

Enumerated Values

ParameterValue
custom_label_positionprefix
custom_label_positionsuffix
formatcurrency
formatidentifier
formatpercentage
formatcustom
formatnone
resource_subtypetext
resource_subtypeenum
resource_subtypemulti_enum
resource_subtypenumber
resource_subtypedate
resource_subtypepeople

Responses

StatusDescription
201 CustomFieldCustom field successfully created.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get a custom field

Code samples

curl -X GET https://app.asana.com/api/1.0/custom_fields/{custom_field_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "custom_field",
    "asana_created_field": "priority",
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "currency_code": "EUR",
    "custom_label": "gold pieces",
    "custom_label_position": "suffix",
    "date_value": {
      "date": "2024-08-23",
      "date_time": "2024-08-23T22:00:00.000Z"
    },
    "description": "Development team priority",
    "display_value": "blue",
    "enabled": true,
    "enum_options": [
      {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "enum_value": {
      "gid": "12345",
      "resource_type": "enum_option",
      "color": "blue",
      "enabled": true,
      "name": "Low"
    },
    "format": "custom",
    "has_notifications_enabled": true,
    "is_global_to_workspace": true,
    "multi_enum_values": [
      {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "name": "Status",
    "number_value": 5.2,
    "people_value": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "precision": 2,
    "resource_subtype": "text",
    "text_value": "Some Value",
    "type": "text"
  }
}

See input/output options to include more fields in your response.

GET /custom_fields/{custom_field_gid}

Get the complete definition of a custom field’s metadata.

Since custom fields can be defined for one of a number of types, and these types have different data and behaviors, there are fields that are relevant to a particular type. For instance, as noted above, enum_options is only relevant for the enum type and defines the set of choices that the enum could represent. The examples below show some of these type-specific custom field definitions.

Parameters

NameDescription
/custom_field_gid string
required
Globally unique identifier for the custom field.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 CustomFieldSuccessfully retrieved the complete definition of a custom field’s metadata.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Update a custom field

Code samples

curl -X PUT https://app.asana.com/api/1.0/custom_fields/{custom_field_gid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "currency_code": "EUR",
    "custom_label": "gold pieces",
    "custom_label_position": "suffix",
    "date_value": {
      "date": "2024-08-23",
      "date_time": "2024-08-23T22:00:00.000Z"
    },
    "description": "Development team priority",
    "enabled": true,
    "enum_options": [
      {
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "enum_value": {
      "color": "blue",
      "enabled": true,
      "name": "Low"
    },
    "format": "custom",
    "has_notifications_enabled": true,
    "multi_enum_values": [
      {
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "name": "Status",
    "number_value": 5.2,
    "people_value": [
      "12345"
    ],
    "precision": 2,
    "resource_subtype": "text",
    "text_value": "Some Value",
    "workspace": "1331"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "custom_field",
    "asana_created_field": "priority",
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "currency_code": "EUR",
    "custom_label": "gold pieces",
    "custom_label_position": "suffix",
    "date_value": {
      "date": "2024-08-23",
      "date_time": "2024-08-23T22:00:00.000Z"
    },
    "description": "Development team priority",
    "display_value": "blue",
    "enabled": true,
    "enum_options": [
      {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "enum_value": {
      "gid": "12345",
      "resource_type": "enum_option",
      "color": "blue",
      "enabled": true,
      "name": "Low"
    },
    "format": "custom",
    "has_notifications_enabled": true,
    "is_global_to_workspace": true,
    "multi_enum_values": [
      {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "name": "Status",
    "number_value": 5.2,
    "people_value": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "precision": 2,
    "resource_subtype": "text",
    "text_value": "Some Value",
    "type": "text"
  }
}

See input/output options to include more fields in your response.

PUT /custom_fields/{custom_field_gid}

A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the fields provided in the data block will be updated; any unspecified fields will remain unchanged When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the custom field. A custom field’s type cannot be updated. An enum custom field’s enum_options cannot be updated with this endpoint. Instead see “Work With Enum Options” for information on how to update enum_options. Locked custom fields can only be updated by the user who locked the field. Returns the complete updated custom field record.

Parameters

NameDescription
/custom_field_gid string
required
Globally unique identifier for the custom field.
body objectThe custom field object with all updated properties.
data objectCustom Fields store the metadata that is used in order to add user-specified information to tasks in Asana. Be sure to reference the Custom Fields developer documentation for more information about how custom fields relate to various resources in Asana.
currency_code string¦nullISO 4217 currency code to format this custom field. This will be null if the format is not currency.
custom_label string¦nullThis is the string that appears next to the custom field value. This will be null if the format is not custom.
custom_label_position stringOnly relevant for custom fields with custom format. This depicts where to place the custom label. This will be null if the format is not custom.
date_value objectConditional. Only relevant for custom fields of type date. This object reflects the chosen date (and optionally, time) value of a date custom field. If no date is selected, the value of date_value will be null.
date stringA string representing the date in YYYY-MM-DD format.
date_time stringA string representing the date in ISO 8601 format. If no time value is selected, the value of date-time will be null.
description stringOpt In. The description of the custom field.
enabled booleanConditional. Determines if the custom field is enabled or not.
enum_options [object]Conditional. Only relevant for custom fields of type enum. This array specifies the possible values which an enum custom field can adopt. To modify the enum options, refer to working with enum options.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
enum_value objectConditional. Only relevant for custom fields of type enum. This object is the chosen value of an enum custom field.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
format stringThe format of this custom field.
has_notifications_enabled booleanConditional. This flag describes whether a follower of a task with this field should receive inbox notifications from changes to this field.
multi_enum_values [object]Conditional. Only relevant for custom fields of type multi_enum. This object is the chosen values of a multi_enum custom field.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
name stringThe name of the custom field.
number_value numberConditional. This number is the value of a number custom field.
people_value [string]Conditional. Only relevant for custom fields of type people. This array of user GIDs reflects the users to be written to a people custom field. Note that write operations will replace existing users (if any) in the custom field with the users specified in this array.
precision integerOnly relevant for custom fields of type ‘Number’. This field dictates the number of places after the decimal to round to, i.e. 0 is integer values, 1 rounds to the nearest tenth, and so on. Must be between 0 and 6, inclusive.
resource_subtype stringThe type of the custom field. Must be one of the given values.
text_value stringConditional. This string is the value of a text custom field.
workspace string
required
Create-Only The workspace to create a custom field in.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Detailed descriptions

precision: Only relevant for custom fields of type ‘Number’. This field dictates the number of places after the decimal to round to, i.e. 0 is integer values, 1 rounds to the nearest tenth, and so on. Must be between 0 and 6, inclusive. For percentage format, this may be unintuitive, as a value of 0.25 has a precision of 0, while a value of 0.251 has a precision of 1. This is due to 0.25 being displayed as 25%. The identifier format will always have a precision of 0.

Enumerated Values

ParameterValue
custom_label_positionprefix
custom_label_positionsuffix
formatcurrency
formatidentifier
formatpercentage
formatcustom
formatnone
resource_subtypetext
resource_subtypeenum
resource_subtypemulti_enum
resource_subtypenumber
resource_subtypedate
resource_subtypepeople

Responses

StatusDescription
200 CustomFieldThe custom field was successfully updated.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Delete a custom field

Code samples

curl -X DELETE https://app.asana.com/api/1.0/custom_fields/{custom_field_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

DELETE /custom_fields/{custom_field_gid}

A specific, existing custom field can be deleted by making a DELETE request on the URL for that custom field. Locked custom fields can only be deleted by the user who locked the field. Returns an empty data record.

Parameters

NameDescription
/custom_field_gid string
required
Globally unique identifier for the custom field.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineThe custom field was successfully deleted.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Get a workspace's custom fields

Code samples

curl -X GET https://app.asana.com/api/1.0/workspaces/{workspace_gid}/custom_fields \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "custom_field",
      "asana_created_field": "priority",
      "created_by": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "currency_code": "EUR",
      "custom_label": "gold pieces",
      "custom_label_position": "suffix",
      "date_value": {
        "date": "2024-08-23",
        "date_time": "2024-08-23T22:00:00.000Z"
      },
      "description": "Development team priority",
      "display_value": "blue",
      "enabled": true,
      "enum_options": [
        {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        }
      ],
      "enum_value": {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      },
      "format": "custom",
      "has_notifications_enabled": true,
      "is_global_to_workspace": true,
      "multi_enum_values": [
        {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        }
      ],
      "name": "Status",
      "number_value": 5.2,
      "people_value": [
        {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      ],
      "precision": 2,
      "resource_subtype": "text",
      "text_value": "Some Value",
      "type": "text"
    }
  ]
}

See input/output options to include more fields in your response.

GET /workspaces/{workspace_gid}/custom_fields

Returns a list of the compact representation of all of the custom fields in a workspace.

Parameters

NameDescription
/workspace_gid string
required
Globally unique identifier for the workspace or organization.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 CustomFieldSuccessfully retrieved all custom fields for the given workspace.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Create an enum option

Code samples

curl -X POST https://app.asana.com/api/1.0/custom_fields/{custom_field_gid}/enum_options \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "color": "blue",
    "enabled": true,
    "insert_after": "12345",
    "insert_before": "12345",
    "name": "Low"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "enum_option",
    "color": "blue",
    "enabled": true,
    "name": "Low"
  }
}

See input/output options to include more fields in your response.

POST /custom_fields/{custom_field_gid}/enum_options

Creates an enum option and adds it to this custom field’s list of enum options. A custom field can have at most 500 enum options (including disabled options). By default new enum options are inserted at the end of a custom field’s list. Locked custom fields can only have enum options added by the user who locked the field. Returns the full record of the newly created enum option.

Parameters

NameDescription
/custom_field_gid string
required
Globally unique identifier for the custom field.
body objectThe enum option object to create.
data objectEnum options are the possible values which an enum custom field can adopt. An enum custom field must contain at least 1 enum option but no more than 500.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
insert_after stringAn existing enum option within this custom field after which the new enum option should be inserted. Cannot be provided together with before_enum_option.
insert_before stringAn existing enum option within this custom field before which the new enum option should be inserted. Cannot be provided together with after_enum_option.
name stringThe name of the enum option.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
201 EnumOptionCustom field enum option successfully created.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Reorder a custom field's enum

Code samples

curl -X POST https://app.asana.com/api/1.0/custom_fields/{custom_field_gid}/enum_options/insert \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "after_enum_option": "12345",
    "before_enum_option": "12345",
    "enum_option": "97285"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "enum_option",
    "color": "blue",
    "enabled": true,
    "name": "Low"
  }
}

See input/output options to include more fields in your response.

POST /custom_fields/{custom_field_gid}/enum_options/insert

Moves a particular enum option to be either before or after another specified enum option in the custom field. Locked custom fields can only be reordered by the user who locked the field.

Parameters

NameDescription
/custom_field_gid string
required
Globally unique identifier for the custom field.
body objectThe enum option object to create.
data objectnone
after_enum_option stringAn existing enum option within this custom field after which the new enum option should be inserted. Cannot be provided together with before_enum_option.
before_enum_option stringAn existing enum option within this custom field before which the new enum option should be inserted. Cannot be provided together with after_enum_option.
enum_option string
required
The gid of the enum option to relocate.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 EnumOptionCustom field enum option successfully reordered.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Update an enum option

Code samples

curl -X PUT https://app.asana.com/api/1.0/enum_options/{enum_option_gid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "color": "blue",
    "enabled": true,
    "insert_after": "12345",
    "insert_before": "12345",
    "name": "Low"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "enum_option",
    "color": "blue",
    "enabled": true,
    "name": "Low"
  }
}

See input/output options to include more fields in your response.

PUT /enum_options/{enum_option_gid}

Updates an existing enum option. Enum custom fields require at least one enabled enum option. Locked custom fields can only be updated by the user who locked the field. Returns the full record of the updated enum option.

Parameters

NameDescription
/enum_option_gid string
required
Globally unique identifier for the enum option.
body objectThe enum option object to update
data objectEnum options are the possible values which an enum custom field can adopt. An enum custom field must contain at least 1 enum option but no more than 500.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
insert_after stringAn existing enum option within this custom field after which the new enum option should be inserted. Cannot be provided together with before_enum_option.
insert_before stringAn existing enum option within this custom field before which the new enum option should be inserted. Cannot be provided together with after_enum_option.
name stringThe name of the enum option.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 EnumOptionSuccessfully updated the specified custom field enum.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Custom field settings

GET /projects/{project_gid}/custom_field_settings
GET /portfolios/{portfolio_gid}/custom_field_settings

Custom fields are attached to a particular project with the custom field settings resource. This resource both represents the many-to-many join of the custom field and project as well as stores information that is relevant to that particular pairing. For instance, the is_important property determines some possible application-specific handling of that custom field.


Get a project's custom fields

Code samples

curl -X GET https://app.asana.com/api/1.0/projects/{project_gid}/custom_field_settings \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "custom_field_setting",
      "custom_field": {
        "gid": "12345",
        "resource_type": "custom_field",
        "asana_created_field": "priority",
        "created_by": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        },
        "currency_code": "EUR",
        "custom_label": "gold pieces",
        "custom_label_position": "suffix",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "description": "Development team priority",
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "format": "custom",
        "has_notifications_enabled": true,
        "is_global_to_workspace": true,
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "people_value": [
          {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          }
        ],
        "precision": 2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      },
      "is_important": false,
      "parent": {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      },
      "project": {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      }
    }
  ]
}

See input/output options to include more fields in your response.

GET /projects/{project_gid}/custom_field_settings

Returns a list of all of the custom fields settings on a project, in compact form. Note that, as in all queries to collections which return compact representation, opt_fields can be used to include more data than is returned in the compact representation. See the getting started guide on input/output options for more information.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 CustomFieldSettingSuccessfully retrieved custom field settings objects for a project.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get a portfolio's custom fields

Code samples

curl -X GET https://app.asana.com/api/1.0/portfolios/{portfolio_gid}/custom_field_settings \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "custom_field_setting",
      "custom_field": {
        "gid": "12345",
        "resource_type": "custom_field",
        "asana_created_field": "priority",
        "created_by": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        },
        "currency_code": "EUR",
        "custom_label": "gold pieces",
        "custom_label_position": "suffix",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "description": "Development team priority",
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "format": "custom",
        "has_notifications_enabled": true,
        "is_global_to_workspace": true,
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "people_value": [
          {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          }
        ],
        "precision": 2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      },
      "is_important": false,
      "parent": {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      },
      "project": {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      }
    }
  ]
}

See input/output options to include more fields in your response.

GET /portfolios/{portfolio_gid}/custom_field_settings

Returns a list of all of the custom fields settings on a portfolio, in compact form.

Parameters

NameDescription
/portfolio_gid string
required
Globally unique identifier for the portfolio.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 CustomFieldSettingSuccessfully retrieved custom field settings objects for a portfolio.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Events

GET /events

An event is an object representing a change to a resource that was observed by an event subscription. Event streams rely on the same infrastructure as webhooks, which ensures events are delivered within a minute (on average). This system is designed for at most once delivery, meaning in exceptional circumstances a small number of events may be missing from the stream. For this reason, if your use case requires strong guarantees about processing all changes on a resource and cannot tolerate any missing events, regardless of how rare that might be, we recommend building a fallback polling system that fetches the resource periodically as well. Note that while webhooks cannot be replayed once delivered, events are retrievable from the event stream for 24 hours after being processed.

In general, requesting events on a resource is faster and subject to higher rate limits than requesting the resource itself. Additionally, change events "bubble up" (e.g., listening to events on a project would include when stories are added to tasks in the project, and even to subtasks).

Establish an initial sync token by making a request with no sync token. The response will be a 412 Precondition Failed error - the same as if the sync token had expired.

Subsequent requests should always provide the sync token from the immediately preceding call.

Sync tokens may not be valid if you attempt to go "backward" in the history by requesting previous tokens, though re-requesting the current sync token is generally safe, and will always return the same results.

When you receive a 412 Precondition Failed error, it means that the sync token is either invalid or expired. If you are attempting to keep a set of data in sync, this signals you may need to re-crawl the data.

Sync tokens always expire after 24 hours, but may expire sooner, depending on load on the service.


Get events on a resource

Code samples

curl -X GET https://app.asana.com/api/1.0/events?resource=12345 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "action": "changed",
      "change": {
        "action": "changed",
        "added_value": {
          "gid": "12345",
          "resource_type": "user"
        },
        "field": "assignee",
        "new_value": {
          "gid": "12345",
          "resource_type": "user"
        },
        "removed_value": {
          "gid": "12345",
          "resource_type": "user"
        }
      },
      "created_at": "2012-02-22T02:06:58.147Z",
      "parent": {
        "gid": "12345",
        "resource_type": "task",
        "name": "Bug Task"
      },
      "resource": {
        "gid": "12345",
        "resource_type": "task",
        "name": "Bug Task"
      },
      "type": "task",
      "user": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    }
  ],
  "sync": "de4774f6915eae04714ca93bb2f5ee81",
  "has_more": true
}

See input/output options to include more fields in your response.

GET /events

Returns the full record for all events that have occurred since the sync token was created.

A GET request to the endpoint /[path_to_resource]/events can be made in lieu of including the resource ID in the data for the request.

Asana limits a single sync token to 100 events. If more than 100 events exist for a given resource, has_more: true will be returned in the response, indicating that there are more events to pull.

Note: The resource returned will be the resource that triggered the event. This may be different from the one that the events were requested for. For example, a subscription to a project will contain events for tasks contained within the project.

Parameters

NameDescription
?resource string
required
A resource ID to subscribe to. The resource can be a task or project.
?sync stringA sync token received from the last request, or none on first sync. Events will be returned from the point in time that the sync token was generated.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Detailed descriptions

sync: A sync token received from the last request, or none on first sync. Events will be returned from the point in time that the sync token was generated. Note: On your first request, omit the sync token. The response will be the same as for an expired sync token, and will include a new valid sync token.If the sync token is too old (which may happen from time to time) the API will return a 412 Precondition Failed error, and include a fresh sync token in the response.

Responses

StatusDescription
200 EventSuccessfully retrieved events.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Goals

GET /goals/{goal_gid}
PUT /goals/{goal_gid}
DELETE /goals/{goal_gid}
GET /goals
POST /goals
POST /goals/{goal_gid}/setMetric
POST /goals/{goal_gid}/setMetricCurrentValue
POST /goals/{goal_gid}/addFollowers
POST /goals/{goal_gid}/removeFollowers
GET /goals/{goal_gid}/parentGoals

A goal is an object in the goal-tracking system that helps your organization drive measurable results.


Get a goal

Code samples

curl -X GET https://app.asana.com/api/1.0/goals/{goal_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "goal",
    "due_on": "2019-09-15",
    "html_notes": "<body>Start building brand awareness.</body>",
    "is_workspace_level": true,
    "liked": false,
    "name": "Grow web traffic by 30%",
    "notes": "Start building brand awareness.",
    "start_on": "2019-09-14",
    "status": "green",
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "metric": {
      "gid": "12345",
      "resource_type": "task",
      "currency_code": "EUR",
      "current_display_value": "8.12",
      "current_number_value": 8.12,
      "initial_number_value": 5.2,
      "precision": 2,
      "progress_source": "manual",
      "resource_subtype": "number",
      "target_number_value": 10.2,
      "unit": "none",
      "can_manage": true
    },
    "num_likes": 5,
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    },
    "time_period": {
      "gid": "12345",
      "resource_type": "time_period",
      "display_name": "Q1 FY22",
      "end_on": "2019-09-14",
      "period": "Q1",
      "start_on": "2019-09-13"
    },
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

GET /goals/{goal_gid}

Returns the complete goal record for a single goal.

Parameters

NameDescription
/goal_gid string
required
Globally unique identifier for the goal.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 GoalSuccessfully retrieved the record for a single goal.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
402 ErrorThe request was valid, but the queried object or object mutation specified in the request is above your current premium level.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Update a goal

Code samples

curl -X PUT https://app.asana.com/api/1.0/goals/{goal_gid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "due_on": "2019-09-15",
    "followers": [
      "12345"
    ],
    "html_notes": "<body>Start building brand awareness.</body>",
    "is_workspace_level": true,
    "liked": false,
    "name": "Grow web traffic by 30%",
    "notes": "Start building brand awareness.",
    "owner": "12345",
    "start_on": "2019-09-14",
    "status": "green",
    "team": "12345",
    "time_period": "12345",
    "workspace": "12345"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "goal",
    "due_on": "2019-09-15",
    "html_notes": "<body>Start building brand awareness.</body>",
    "is_workspace_level": true,
    "liked": false,
    "name": "Grow web traffic by 30%",
    "notes": "Start building brand awareness.",
    "start_on": "2019-09-14",
    "status": "green",
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "metric": {
      "gid": "12345",
      "resource_type": "task",
      "currency_code": "EUR",
      "current_display_value": "8.12",
      "current_number_value": 8.12,
      "initial_number_value": 5.2,
      "precision": 2,
      "progress_source": "manual",
      "resource_subtype": "number",
      "target_number_value": 10.2,
      "unit": "none",
      "can_manage": true
    },
    "num_likes": 5,
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    },
    "time_period": {
      "gid": "12345",
      "resource_type": "time_period",
      "display_name": "Q1 FY22",
      "end_on": "2019-09-14",
      "period": "Q1",
      "start_on": "2019-09-13"
    },
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

PUT /goals/{goal_gid}

An existing goal can be updated by making a PUT request on the URL for that goal. Only the fields provided in the data block will be updated; any unspecified fields will remain unchanged.

Returns the complete updated goal record.

Parameters

NameDescription
/goal_gid string
required
Globally unique identifier for the goal.
body object
required
The updated fields for the goal.
data objectA generic Asana Resource, containing a globally unique identifier.
due_on string¦nullThe localized day on which this goal is due. This takes a date with format YYYY-MM-DD.
followers [string]none
html_notes stringThe notes of the goal with formatting as HTML.
is_workspace_level booleanConditional. This property is only present when the workspace provided is an organization. Whether the goal belongs to the workspace (and is listed as part of the workspace’s goals) or not. If it isn’t a workspace-level goal, it is a team-level goal, and is associated with the goal’s team.
liked booleanTrue if the goal is liked by the authorized user, false if not.
name stringThe name of the goal.
notes stringFree-form textual information associated with the goal (i.e. its description).
owner string¦nullThe gid of a user.
start_on string¦nullThe day on which work for this goal begins, or null if the goal has no start date. This takes a date with YYYY-MM-DD format, and cannot be set unless there is an accompanying due date.
status string¦nullThe current status of this goal. When the goal is open, its status can be green, yellow, and red to reflect "On Track", "At Risk", and "Off Track", respectively. When the goal is closed, the value can be missed, achieved, partial, or dropped.
team string¦nullConditional. This property is only present when the workspace provided is an organization.
time_period string¦nullThe gid of a time period.
workspace stringThe gid of a workspace.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Detailed descriptions

status: The current status of this goal. When the goal is open, its status can be green, yellow, and red to reflect "On Track", "At Risk", and "Off Track", respectively. When the goal is closed, the value can be missed, achieved, partial, or dropped. Note you can only write to this property if metric is set.

Responses

StatusDescription
200 GoalSuccessfully updated the goal.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Delete a goal

Code samples

curl -X DELETE https://app.asana.com/api/1.0/goals/{goal_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

DELETE /goals/{goal_gid}

A specific, existing goal can be deleted by making a DELETE request on the URL for that goal.

Returns an empty data record.

Parameters

NameDescription
/goal_gid string
required
Globally unique identifier for the goal.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully deleted the specified goal.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
402 ErrorThe request was valid, but the queried object or object mutation specified in the request is above your current premium level.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Get goals

Code samples

curl -X GET https://app.asana.com/api/1.0/goals \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "goal",
      "name": "Grow web traffic by 30%",
      "owner": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    }
  ]
}

See input/output options to include more fields in your response.

GET /goals

Returns compact goal records.

Parameters

NameDescription
?portfolio stringGlobally unique identifier for supporting portfolio.
?project stringGlobally unique identifier for supporting project.
?is_workspace_level booleanFilter to goals with is_workspace_level set to query value. Must be used with the workspace parameter.
?team stringGlobally unique identifier for the team.
?workspace stringGlobally unique identifier for the workspace.
?time_periods array[string]Globally unique identifiers for the time periods.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 GoalCompactSuccessfully retrieved the requested goals.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
402 ErrorThe request was valid, but the queried object or object mutation specified in the request is above your current premium level.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Create a goal

Code samples

curl -X POST https://app.asana.com/api/1.0/goals \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "due_on": "2019-09-15",
    "followers": [
      "12345"
    ],
    "html_notes": "<body>Start building brand awareness.</body>",
    "is_workspace_level": true,
    "liked": false,
    "name": "Grow web traffic by 30%",
    "notes": "Start building brand awareness.",
    "owner": "12345",
    "start_on": "2019-09-14",
    "status": "green",
    "team": "12345",
    "time_period": "12345",
    "workspace": "12345"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "goal",
    "due_on": "2019-09-15",
    "html_notes": "<body>Start building brand awareness.</body>",
    "is_workspace_level": true,
    "liked": false,
    "name": "Grow web traffic by 30%",
    "notes": "Start building brand awareness.",
    "start_on": "2019-09-14",
    "status": "green",
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "metric": {
      "gid": "12345",
      "resource_type": "task",
      "currency_code": "EUR",
      "current_display_value": "8.12",
      "current_number_value": 8.12,
      "initial_number_value": 5.2,
      "precision": 2,
      "progress_source": "manual",
      "resource_subtype": "number",
      "target_number_value": 10.2,
      "unit": "none",
      "can_manage": true
    },
    "num_likes": 5,
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    },
    "time_period": {
      "gid": "12345",
      "resource_type": "time_period",
      "display_name": "Q1 FY22",
      "end_on": "2019-09-14",
      "period": "Q1",
      "start_on": "2019-09-13"
    },
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

POST /goals

Creates a new goal in a workspace or team.

Returns the full record of the newly created goal.

Parameters

NameDescription
body object
required
The goal to create.
data objectA generic Asana Resource, containing a globally unique identifier.
due_on string¦nullThe localized day on which this goal is due. This takes a date with format YYYY-MM-DD.
followers [string]none
html_notes stringThe notes of the goal with formatting as HTML.
is_workspace_level booleanConditional. This property is only present when the workspace provided is an organization. Whether the goal belongs to the workspace (and is listed as part of the workspace’s goals) or not. If it isn’t a workspace-level goal, it is a team-level goal, and is associated with the goal’s team.
liked booleanTrue if the goal is liked by the authorized user, false if not.
name stringThe name of the goal.
notes stringFree-form textual information associated with the goal (i.e. its description).
owner string¦nullThe gid of a user.
start_on string¦nullThe day on which work for this goal begins, or null if the goal has no start date. This takes a date with YYYY-MM-DD format, and cannot be set unless there is an accompanying due date.
status string¦nullThe current status of this goal. When the goal is open, its status can be green, yellow, and red to reflect "On Track", "At Risk", and "Off Track", respectively. When the goal is closed, the value can be missed, achieved, partial, or dropped.
team string¦nullConditional. This property is only present when the workspace provided is an organization.
time_period string¦nullThe gid of a time period.
workspace stringThe gid of a workspace.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Detailed descriptions

status: The current status of this goal. When the goal is open, its status can be green, yellow, and red to reflect "On Track", "At Risk", and "Off Track", respectively. When the goal is closed, the value can be missed, achieved, partial, or dropped. Note you can only write to this property if metric is set.

Responses

StatusDescription
201 GoalSuccessfully created a new goal.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
402 ErrorThe request was valid, but the queried object or object mutation specified in the request is above your current premium level.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Create a goal metric

Code samples

curl -X POST https://app.asana.com/api/1.0/goals/{goal_gid}/setMetric \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "currency_code": "EUR",
    "current_number_value": 8.12,
    "initial_number_value": 5.2,
    "precision": 2,
    "progress_source": "manual",
    "target_number_value": 10.2,
    "unit": "none"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "goal",
    "due_on": "2019-09-15",
    "html_notes": "<body>Start building brand awareness.</body>",
    "is_workspace_level": true,
    "liked": false,
    "name": "Grow web traffic by 30%",
    "notes": "Start building brand awareness.",
    "start_on": "2019-09-14",
    "status": "green",
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "metric": {
      "gid": "12345",
      "resource_type": "task",
      "currency_code": "EUR",
      "current_display_value": "8.12",
      "current_number_value": 8.12,
      "initial_number_value": 5.2,
      "precision": 2,
      "progress_source": "manual",
      "resource_subtype": "number",
      "target_number_value": 10.2,
      "unit": "none",
      "can_manage": true
    },
    "num_likes": 5,
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    },
    "time_period": {
      "gid": "12345",
      "resource_type": "time_period",
      "display_name": "Q1 FY22",
      "end_on": "2019-09-14",
      "period": "Q1",
      "start_on": "2019-09-13"
    },
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

POST /goals/{goal_gid}/setMetric

Creates and adds a goal metric to a specified goal. Note that this replaces an existing goal metric if one already exists.

Parameters

NameDescription
/goal_gid string
required
Globally unique identifier for the goal.
body object
required
The goal metric to create.
data objectA generic Asana Resource, containing a globally unique identifier.
currency_code string¦nullISO 4217 currency code to format this custom field. This will be null if the unit is not currency.
current_number_value numberThis number is the current value of a goal metric of type number.
initial_number_value numberThis number is the start value of a goal metric of type number.
precision integerConditional. Only relevant for goal metrics of type ‘Number’. This field dictates the number of places after the decimal to round to, i.e. 0 is integer values, 1 rounds to the nearest tenth, and so on. Must be between 0 and 6, inclusive.
progress_source stringThis field defines how the progress value of a goal metric is being calculated. A goal's progress can be provided manually by the user, calculated automatically from contributing subgoals or projects, or managed by an integration with an external data source, such as Salesforce.
target_number_value numberThis number is the end value of a goal metric of type number. This number cannot equal initial_number_value.
unit stringA supported unit of measure for the goal metric, or none.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Detailed descriptions

precision: Conditional. Only relevant for goal metrics of type ‘Number’. This field dictates the number of places after the decimal to round to, i.e. 0 is integer values, 1 rounds to the nearest tenth, and so on. Must be between 0 and 6, inclusive. For percentage format, this may be unintuitive, as a value of 0.25 has a precision of 0, while a value of 0.251 has a precision of 1. This is due to 0.25 being displayed as 25%.

Enumerated Values

ParameterValue
progress_sourcemanual
progress_sourcesubgoal_progress
progress_sourceproject_task_completion
progress_sourceproject_milestone_completion
progress_sourceexternal
unitnone
unitcurrency
unitpercentage

Responses

StatusDescription
200 GoalSuccessfully created a new goal metric.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
402 ErrorThe request was valid, but the queried object or object mutation specified in the request is above your current premium level.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Update a goal metric

Code samples

curl -X POST https://app.asana.com/api/1.0/goals/{goal_gid}/setMetricCurrentValue \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "current_number_value": 8.12
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "goal",
    "due_on": "2019-09-15",
    "html_notes": "<body>Start building brand awareness.</body>",
    "is_workspace_level": true,
    "liked": false,
    "name": "Grow web traffic by 30%",
    "notes": "Start building brand awareness.",
    "start_on": "2019-09-14",
    "status": "green",
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "metric": {
      "gid": "12345",
      "resource_type": "task",
      "currency_code": "EUR",
      "current_display_value": "8.12",
      "current_number_value": 8.12,
      "initial_number_value": 5.2,
      "precision": 2,
      "progress_source": "manual",
      "resource_subtype": "number",
      "target_number_value": 10.2,
      "unit": "none",
      "can_manage": true
    },
    "num_likes": 5,
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    },
    "time_period": {
      "gid": "12345",
      "resource_type": "time_period",
      "display_name": "Q1 FY22",
      "end_on": "2019-09-14",
      "period": "Q1",
      "start_on": "2019-09-13"
    },
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

POST /goals/{goal_gid}/setMetricCurrentValue

Updates a goal's existing metric's current_number_value if one exists, otherwise responds with a 400 status code.

Returns the complete updated goal metric record.

Parameters

NameDescription
/goal_gid string
required
Globally unique identifier for the goal.
body object
required
The updated fields for the goal metric.
data objectA generic Asana Resource, containing a globally unique identifier.
current_number_value numberConditional. This number is the current value of a goal metric of type number.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 GoalSuccessfully updated the goal metric.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
402 ErrorThe request was valid, but the queried object or object mutation specified in the request is above your current premium level.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Add a collaborator to a goal

Code samples

curl -X POST https://app.asana.com/api/1.0/goals/{goal_gid}/addFollowers \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "followers": [
      "13579",
      "321654"
    ]
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "goal",
    "due_on": "2019-09-15",
    "html_notes": "<body>Start building brand awareness.</body>",
    "is_workspace_level": true,
    "liked": false,
    "name": "Grow web traffic by 30%",
    "notes": "Start building brand awareness.",
    "start_on": "2019-09-14",
    "status": "green",
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "metric": {
      "gid": "12345",
      "resource_type": "task",
      "currency_code": "EUR",
      "current_display_value": "8.12",
      "current_number_value": 8.12,
      "initial_number_value": 5.2,
      "precision": 2,
      "progress_source": "manual",
      "resource_subtype": "number",
      "target_number_value": 10.2,
      "unit": "none",
      "can_manage": true
    },
    "num_likes": 5,
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    },
    "time_period": {
      "gid": "12345",
      "resource_type": "time_period",
      "display_name": "Q1 FY22",
      "end_on": "2019-09-14",
      "period": "Q1",
      "start_on": "2019-09-13"
    },
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

POST /goals/{goal_gid}/addFollowers

Adds followers to a goal. Returns the goal the followers were added to. Each goal can be associated with zero or more followers in the system. Requests to add/remove followers, if successful, will return the complete updated goal record, described above.

Parameters

NameDescription
/goal_gid string
required
Globally unique identifier for the goal.
body object
required
The followers to be added as collaborators
data objectnone
followers [string]
required
An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 GoalSuccessfully added users as collaborators.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
402 ErrorThe request was valid, but the queried object or object mutation specified in the request is above your current premium level.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Remove a collaborator from a goal

Code samples

curl -X POST https://app.asana.com/api/1.0/goals/{goal_gid}/removeFollowers \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "followers": [
      "13579",
      "321654"
    ]
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "goal",
    "due_on": "2019-09-15",
    "html_notes": "<body>Start building brand awareness.</body>",
    "is_workspace_level": true,
    "liked": false,
    "name": "Grow web traffic by 30%",
    "notes": "Start building brand awareness.",
    "start_on": "2019-09-14",
    "status": "green",
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "metric": {
      "gid": "12345",
      "resource_type": "task",
      "currency_code": "EUR",
      "current_display_value": "8.12",
      "current_number_value": 8.12,
      "initial_number_value": 5.2,
      "precision": 2,
      "progress_source": "manual",
      "resource_subtype": "number",
      "target_number_value": 10.2,
      "unit": "none",
      "can_manage": true
    },
    "num_likes": 5,
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    },
    "time_period": {
      "gid": "12345",
      "resource_type": "time_period",
      "display_name": "Q1 FY22",
      "end_on": "2019-09-14",
      "period": "Q1",
      "start_on": "2019-09-13"
    },
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

POST /goals/{goal_gid}/removeFollowers

Removes followers from a goal. Returns the goal the followers were removed from. Each goal can be associated with zero or more followers in the system. Requests to add/remove followers, if successful, will return the complete updated goal record, described above.

Parameters

NameDescription
/goal_gid string
required
Globally unique identifier for the goal.
body object
required
The followers to be removed as collaborators
data objectnone
followers [string]
required
An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 GoalSuccessfully removed users as collaborators.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
402 ErrorThe request was valid, but the queried object or object mutation specified in the request is above your current premium level.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get parent goals from a goal

Code samples

curl -X GET https://app.asana.com/api/1.0/goals/{goal_gid}/parentGoals \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "goal",
      "name": "Grow web traffic by 30%",
      "owner": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    }
  ]
}

See input/output options to include more fields in your response.

GET /goals/{goal_gid}/parentGoals

Returns a compact representation of all of the parent goals of a goal.

Parameters

NameDescription
/goal_gid string
required
Globally unique identifier for the goal.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 GoalCompactSuccessfully retrieved the specified goal's parent goals.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
402 ErrorThe request was valid, but the queried object or object mutation specified in the request is above your current premium level.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Goal relationships

GET /goal_relationships/{goal_relationship_gid}
PUT /goal_relationships/{goal_relationship_gid}
GET /goal_relationships
POST /goals/{goal_gid}/addSupportingRelationship
POST /goals/{goal_gid}/removeSupportingRelationship

A goal relationship is an object representing the relationship between a goal and another goal, a project, or a portfolio.


Get a goal relationship

Code samples

curl -X GET https://app.asana.com/api/1.0/goal_relationships/{goal_relationship_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "goal_relationship",
    "contribution_weight": 1,
    "resource_subtype": "subgoal",
    "supported_goal": {
      "gid": "12345",
      "resource_type": "goal",
      "name": "Grow web traffic by 30%",
      "owner": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    },
    "supporting_resource": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    }
  }
}

See input/output options to include more fields in your response.

GET /goal_relationships/{goal_relationship_gid}

Returns the complete updated goal relationship record for a single goal relationship.

Parameters

NameDescription
/goal_relationship_gid string
required
Globally unique identifier for the goal relationship.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 GoalRelationshipSuccessfully retrieved the record for the goal relationship.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Update a goal relationship

Code samples

curl -X PUT https://app.asana.com/api/1.0/goal_relationships/{goal_relationship_gid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "contribution_weight": 1
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "goal_relationship",
    "contribution_weight": 1,
    "resource_subtype": "subgoal",
    "supported_goal": {
      "gid": "12345",
      "resource_type": "goal",
      "name": "Grow web traffic by 30%",
      "owner": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    },
    "supporting_resource": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    }
  }
}

See input/output options to include more fields in your response.

PUT /goal_relationships/{goal_relationship_gid}

An existing goal relationship can be updated by making a PUT request on the URL for that goal relationship. Only the fields provided in the data block will be updated; any unspecified fields will remain unchanged.

Returns the complete updated goal relationship record.

Parameters

NameDescription
/goal_relationship_gid string
required
Globally unique identifier for the goal relationship.
body object
required
The updated fields for the goal relationship.
data objectA goal relationship is an object representing the relationship between a goal and another goal, a project, or a portfolio.
contribution_weight numberThe weight that the supporting resource's progress contributes to the supported goal's progress. This can only be 0 or 1.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 GoalRelationshipSuccessfully updated the goal relationship.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get goal relationships

Code samples

curl -X GET https://app.asana.com/api/1.0/goal_relationships?supported_goal=12345 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "goal_relationship",
      "contribution_weight": 1,
      "resource_subtype": "subgoal",
      "supporting_resource": {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      }
    }
  ]
}

See input/output options to include more fields in your response.

GET /goal_relationships

Returns compact goal relationship records.

Parameters

NameDescription
?supported_goal string
required
Globally unique identifier for the supported goal in the goal relationship.
?resource_subtype stringIf provided, filter to goal relationships with a given resource_subtype.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 GoalRelationshipCompactSuccessfully retrieved the requested goal relationships.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Add a supporting goal relationship

Code samples

curl -X POST https://app.asana.com/api/1.0/goals/{goal_gid}/addSupportingRelationship \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "contribution_weight": 1,
    "insert_after": "1331",
    "insert_before": "1331",
    "supporting_resource": "12345"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "goal_relationship",
    "contribution_weight": 1,
    "resource_subtype": "subgoal",
    "supported_goal": {
      "gid": "12345",
      "resource_type": "goal",
      "name": "Grow web traffic by 30%",
      "owner": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    },
    "supporting_resource": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    }
  }
}

See input/output options to include more fields in your response.

POST /goals/{goal_gid}/addSupportingRelationship

Creates a goal relationship by adding a supporting resource to a given goal.

Returns the newly created goal relationship record.

Parameters

NameDescription
/goal_gid string
required
Globally unique identifier for the goal.
body object
required
The supporting resource to be added to the goal
data objectnone
contribution_weight numberThe weight that the supporting resource's progress will contribute to the supported goal's progress. This can only be 0 or 1.
insert_after stringAn id of a subgoal of this parent goal. The new subgoal will be added after the one specified here. insert_before and insert_after parameters cannot both be specified. Currently only supported when adding a subgoal.
insert_before stringAn id of a subgoal of this parent goal. The new subgoal will be added before the one specified here. insert_before and insert_after parameters cannot both be specified. Currently only supported when adding a subgoal.
supporting_resource string
required
The gid of the supporting resource to add to the parent goal. Must be the gid of a goal, project, or portfolio.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 GoalRelationshipSuccessfully created the goal relationship.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Removes a supporting goal relationship

Code samples

curl -X POST https://app.asana.com/api/1.0/goals/{goal_gid}/removeSupportingRelationship \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "supporting_resource": "12345"
  }
}

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

POST /goals/{goal_gid}/removeSupportingRelationship

Removes a goal relationship for a given parent goal.

Parameters

NameDescription
/goal_gid string
required
Globally unique identifier for the goal.
body object
required
The supporting resource to be removed from the goal
data objectnone
supporting_resource string
required
The gid of the supporting resource to remove from the parent goal. Must be the gid of a goal, project, or portfolio.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully removed the goal relationship.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Jobs

GET /jobs/{job_gid}

Jobs represent processes that handle asynchronous work. A job created when an endpoint requests an action that will be handled asynchronously, such as project or task duplication.

Only the creator of the duplication process can access the duplication status of the new object.

Note: With any work that is handled asynchronously (e.g., project instantation from a template, duplicating a task or project, etc.), the intermittent states of newly-created objects may not be consistent. That is, object properties may return different values each time when polled until the job status has returned a succeeded value.


Get a job by id

Code samples

curl -X GET https://app.asana.com/api/1.0/jobs/{job_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "job",
    "new_project": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    },
    "new_project_template": {
      "gid": "12345",
      "resource_type": "project_template",
      "name": "Packing list"
    },
    "new_task": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "resource_subtype": "duplicate_task",
    "status": "in_progress"
  }
}

See input/output options to include more fields in your response.

GET /jobs/{job_gid}

Returns the full record for a job.

Parameters

NameDescription
/job_gid string
required
Globally unique identifier for the job.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 JobSuccessfully retrieved Job.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Organization exports

POST /organization_exports
GET /organization_exports/{organization_export_gid}

An organization_export object represents a request to export the complete data of an organization in JSON format.

To export an organization using this API:

  • Create an organization_export request and store the ID that is returned.
  • Request the organization_export every few minutes, until the state field contains ‘finished’.
  • Download the file located at the URL in the download_url field. * Exports can take a long time, from several minutes to a few hours for large organizations.

Note: These endpoints are only available to Service Accounts of an Enterprise organization.


Create an organization export request

Code samples

curl -X POST https://app.asana.com/api/1.0/organization_exports \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "organization": "1331"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "organization_export",
    "created_at": "2012-02-22T02:06:58.147Z",
    "download_url": "https://asana-export.s3.amazonaws.com/export-4632784536274-20170127-43246.json.gz?AWSAccessKeyId=xxxxxxxx",
    "organization": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    },
    "state": "started"
  }
}

See input/output options to include more fields in your response.

POST /organization_exports

This method creates a request to export an Organization. Asana will complete the export at some point after you create the request.

Parameters

NameDescription
body object
required
The organization to export.
data objectAn organization_export request starts a job to export the complete data of the given Organization.
organization stringGlobally unique identifier for the workspace or organization.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
201 OrganizationExportSuccessfully created organization export request.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get details on an org export request

Code samples

curl -X GET https://app.asana.com/api/1.0/organization_exports/{organization_export_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "organization_export",
    "created_at": "2012-02-22T02:06:58.147Z",
    "download_url": "https://asana-export.s3.amazonaws.com/export-4632784536274-20170127-43246.json.gz?AWSAccessKeyId=xxxxxxxx",
    "organization": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    },
    "state": "started"
  }
}

See input/output options to include more fields in your response.

GET /organization_exports/{organization_export_gid}

Returns details of a previously-requested Organization export.

Parameters

NameDescription
/organization_export_gid string
required
Globally unique identifier for the organization export.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 OrganizationExportSuccessfully retrieved organization export object.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Portfolios

GET /portfolios
POST /portfolios
GET /portfolios/{portfolio_gid}
PUT /portfolios/{portfolio_gid}
DELETE /portfolios/{portfolio_gid}
GET /portfolios/{portfolio_gid}/items
POST /portfolios/{portfolio_gid}/addItem
POST /portfolios/{portfolio_gid}/removeItem
POST /portfolios/{portfolio_gid}/addCustomFieldSetting
POST /portfolios/{portfolio_gid}/removeCustomFieldSetting
POST /portfolios/{portfolio_gid}/addMembers
POST /portfolios/{portfolio_gid}/removeMembers

A portfolio gives a high-level overview of the status of multiple initiatives in Asana. Portfolios provide a dashboard overview of the state of multiple projects, including a progress report and the most recent status update. Portfolios have some restrictions on size. Each portfolio has a max of 500 items and, like projects, a maximum of 20 custom fields.


Get multiple portfolios

Code samples

curl -X GET https://app.asana.com/api/1.0/portfolios?workspace=1331&owner=14916 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "portfolio",
      "name": "Bug Portfolio"
    }
  ]
}

See input/output options to include more fields in your response.

GET /portfolios

Returns a list of the portfolios in compact representation that are owned by the current API user.

Parameters

NameDescription
?workspace string
required
The workspace or organization to filter portfolios on.
?owner string
required
The user who owns the portfolio. Currently, API users can only get a list of portfolios that they themselves own.
?limit integerResults per page.
?offset stringOffset token.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 PortfolioCompactSuccessfully retrieved portfolios.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Create a portfolio

Code samples

curl -X POST https://app.asana.com/api/1.0/portfolios \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "color": "light-green",
    "name": "Bug Portfolio",
    "public": false,
    "workspace": "167589"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "portfolio",
    "color": "light-green",
    "name": "Bug Portfolio",
    "created_at": "2012-02-22T02:06:58.147Z",
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "custom_field_settings": [
      {
        "gid": "12345",
        "resource_type": "custom_field_setting",
        "custom_field": {
          "gid": "12345",
          "resource_type": "custom_field",
          "asana_created_field": "priority",
          "created_by": {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          },
          "currency_code": "EUR",
          "custom_label": "gold pieces",
          "custom_label_position": "suffix",
          "date_value": {
            "date": "2024-08-23",
            "date_time": "2024-08-23T22:00:00.000Z"
          },
          "description": "Development team priority",
          "display_value": "blue",
          "enabled": true,
          "enum_options": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "enum_value": {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          },
          "format": "custom",
          "has_notifications_enabled": true,
          "is_global_to_workspace": true,
          "multi_enum_values": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "name": "Status",
          "number_value": 5.2,
          "people_value": [
            {
              "gid": "12345",
              "resource_type": "user",
              "name": "Greg Sanchez"
            }
          ],
          "precision": 2,
          "resource_subtype": "text",
          "text_value": "Some Value",
          "type": "text"
        },
        "is_important": false,
        "parent": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        }
      }
    ],
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "due_on": "2019-09-15",
    "members": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "public": false,
    "start_on": "2019-09-14",
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

POST /portfolios

Creates a new portfolio in the given workspace with the supplied name.

Note that portfolios created in the Asana UI may have some state (like the “Priority” custom field) which is automatically added to the portfolio when it is created. Portfolios created via our API will not be created with the same initial state to allow integrations to create their own starting state on a portfolio.

Parameters

NameDescription
body object
required
The portfolio to create.
data objectA portfolio gives a high-level overview of the status of multiple initiatives in Asana. Portfolios provide a dashboard overview of the state of multiple projects, including a progress report and the most recent project status update.
color stringColor of the portfolio.
name stringThe name of the portfolio.
public booleanTrue if the portfolio is public to its workspace members.
workspace stringGid of an object.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Enumerated Values

ParameterValue
colordark-pink
colordark-green
colordark-blue
colordark-red
colordark-teal
colordark-brown
colordark-orange
colordark-purple
colordark-warm-gray
colorlight-pink
colorlight-green
colorlight-blue
colorlight-red
colorlight-teal
colorlight-brown
colorlight-orange
colorlight-purple
colorlight-warm-gray

Responses

StatusDescription
201 PortfolioSuccessfully created portfolio.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get a portfolio

Code samples

curl -X GET https://app.asana.com/api/1.0/portfolios/{portfolio_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "portfolio",
    "color": "light-green",
    "name": "Bug Portfolio",
    "created_at": "2012-02-22T02:06:58.147Z",
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "custom_field_settings": [
      {
        "gid": "12345",
        "resource_type": "custom_field_setting",
        "custom_field": {
          "gid": "12345",
          "resource_type": "custom_field",
          "asana_created_field": "priority",
          "created_by": {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          },
          "currency_code": "EUR",
          "custom_label": "gold pieces",
          "custom_label_position": "suffix",
          "date_value": {
            "date": "2024-08-23",
            "date_time": "2024-08-23T22:00:00.000Z"
          },
          "description": "Development team priority",
          "display_value": "blue",
          "enabled": true,
          "enum_options": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "enum_value": {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          },
          "format": "custom",
          "has_notifications_enabled": true,
          "is_global_to_workspace": true,
          "multi_enum_values": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "name": "Status",
          "number_value": 5.2,
          "people_value": [
            {
              "gid": "12345",
              "resource_type": "user",
              "name": "Greg Sanchez"
            }
          ],
          "precision": 2,
          "resource_subtype": "text",
          "text_value": "Some Value",
          "type": "text"
        },
        "is_important": false,
        "parent": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        }
      }
    ],
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "due_on": "2019-09-15",
    "members": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "public": false,
    "start_on": "2019-09-14",
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

GET /portfolios/{portfolio_gid}

Returns the complete portfolio record for a single portfolio.

Parameters

NameDescription
/portfolio_gid string
required
Globally unique identifier for the portfolio.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 PortfolioSuccessfully retrieved the requested portfolio.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Update a portfolio

Code samples

curl -X PUT https://app.asana.com/api/1.0/portfolios/{portfolio_gid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "color": "light-green",
    "name": "Bug Portfolio",
    "public": false,
    "workspace": "167589"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "portfolio",
    "color": "light-green",
    "name": "Bug Portfolio",
    "created_at": "2012-02-22T02:06:58.147Z",
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "custom_field_settings": [
      {
        "gid": "12345",
        "resource_type": "custom_field_setting",
        "custom_field": {
          "gid": "12345",
          "resource_type": "custom_field",
          "asana_created_field": "priority",
          "created_by": {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          },
          "currency_code": "EUR",
          "custom_label": "gold pieces",
          "custom_label_position": "suffix",
          "date_value": {
            "date": "2024-08-23",
            "date_time": "2024-08-23T22:00:00.000Z"
          },
          "description": "Development team priority",
          "display_value": "blue",
          "enabled": true,
          "enum_options": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "enum_value": {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          },
          "format": "custom",
          "has_notifications_enabled": true,
          "is_global_to_workspace": true,
          "multi_enum_values": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "name": "Status",
          "number_value": 5.2,
          "people_value": [
            {
              "gid": "12345",
              "resource_type": "user",
              "name": "Greg Sanchez"
            }
          ],
          "precision": 2,
          "resource_subtype": "text",
          "text_value": "Some Value",
          "type": "text"
        },
        "is_important": false,
        "parent": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        }
      }
    ],
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "due_on": "2019-09-15",
    "members": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "public": false,
    "start_on": "2019-09-14",
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

PUT /portfolios/{portfolio_gid}

An existing portfolio can be updated by making a PUT request on the URL for that portfolio. Only the fields provided in the data block will be updated; any unspecified fields will remain unchanged.

Returns the complete updated portfolio record.

Parameters

NameDescription
/portfolio_gid string
required
Globally unique identifier for the portfolio.
body object
required
The updated fields for the portfolio.
data objectA portfolio gives a high-level overview of the status of multiple initiatives in Asana. Portfolios provide a dashboard overview of the state of multiple projects, including a progress report and the most recent project status update.
color stringColor of the portfolio.
name stringThe name of the portfolio.
public booleanTrue if the portfolio is public to its workspace members.
workspace stringGid of an object.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Enumerated Values

ParameterValue
colordark-pink
colordark-green
colordark-blue
colordark-red
colordark-teal
colordark-brown
colordark-orange
colordark-purple
colordark-warm-gray
colorlight-pink
colorlight-green
colorlight-blue
colorlight-red
colorlight-teal
colorlight-brown
colorlight-orange
colorlight-purple
colorlight-warm-gray

Responses

StatusDescription
200 PortfolioSuccessfully updated the portfolio.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Delete a portfolio

Code samples

curl -X DELETE https://app.asana.com/api/1.0/portfolios/{portfolio_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

DELETE /portfolios/{portfolio_gid}

An existing portfolio can be deleted by making a DELETE request on the URL for that portfolio.

Returns an empty data record.

Parameters

NameDescription
/portfolio_gid string
required
Globally unique identifier for the portfolio.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully deleted the specified portfolio.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Get portfolio items

Code samples

curl -X GET https://app.asana.com/api/1.0/portfolios/{portfolio_gid}/items \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    }
  ]
}

See input/output options to include more fields in your response.

GET /portfolios/{portfolio_gid}/items

Get a list of the items in compact form in a portfolio.

Parameters

NameDescription
/portfolio_gid string
required
Globally unique identifier for the portfolio.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectCompactSuccessfully retrieved the requested portfolio's items.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Add a portfolio item

Code samples

curl -X POST https://app.asana.com/api/1.0/portfolios/{portfolio_gid}/addItem \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "insert_after": "1331",
    "insert_before": "1331",
    "item": "1331"
  }
}

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

POST /portfolios/{portfolio_gid}/addItem

Add an item to a portfolio. Returns an empty data block.

Parameters

NameDescription
/portfolio_gid string
required
Globally unique identifier for the portfolio.
body object
required
Information about the item being inserted.
data objectnone
insert_after stringAn id of an item in this portfolio. The new item will be added after the one specified here. insert_before and insert_after parameters cannot both be specified.
insert_before stringAn id of an item in this portfolio. The new item will be added before the one specified here. insert_before and insert_after parameters cannot both be specified.
item string
required
The item to add to the portfolio.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully added the item to the portfolio.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Remove a portfolio item

Code samples

curl -X POST https://app.asana.com/api/1.0/portfolios/{portfolio_gid}/removeItem \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "item": "1331"
  }
}

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

POST /portfolios/{portfolio_gid}/removeItem

Remove an item from a portfolio. Returns an empty data block.

Parameters

NameDescription
/portfolio_gid string
required
Globally unique identifier for the portfolio.
body object
required
Information about the item being removed.
data objectnone
item string
required
The item to remove from the portfolio.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully removed the item from the portfolio.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Add a custom field to a portfolio

Code samples

curl -X POST https://app.asana.com/api/1.0/portfolios/{portfolio_gid}/addCustomFieldSetting \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "custom_field": "14916",
    "insert_after": "1331",
    "insert_before": "1331",
    "is_important": true
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "custom_field_setting",
    "custom_field": {
      "gid": "12345",
      "resource_type": "custom_field",
      "asana_created_field": "priority",
      "created_by": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "currency_code": "EUR",
      "custom_label": "gold pieces",
      "custom_label_position": "suffix",
      "date_value": {
        "date": "2024-08-23",
        "date_time": "2024-08-23T22:00:00.000Z"
      },
      "description": "Development team priority",
      "display_value": "blue",
      "enabled": true,
      "enum_options": [
        {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        }
      ],
      "enum_value": {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      },
      "format": "custom",
      "has_notifications_enabled": true,
      "is_global_to_workspace": true,
      "multi_enum_values": [
        {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        }
      ],
      "name": "Status",
      "number_value": 5.2,
      "people_value": [
        {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      ],
      "precision": 2,
      "resource_subtype": "text",
      "text_value": "Some Value",
      "type": "text"
    },
    "is_important": false,
    "parent": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    },
    "project": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    }
  }
}

See input/output options to include more fields in your response.

POST /portfolios/{portfolio_gid}/addCustomFieldSetting

Custom fields are associated with portfolios by way of custom field settings. This method creates a setting for the portfolio.

Parameters

NameDescription
/portfolio_gid string
required
Globally unique identifier for the portfolio.
body object
required
Information about the custom field setting.
data objectnone
custom_field string
required
The custom field to associate with this container.
insert_after stringA gid of a Custom Field Setting on this container, after which the new Custom Field Setting will be added. insert_before and insert_after parameters cannot both be specified.
insert_before stringA gid of a Custom Field Setting on this container, before which the new Custom Field Setting will be added. insert_before and insert_after parameters cannot both be specified.
is_important booleanWhether this field should be considered important to this container (for instance, to display in the list view of items in the container).
?opt_pretty booleanProvides “pretty” output.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 CustomFieldSettingSuccessfully added the custom field to the portfolio.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Remove a custom field from a portfolio

Code samples

curl -X POST https://app.asana.com/api/1.0/portfolios/{portfolio_gid}/removeCustomFieldSetting \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "custom_field": "14916"
  }
}

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

POST /portfolios/{portfolio_gid}/removeCustomFieldSetting

Removes a custom field setting from a portfolio.

Parameters

NameDescription
/portfolio_gid string
required
Globally unique identifier for the portfolio.
body object
required
Information about the custom field setting being removed.
data objectnone
custom_field string
required
The custom field to remove from this portfolio.
?opt_pretty booleanProvides “pretty” output.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully removed the custom field from the portfolio.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Add users to a portfolio

Code samples

curl -X POST https://app.asana.com/api/1.0/portfolios/{portfolio_gid}/addMembers \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "members": "521621,621373"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "portfolio",
    "color": "light-green",
    "name": "Bug Portfolio",
    "created_at": "2012-02-22T02:06:58.147Z",
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "custom_field_settings": [
      {
        "gid": "12345",
        "resource_type": "custom_field_setting",
        "custom_field": {
          "gid": "12345",
          "resource_type": "custom_field",
          "asana_created_field": "priority",
          "created_by": {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          },
          "currency_code": "EUR",
          "custom_label": "gold pieces",
          "custom_label_position": "suffix",
          "date_value": {
            "date": "2024-08-23",
            "date_time": "2024-08-23T22:00:00.000Z"
          },
          "description": "Development team priority",
          "display_value": "blue",
          "enabled": true,
          "enum_options": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "enum_value": {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          },
          "format": "custom",
          "has_notifications_enabled": true,
          "is_global_to_workspace": true,
          "multi_enum_values": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "name": "Status",
          "number_value": 5.2,
          "people_value": [
            {
              "gid": "12345",
              "resource_type": "user",
              "name": "Greg Sanchez"
            }
          ],
          "precision": 2,
          "resource_subtype": "text",
          "text_value": "Some Value",
          "type": "text"
        },
        "is_important": false,
        "parent": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        }
      }
    ],
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "due_on": "2019-09-15",
    "members": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "public": false,
    "start_on": "2019-09-14",
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

POST /portfolios/{portfolio_gid}/addMembers

Adds the specified list of users as members of the portfolio. Returns the updated portfolio record.

Parameters

NameDescription
/portfolio_gid string
required
Globally unique identifier for the portfolio.
body object
required
Information about the members being added.
data objectnone
members string
required
An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 PortfolioSuccessfully added members to the portfolio.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Remove users from a portfolio

Code samples

curl -X POST https://app.asana.com/api/1.0/portfolios/{portfolio_gid}/removeMembers \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "members": "521621,621373"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "portfolio",
    "color": "light-green",
    "name": "Bug Portfolio",
    "created_at": "2012-02-22T02:06:58.147Z",
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "custom_field_settings": [
      {
        "gid": "12345",
        "resource_type": "custom_field_setting",
        "custom_field": {
          "gid": "12345",
          "resource_type": "custom_field",
          "asana_created_field": "priority",
          "created_by": {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          },
          "currency_code": "EUR",
          "custom_label": "gold pieces",
          "custom_label_position": "suffix",
          "date_value": {
            "date": "2024-08-23",
            "date_time": "2024-08-23T22:00:00.000Z"
          },
          "description": "Development team priority",
          "display_value": "blue",
          "enabled": true,
          "enum_options": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "enum_value": {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          },
          "format": "custom",
          "has_notifications_enabled": true,
          "is_global_to_workspace": true,
          "multi_enum_values": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "name": "Status",
          "number_value": 5.2,
          "people_value": [
            {
              "gid": "12345",
              "resource_type": "user",
              "name": "Greg Sanchez"
            }
          ],
          "precision": 2,
          "resource_subtype": "text",
          "text_value": "Some Value",
          "type": "text"
        },
        "is_important": false,
        "parent": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        }
      }
    ],
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "due_on": "2019-09-15",
    "members": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "public": false,
    "start_on": "2019-09-14",
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

POST /portfolios/{portfolio_gid}/removeMembers

Removes the specified list of users from members of the portfolio. Returns the updated portfolio record.

Parameters

NameDescription
/portfolio_gid string
required
Globally unique identifier for the portfolio.
body object
required
Information about the members being removed.
data objectnone
members string
required
An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 PortfolioSuccessfully removed the members from the portfolio.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Portfolio memberships

GET /portfolio_memberships
GET /portfolio_memberships/{portfolio_membership_gid}
GET /portfolios/{portfolio_gid}/portfolio_memberships

This object determines if a user is a member of a portfolio.


Get multiple portfolio memberships

Code samples

curl -X GET https://app.asana.com/api/1.0/portfolio_memberships \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "portfolio_membership",
      "portfolio": {
        "gid": "12345",
        "resource_type": "portfolio",
        "name": "Bug Portfolio"
      },
      "user": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    }
  ]
}

See input/output options to include more fields in your response.

GET /portfolio_memberships

Returns a list of portfolio memberships in compact representation. You must specify portfolio, portfolio and user, or workspace and user.

Parameters

NameDescription
?portfolio stringThe portfolio to filter results on.
?workspace stringThe workspace to filter results on.
?user stringA string identifying a user. This can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 PortfolioMembershipCompactSuccessfully retrieved portfolio memberships.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get a portfolio membership

Code samples

curl -X GET https://app.asana.com/api/1.0/portfolio_memberships/{portfolio_membership_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "portfolio_membership",
    "portfolio": {
      "gid": "12345",
      "resource_type": "portfolio",
      "name": "Bug Portfolio"
    },
    "user": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    }
  }
}

See input/output options to include more fields in your response.

GET /portfolio_memberships/{portfolio_membership_gid}

Returns the complete portfolio record for a single portfolio membership.

Parameters

NameDescription
/portfolio_membership_gid string
required
none
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 PortfolioMembershipSuccessfully retrieved the requested portfolio membership.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get memberships from a portfolio

Code samples

curl -X GET https://app.asana.com/api/1.0/portfolios/{portfolio_gid}/portfolio_memberships \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "portfolio_membership",
      "portfolio": {
        "gid": "12345",
        "resource_type": "portfolio",
        "name": "Bug Portfolio"
      },
      "user": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    }
  ]
}

See input/output options to include more fields in your response.

GET /portfolios/{portfolio_gid}/portfolio_memberships

Returns the compact portfolio membership records for the portfolio.

Parameters

NameDescription
/portfolio_gid string
required
Globally unique identifier for the portfolio.
?user stringA string identifying a user. This can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 PortfolioMembershipCompactSuccessfully retrieved the requested portfolio's memberships.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Projects

GET /projects
POST /projects
GET /projects/{project_gid}
PUT /projects/{project_gid}
DELETE /projects/{project_gid}
POST /projects/{project_gid}/duplicate
GET /tasks/{task_gid}/projects
GET /teams/{team_gid}/projects
POST /teams/{team_gid}/projects
GET /workspaces/{workspace_gid}/projects
POST /workspaces/{workspace_gid}/projects
POST /projects/{project_gid}/addCustomFieldSetting
POST /projects/{project_gid}/removeCustomFieldSetting
GET /projects/{project_gid}/task_counts
POST /projects/{project_gid}/addMembers
POST /projects/{project_gid}/removeMembers
POST /projects/{project_gid}/addFollowers
POST /projects/{project_gid}/removeFollowers
POST /projects/{project_gid}/saveAsTemplate

A project represents a prioritized list of tasks in Asana or a board with columns of tasks represented as cards. A project exists in a single workspace or organization and is accessible to a subset of users in that workspace or organization, depending on its permissions.

Projects in organizations are shared with a single team. Currently, the team of a project cannot be changed via the API. Non-organization workspaces do not have teams and so you should not specify the team of project in a regular workspace.

Followers of a project are a subset of the members of that project. Followers of a project will receive all updates including tasks created, added and removed from that project. Members of the project have access to and will receive status updates of the project. Adding followers to a project will add them as members if they are not already, removing followers from a project will not affect membership.

Note: You can use certain project endpoints to operate on user task lists (My Tasks) by substituting the {project_gid} with the {user_task_list_gid}. For example, you can perform operations on the custom fields of a user task list by using the following projects endpoints: Add a custom field to a project, Remove a custom field from a project and Get a project's custom fields


Get multiple projects

Code samples

curl -X GET https://app.asana.com/api/1.0/projects \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    }
  ]
}

See input/output options to include more fields in your response.

GET /projects

Returns the compact project records for some filtered set of projects. Use one or more of the parameters provided to filter the projects returned. Note: This endpoint may timeout for large domains. Try filtering by team!

Parameters

NameDescription
?workspace stringThe workspace or organization to filter projects on.
?team stringThe team to filter projects on.
?archived booleanOnly return projects whose archived field takes on the value of this parameter.
?limit integerResults per page.
?offset stringOffset token.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectCompactSuccessfully retrieved projects.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Create a project

Code samples

curl -X POST https://app.asana.com/api/1.0/projects \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "archived": false,
    "color": "light-green",
    "current_status": {
      "author": {
        "name": "Greg Sanchez"
      },
      "color": "green",
      "created_by": {
        "name": "Greg Sanchez"
      },
      "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
      "text": "The project is moving forward according to plan...",
      "title": "Status Update - Jun 15"
    },
    "current_status_update": {
      "title": "Status Update - Jun 15"
    },
    "custom_fields": {
      "4578152156": "Not Started",
      "5678904321": "On Hold"
    },
    "default_view": "calendar",
    "due_date": "2019-09-15",
    "due_on": "2019-09-15",
    "followers": "12345,23456",
    "html_notes": "<body>These are things we need to purchase.</body>",
    "is_template": false,
    "name": "Stuff to buy",
    "notes": "These are things we need to purchase.",
    "owner": "12345",
    "public": false,
    "start_on": "2019-09-14",
    "team": "12345"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "project",
    "archived": false,
    "color": "light-green",
    "created_at": "2012-02-22T02:06:58.147Z",
    "current_status": {
      "gid": "12345",
      "resource_type": "project_status",
      "author": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "color": "green",
      "created_at": "2012-02-22T02:06:58.147Z",
      "created_by": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
      "modified_at": "2012-02-22T02:06:58.147Z",
      "text": "The project is moving forward according to plan...",
      "title": "Status Update - Jun 15"
    },
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "custom_field_settings": [
      {
        "gid": "12345",
        "resource_type": "custom_field_setting",
        "custom_field": {
          "gid": "12345",
          "resource_type": "custom_field",
          "asana_created_field": "priority",
          "created_by": {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          },
          "currency_code": "EUR",
          "custom_label": "gold pieces",
          "custom_label_position": "suffix",
          "date_value": {
            "date": "2024-08-23",
            "date_time": "2024-08-23T22:00:00.000Z"
          },
          "description": "Development team priority",
          "display_value": "blue",
          "enabled": true,
          "enum_options": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "enum_value": {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          },
          "format": "custom",
          "has_notifications_enabled": true,
          "is_global_to_workspace": true,
          "multi_enum_values": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "name": "Status",
          "number_value": 5.2,
          "people_value": [
            {
              "gid": "12345",
              "resource_type": "user",
              "name": "Greg Sanchez"
            }
          ],
          "precision": 2,
          "resource_subtype": "text",
          "text_value": "Some Value",
          "type": "text"
        },
        "is_important": false,
        "parent": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        }
      }
    ],
    "default_view": "calendar",
    "due_date": "2019-09-15",
    "due_on": "2019-09-15",
    "html_notes": "<body>These are things we need to purchase.</body>",
    "is_template": false,
    "members": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "name": "Stuff to buy",
    "notes": "These are things we need to purchase.",
    "public": false,
    "start_on": "2019-09-14",
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    },
    "completed": false,
    "completed_at": "2012-02-22T02:06:58.147Z",
    "completed_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_from_template": {
      "gid": "12345",
      "resource_type": "project_template",
      "name": "Packing list"
    },
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "icon": "chat_bubbles",
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "project_brief": {
      "gid": "12345",
      "resource_type": "project_brief"
    },
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    }
  }
}

See input/output options to include more fields in your response.

POST /projects

Create a new project in a workspace or team.

Every project is required to be created in a specific workspace or organization, and this cannot be changed once set. Note that you can use the workspace parameter regardless of whether or not it is an organization.

If the workspace for your project is an organization, you must also supply a team to share the project with.

Returns the full record of the newly created project.

Parameters

NameDescription
body object
required
The project to create.
data objectA project represents a prioritized list of tasks in Asana or a board with columns of tasks represented as cards. It exists in a single workspace or organization and is accessible to a subset of users in that workspace or organization, depending on its permissions.
archived booleanTrue if the project is archived, false if not. Archived projects do not show in the UI by default and may be treated differently for queries.
color string¦nullColor of the project.
current_status objectDeprecated: new integrations should prefer the status_update resource.
author objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
name stringRead-only except when same user as requester. The user’s name.
color string
required
The color associated with the status update.
created_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
name stringRead-only except when same user as requester. The user’s name.
html_text stringOpt In. The text content of the status update with formatting as HTML.
text string
required
The text content of the status update.
title stringThe title of the project status update.
current_status_update objectA status update is an update on the progress of a particular project, portfolio, or goal, and is sent out to all of its parent's followers when created. These updates include both text describing the update and a status_type intended to represent the overall state of the project.
title stringThe title of the status update.
custom_fields objectAn object where each key is a Custom Field GID and each value is an enum GID, string, number, or object.
default_view stringThe default view (list, board, calendar, or timeline) of a project.
due_date string(date-time)¦nullDeprecated: new integrations should prefer the due_on field.
due_on string(date-time)¦nullThe day on which this project is due. This takes a date with format YYYY-MM-DD.
followers stringCreate-only. Comma separated string of users. Followers are a subset of members who have opted in to receive "tasks added" notifications for a project.
html_notes stringOpt In. The notes of the project with formatting as HTML.
is_template booleanOpt In. Deprecated - please use a project template endpoint instead (more in this forum post). Determines if the project is a template.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
notes stringFree-form textual information associated with the project (ie., its description).
owner string¦nullThe current owner of the project, may be null.
public booleanTrue if the project is public to its team.
start_on string(date)¦nullThe day on which work for this project begins, or null if the project has no start date. This takes a date with YYYY-MM-DD format. Note: due_on or due_at must be present in the request when setting or unsetting the start_on parameter. Additionally, start_on and due_on cannot be the same date.
team stringThe team that this project is shared with.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Detailed descriptions

current_status: Deprecated: new integrations should prefer the status_update resource. A project status is an update on the progress of a particular project, and is sent out to all project followers when created. These updates include both text describing the update and a color code intended to represent the overall state of the project: "green" for projects that are on track, "yellow" for projects at risk, and "red" for projects that are behind.

Enumerated Values

ParameterValue
colordark-pink
colordark-green
colordark-blue
colordark-red
colordark-teal
colordark-brown
colordark-orange
colordark-purple
colordark-warm-gray
colorlight-pink
colorlight-green
colorlight-blue
colorlight-red
colorlight-teal
colorlight-brown
colorlight-orange
colorlight-purple
colorlight-warm-gray
colorgreen
coloryellow
colorred
colorblue
default_viewlist
default_viewboard
default_viewcalendar
default_viewtimeline

Responses

StatusDescription
201 ProjectSuccessfully retrieved projects.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get a project

Code samples

curl -X GET https://app.asana.com/api/1.0/projects/{project_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "project",
    "archived": false,
    "color": "light-green",
    "created_at": "2012-02-22T02:06:58.147Z",
    "current_status": {
      "gid": "12345",
      "resource_type": "project_status",
      "author": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "color": "green",
      "created_at": "2012-02-22T02:06:58.147Z",
      "created_by": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
      "modified_at": "2012-02-22T02:06:58.147Z",
      "text": "The project is moving forward according to plan...",
      "title": "Status Update - Jun 15"
    },
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "custom_field_settings": [
      {
        "gid": "12345",
        "resource_type": "custom_field_setting",
        "custom_field": {
          "gid": "12345",
          "resource_type": "custom_field",
          "asana_created_field": "priority",
          "created_by": {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          },
          "currency_code": "EUR",
          "custom_label": "gold pieces",
          "custom_label_position": "suffix",
          "date_value": {
            "date": "2024-08-23",
            "date_time": "2024-08-23T22:00:00.000Z"
          },
          "description": "Development team priority",
          "display_value": "blue",
          "enabled": true,
          "enum_options": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "enum_value": {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          },
          "format": "custom",
          "has_notifications_enabled": true,
          "is_global_to_workspace": true,
          "multi_enum_values": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "name": "Status",
          "number_value": 5.2,
          "people_value": [
            {
              "gid": "12345",
              "resource_type": "user",
              "name": "Greg Sanchez"
            }
          ],
          "precision": 2,
          "resource_subtype": "text",
          "text_value": "Some Value",
          "type": "text"
        },
        "is_important": false,
        "parent": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        }
      }
    ],
    "default_view": "calendar",
    "due_date": "2019-09-15",
    "due_on": "2019-09-15",
    "html_notes": "<body>These are things we need to purchase.</body>",
    "is_template": false,
    "members": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "name": "Stuff to buy",
    "notes": "These are things we need to purchase.",
    "public": false,
    "start_on": "2019-09-14",
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    },
    "completed": false,
    "completed_at": "2012-02-22T02:06:58.147Z",
    "completed_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_from_template": {
      "gid": "12345",
      "resource_type": "project_template",
      "name": "Packing list"
    },
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "icon": "chat_bubbles",
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "project_brief": {
      "gid": "12345",
      "resource_type": "project_brief"
    },
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    }
  }
}

See input/output options to include more fields in your response.

GET /projects/{project_gid}

Returns the complete project record for a single project.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectSuccessfully retrieved the requested project.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Update a project

Code samples

curl -X PUT https://app.asana.com/api/1.0/projects/{project_gid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "archived": false,
    "color": "light-green",
    "current_status": {
      "author": {
        "name": "Greg Sanchez"
      },
      "color": "green",
      "created_by": {
        "name": "Greg Sanchez"
      },
      "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
      "text": "The project is moving forward according to plan...",
      "title": "Status Update - Jun 15"
    },
    "current_status_update": {
      "title": "Status Update - Jun 15"
    },
    "custom_fields": {
      "4578152156": "Not Started",
      "5678904321": "On Hold"
    },
    "default_view": "calendar",
    "due_date": "2019-09-15",
    "due_on": "2019-09-15",
    "followers": "12345,23456",
    "html_notes": "<body>These are things we need to purchase.</body>",
    "is_template": false,
    "name": "Stuff to buy",
    "notes": "These are things we need to purchase.",
    "owner": "12345",
    "public": false,
    "start_on": "2019-09-14",
    "team": "12345"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "project",
    "archived": false,
    "color": "light-green",
    "created_at": "2012-02-22T02:06:58.147Z",
    "current_status": {
      "gid": "12345",
      "resource_type": "project_status",
      "author": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "color": "green",
      "created_at": "2012-02-22T02:06:58.147Z",
      "created_by": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
      "modified_at": "2012-02-22T02:06:58.147Z",
      "text": "The project is moving forward according to plan...",
      "title": "Status Update - Jun 15"
    },
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "custom_field_settings": [
      {
        "gid": "12345",
        "resource_type": "custom_field_setting",
        "custom_field": {
          "gid": "12345",
          "resource_type": "custom_field",
          "asana_created_field": "priority",
          "created_by": {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          },
          "currency_code": "EUR",
          "custom_label": "gold pieces",
          "custom_label_position": "suffix",
          "date_value": {
            "date": "2024-08-23",
            "date_time": "2024-08-23T22:00:00.000Z"
          },
          "description": "Development team priority",
          "display_value": "blue",
          "enabled": true,
          "enum_options": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "enum_value": {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          },
          "format": "custom",
          "has_notifications_enabled": true,
          "is_global_to_workspace": true,
          "multi_enum_values": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "name": "Status",
          "number_value": 5.2,
          "people_value": [
            {
              "gid": "12345",
              "resource_type": "user",
              "name": "Greg Sanchez"
            }
          ],
          "precision": 2,
          "resource_subtype": "text",
          "text_value": "Some Value",
          "type": "text"
        },
        "is_important": false,
        "parent": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        }
      }
    ],
    "default_view": "calendar",
    "due_date": "2019-09-15",
    "due_on": "2019-09-15",
    "html_notes": "<body>These are things we need to purchase.</body>",
    "is_template": false,
    "members": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "name": "Stuff to buy",
    "notes": "These are things we need to purchase.",
    "public": false,
    "start_on": "2019-09-14",
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    },
    "completed": false,
    "completed_at": "2012-02-22T02:06:58.147Z",
    "completed_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_from_template": {
      "gid": "12345",
      "resource_type": "project_template",
      "name": "Packing list"
    },
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "icon": "chat_bubbles",
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "project_brief": {
      "gid": "12345",
      "resource_type": "project_brief"
    },
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    }
  }
}

See input/output options to include more fields in your response.

PUT /projects/{project_gid}

A specific, existing project can be updated by making a PUT request on the URL for that project. Only the fields provided in the data block will be updated; any unspecified fields will remain unchanged.

When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the task.

Returns the complete updated project record.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
body object
required
The updated fields for the project.
data objectA project represents a prioritized list of tasks in Asana or a board with columns of tasks represented as cards. It exists in a single workspace or organization and is accessible to a subset of users in that workspace or organization, depending on its permissions.
archived booleanTrue if the project is archived, false if not. Archived projects do not show in the UI by default and may be treated differently for queries.
color string¦nullColor of the project.
current_status objectDeprecated: new integrations should prefer the status_update resource.
author objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
name stringRead-only except when same user as requester. The user’s name.
color string
required
The color associated with the status update.
created_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
name stringRead-only except when same user as requester. The user’s name.
html_text stringOpt In. The text content of the status update with formatting as HTML.
text string
required
The text content of the status update.
title stringThe title of the project status update.
current_status_update objectA status update is an update on the progress of a particular project, portfolio, or goal, and is sent out to all of its parent's followers when created. These updates include both text describing the update and a status_type intended to represent the overall state of the project.
title stringThe title of the status update.
custom_fields objectAn object where each key is a Custom Field GID and each value is an enum GID, string, number, or object.
default_view stringThe default view (list, board, calendar, or timeline) of a project.
due_date string(date-time)¦nullDeprecated: new integrations should prefer the due_on field.
due_on string(date-time)¦nullThe day on which this project is due. This takes a date with format YYYY-MM-DD.
followers stringCreate-only. Comma separated string of users. Followers are a subset of members who have opted in to receive "tasks added" notifications for a project.
html_notes stringOpt In. The notes of the project with formatting as HTML.
is_template booleanOpt In. Deprecated - please use a project template endpoint instead (more in this forum post). Determines if the project is a template.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
notes stringFree-form textual information associated with the project (ie., its description).
owner string¦nullThe current owner of the project, may be null.
public booleanTrue if the project is public to its team.
start_on string(date)¦nullThe day on which work for this project begins, or null if the project has no start date. This takes a date with YYYY-MM-DD format. Note: due_on or due_at must be present in the request when setting or unsetting the start_on parameter. Additionally, start_on and due_on cannot be the same date.
team stringThe team that this project is shared with.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Detailed descriptions

current_status: Deprecated: new integrations should prefer the status_update resource. A project status is an update on the progress of a particular project, and is sent out to all project followers when created. These updates include both text describing the update and a color code intended to represent the overall state of the project: "green" for projects that are on track, "yellow" for projects at risk, and "red" for projects that are behind.

Enumerated Values

ParameterValue
colordark-pink
colordark-green
colordark-blue
colordark-red
colordark-teal
colordark-brown
colordark-orange
colordark-purple
colordark-warm-gray
colorlight-pink
colorlight-green
colorlight-blue
colorlight-red
colorlight-teal
colorlight-brown
colorlight-orange
colorlight-purple
colorlight-warm-gray
colorgreen
coloryellow
colorred
colorblue
default_viewlist
default_viewboard
default_viewcalendar
default_viewtimeline

Responses

StatusDescription
200 ProjectSuccessfully updated the project.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Delete a project

Code samples

curl -X DELETE https://app.asana.com/api/1.0/projects/{project_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

DELETE /projects/{project_gid}

A specific, existing project can be deleted by making a DELETE request on the URL for that project.

Returns an empty data record.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully deleted the specified project.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Duplicate a project

Code samples

curl -X POST https://app.asana.com/api/1.0/projects/{project_gid}/duplicate \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "include": [
      "members",
      "task_notes"
    ],
    "name": "New Project Name",
    "schedule_dates": {
      "due_on": "2019-05-21",
      "should_skip_weekends": true,
      "start_on": "2019-05-21"
    },
    "team": "12345"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "job",
    "new_project": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    },
    "new_project_template": {
      "gid": "12345",
      "resource_type": "project_template",
      "name": "Packing list"
    },
    "new_task": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "resource_subtype": "duplicate_task",
    "status": "in_progress"
  }
}

See input/output options to include more fields in your response.

POST /projects/{project_gid}/duplicate

Creates and returns a job that will asynchronously handle the duplication.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
body objectDescribes the duplicate's name and the elements that will be duplicated.
data objectnone
include stringThe elements that will be duplicated to the new project. Tasks are always included.
name string
required
The name of the new project.
schedule_dates objectA dictionary of options to auto-shift dates. task_dates must be included to use this option. Requires either start_on or due_on, but not both.
due_on stringSets the last due date in the duplicated project to the given date. The rest of the due dates will be offset by the same amount as the due dates in the original project.
should_skip_weekends boolean
required
Determines if the auto-shifted dates should skip weekends.
start_on stringSets the first start date in the duplicated project to the given date. The rest of the start dates will be offset by the same amount as the start dates in the original project.
team stringSets the team of the new project. If team is not defined, the new project will be in the same team as the the original project.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Enumerated Values

ParameterValue
includemembers
includenotes
includeforms
includetask_notes
includetask_assignee
includetask_subtasks
includetask_attachments
includetask_dates
includetask_dependencies
includetask_followers
includetask_tags
includetask_projects

Responses

StatusDescription
201 JobSuccessfully created the job to handle duplication.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get projects a task is in

Code samples

curl -X GET https://app.asana.com/api/1.0/tasks/{task_gid}/projects \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    }
  ]
}

See input/output options to include more fields in your response.

GET /tasks/{task_gid}/projects

Returns a compact representation of all of the projects the task is in.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectCompactSuccessfully retrieved the projects for the given task.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get a team's projects

Code samples

curl -X GET https://app.asana.com/api/1.0/teams/{team_gid}/projects \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    }
  ]
}

See input/output options to include more fields in your response.

GET /teams/{team_gid}/projects

Returns the compact project records for all projects in the team.

Parameters

NameDescription
/team_gid string
required
Globally unique identifier for the team.
?archived booleanOnly return projects whose archived field takes on the value of this parameter.
?limit integerResults per page.
?offset stringOffset token.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectCompactSuccessfully retrieved the requested team's projects.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Create a project in a team

Code samples

curl -X POST https://app.asana.com/api/1.0/teams/{team_gid}/projects \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "archived": false,
    "color": "light-green",
    "current_status": {
      "author": {
        "name": "Greg Sanchez"
      },
      "color": "green",
      "created_by": {
        "name": "Greg Sanchez"
      },
      "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
      "text": "The project is moving forward according to plan...",
      "title": "Status Update - Jun 15"
    },
    "current_status_update": {
      "title": "Status Update - Jun 15"
    },
    "custom_fields": {
      "4578152156": "Not Started",
      "5678904321": "On Hold"
    },
    "default_view": "calendar",
    "due_date": "2019-09-15",
    "due_on": "2019-09-15",
    "followers": "12345,23456",
    "html_notes": "<body>These are things we need to purchase.</body>",
    "is_template": false,
    "name": "Stuff to buy",
    "notes": "These are things we need to purchase.",
    "owner": "12345",
    "public": false,
    "start_on": "2019-09-14",
    "team": "12345"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "project",
    "archived": false,
    "color": "light-green",
    "created_at": "2012-02-22T02:06:58.147Z",
    "current_status": {
      "gid": "12345",
      "resource_type": "project_status",
      "author": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "color": "green",
      "created_at": "2012-02-22T02:06:58.147Z",
      "created_by": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
      "modified_at": "2012-02-22T02:06:58.147Z",
      "text": "The project is moving forward according to plan...",
      "title": "Status Update - Jun 15"
    },
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "custom_field_settings": [
      {
        "gid": "12345",
        "resource_type": "custom_field_setting",
        "custom_field": {
          "gid": "12345",
          "resource_type": "custom_field",
          "asana_created_field": "priority",
          "created_by": {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          },
          "currency_code": "EUR",
          "custom_label": "gold pieces",
          "custom_label_position": "suffix",
          "date_value": {
            "date": "2024-08-23",
            "date_time": "2024-08-23T22:00:00.000Z"
          },
          "description": "Development team priority",
          "display_value": "blue",
          "enabled": true,
          "enum_options": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "enum_value": {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          },
          "format": "custom",
          "has_notifications_enabled": true,
          "is_global_to_workspace": true,
          "multi_enum_values": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "name": "Status",
          "number_value": 5.2,
          "people_value": [
            {
              "gid": "12345",
              "resource_type": "user",
              "name": "Greg Sanchez"
            }
          ],
          "precision": 2,
          "resource_subtype": "text",
          "text_value": "Some Value",
          "type": "text"
        },
        "is_important": false,
        "parent": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        }
      }
    ],
    "default_view": "calendar",
    "due_date": "2019-09-15",
    "due_on": "2019-09-15",
    "html_notes": "<body>These are things we need to purchase.</body>",
    "is_template": false,
    "members": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "name": "Stuff to buy",
    "notes": "These are things we need to purchase.",
    "public": false,
    "start_on": "2019-09-14",
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    },
    "completed": false,
    "completed_at": "2012-02-22T02:06:58.147Z",
    "completed_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_from_template": {
      "gid": "12345",
      "resource_type": "project_template",
      "name": "Packing list"
    },
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "icon": "chat_bubbles",
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "project_brief": {
      "gid": "12345",
      "resource_type": "project_brief"
    },
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    }
  }
}

See input/output options to include more fields in your response.

POST /teams/{team_gid}/projects

Creates a project shared with the given team.

Returns the full record of the newly created project.

Parameters

NameDescription
/team_gid string
required
Globally unique identifier for the team.
body object
required
The new project to create.
data objectA project represents a prioritized list of tasks in Asana or a board with columns of tasks represented as cards. It exists in a single workspace or organization and is accessible to a subset of users in that workspace or organization, depending on its permissions.
archived booleanTrue if the project is archived, false if not. Archived projects do not show in the UI by default and may be treated differently for queries.
color string¦nullColor of the project.
current_status objectDeprecated: new integrations should prefer the status_update resource.
author objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
name stringRead-only except when same user as requester. The user’s name.
color string
required
The color associated with the status update.
created_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
name stringRead-only except when same user as requester. The user’s name.
html_text stringOpt In. The text content of the status update with formatting as HTML.
text string
required
The text content of the status update.
title stringThe title of the project status update.
current_status_update objectA status update is an update on the progress of a particular project, portfolio, or goal, and is sent out to all of its parent's followers when created. These updates include both text describing the update and a status_type intended to represent the overall state of the project.
title stringThe title of the status update.
custom_fields objectAn object where each key is a Custom Field GID and each value is an enum GID, string, number, or object.
default_view stringThe default view (list, board, calendar, or timeline) of a project.
due_date string(date-time)¦nullDeprecated: new integrations should prefer the due_on field.
due_on string(date-time)¦nullThe day on which this project is due. This takes a date with format YYYY-MM-DD.
followers stringCreate-only. Comma separated string of users. Followers are a subset of members who have opted in to receive "tasks added" notifications for a project.
html_notes stringOpt In. The notes of the project with formatting as HTML.
is_template booleanOpt In. Deprecated - please use a project template endpoint instead (more in this forum post). Determines if the project is a template.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
notes stringFree-form textual information associated with the project (ie., its description).
owner string¦nullThe current owner of the project, may be null.
public booleanTrue if the project is public to its team.
start_on string(date)¦nullThe day on which work for this project begins, or null if the project has no start date. This takes a date with YYYY-MM-DD format. Note: due_on or due_at must be present in the request when setting or unsetting the start_on parameter. Additionally, start_on and due_on cannot be the same date.
team stringThe team that this project is shared with.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Detailed descriptions

current_status: Deprecated: new integrations should prefer the status_update resource. A project status is an update on the progress of a particular project, and is sent out to all project followers when created. These updates include both text describing the update and a color code intended to represent the overall state of the project: "green" for projects that are on track, "yellow" for projects at risk, and "red" for projects that are behind.

Enumerated Values

ParameterValue
colordark-pink
colordark-green
colordark-blue
colordark-red
colordark-teal
colordark-brown
colordark-orange
colordark-purple
colordark-warm-gray
colorlight-pink
colorlight-green
colorlight-blue
colorlight-red
colorlight-teal
colorlight-brown
colorlight-orange
colorlight-purple
colorlight-warm-gray
colorgreen
coloryellow
colorred
colorblue
default_viewlist
default_viewboard
default_viewcalendar
default_viewtimeline

Responses

StatusDescription
201 ProjectSuccessfully created the specified project.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get all projects in a workspace

Code samples

curl -X GET https://app.asana.com/api/1.0/workspaces/{workspace_gid}/projects \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    }
  ]
}

See input/output options to include more fields in your response.

GET /workspaces/{workspace_gid}/projects

Returns the compact project records for all projects in the workspace. Note: This endpoint may timeout for large domains. Prefer the /teams/{team_gid}/projects endpoint.

Parameters

NameDescription
/workspace_gid string
required
Globally unique identifier for the workspace or organization.
?archived booleanOnly return projects whose archived field takes on the value of this parameter.
?limit integerResults per page.
?offset stringOffset token.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectCompactSuccessfully retrieved the requested workspace's projects.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Create a project in a workspace

Code samples

curl -X POST https://app.asana.com/api/1.0/workspaces/{workspace_gid}/projects \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "archived": false,
    "color": "light-green",
    "current_status": {
      "author": {
        "name": "Greg Sanchez"
      },
      "color": "green",
      "created_by": {
        "name": "Greg Sanchez"
      },
      "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
      "text": "The project is moving forward according to plan...",
      "title": "Status Update - Jun 15"
    },
    "current_status_update": {
      "title": "Status Update - Jun 15"
    },
    "custom_fields": {
      "4578152156": "Not Started",
      "5678904321": "On Hold"
    },
    "default_view": "calendar",
    "due_date": "2019-09-15",
    "due_on": "2019-09-15",
    "followers": "12345,23456",
    "html_notes": "<body>These are things we need to purchase.</body>",
    "is_template": false,
    "name": "Stuff to buy",
    "notes": "These are things we need to purchase.",
    "owner": "12345",
    "public": false,
    "start_on": "2019-09-14",
    "team": "12345"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "project",
    "archived": false,
    "color": "light-green",
    "created_at": "2012-02-22T02:06:58.147Z",
    "current_status": {
      "gid": "12345",
      "resource_type": "project_status",
      "author": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "color": "green",
      "created_at": "2012-02-22T02:06:58.147Z",
      "created_by": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
      "modified_at": "2012-02-22T02:06:58.147Z",
      "text": "The project is moving forward according to plan...",
      "title": "Status Update - Jun 15"
    },
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "custom_field_settings": [
      {
        "gid": "12345",
        "resource_type": "custom_field_setting",
        "custom_field": {
          "gid": "12345",
          "resource_type": "custom_field",
          "asana_created_field": "priority",
          "created_by": {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          },
          "currency_code": "EUR",
          "custom_label": "gold pieces",
          "custom_label_position": "suffix",
          "date_value": {
            "date": "2024-08-23",
            "date_time": "2024-08-23T22:00:00.000Z"
          },
          "description": "Development team priority",
          "display_value": "blue",
          "enabled": true,
          "enum_options": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "enum_value": {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          },
          "format": "custom",
          "has_notifications_enabled": true,
          "is_global_to_workspace": true,
          "multi_enum_values": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "name": "Status",
          "number_value": 5.2,
          "people_value": [
            {
              "gid": "12345",
              "resource_type": "user",
              "name": "Greg Sanchez"
            }
          ],
          "precision": 2,
          "resource_subtype": "text",
          "text_value": "Some Value",
          "type": "text"
        },
        "is_important": false,
        "parent": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        }
      }
    ],
    "default_view": "calendar",
    "due_date": "2019-09-15",
    "due_on": "2019-09-15",
    "html_notes": "<body>These are things we need to purchase.</body>",
    "is_template": false,
    "members": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "name": "Stuff to buy",
    "notes": "These are things we need to purchase.",
    "public": false,
    "start_on": "2019-09-14",
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    },
    "completed": false,
    "completed_at": "2012-02-22T02:06:58.147Z",
    "completed_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_from_template": {
      "gid": "12345",
      "resource_type": "project_template",
      "name": "Packing list"
    },
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "icon": "chat_bubbles",
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "project_brief": {
      "gid": "12345",
      "resource_type": "project_brief"
    },
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    }
  }
}

See input/output options to include more fields in your response.

POST /workspaces/{workspace_gid}/projects

Returns the compact project records for all projects in the workspace.

If the workspace for your project is an organization, you must also supply a team to share the project with.

Returns the full record of the newly created project.

Parameters

NameDescription
/workspace_gid string
required
Globally unique identifier for the workspace or organization.
body object
required
The new project to create.
data objectA project represents a prioritized list of tasks in Asana or a board with columns of tasks represented as cards. It exists in a single workspace or organization and is accessible to a subset of users in that workspace or organization, depending on its permissions.
archived booleanTrue if the project is archived, false if not. Archived projects do not show in the UI by default and may be treated differently for queries.
color string¦nullColor of the project.
current_status objectDeprecated: new integrations should prefer the status_update resource.
author objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
name stringRead-only except when same user as requester. The user’s name.
color string
required
The color associated with the status update.
created_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
name stringRead-only except when same user as requester. The user’s name.
html_text stringOpt In. The text content of the status update with formatting as HTML.
text string
required
The text content of the status update.
title stringThe title of the project status update.
current_status_update objectA status update is an update on the progress of a particular project, portfolio, or goal, and is sent out to all of its parent's followers when created. These updates include both text describing the update and a status_type intended to represent the overall state of the project.
title stringThe title of the status update.
custom_fields objectAn object where each key is a Custom Field GID and each value is an enum GID, string, number, or object.
default_view stringThe default view (list, board, calendar, or timeline) of a project.
due_date string(date-time)¦nullDeprecated: new integrations should prefer the due_on field.
due_on string(date-time)¦nullThe day on which this project is due. This takes a date with format YYYY-MM-DD.
followers stringCreate-only. Comma separated string of users. Followers are a subset of members who have opted in to receive "tasks added" notifications for a project.
html_notes stringOpt In. The notes of the project with formatting as HTML.
is_template booleanOpt In. Deprecated - please use a project template endpoint instead (more in this forum post). Determines if the project is a template.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
notes stringFree-form textual information associated with the project (ie., its description).
owner string¦nullThe current owner of the project, may be null.
public booleanTrue if the project is public to its team.
start_on string(date)¦nullThe day on which work for this project begins, or null if the project has no start date. This takes a date with YYYY-MM-DD format. Note: due_on or due_at must be present in the request when setting or unsetting the start_on parameter. Additionally, start_on and due_on cannot be the same date.
team stringThe team that this project is shared with.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Detailed descriptions

current_status: Deprecated: new integrations should prefer the status_update resource. A project status is an update on the progress of a particular project, and is sent out to all project followers when created. These updates include both text describing the update and a color code intended to represent the overall state of the project: "green" for projects that are on track, "yellow" for projects at risk, and "red" for projects that are behind.

Enumerated Values

ParameterValue
colordark-pink
colordark-green
colordark-blue
colordark-red
colordark-teal
colordark-brown
colordark-orange
colordark-purple
colordark-warm-gray
colorlight-pink
colorlight-green
colorlight-blue
colorlight-red
colorlight-teal
colorlight-brown
colorlight-orange
colorlight-purple
colorlight-warm-gray
colorgreen
coloryellow
colorred
colorblue
default_viewlist
default_viewboard
default_viewcalendar
default_viewtimeline

Responses

StatusDescription
201 ProjectSuccessfully created a new project in the specified workspace.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Add a custom field to a project

Code samples

curl -X POST https://app.asana.com/api/1.0/projects/{project_gid}/addCustomFieldSetting \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "custom_field": "14916",
    "insert_after": "1331",
    "insert_before": "1331",
    "is_important": true
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "custom_field_setting",
    "custom_field": {
      "gid": "12345",
      "resource_type": "custom_field",
      "asana_created_field": "priority",
      "created_by": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "currency_code": "EUR",
      "custom_label": "gold pieces",
      "custom_label_position": "suffix",
      "date_value": {
        "date": "2024-08-23",
        "date_time": "2024-08-23T22:00:00.000Z"
      },
      "description": "Development team priority",
      "display_value": "blue",
      "enabled": true,
      "enum_options": [
        {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        }
      ],
      "enum_value": {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      },
      "format": "custom",
      "has_notifications_enabled": true,
      "is_global_to_workspace": true,
      "multi_enum_values": [
        {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        }
      ],
      "name": "Status",
      "number_value": 5.2,
      "people_value": [
        {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      ],
      "precision": 2,
      "resource_subtype": "text",
      "text_value": "Some Value",
      "type": "text"
    },
    "is_important": false,
    "parent": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    },
    "project": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    }
  }
}

See input/output options to include more fields in your response.

POST /projects/{project_gid}/addCustomFieldSetting

Custom fields are associated with projects by way of custom field settings. This method creates a setting for the project.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
body object
required
Information about the custom field setting.
data objectnone
custom_field string
required
The custom field to associate with this container.
insert_after stringA gid of a Custom Field Setting on this container, after which the new Custom Field Setting will be added. insert_before and insert_after parameters cannot both be specified.
insert_before stringA gid of a Custom Field Setting on this container, before which the new Custom Field Setting will be added. insert_before and insert_after parameters cannot both be specified.
is_important booleanWhether this field should be considered important to this container (for instance, to display in the list view of items in the container).
?opt_pretty booleanProvides “pretty” output.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 CustomFieldSettingSuccessfully added the custom field to the project.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Remove a custom field from a project

Code samples

curl -X POST https://app.asana.com/api/1.0/projects/{project_gid}/removeCustomFieldSetting \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "custom_field": "14916"
  }
}

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

POST /projects/{project_gid}/removeCustomFieldSetting

Removes a custom field setting from a project.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
body object
required
Information about the custom field setting being removed.
data objectnone
custom_field string
required
The custom field to remove from this portfolio.
?opt_pretty booleanProvides “pretty” output.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully removed the custom field from the project.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Get task count of a project

Code samples

curl -X GET https://app.asana.com/api/1.0/projects/{project_gid}/task_counts \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "num_completed_milestones": 3,
    "num_completed_tasks": 150,
    "num_incomplete_milestones": 7,
    "num_incomplete_tasks": 50,
    "num_milestones": 10,
    "num_tasks": 200
  }
}

See input/output options to include more fields in your response.

GET /projects/{project_gid}/task_counts

Get an object that holds task count fields. All fields are excluded by default. You must opt in using opt_fields to get any information from this endpoint.

This endpoint has an additional rate limit and each field counts especially high against our cost limits.

Milestones are just tasks, so they are included in the num_tasks, num_incomplete_tasks, and num_completed_tasks counts.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TaskCountSuccessfully retrieved the requested project's task counts.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Add users to a project

Code samples

curl -X POST https://app.asana.com/api/1.0/projects/{project_gid}/addMembers \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "members": "521621,621373"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "project",
    "archived": false,
    "color": "light-green",
    "created_at": "2012-02-22T02:06:58.147Z",
    "current_status": {
      "gid": "12345",
      "resource_type": "project_status",
      "author": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "color": "green",
      "created_at": "2012-02-22T02:06:58.147Z",
      "created_by": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
      "modified_at": "2012-02-22T02:06:58.147Z",
      "text": "The project is moving forward according to plan...",
      "title": "Status Update - Jun 15"
    },
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "custom_field_settings": [
      {
        "gid": "12345",
        "resource_type": "custom_field_setting",
        "custom_field": {
          "gid": "12345",
          "resource_type": "custom_field",
          "asana_created_field": "priority",
          "created_by": {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          },
          "currency_code": "EUR",
          "custom_label": "gold pieces",
          "custom_label_position": "suffix",
          "date_value": {
            "date": "2024-08-23",
            "date_time": "2024-08-23T22:00:00.000Z"
          },
          "description": "Development team priority",
          "display_value": "blue",
          "enabled": true,
          "enum_options": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "enum_value": {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          },
          "format": "custom",
          "has_notifications_enabled": true,
          "is_global_to_workspace": true,
          "multi_enum_values": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "name": "Status",
          "number_value": 5.2,
          "people_value": [
            {
              "gid": "12345",
              "resource_type": "user",
              "name": "Greg Sanchez"
            }
          ],
          "precision": 2,
          "resource_subtype": "text",
          "text_value": "Some Value",
          "type": "text"
        },
        "is_important": false,
        "parent": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        }
      }
    ],
    "default_view": "calendar",
    "due_date": "2019-09-15",
    "due_on": "2019-09-15",
    "html_notes": "<body>These are things we need to purchase.</body>",
    "is_template": false,
    "members": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "name": "Stuff to buy",
    "notes": "These are things we need to purchase.",
    "public": false,
    "start_on": "2019-09-14",
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    },
    "completed": false,
    "completed_at": "2012-02-22T02:06:58.147Z",
    "completed_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_from_template": {
      "gid": "12345",
      "resource_type": "project_template",
      "name": "Packing list"
    },
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "icon": "chat_bubbles",
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "project_brief": {
      "gid": "12345",
      "resource_type": "project_brief"
    },
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    }
  }
}

See input/output options to include more fields in your response.

POST /projects/{project_gid}/addMembers

Adds the specified list of users as members of the project. Note that a user being added as a member may also be added as a follower as a result of this operation. This is because the user's default notification settings (i.e., in the "Notifcations" tab of "My Profile Settings") will override this endpoint's default behavior of setting "Tasks added" notifications to false. Returns the updated project record.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
body object
required
Information about the members being added.
data objectnone
members string
required
An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectSuccessfully added members to the project.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Remove users from a project

Code samples

curl -X POST https://app.asana.com/api/1.0/projects/{project_gid}/removeMembers \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "members": "521621,621373"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "project",
    "archived": false,
    "color": "light-green",
    "created_at": "2012-02-22T02:06:58.147Z",
    "current_status": {
      "gid": "12345",
      "resource_type": "project_status",
      "author": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "color": "green",
      "created_at": "2012-02-22T02:06:58.147Z",
      "created_by": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
      "modified_at": "2012-02-22T02:06:58.147Z",
      "text": "The project is moving forward according to plan...",
      "title": "Status Update - Jun 15"
    },
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "custom_field_settings": [
      {
        "gid": "12345",
        "resource_type": "custom_field_setting",
        "custom_field": {
          "gid": "12345",
          "resource_type": "custom_field",
          "asana_created_field": "priority",
          "created_by": {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          },
          "currency_code": "EUR",
          "custom_label": "gold pieces",
          "custom_label_position": "suffix",
          "date_value": {
            "date": "2024-08-23",
            "date_time": "2024-08-23T22:00:00.000Z"
          },
          "description": "Development team priority",
          "display_value": "blue",
          "enabled": true,
          "enum_options": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "enum_value": {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          },
          "format": "custom",
          "has_notifications_enabled": true,
          "is_global_to_workspace": true,
          "multi_enum_values": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "name": "Status",
          "number_value": 5.2,
          "people_value": [
            {
              "gid": "12345",
              "resource_type": "user",
              "name": "Greg Sanchez"
            }
          ],
          "precision": 2,
          "resource_subtype": "text",
          "text_value": "Some Value",
          "type": "text"
        },
        "is_important": false,
        "parent": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        }
      }
    ],
    "default_view": "calendar",
    "due_date": "2019-09-15",
    "due_on": "2019-09-15",
    "html_notes": "<body>These are things we need to purchase.</body>",
    "is_template": false,
    "members": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "name": "Stuff to buy",
    "notes": "These are things we need to purchase.",
    "public": false,
    "start_on": "2019-09-14",
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    },
    "completed": false,
    "completed_at": "2012-02-22T02:06:58.147Z",
    "completed_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_from_template": {
      "gid": "12345",
      "resource_type": "project_template",
      "name": "Packing list"
    },
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "icon": "chat_bubbles",
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "project_brief": {
      "gid": "12345",
      "resource_type": "project_brief"
    },
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    }
  }
}

See input/output options to include more fields in your response.

POST /projects/{project_gid}/removeMembers

Removes the specified list of users from members of the project. Returns the updated project record.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
body object
required
Information about the members being removed.
data objectnone
members string
required
An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectSuccessfully removed the members from the project.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Add followers to a project

Code samples

curl -X POST https://app.asana.com/api/1.0/projects/{project_gid}/addFollowers \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "followers": "521621,621373"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "project",
    "archived": false,
    "color": "light-green",
    "created_at": "2012-02-22T02:06:58.147Z",
    "current_status": {
      "gid": "12345",
      "resource_type": "project_status",
      "author": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "color": "green",
      "created_at": "2012-02-22T02:06:58.147Z",
      "created_by": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
      "modified_at": "2012-02-22T02:06:58.147Z",
      "text": "The project is moving forward according to plan...",
      "title": "Status Update - Jun 15"
    },
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "custom_field_settings": [
      {
        "gid": "12345",
        "resource_type": "custom_field_setting",
        "custom_field": {
          "gid": "12345",
          "resource_type": "custom_field",
          "asana_created_field": "priority",
          "created_by": {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          },
          "currency_code": "EUR",
          "custom_label": "gold pieces",
          "custom_label_position": "suffix",
          "date_value": {
            "date": "2024-08-23",
            "date_time": "2024-08-23T22:00:00.000Z"
          },
          "description": "Development team priority",
          "display_value": "blue",
          "enabled": true,
          "enum_options": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "enum_value": {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          },
          "format": "custom",
          "has_notifications_enabled": true,
          "is_global_to_workspace": true,
          "multi_enum_values": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "name": "Status",
          "number_value": 5.2,
          "people_value": [
            {
              "gid": "12345",
              "resource_type": "user",
              "name": "Greg Sanchez"
            }
          ],
          "precision": 2,
          "resource_subtype": "text",
          "text_value": "Some Value",
          "type": "text"
        },
        "is_important": false,
        "parent": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        }
      }
    ],
    "default_view": "calendar",
    "due_date": "2019-09-15",
    "due_on": "2019-09-15",
    "html_notes": "<body>These are things we need to purchase.</body>",
    "is_template": false,
    "members": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "name": "Stuff to buy",
    "notes": "These are things we need to purchase.",
    "public": false,
    "start_on": "2019-09-14",
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    },
    "completed": false,
    "completed_at": "2012-02-22T02:06:58.147Z",
    "completed_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_from_template": {
      "gid": "12345",
      "resource_type": "project_template",
      "name": "Packing list"
    },
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "icon": "chat_bubbles",
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "project_brief": {
      "gid": "12345",
      "resource_type": "project_brief"
    },
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    }
  }
}

See input/output options to include more fields in your response.

POST /projects/{project_gid}/addFollowers

Adds the specified list of users as followers to the project. Followers are a subset of members who have opted in to receive "tasks added" notifications for a project. Therefore, if the users are not already members of the project, they will also become members as a result of this operation. Returns the updated project record.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
body object
required
Information about the followers being added.
data objectnone
followers string
required
An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectSuccessfully added followers to the project.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Remove followers from a project

Code samples

curl -X POST https://app.asana.com/api/1.0/projects/{project_gid}/removeFollowers \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "followers": "521621,621373"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "project",
    "archived": false,
    "color": "light-green",
    "created_at": "2012-02-22T02:06:58.147Z",
    "current_status": {
      "gid": "12345",
      "resource_type": "project_status",
      "author": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "color": "green",
      "created_at": "2012-02-22T02:06:58.147Z",
      "created_by": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
      "modified_at": "2012-02-22T02:06:58.147Z",
      "text": "The project is moving forward according to plan...",
      "title": "Status Update - Jun 15"
    },
    "current_status_update": {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    },
    "custom_field_settings": [
      {
        "gid": "12345",
        "resource_type": "custom_field_setting",
        "custom_field": {
          "gid": "12345",
          "resource_type": "custom_field",
          "asana_created_field": "priority",
          "created_by": {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          },
          "currency_code": "EUR",
          "custom_label": "gold pieces",
          "custom_label_position": "suffix",
          "date_value": {
            "date": "2024-08-23",
            "date_time": "2024-08-23T22:00:00.000Z"
          },
          "description": "Development team priority",
          "display_value": "blue",
          "enabled": true,
          "enum_options": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "enum_value": {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          },
          "format": "custom",
          "has_notifications_enabled": true,
          "is_global_to_workspace": true,
          "multi_enum_values": [
            {
              "gid": "12345",
              "resource_type": "enum_option",
              "color": "blue",
              "enabled": true,
              "name": "Low"
            }
          ],
          "name": "Status",
          "number_value": 5.2,
          "people_value": [
            {
              "gid": "12345",
              "resource_type": "user",
              "name": "Greg Sanchez"
            }
          ],
          "precision": 2,
          "resource_subtype": "text",
          "text_value": "Some Value",
          "type": "text"
        },
        "is_important": false,
        "parent": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        }
      }
    ],
    "default_view": "calendar",
    "due_date": "2019-09-15",
    "due_on": "2019-09-15",
    "html_notes": "<body>These are things we need to purchase.</body>",
    "is_template": false,
    "members": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "name": "Stuff to buy",
    "notes": "These are things we need to purchase.",
    "public": false,
    "start_on": "2019-09-14",
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    },
    "completed": false,
    "completed_at": "2012-02-22T02:06:58.147Z",
    "completed_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_from_template": {
      "gid": "12345",
      "resource_type": "project_template",
      "name": "Packing list"
    },
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "icon": "chat_bubbles",
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "project_brief": {
      "gid": "12345",
      "resource_type": "project_brief"
    },
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    }
  }
}

See input/output options to include more fields in your response.

POST /projects/{project_gid}/removeFollowers

Removes the specified list of users from following the project, this will not affect project membership status. Returns the updated project record.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
body object
required
Information about the followers being removed.
data objectnone
followers string
required
An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectSuccessfully removed followers from the project.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Create a project template from a project

Code samples

curl -X POST https://app.asana.com/api/1.0/projects/{project_gid}/saveAsTemplate \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "name": "New Project Template",
    "public": true,
    "team": "12345",
    "workspace": "12345"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "job",
    "new_project": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    },
    "new_project_template": {
      "gid": "12345",
      "resource_type": "project_template",
      "name": "Packing list"
    },
    "new_task": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "resource_subtype": "duplicate_task",
    "status": "in_progress"
  }
}

See input/output options to include more fields in your response.

POST /projects/{project_gid}/saveAsTemplate

Creates and returns a job that will asynchronously handle the project template creation. Note that while the resulting project template can be accessed with the API, it won't be visible in the Asana UI until Project Templates 2.0 is launched in the app. See more in this forum post.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
body object
required
Describes the inputs used for creating a project template, such as the resulting project template's name, which team it should be created in.
data objectnone
name string
required
The name of the new project template.
public boolean
required
Sets the project template to public to its team.
team stringSets the team of the new project template. If the project exists in an organization, specify team and not workspace.
workspace stringSets the workspace of the new project template. Only specify workspace if the project exists in a workspace.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
201 JobSuccessfully created the job to handle project template creation.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Project briefs

GET /project_briefs/{project_brief_gid}
PUT /project_briefs/{project_brief_gid}
DELETE /project_briefs/{project_brief_gid}
POST /projects/{project_gid}/project_briefs

A project brief object represents a rich text document that describes a project.

Please note that this API is in preview, and is expected to change. This API is to be used for development and testing only as an advance view into the upcoming rich text format experience in the task description. For more information, see this post in the developer forum.


Get a project brief

PREVIEW - This endpoint is in "preview". For details, please see Projects Briefs

Code samples

curl -X GET https://app.asana.com/api/1.0/project_briefs/{project_brief_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "project_brief",
    "html_text": "<body>This is a <strong>project brief</strong>.</body>",
    "title": "Stuff to buy — Project Brief",
    "permalink_url": "https://app.asana.com/0/11111111/22222222",
    "project": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    },
    "text": "This is a project brief."
  }
}

See input/output options to include more fields in your response.

GET /project_briefs/{project_brief_gid}

Get the full record for a project brief.

Parameters

NameDescription
/project_brief_gid string
required
Globally unique identifier for the project brief.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectBriefSuccessfully retrieved the record for a project brief.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
402 ErrorThe request was valid, but the queried object or object mutation specified in the request is above your current premium level.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
424 ErrorYou have exceeded one of the enforced rate limits in the API. See the documentation on rate limiting for more information.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
501 ErrorThere is an issue between the load balancers and Asana's API.
503 ErrorEither the upstream service is unavailable to the API, or the API has been intentionally shut off.
504 ErrorThis request took too long to complete.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Update a project brief

PREVIEW - This endpoint is in "preview". For details, please see Projects Briefs

Code samples

curl -X PUT https://app.asana.com/api/1.0/project_briefs/{project_brief_gid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "html_text": "<body>This is a <strong>project brief</strong>.</body>",
    "text": "This is a project brief.",
    "title": "Stuff to buy — Project Brief"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "project_brief",
    "html_text": "<body>This is a <strong>project brief</strong>.</body>",
    "title": "Stuff to buy — Project Brief",
    "permalink_url": "https://app.asana.com/0/11111111/22222222",
    "project": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    },
    "text": "This is a project brief."
  }
}

See input/output options to include more fields in your response.

PUT /project_briefs/{project_brief_gid}

An existing project brief can be updated by making a PUT request on the URL for that project brief. Only the fields provided in the data block will be updated; any unspecified fields will remain unchanged.

Returns the complete updated project brief record.

Parameters

NameDescription
/project_brief_gid string
required
Globally unique identifier for the project brief.
body object
required
The updated fields for the project brief.
data objectA Project Brief allows you to explain the what and why of the project to your team.
html_text stringHTML formatted text for the project brief.
text stringThe plain text of the project brief. When writing to a project brief, you can specify either html_text (preferred) or text, but not both.
title stringThe title of the project brief.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectBriefSuccessfully updated the project brief.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Delete a project brief

PREVIEW - This endpoint is in "preview". For details, please see Projects Briefs

Code samples

curl -X DELETE https://app.asana.com/api/1.0/project_briefs/{project_brief_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

DELETE /project_briefs/{project_brief_gid}

Deletes a specific, existing project brief.

Returns an empty data record.

Parameters

NameDescription
/project_brief_gid string
required
Globally unique identifier for the project brief.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully deleted the specified project brief.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Create a project brief

PREVIEW - This endpoint is in "preview". For details, please see Projects Briefs

Code samples

curl -X POST https://app.asana.com/api/1.0/projects/{project_gid}/project_briefs \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "html_text": "<body>This is a <strong>project brief</strong>.</body>",
    "text": "This is a project brief.",
    "title": "Stuff to buy — Project Brief"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "project_brief",
    "html_text": "<body>This is a <strong>project brief</strong>.</body>",
    "title": "Stuff to buy — Project Brief",
    "permalink_url": "https://app.asana.com/0/11111111/22222222",
    "project": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    },
    "text": "This is a project brief."
  }
}

See input/output options to include more fields in your response.

POST /projects/{project_gid}/project_briefs

Creates a new project brief.

Returns the full record of the newly created project brief.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
body object
required
The project brief to create.
data objectA Project Brief allows you to explain the what and why of the project to your team.
html_text stringHTML formatted text for the project brief.
text stringThe plain text of the project brief. When writing to a project brief, you can specify either html_text (preferred) or text, but not both.
title stringThe title of the project brief.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
201 ProjectBriefSuccessfully created a new project brief.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
402 ErrorThe request was valid, but the queried object or object mutation specified in the request is above your current premium level.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Project memberships

GET /project_memberships/{project_membership_gid}
GET /projects/{project_gid}/project_memberships

With the introduction of “comment-only” projects in Asana, a user’s membership in a project comes with associated permissions. These permissions (i.e., whether a user has full access to the project or comment-only access) are accessible through the project memberships endpoints described here.


Get a project membership

Code samples

curl -X GET https://app.asana.com/api/1.0/project_memberships/{project_membership_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "project_membership",
    "user": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "project": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    },
    "write_access": "full_write"
  }
}

See input/output options to include more fields in your response.

GET /project_memberships/{project_membership_gid}

Returns the complete project record for a single project membership.

Parameters

NameDescription
/project_membership_gid string
required
none
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectMembershipSuccessfully retrieved the requested project membership.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get memberships from a project

Code samples

curl -X GET https://app.asana.com/api/1.0/projects/{project_gid}/project_memberships \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "project_membership",
      "user": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    }
  ]
}

See input/output options to include more fields in your response.

GET /projects/{project_gid}/project_memberships

Returns the compact project membership records for the project.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
?user stringA string identifying a user. This can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectMembershipCompactSuccessfully retrieved the requested project's memberships.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Project statuses

GET /project_statuses/{project_status_gid}
DELETE /project_statuses/{project_status_gid}
GET /projects/{project_gid}/project_statuses
POST /projects/{project_gid}/project_statuses

Deprecated: new integrations should prefer using status updates

A project status is an update on the progress of a particular project, and is sent out to all project followers when created. These updates include both text describing the update and a color code intended to represent the overall state of the project: "green" for projects that are on track, "yellow" for projects at risk, "red" for projects that are behind, and "blue" for projects on hold.

Project statuses can be created and deleted, but not modified.


Get a project status

Code samples

curl -X GET https://app.asana.com/api/1.0/project_statuses/{project_status_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "project_status",
    "color": "green",
    "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
    "text": "The project is moving forward according to plan...",
    "title": "Status Update - Jun 15",
    "author": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_at": "2012-02-22T02:06:58.147Z",
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "modified_at": "2012-02-22T02:06:58.147Z"
  }
}

See input/output options to include more fields in your response.

GET /project_statuses/{project_status_gid}

Deprecated: new integrations should prefer the /status_updates/{status_gid} route.

Returns the complete record for a single status update.

Parameters

NameDescription
/project_status_gid string
required
The project status update to get.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectStatusSuccessfully retrieved the specified project's status updates.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Delete a project status

Code samples

curl -X DELETE https://app.asana.com/api/1.0/project_statuses/{project_status_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

DELETE /project_statuses/{project_status_gid}

Deprecated: new integrations should prefer the /status_updates/{status_gid} route.

Deletes a specific, existing project status update.

Returns an empty data record.

Parameters

NameDescription
/project_status_gid string
required
The project status update to get.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully deleted the specified project status.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Get statuses from a project

Code samples

curl -X GET https://app.asana.com/api/1.0/projects/{project_gid}/project_statuses \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "project_status",
      "title": "Status Update - Jun 15"
    }
  ]
}

See input/output options to include more fields in your response.

GET /projects/{project_gid}/project_statuses

Deprecated: new integrations should prefer the /status_updates route.

Returns the compact project status update records for all updates on the project.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectStatusCompactSuccessfully retrieved the specified project's status updates.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Create a project status

Code samples

curl -X POST https://app.asana.com/api/1.0/projects/{project_gid}/project_statuses \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "color": "green",
    "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
    "text": "The project is moving forward according to plan...",
    "title": "Status Update - Jun 15"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "project_status",
    "color": "green",
    "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
    "text": "The project is moving forward according to plan...",
    "title": "Status Update - Jun 15",
    "author": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_at": "2012-02-22T02:06:58.147Z",
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "modified_at": "2012-02-22T02:06:58.147Z"
  }
}

See input/output options to include more fields in your response.

POST /projects/{project_gid}/project_statuses

Deprecated: new integrations should prefer the /status_updates route.

Creates a new status update on the project.

Returns the full record of the newly created project status update.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
body object
required
The project status to create.
data objectDeprecated: new integrations should prefer the status_update resource.
color string
required
The color associated with the status update.
html_text stringOpt In. The text content of the status update with formatting as HTML.
text string
required
The text content of the status update.
title stringThe title of the project status update.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Enumerated Values

ParameterValue
colorgreen
coloryellow
colorred
colorblue

Responses

StatusDescription
201 ProjectStatusSuccessfully created a new story.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Project templates

GET /project_templates/{project_template_gid}
GET /project_templates
GET /teams/{team_gid}/project_templates
POST /project_templates/{project_template_gid}/instantiateProject

A project template is an object that allows new projects to be created with a predefined setup, which may include tasks, sections, rules, etc. It simplifies the process of running a workflow that involves a similar set of work every time.

Project templates in organizations are shared with a single team. Currently, the team of a project template cannot be changed via the API.


Get a project template

Code samples

curl -X GET https://app.asana.com/api/1.0/project_templates/{project_template_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "project_template",
    "color": "light-green",
    "description": "These are things we need to pack for a trip.",
    "html_description": "<body>These are things we need to pack for a trip.</body>",
    "name": "Packing list",
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "public": false,
    "requested_dates": [
      {
        "description": "Choose a start date for your project.",
        "gid": "1",
        "name": "Start Date"
      }
    ],
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    }
  }
}

See input/output options to include more fields in your response.

GET /project_templates/{project_template_gid}

Returns the complete project template record for a single project template.

Parameters

NameDescription
/project_template_gid string
required
Globally unique identifier for the project template.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectTemplateSuccessfully retrieved the requested project template.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get multiple project templates

Code samples

curl -X GET https://app.asana.com/api/1.0/project_templates \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "project_template",
      "name": "Packing list"
    }
  ]
}

See input/output options to include more fields in your response.

GET /project_templates

Returns the compact project template records for all project templates in the given team or workspace.

Parameters

NameDescription
?workspace stringThe workspace to filter results on.
?team stringThe team to filter projects on.
?limit integerResults per page.
?offset stringOffset token.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectTemplateCompactSuccessfully retrieved the requested team's or workspace's project templates.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get a team's project templates

Code samples

curl -X GET https://app.asana.com/api/1.0/teams/{team_gid}/project_templates \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "project_template",
      "name": "Packing list"
    }
  ]
}

See input/output options to include more fields in your response.

GET /teams/{team_gid}/project_templates

Returns the compact project template records for all project templates in the team.

Parameters

NameDescription
/team_gid string
required
Globally unique identifier for the team.
?limit integerResults per page.
?offset stringOffset token.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 ProjectTemplateCompactSuccessfully retrieved the requested team's project templates.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Instantiate a project from a project template

Code samples

curl -X POST https://app.asana.com/api/1.0/project_templates/{project_template_gid}/instantiateProject \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "is_strict": true,
    "name": "New Project Name",
    "public": true,
    "requested_dates": [
      {
        "gid": "1",
        "value": "2022-01-01"
      }
    ],
    "team": "12345",
    "workspace": "12345"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "job",
    "new_project": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    },
    "new_project_template": {
      "gid": "12345",
      "resource_type": "project_template",
      "name": "Packing list"
    },
    "new_task": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "resource_subtype": "duplicate_task",
    "status": "in_progress"
  }
}

See input/output options to include more fields in your response.

POST /project_templates/{project_template_gid}/instantiateProject

Creates and returns a job that will asynchronously handle the project instantiation.

To form this request, it is recommended to first make a request to get a project template. Then, from the response, copy the gid from the object in the requested_dates array. This gid should be used in requested_dates to instantiate a project.

Note: The body of this request will differ if your workspace is an organization. To determine if your workspace is an organization, use the is_organization parameter.

Parameters

NameDescription
/project_template_gid string
required
Globally unique identifier for the project template.
body objectDescribes the inputs used for instantiating a project, such as the resulting project's name, which team it should be created in, and values for date variables.
data objectnone
is_strict booleanOptional. If set to true, the endpoint returns an "Unprocessable Entity" error if you fail to provide a calendar date value for any date variable. If set to false, a default date is used for each unfulfilled date variable (e.g., the current date is used as the Start Date of a project).
name string
required
The name of the new project.
public boolean
required
Sets the project to public to its team.
requested_dates [object]Array of mappings of date variables to calendar dates.
gid stringGlobally unique identifier of the date field in the project template. A value of 1 refers to the project start date, while 2 refers to the project due date.
value string(date-time)¦nullThe date with which the date variable should be replaced when instantiating a project. This takes a date with YYYY-MM-DD format.
team stringConditional. Sets the team of the new project. If the project template exists in an organization, you must specify a value for team and not workspace.
workspace stringConditional. Sets the workspace of the new project. If the project template exists in a workspace, you must specify a value for workspace and not team.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
201 JobSuccessfully created the job to handle project instantiation.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Sections

GET /sections/{section_gid}
PUT /sections/{section_gid}
DELETE /sections/{section_gid}
GET /projects/{project_gid}/sections
POST /projects/{project_gid}/sections
POST /sections/{section_gid}/addTask
POST /projects/{project_gid}/sections/insert

A section is a subdivision of a project that groups tasks together. It can either be a header above a list of tasks in a list view or a column in a board view of a project.

Sections are largely a shared idiom in Asana’s API for both list and board views of a project regardless of the project’s layout.

The ‘memberships’ property when getting a task will return the information for the section or the column under ‘section’ in the response.


Get a section

Code samples

curl -X GET https://app.asana.com/api/1.0/sections/{section_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "section",
    "name": "Next Actions",
    "created_at": "2012-02-22T02:06:58.147Z",
    "project": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    },
    "projects": [
      {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      }
    ]
  }
}

See input/output options to include more fields in your response.

GET /sections/{section_gid}

Returns the complete record for a single section.

Parameters

NameDescription
/section_gid string
required
The globally unique identifier for the section.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 SectionSuccessfully retrieved section.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Update a section

Code samples

curl -X PUT https://app.asana.com/api/1.0/sections/{section_gid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "insert_after": "987654",
    "insert_before": "86420",
    "name": "Next Actions"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "section",
    "name": "Next Actions",
    "created_at": "2012-02-22T02:06:58.147Z",
    "project": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    },
    "projects": [
      {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      }
    ]
  }
}

See input/output options to include more fields in your response.

PUT /sections/{section_gid}

A specific, existing section can be updated by making a PUT request on the URL for that project. Only the fields provided in the data block will be updated; any unspecified fields will remain unchanged. (note that at this time, the only field that can be updated is the name field.)

When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the task.

Returns the complete updated section record.

Parameters

NameDescription
/section_gid string
required
The globally unique identifier for the section.
body object
required
The section to create.
data objectnone
insert_after stringAn existing section within this project after which the added section should be inserted. Cannot be provided together with insert_before.
insert_before stringAn existing section within this project before which the added section should be inserted. Cannot be provided together with insert_after.
name string
required
The text to be displayed as the section name. This cannot be an empty string.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 SectionSuccessfully updated the specified section.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Delete a section

Code samples

curl -X DELETE https://app.asana.com/api/1.0/sections/{section_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

DELETE /sections/{section_gid}

A specific, existing section can be deleted by making a DELETE request on the URL for that section.

Note that sections must be empty to be deleted.

The last remaining section cannot be deleted.

Returns an empty data block.

Parameters

NameDescription
/section_gid string
required
The globally unique identifier for the section.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully deleted the specified section.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Get sections in a project

Code samples

curl -X GET https://app.asana.com/api/1.0/projects/{project_gid}/sections \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "section",
      "name": "Next Actions"
    }
  ]
}

See input/output options to include more fields in your response.

GET /projects/{project_gid}/sections

Returns the compact records for all sections in the specified project.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
?limit integerResults per page.
?offset stringOffset token.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 SectionCompactSuccessfully retrieved sections in project.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Create a section in a project

Code samples

curl -X POST https://app.asana.com/api/1.0/projects/{project_gid}/sections \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "insert_after": "987654",
    "insert_before": "86420",
    "name": "Next Actions"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "section",
    "name": "Next Actions",
    "created_at": "2012-02-22T02:06:58.147Z",
    "project": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    },
    "projects": [
      {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      }
    ]
  }
}

See input/output options to include more fields in your response.

POST /projects/{project_gid}/sections

Creates a new section in a project. Returns the full record of the newly created section.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
body object
required
The section to create.
data objectnone
insert_after stringAn existing section within this project after which the added section should be inserted. Cannot be provided together with insert_before.
insert_before stringAn existing section within this project before which the added section should be inserted. Cannot be provided together with insert_after.
name string
required
The text to be displayed as the section name. This cannot be an empty string.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
201 SectionSuccessfully created the specified section.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Add task to section

Code samples

curl -X POST https://app.asana.com/api/1.0/sections/{section_gid}/addTask \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "insert_after": "987654",
    "insert_before": "86420",
    "task": "123456"
  }
}

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

POST /sections/{section_gid}/addTask

Add a task to a specific, existing section. This will remove the task from other sections of the project.

The task will be inserted at the top of a section unless an insert_before or insert_after parameter is declared.

This does not work for separators (tasks with the resource_subtype of section).

Parameters

NameDescription
/section_gid string
required
The globally unique identifier for the section.
body object
required
The task and optionally the insert location.
data objectnone
insert_after stringAn existing task within this section after which the added task should be inserted. Cannot be provided together with insert_before.
insert_before stringAn existing task within this section before which the added task should be inserted. Cannot be provided together with insert_after.
task string
required
The task to add to this section.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully added the task.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Move or Insert sections

Code samples

curl -X POST https://app.asana.com/api/1.0/projects/{project_gid}/sections/insert \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "after_section": "987654",
    "before_section": "86420",
    "project": "123456",
    "section": "321654"
  }
}

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

POST /projects/{project_gid}/sections/insert

Move sections relative to each other. One of before_section or after_section is required.

Sections cannot be moved between projects.

Returns an empty data block.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
body object
required
The section's move action.
data objectnone
after_section stringInsert the given section immediately after the section specified by this parameter.
before_section stringInsert the given section immediately before the section specified by this parameter.
project string
required
The project in which to reorder the given section.
section string
required
The section to reorder.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully moved the specified section.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Status updates

GET /status_updates/{status_gid}
DELETE /status_updates/{status_gid}
GET /status_updates
POST /status_updates

A status update is an update on the progress of a particular object, and is sent out to all followers when created. These updates include both text describing the update and a status_type intended to represent the overall state of the project. These include: on_track for projects that are on track, at_risk for projects at risk, off_track for projects that are behind, and on_hold for projects on hold.

Status updates can be created and deleted, but not modified.


Get a status update

Code samples

curl -X GET https://app.asana.com/api/1.0/status_updates/{status_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "status_update",
    "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
    "resource_subtype": "project_status_update",
    "status_type": "on_track",
    "text": "The project is moving forward according to plan...",
    "title": "Status Update - Jun 15",
    "author": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_at": "2012-02-22T02:06:58.147Z",
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "hearted": true,
    "hearts": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "liked": true,
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "num_hearts": 5,
    "num_likes": 5,
    "parent": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    }
  }
}

See input/output options to include more fields in your response.

GET /status_updates/{status_gid}

Returns the complete record for a single status update.

Parameters

NameDescription
/status_gid string
required
The status update to get.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 StatusUpdateSuccessfully retrieved the specified object's status updates.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Delete a status update

Code samples

curl -X DELETE https://app.asana.com/api/1.0/status_updates/{status_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

DELETE /status_updates/{status_gid}

Deletes a specific, existing status update.

Returns an empty data record.

Parameters

NameDescription
/status_gid string
required
The status update to get.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully deleted the specified status.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Get status updates from an object

Code samples

curl -X GET https://app.asana.com/api/1.0/status_updates?parent=159874 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "status_update",
      "resource_subtype": "project_status_update",
      "title": "Status Update - Jun 15"
    }
  ]
}

See input/output options to include more fields in your response.

GET /status_updates

Returns the compact status update records for all updates on the object.

Parameters

NameDescription
?parent string
required
Globally unique identifier for object to fetch statuses from. Must be a GID for a project, portfolio, or goal.
?created_since string(date-time)Only return statuses that have been created since the given time.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 StatusUpdateCompactSuccessfully retrieved the specified object's status updates.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Create a status update

Code samples

curl -X POST https://app.asana.com/api/1.0/status_updates \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
    "parent": "string",
    "status_type": "on_track",
    "text": "The project is moving forward according to plan...",
    "title": "Status Update - Jun 15"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "status_update",
    "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
    "resource_subtype": "project_status_update",
    "status_type": "on_track",
    "text": "The project is moving forward according to plan...",
    "title": "Status Update - Jun 15",
    "author": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_at": "2012-02-22T02:06:58.147Z",
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "hearted": true,
    "hearts": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "liked": true,
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "num_hearts": 5,
    "num_likes": 5,
    "parent": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    }
  }
}

See input/output options to include more fields in your response.

POST /status_updates

Creates a new status update on an object. Returns the full record of the newly created status update.

Parameters

NameDescription
body object
required
The status update to create.
data objectA status update is an update on the progress of a particular project, portfolio, or goal, and is sent out to all of its parent's followers when created. These updates include both text describing the update and a status_type intended to represent the overall state of the project.
html_text stringOpt In. The text content of the status update with formatting as HTML.
parent string
required
The id of parent to send this status update to. This can be a project, goal or portfolio.
status_type stringThe type associated with the status update. This represents the current state of the object this object is on.
text stringThe text content of the status update.
title stringThe title of the status update.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Enumerated Values

ParameterValue
status_typeon_track
status_typeat_risk
status_typeoff_track
status_typeon_hold
status_typecomplete
status_typeachieved
status_typepartial
status_typemissed
status_typedropped

Responses

StatusDescription
201 StatusUpdateSuccessfully created a new status update.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Stories

GET /stories/{story_gid}
PUT /stories/{story_gid}
DELETE /stories/{story_gid}
GET /tasks/{task_gid}/stories
POST /tasks/{task_gid}/stories

See our forum post for more info on when conditional fields are returned.

A story represents an activity associated with an object in the Asana system. Stories are generated by the system whenever users take actions such as creating or assigning tasks, or moving tasks between projects. "Comments" are also a form of user-generated story.


Get a story

Code samples

curl -X GET https://app.asana.com/api/1.0/stories/{story_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "story",
    "created_at": "2012-02-22T02:06:58.147Z",
    "html_text": "<body>This is a comment.</body>",
    "is_pinned": false,
    "resource_subtype": "comment_added",
    "sticker_name": "dancing_unicorn",
    "text": "This is a comment.",
    "assignee": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "custom_field": {
      "gid": "12345",
      "resource_type": "custom_field",
      "date_value": {
        "date": "2024-08-23",
        "date_time": "2024-08-23T22:00:00.000Z"
      },
      "display_value": "blue",
      "enabled": true,
      "enum_options": [
        {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        }
      ],
      "enum_value": {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      },
      "multi_enum_values": [
        {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        }
      ],
      "name": "Status",
      "number_value": 5.2,
      "resource_subtype": "text",
      "text_value": "Some Value",
      "type": "text"
    },
    "dependency": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "duplicate_of": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "duplicated_from": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "follower": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "hearted": false,
    "hearts": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "is_editable": false,
    "is_edited": false,
    "liked": false,
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "new_approval_status": "approved",
    "new_date_value": {
      "due_at": "2019-09-15T02:06:58.158Z",
      "due_on": "2019-09-15",
      "start_on": "2019-09-14"
    },
    "new_dates": {
      "due_at": "2019-09-15T02:06:58.158Z",
      "due_on": "2019-09-15",
      "start_on": "2019-09-14"
    },
    "new_enum_value": {
      "gid": "12345",
      "resource_type": "enum_option",
      "color": "blue",
      "enabled": true,
      "name": "Low"
    },
    "new_multi_enum_values": [
      {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "new_name": "This is the New Name",
    "new_number_value": 2,
    "new_people_value": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "new_resource_subtype": "milestone",
    "new_section": {
      "gid": "12345",
      "resource_type": "section",
      "name": "Next Actions"
    },
    "new_text_value": "This is the New Text",
    "num_hearts": 5,
    "num_likes": 5,
    "old_approval_status": "pending",
    "old_date_value": {
      "due_at": "2019-09-15T02:06:58.158Z",
      "due_on": "2019-09-15",
      "start_on": "2019-09-14"
    },
    "old_dates": {
      "due_at": "2019-09-15T02:06:58.158Z",
      "due_on": "2019-09-15",
      "start_on": "2019-09-14"
    },
    "old_enum_value": {
      "gid": "12345",
      "resource_type": "enum_option",
      "color": "blue",
      "enabled": true,
      "name": "Low"
    },
    "old_multi_enum_values": [
      {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "old_name": "This was the Old Name",
    "old_number_value": 1,
    "old_people_value": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "old_resource_subtype": "default_task",
    "old_section": {
      "gid": "12345",
      "resource_type": "section",
      "name": "Next Actions"
    },
    "old_text_value": "This was the Old Text",
    "previews": [
      {
        "fallback": "Greg: Great! I like this idea.\\n\\nhttps//a_company.slack.com/archives/ABCDEFG/12345678",
        "footer": "Mar 17, 2019 1:25 PM",
        "header": "Asana for Slack",
        "header_link": "https://asana.comn/apps/slack",
        "html_text": "<body>Great! I like this idea.</body>",
        "text": "Great! I like this idea.",
        "title": "Greg",
        "title_link": "https://asana.slack.com/archives/ABCDEFG/12345678"
      }
    ],
    "project": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    },
    "source": "web",
    "story": {
      "gid": "12345",
      "resource_type": "story",
      "created_at": "2012-02-22T02:06:58.147Z",
      "created_by": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "resource_subtype": "comment_added",
      "text": "marked today"
    },
    "tag": {
      "gid": "12345",
      "resource_type": "tag",
      "name": "Stuff to buy"
    },
    "target": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "task": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "type": "comment"
  }
}

See input/output options to include more fields in your response.

GET /stories/{story_gid}

Returns the full record for a single story.

Parameters

NameDescription
/story_gid string
required
Globally unique identifier for the story.
?limit integerResults per page.
?offset stringOffset token.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 StorySuccessfully retrieved the specified story.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Update a story

Code samples

curl -X PUT https://app.asana.com/api/1.0/stories/{story_gid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "html_text": "<body>This is a comment.</body>",
    "is_pinned": false,
    "sticker_name": "dancing_unicorn",
    "text": "This is a comment."
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "story",
    "created_at": "2012-02-22T02:06:58.147Z",
    "html_text": "<body>This is a comment.</body>",
    "is_pinned": false,
    "resource_subtype": "comment_added",
    "sticker_name": "dancing_unicorn",
    "text": "This is a comment.",
    "assignee": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "custom_field": {
      "gid": "12345",
      "resource_type": "custom_field",
      "date_value": {
        "date": "2024-08-23",
        "date_time": "2024-08-23T22:00:00.000Z"
      },
      "display_value": "blue",
      "enabled": true,
      "enum_options": [
        {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        }
      ],
      "enum_value": {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      },
      "multi_enum_values": [
        {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        }
      ],
      "name": "Status",
      "number_value": 5.2,
      "resource_subtype": "text",
      "text_value": "Some Value",
      "type": "text"
    },
    "dependency": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "duplicate_of": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "duplicated_from": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "follower": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "hearted": false,
    "hearts": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "is_editable": false,
    "is_edited": false,
    "liked": false,
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "new_approval_status": "approved",
    "new_date_value": {
      "due_at": "2019-09-15T02:06:58.158Z",
      "due_on": "2019-09-15",
      "start_on": "2019-09-14"
    },
    "new_dates": {
      "due_at": "2019-09-15T02:06:58.158Z",
      "due_on": "2019-09-15",
      "start_on": "2019-09-14"
    },
    "new_enum_value": {
      "gid": "12345",
      "resource_type": "enum_option",
      "color": "blue",
      "enabled": true,
      "name": "Low"
    },
    "new_multi_enum_values": [
      {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "new_name": "This is the New Name",
    "new_number_value": 2,
    "new_people_value": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "new_resource_subtype": "milestone",
    "new_section": {
      "gid": "12345",
      "resource_type": "section",
      "name": "Next Actions"
    },
    "new_text_value": "This is the New Text",
    "num_hearts": 5,
    "num_likes": 5,
    "old_approval_status": "pending",
    "old_date_value": {
      "due_at": "2019-09-15T02:06:58.158Z",
      "due_on": "2019-09-15",
      "start_on": "2019-09-14"
    },
    "old_dates": {
      "due_at": "2019-09-15T02:06:58.158Z",
      "due_on": "2019-09-15",
      "start_on": "2019-09-14"
    },
    "old_enum_value": {
      "gid": "12345",
      "resource_type": "enum_option",
      "color": "blue",
      "enabled": true,
      "name": "Low"
    },
    "old_multi_enum_values": [
      {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "old_name": "This was the Old Name",
    "old_number_value": 1,
    "old_people_value": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "old_resource_subtype": "default_task",
    "old_section": {
      "gid": "12345",
      "resource_type": "section",
      "name": "Next Actions"
    },
    "old_text_value": "This was the Old Text",
    "previews": [
      {
        "fallback": "Greg: Great! I like this idea.\\n\\nhttps//a_company.slack.com/archives/ABCDEFG/12345678",
        "footer": "Mar 17, 2019 1:25 PM",
        "header": "Asana for Slack",
        "header_link": "https://asana.comn/apps/slack",
        "html_text": "<body>Great! I like this idea.</body>",
        "text": "Great! I like this idea.",
        "title": "Greg",
        "title_link": "https://asana.slack.com/archives/ABCDEFG/12345678"
      }
    ],
    "project": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    },
    "source": "web",
    "story": {
      "gid": "12345",
      "resource_type": "story",
      "created_at": "2012-02-22T02:06:58.147Z",
      "created_by": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "resource_subtype": "comment_added",
      "text": "marked today"
    },
    "tag": {
      "gid": "12345",
      "resource_type": "tag",
      "name": "Stuff to buy"
    },
    "target": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "task": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "type": "comment"
  }
}

See input/output options to include more fields in your response.

PUT /stories/{story_gid}

Updates the story and returns the full record for the updated story. Only comment stories can have their text updated, and only comment stories and attachment stories can be pinned. Only one of text and html_text can be specified.

Parameters

NameDescription
/story_gid string
required
Globally unique identifier for the story.
body object
required
The comment story to update.
data objectA story represents an activity associated with an object in the Asana system.
html_text stringOpt In. HTML formatted text for a comment. This will not include the name of the creator.
is_pinned booleanConditional. Whether the story should be pinned on the resource.
sticker_name stringThe name of the sticker in this story. null if there is no sticker.
text stringThe plain text of the comment to add. Cannot be used with html_text.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Enumerated Values

ParameterValue
sticker_namegreen_checkmark
sticker_namepeople_dancing
sticker_namedancing_unicorn
sticker_nameheart
sticker_nameparty_popper
sticker_namepeople_waving_flags
sticker_namesplashing_narwhal
sticker_nametrophy
sticker_nameyeti_riding_unicorn
sticker_namecelebrating_people
sticker_namedetermined_climbers
sticker_namephoenix_spreading_love

Responses

StatusDescription
200 StorySuccessfully retrieved the specified story.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Delete a story

Code samples

curl -X DELETE https://app.asana.com/api/1.0/stories/{story_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

DELETE /stories/{story_gid}

Deletes a story. A user can only delete stories they have created.

Returns an empty data record.

Parameters

NameDescription
/story_gid string
required
Globally unique identifier for the story.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully deleted the specified story.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Get stories from a task

Code samples

curl -X GET https://app.asana.com/api/1.0/tasks/{task_gid}/stories \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "story",
      "created_at": "2012-02-22T02:06:58.147Z",
      "created_by": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "resource_subtype": "comment_added",
      "text": "marked today"
    }
  ]
}

See input/output options to include more fields in your response.

GET /tasks/{task_gid}/stories

Returns the compact records for all stories on the task.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
?limit integerResults per page.
?offset stringOffset token.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 StoryCompactSuccessfully retrieved the specified task's stories.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Create a story on a task

Code samples

curl -X POST https://app.asana.com/api/1.0/tasks/{task_gid}/stories \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "html_text": "<body>This is a comment.</body>",
    "is_pinned": false,
    "sticker_name": "dancing_unicorn",
    "text": "This is a comment."
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "story",
    "created_at": "2012-02-22T02:06:58.147Z",
    "html_text": "<body>This is a comment.</body>",
    "is_pinned": false,
    "resource_subtype": "comment_added",
    "sticker_name": "dancing_unicorn",
    "text": "This is a comment.",
    "assignee": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "custom_field": {
      "gid": "12345",
      "resource_type": "custom_field",
      "date_value": {
        "date": "2024-08-23",
        "date_time": "2024-08-23T22:00:00.000Z"
      },
      "display_value": "blue",
      "enabled": true,
      "enum_options": [
        {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        }
      ],
      "enum_value": {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      },
      "multi_enum_values": [
        {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        }
      ],
      "name": "Status",
      "number_value": 5.2,
      "resource_subtype": "text",
      "text_value": "Some Value",
      "type": "text"
    },
    "dependency": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "duplicate_of": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "duplicated_from": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "follower": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "hearted": false,
    "hearts": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "is_editable": false,
    "is_edited": false,
    "liked": false,
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "new_approval_status": "approved",
    "new_date_value": {
      "due_at": "2019-09-15T02:06:58.158Z",
      "due_on": "2019-09-15",
      "start_on": "2019-09-14"
    },
    "new_dates": {
      "due_at": "2019-09-15T02:06:58.158Z",
      "due_on": "2019-09-15",
      "start_on": "2019-09-14"
    },
    "new_enum_value": {
      "gid": "12345",
      "resource_type": "enum_option",
      "color": "blue",
      "enabled": true,
      "name": "Low"
    },
    "new_multi_enum_values": [
      {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "new_name": "This is the New Name",
    "new_number_value": 2,
    "new_people_value": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "new_resource_subtype": "milestone",
    "new_section": {
      "gid": "12345",
      "resource_type": "section",
      "name": "Next Actions"
    },
    "new_text_value": "This is the New Text",
    "num_hearts": 5,
    "num_likes": 5,
    "old_approval_status": "pending",
    "old_date_value": {
      "due_at": "2019-09-15T02:06:58.158Z",
      "due_on": "2019-09-15",
      "start_on": "2019-09-14"
    },
    "old_dates": {
      "due_at": "2019-09-15T02:06:58.158Z",
      "due_on": "2019-09-15",
      "start_on": "2019-09-14"
    },
    "old_enum_value": {
      "gid": "12345",
      "resource_type": "enum_option",
      "color": "blue",
      "enabled": true,
      "name": "Low"
    },
    "old_multi_enum_values": [
      {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "old_name": "This was the Old Name",
    "old_number_value": 1,
    "old_people_value": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "old_resource_subtype": "default_task",
    "old_section": {
      "gid": "12345",
      "resource_type": "section",
      "name": "Next Actions"
    },
    "old_text_value": "This was the Old Text",
    "previews": [
      {
        "fallback": "Greg: Great! I like this idea.\\n\\nhttps//a_company.slack.com/archives/ABCDEFG/12345678",
        "footer": "Mar 17, 2019 1:25 PM",
        "header": "Asana for Slack",
        "header_link": "https://asana.comn/apps/slack",
        "html_text": "<body>Great! I like this idea.</body>",
        "text": "Great! I like this idea.",
        "title": "Greg",
        "title_link": "https://asana.slack.com/archives/ABCDEFG/12345678"
      }
    ],
    "project": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    },
    "source": "web",
    "story": {
      "gid": "12345",
      "resource_type": "story",
      "created_at": "2012-02-22T02:06:58.147Z",
      "created_by": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "resource_subtype": "comment_added",
      "text": "marked today"
    },
    "tag": {
      "gid": "12345",
      "resource_type": "tag",
      "name": "Stuff to buy"
    },
    "target": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "task": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "type": "comment"
  }
}

See input/output options to include more fields in your response.

POST /tasks/{task_gid}/stories

Adds a story to a task. This endpoint currently only allows for comment stories to be created. The comment will be authored by the currently authenticated user, and timestamped when the server receives the request.

Returns the full record for the new story added to the task.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
body object
required
The story to create.
data objectA story represents an activity associated with an object in the Asana system.
html_text stringOpt In. HTML formatted text for a comment. This will not include the name of the creator.
is_pinned booleanConditional. Whether the story should be pinned on the resource.
sticker_name stringThe name of the sticker in this story. null if there is no sticker.
text stringThe plain text of the comment to add. Cannot be used with html_text.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Enumerated Values

ParameterValue
sticker_namegreen_checkmark
sticker_namepeople_dancing
sticker_namedancing_unicorn
sticker_nameheart
sticker_nameparty_popper
sticker_namepeople_waving_flags
sticker_namesplashing_narwhal
sticker_nametrophy
sticker_nameyeti_riding_unicorn
sticker_namecelebrating_people
sticker_namedetermined_climbers
sticker_namephoenix_spreading_love

Responses

StatusDescription
201 StorySuccessfully created a new story.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Tags

GET /tags
POST /tags
GET /tags/{tag_gid}
PUT /tags/{tag_gid}
DELETE /tags/{tag_gid}
GET /tasks/{task_gid}/tags
GET /workspaces/{workspace_gid}/tags
POST /workspaces/{workspace_gid}/tags

A tag is a label that can be attached to any task in Asana. It exists in a single workspace or organization.

Tags have some metadata associated with them, but it is possible that we will simplify them in the future so it is not encouraged to rely too heavily on it. Unlike projects, tags do not provide any ordering on the tasks they are associated with.


Get multiple tags

Code samples

curl -X GET https://app.asana.com/api/1.0/tags \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "tag",
      "name": "Stuff to buy"
    }
  ]
}

See input/output options to include more fields in your response.

GET /tags

Returns the compact tag records for some filtered set of tags. Use one or more of the parameters provided to filter the tags returned.

Parameters

NameDescription
?workspace stringThe workspace to filter tags on.
?limit integerResults per page.
?offset stringOffset token.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TagCompactSuccessfully retrieved the specified set of tags.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Create a tag

Code samples

curl -X POST https://app.asana.com/api/1.0/tags \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "color": "light-green",
    "followers": [
      "12345",
      "42563"
    ],
    "name": "Stuff to buy",
    "notes": "Mittens really likes the stuff from Humboldt.",
    "workspace": "12345"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "tag",
    "color": "light-green",
    "created_at": "2012-02-22T02:06:58.147Z",
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "name": "Stuff to buy",
    "notes": "Mittens really likes the stuff from Humboldt.",
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

POST /tags

Creates a new tag in a workspace or organization.

Every tag is required to be created in a specific workspace or organization, and this cannot be changed once set. Note that you can use the workspace parameter regardless of whether or not it is an organization.

Returns the full record of the newly created tag.

Parameters

NameDescription
body object
required
The tag to create.
data objectA tag is a label that can be attached to any task in Asana. It exists in a single workspace or organization.
color string¦nullColor of the tag.
followers [string]An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.
name stringName of the tag. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
notes stringFree-form textual information associated with the tag (i.e. its description).
workspace stringGid of an object.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Enumerated Values

ParameterValue
colordark-pink
colordark-green
colordark-blue
colordark-red
colordark-teal
colordark-brown
colordark-orange
colordark-purple
colordark-warm-gray
colorlight-pink
colorlight-green
colorlight-blue
colorlight-red
colorlight-teal
colorlight-brown
colorlight-orange
colorlight-purple
colorlight-warm-gray

Responses

StatusDescription
201 TagSuccessfully created the newly specified tag.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get a tag

Code samples

curl -X GET https://app.asana.com/api/1.0/tags/{tag_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "tag",
    "color": "light-green",
    "created_at": "2012-02-22T02:06:58.147Z",
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "name": "Stuff to buy",
    "notes": "Mittens really likes the stuff from Humboldt.",
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

GET /tags/{tag_gid}

Returns the complete tag record for a single tag.

Parameters

NameDescription
/tag_gid string
required
Globally unique identifier for the tag.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TagSuccessfully retrieved the specified tag.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Update a tag

Code samples

curl -X PUT https://app.asana.com/api/1.0/tags/{tag_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "tag",
    "color": "light-green",
    "created_at": "2012-02-22T02:06:58.147Z",
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "name": "Stuff to buy",
    "notes": "Mittens really likes the stuff from Humboldt.",
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

PUT /tags/{tag_gid}

Updates the properties of a tag. Only the fields provided in the data block will be updated; any unspecified fields will remain unchanged.

When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the tag.

Returns the complete updated tag record.

Parameters

NameDescription
/tag_gid string
required
Globally unique identifier for the tag.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TagSuccessfully updated the specified tag.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Delete a tag

Code samples

curl -X DELETE https://app.asana.com/api/1.0/tags/{tag_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

DELETE /tags/{tag_gid}

A specific, existing tag can be deleted by making a DELETE request on the URL for that tag.

Returns an empty data record.

Parameters

NameDescription
/tag_gid string
required
Globally unique identifier for the tag.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully deleted the specified tag.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Get a task's tags

Code samples

curl -X GET https://app.asana.com/api/1.0/tasks/{task_gid}/tags \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "tag",
      "name": "Stuff to buy"
    }
  ]
}

See input/output options to include more fields in your response.

GET /tasks/{task_gid}/tags

Get a compact representation of all of the tags the task has.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TagCompactSuccessfully retrieved the tags for the given task.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get tags in a workspace

Code samples

curl -X GET https://app.asana.com/api/1.0/workspaces/{workspace_gid}/tags \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "tag",
      "name": "Stuff to buy"
    }
  ]
}

See input/output options to include more fields in your response.

GET /workspaces/{workspace_gid}/tags

Returns the compact tag records for some filtered set of tags. Use one or more of the parameters provided to filter the tags returned.

Parameters

NameDescription
/workspace_gid string
required
Globally unique identifier for the workspace or organization.
?limit integerResults per page.
?offset stringOffset token.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TagCompactSuccessfully retrieved the specified set of tags.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Create a tag in a workspace

Code samples

curl -X POST https://app.asana.com/api/1.0/workspaces/{workspace_gid}/tags \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "color": "light-green",
    "name": "Stuff to buy",
    "notes": "Mittens really likes the stuff from Humboldt.",
    "workspace": {
      "name": "My Company Workspace"
    }
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "tag",
    "color": "light-green",
    "created_at": "2012-02-22T02:06:58.147Z",
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "name": "Stuff to buy",
    "notes": "Mittens really likes the stuff from Humboldt.",
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

POST /workspaces/{workspace_gid}/tags

Creates a new tag in a workspace or organization.

Every tag is required to be created in a specific workspace or organization, and this cannot be changed once set. Note that you can use the workspace parameter regardless of whether or not it is an organization.

Returns the full record of the newly created tag.

Parameters

NameDescription
/workspace_gid string
required
Globally unique identifier for the workspace or organization.
body object
required
The tag to create.
data TagResponseA tag is a label that can be attached to any task in Asana. It exists in a single workspace or organization.
color string¦nullColor of the tag.
name stringName of the tag. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
notes stringFree-form textual information associated with the tag (i.e. its description).
workspace objectA workspace is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace.
name stringThe name of the workspace.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Enumerated Values

ParameterValue
colordark-pink
colordark-green
colordark-blue
colordark-red
colordark-teal
colordark-brown
colordark-orange
colordark-purple
colordark-warm-gray
colorlight-pink
colorlight-green
colorlight-blue
colorlight-red
colorlight-teal
colorlight-brown
colorlight-orange
colorlight-purple
colorlight-warm-gray

Responses

StatusDescription
201 TagSuccessfully created the newly specified tag.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Tasks

GET /tasks
POST /tasks
GET /tasks/{task_gid}
PUT /tasks/{task_gid}
DELETE /tasks/{task_gid}
POST /tasks/{task_gid}/duplicate
GET /projects/{project_gid}/tasks
GET /sections/{section_gid}/tasks
GET /tags/{tag_gid}/tasks
GET /user_task_lists/{user_task_list_gid}/tasks
GET /tasks/{task_gid}/subtasks
POST /tasks/{task_gid}/subtasks
POST /tasks/{task_gid}/setParent
GET /tasks/{task_gid}/dependencies
POST /tasks/{task_gid}/addDependencies
POST /tasks/{task_gid}/removeDependencies
GET /tasks/{task_gid}/dependents
POST /tasks/{task_gid}/addDependents
POST /tasks/{task_gid}/removeDependents
POST /tasks/{task_gid}/addProject
POST /tasks/{task_gid}/removeProject
POST /tasks/{task_gid}/addTag
POST /tasks/{task_gid}/removeTag
POST /tasks/{task_gid}/addFollowers
POST /tasks/{task_gid}/removeFollowers
GET /workspaces/{workspace_gid}/tasks/search

The task is the basic object around which many operations in Asana are centered. In the Asana application, multiple tasks populate the middle pane according to some view parameters, and the set of selected tasks determines the more detailed information presented in the details pane.

Sections are unique in that they will be included in the memberships field of task objects returned in the API when the task is within a section. They can also be used to manipulate the ordering of a task within a project.

Queries return a compact representation of each task object. To retrieve all fields or specific set of the fields, use field selectors to manipulate what data is included in a response.


Get multiple tasks

Code samples

curl -X GET https://app.asana.com/api/1.0/tasks \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    }
  ]
}

See input/output options to include more fields in your response.

GET /tasks

Returns the compact task records for some filtered set of tasks. Use one or more of the parameters provided to filter the tasks returned. You must specify a project or tag if you do not specify assignee and workspace.

For more complex task retrieval, use workspaces/{workspace_gid}/tasks/search.

Parameters

NameDescription
?assignee stringThe assignee to filter tasks on. If searching for unassigned tasks, assignee.any = null can be specified.
?project stringThe project to filter tasks on.
?section stringThe section to filter tasks on.
?workspace stringThe workspace to filter tasks on.
?completed_since string(date-time)Only return tasks that are either incomplete or that have been completed since this time.
?modified_since string(date-time)Only return tasks that have been modified since the given time.
?limit integerResults per page.
?offset stringOffset token.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Detailed descriptions

assignee: The assignee to filter tasks on. If searching for unassigned tasks, assignee.any = null can be specified. Note: If you specify assignee, you must also specify the workspace to filter on.

section: The section to filter tasks on. Note: Currently, this is only supported in board views.

workspace: The workspace to filter tasks on. Note: If you specify workspace, you must also specify the assignee to filter on.

modified_since: Only return tasks that have been modified since the given time.

Note: A task is considered “modified” if any of its properties change, or associations between it and other objects are modified (e.g. a task being added to a project). A task is not considered modified just because another object it is associated with (e.g. a subtask) is modified. Actions that count as modifying the task include assigning, renaming, completing, and adding stories.

Responses

StatusDescription
200 TaskCompactSuccessfully retrieved requested tasks.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Create a task

Code samples

curl -X POST https://app.asana.com/api/1.0/tasks \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "approval_status": "pending",
    "assignee": "12345",
    "assignee_section": "12345",
    "assignee_status": "upcoming",
    "completed": false,
    "completed_by": {
      "name": "Greg Sanchez"
    },
    "custom_fields": {
      "4578152156": "Not Started",
      "5678904321": "On Hold"
    },
    "due_at": "2019-09-15T02:06:58.147Z",
    "due_on": "2019-09-15",
    "external": {
      "data": "A blob of information",
      "gid": "my_gid"
    },
    "followers": [
      "12345"
    ],
    "html_notes": "<body>Mittens <em>really</em> likes the stuff from Humboldt.</body>",
    "liked": true,
    "name": "Buy catnip",
    "notes": "Mittens really likes the stuff from Humboldt.",
    "parent": "12345",
    "projects": [
      "12345"
    ],
    "resource_subtype": "default_task",
    "start_at": "2019-09-14T02:06:58.147Z",
    "start_on": "2019-09-14",
    "tags": [
      "12345"
    ],
    "workspace": "12345"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "task",
    "actual_time_minutes": 200,
    "approval_status": "pending",
    "assignee_status": "upcoming",
    "completed": false,
    "completed_at": "2012-02-22T02:06:58.147Z",
    "completed_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_at": "2012-02-22T02:06:58.147Z",
    "dependencies": [
      {
        "gid": "12345",
        "resource_type": "task"
      }
    ],
    "dependents": [
      {
        "gid": "12345",
        "resource_type": "task"
      }
    ],
    "due_at": "2019-09-15T02:06:58.147Z",
    "due_on": "2019-09-15",
    "external": {
      "data": "A blob of information",
      "gid": "my_gid"
    },
    "hearted": true,
    "hearts": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "html_notes": "<body>Mittens <em>really</em> likes the stuff from Humboldt.</body>",
    "is_rendered_as_separator": false,
    "liked": true,
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "memberships": [
      {
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "section": {
          "gid": "12345",
          "resource_type": "section",
          "name": "Next Actions"
        }
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "name": "Buy catnip",
    "notes": "Mittens really likes the stuff from Humboldt.",
    "num_hearts": 5,
    "num_likes": 5,
    "num_subtasks": 3,
    "resource_subtype": "default_task",
    "start_at": "2019-09-14T02:06:58.147Z",
    "start_on": "2019-09-14",
    "assignee": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "assignee_section": {
      "gid": "12345",
      "resource_type": "section",
      "name": "Next Actions"
    },
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "asana_created_field": "priority",
        "created_by": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        },
        "currency_code": "EUR",
        "custom_label": "gold pieces",
        "custom_label_position": "suffix",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "description": "Development team priority",
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "format": "custom",
        "has_notifications_enabled": true,
        "is_global_to_workspace": true,
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "people_value": [
          {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          }
        ],
        "precision": 2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "parent": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "projects": [
      {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      }
    ],
    "tags": [
      {
        "gid": "59746",
        "name": "Grade A"
      }
    ],
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

POST /tasks

Creating a new task is as easy as POSTing to the /tasks endpoint with a data block containing the fields you’d like to set on the task. Any unspecified fields will take on default values.

Every task is required to be created in a specific workspace, and this workspace cannot be changed once set. The workspace need not be set explicitly if you specify projects or a parent task instead.

Parameters

NameDescription
body object
required
The task to create.
data objectThe task is the basic object around which many operations in Asana are centered.
approval_status stringConditional Reflects the approval status of this task. This field is kept in sync with completed, meaning pending translates to false while approved, rejected, and changes_requested translate to true. If you set completed to true, this field will be set to approved.
assignee string¦nullGid of a user.
assignee_section string¦nullThe assignee section is a subdivision of a project that groups tasks together in the assignee's "My Tasks" list. It can either be a header above a list of tasks in a list view or a column in a board view of "My Tasks."
assignee_status stringDeprecated Scheduling status of this task for the user it is assigned to. This field can only be set if the assignee is non-null. Setting this field to "inbox" or "upcoming" inserts it at the top of the section, while the other options will insert at the bottom.
completed booleanTrue if the task is currently marked complete, false if not.
completed_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
name stringRead-only except when same user as requester. The user’s name.
custom_fields objectAn object where each key is a Custom Field GID and each value is an enum GID, string, number, object, or array.
due_at string(date)¦nullThe UTC date and time on which this task is due, or null if the task has no due time. This takes an ISO 8601 date string in UTC and should not be used together with due_on.
due_on string(date)¦nullThe localized date on which this task is due, or null if the task has no due date. This takes a date with YYYY-MM-DD format and should not be used together with due_at.
external objectOAuth Required. Conditional. This field is returned only if external values are set or included by using Opt In.
data stringnone
gid stringnone
followers [string]Create-Only An array of strings identifying users. These can either be the string "me", an email, or the gid of a user. In order to change followers on an existing task use addFollowers and removeFollowers.
html_notes stringOpt In. The notes of the text with formatting as HTML.
liked booleanTrue if the task is liked by the authorized user, false if not.
name stringName of the task. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
notes stringFree-form textual information associated with the task (i.e. its description).
parent string¦nullGid of a task.
projects [string]Create-Only Array of project gids. In order to change projects on an existing task use addProject and removeProject.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
start_at string(date)¦nullDate and time on which work begins for the task, or null if the task has no start time. This takes an ISO 8601 date string in UTC and should not be used together with start_on.
start_on string(date)¦nullThe day on which work begins for the task , or null if the task has no start date. This takes a date with YYYY-MM-DD format and should not be used together with start_at.
tags [string]Create-Only Array of tag gids. In order to change tags on an existing task use addTag and removeTag.
workspace stringGid of a workspace.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Detailed descriptions

assignee_section: The assignee section is a subdivision of a project that groups tasks together in the assignee's "My Tasks" list. It can either be a header above a list of tasks in a list view or a column in a board view of "My Tasks." The assignee_section property will be returned in the response only if the request was sent by the user who is the assignee of the task. Note that you can only write to assignee_section with the gid of an existing section visible in the user's "My Tasks" list.

external: OAuth Required. Conditional. This field is returned only if external values are set or included by using Opt In. The external field allows you to store app-specific metadata on tasks, including a gid that can be used to retrieve tasks and a data blob that can store app-specific character strings. Note that you will need to authenticate with Oauth to access or modify this data. Once an external gid is set, you can use the notation external:custom_gid to reference your object anywhere in the API where you may use the original object gid. See the page on Custom External Data for more details.

resource_subtype: The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning. The resource_subtype milestone represent a single moment in time. This means tasks with this subtype cannot have a start_date.

start_at: Date and time on which work begins for the task, or null if the task has no start time. This takes an ISO 8601 date string in UTC and should not be used together with start_on. Note: due_at must be present in the request when setting or unsetting the start_at parameter.

start_on: The day on which work begins for the task , or null if the task has no start date. This takes a date with YYYY-MM-DD format and should not be used together with start_at. Note: due_on or due_at must be present in the request when setting or unsetting the start_on parameter.

Enumerated Values

ParameterValue
approval_statuspending
approval_statusapproved
approval_statusrejected
approval_statuschanges_requested
assignee_statustoday
assignee_statusupcoming
assignee_statuslater
assignee_statusnew
assignee_statusinbox
resource_subtypedefault_task
resource_subtypemilestone
resource_subtypesection
resource_subtypeapproval

Responses

StatusDescription
201 TaskSuccessfully created a new task.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get a task

Code samples

curl -X GET https://app.asana.com/api/1.0/tasks/{task_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "task",
    "actual_time_minutes": 200,
    "approval_status": "pending",
    "assignee_status": "upcoming",
    "completed": false,
    "completed_at": "2012-02-22T02:06:58.147Z",
    "completed_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_at": "2012-02-22T02:06:58.147Z",
    "dependencies": [
      {
        "gid": "12345",
        "resource_type": "task"
      }
    ],
    "dependents": [
      {
        "gid": "12345",
        "resource_type": "task"
      }
    ],
    "due_at": "2019-09-15T02:06:58.147Z",
    "due_on": "2019-09-15",
    "external": {
      "data": "A blob of information",
      "gid": "my_gid"
    },
    "hearted": true,
    "hearts": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "html_notes": "<body>Mittens <em>really</em> likes the stuff from Humboldt.</body>",
    "is_rendered_as_separator": false,
    "liked": true,
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "memberships": [
      {
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "section": {
          "gid": "12345",
          "resource_type": "section",
          "name": "Next Actions"
        }
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "name": "Buy catnip",
    "notes": "Mittens really likes the stuff from Humboldt.",
    "num_hearts": 5,
    "num_likes": 5,
    "num_subtasks": 3,
    "resource_subtype": "default_task",
    "start_at": "2019-09-14T02:06:58.147Z",
    "start_on": "2019-09-14",
    "assignee": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "assignee_section": {
      "gid": "12345",
      "resource_type": "section",
      "name": "Next Actions"
    },
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "asana_created_field": "priority",
        "created_by": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        },
        "currency_code": "EUR",
        "custom_label": "gold pieces",
        "custom_label_position": "suffix",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "description": "Development team priority",
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "format": "custom",
        "has_notifications_enabled": true,
        "is_global_to_workspace": true,
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "people_value": [
          {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          }
        ],
        "precision": 2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "parent": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "projects": [
      {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      }
    ],
    "tags": [
      {
        "gid": "59746",
        "name": "Grade A"
      }
    ],
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

GET /tasks/{task_gid}

Returns the complete task record for a single task.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TaskSuccessfully retrieved the specified task.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Update a task

Code samples

curl -X PUT https://app.asana.com/api/1.0/tasks/{task_gid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "approval_status": "pending",
    "assignee": "12345",
    "assignee_section": "12345",
    "assignee_status": "upcoming",
    "completed": false,
    "completed_by": {
      "name": "Greg Sanchez"
    },
    "custom_fields": {
      "4578152156": "Not Started",
      "5678904321": "On Hold"
    },
    "due_at": "2019-09-15T02:06:58.147Z",
    "due_on": "2019-09-15",
    "external": {
      "data": "A blob of information",
      "gid": "my_gid"
    },
    "followers": [
      "12345"
    ],
    "html_notes": "<body>Mittens <em>really</em> likes the stuff from Humboldt.</body>",
    "liked": true,
    "name": "Buy catnip",
    "notes": "Mittens really likes the stuff from Humboldt.",
    "parent": "12345",
    "projects": [
      "12345"
    ],
    "resource_subtype": "default_task",
    "start_at": "2019-09-14T02:06:58.147Z",
    "start_on": "2019-09-14",
    "tags": [
      "12345"
    ],
    "workspace": "12345"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "task",
    "actual_time_minutes": 200,
    "approval_status": "pending",
    "assignee_status": "upcoming",
    "completed": false,
    "completed_at": "2012-02-22T02:06:58.147Z",
    "completed_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_at": "2012-02-22T02:06:58.147Z",
    "dependencies": [
      {
        "gid": "12345",
        "resource_type": "task"
      }
    ],
    "dependents": [
      {
        "gid": "12345",
        "resource_type": "task"
      }
    ],
    "due_at": "2019-09-15T02:06:58.147Z",
    "due_on": "2019-09-15",
    "external": {
      "data": "A blob of information",
      "gid": "my_gid"
    },
    "hearted": true,
    "hearts": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "html_notes": "<body>Mittens <em>really</em> likes the stuff from Humboldt.</body>",
    "is_rendered_as_separator": false,
    "liked": true,
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "memberships": [
      {
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "section": {
          "gid": "12345",
          "resource_type": "section",
          "name": "Next Actions"
        }
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "name": "Buy catnip",
    "notes": "Mittens really likes the stuff from Humboldt.",
    "num_hearts": 5,
    "num_likes": 5,
    "num_subtasks": 3,
    "resource_subtype": "default_task",
    "start_at": "2019-09-14T02:06:58.147Z",
    "start_on": "2019-09-14",
    "assignee": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "assignee_section": {
      "gid": "12345",
      "resource_type": "section",
      "name": "Next Actions"
    },
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "asana_created_field": "priority",
        "created_by": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        },
        "currency_code": "EUR",
        "custom_label": "gold pieces",
        "custom_label_position": "suffix",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "description": "Development team priority",
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "format": "custom",
        "has_notifications_enabled": true,
        "is_global_to_workspace": true,
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "people_value": [
          {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          }
        ],
        "precision": 2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "parent": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "projects": [
      {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      }
    ],
    "tags": [
      {
        "gid": "59746",
        "name": "Grade A"
      }
    ],
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

PUT /tasks/{task_gid}

A specific, existing task can be updated by making a PUT request on the URL for that task. Only the fields provided in the data block will be updated; any unspecified fields will remain unchanged.

When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the task.

Returns the complete updated task record.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
body object
required
The task to update.
data objectThe task is the basic object around which many operations in Asana are centered.
approval_status stringConditional Reflects the approval status of this task. This field is kept in sync with completed, meaning pending translates to false while approved, rejected, and changes_requested translate to true. If you set completed to true, this field will be set to approved.
assignee string¦nullGid of a user.
assignee_section string¦nullThe assignee section is a subdivision of a project that groups tasks together in the assignee's "My Tasks" list. It can either be a header above a list of tasks in a list view or a column in a board view of "My Tasks."
assignee_status stringDeprecated Scheduling status of this task for the user it is assigned to. This field can only be set if the assignee is non-null. Setting this field to "inbox" or "upcoming" inserts it at the top of the section, while the other options will insert at the bottom.
completed booleanTrue if the task is currently marked complete, false if not.
completed_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
name stringRead-only except when same user as requester. The user’s name.
custom_fields objectAn object where each key is a Custom Field GID and each value is an enum GID, string, number, object, or array.
due_at string(date)¦nullThe UTC date and time on which this task is due, or null if the task has no due time. This takes an ISO 8601 date string in UTC and should not be used together with due_on.
due_on string(date)¦nullThe localized date on which this task is due, or null if the task has no due date. This takes a date with YYYY-MM-DD format and should not be used together with due_at.
external objectOAuth Required. Conditional. This field is returned only if external values are set or included by using Opt In.
data stringnone
gid stringnone
followers [string]Create-Only An array of strings identifying users. These can either be the string "me", an email, or the gid of a user. In order to change followers on an existing task use addFollowers and removeFollowers.
html_notes stringOpt In. The notes of the text with formatting as HTML.
liked booleanTrue if the task is liked by the authorized user, false if not.
name stringName of the task. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
notes stringFree-form textual information associated with the task (i.e. its description).
parent string¦nullGid of a task.
projects [string]Create-Only Array of project gids. In order to change projects on an existing task use addProject and removeProject.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
start_at string(date)¦nullDate and time on which work begins for the task, or null if the task has no start time. This takes an ISO 8601 date string in UTC and should not be used together with start_on.
start_on string(date)¦nullThe day on which work begins for the task , or null if the task has no start date. This takes a date with YYYY-MM-DD format and should not be used together with start_at.
tags [string]Create-Only Array of tag gids. In order to change tags on an existing task use addTag and removeTag.
workspace stringGid of a workspace.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Detailed descriptions

assignee_section: The assignee section is a subdivision of a project that groups tasks together in the assignee's "My Tasks" list. It can either be a header above a list of tasks in a list view or a column in a board view of "My Tasks." The assignee_section property will be returned in the response only if the request was sent by the user who is the assignee of the task. Note that you can only write to assignee_section with the gid of an existing section visible in the user's "My Tasks" list.

external: OAuth Required. Conditional. This field is returned only if external values are set or included by using Opt In. The external field allows you to store app-specific metadata on tasks, including a gid that can be used to retrieve tasks and a data blob that can store app-specific character strings. Note that you will need to authenticate with Oauth to access or modify this data. Once an external gid is set, you can use the notation external:custom_gid to reference your object anywhere in the API where you may use the original object gid. See the page on Custom External Data for more details.

resource_subtype: The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning. The resource_subtype milestone represent a single moment in time. This means tasks with this subtype cannot have a start_date.

start_at: Date and time on which work begins for the task, or null if the task has no start time. This takes an ISO 8601 date string in UTC and should not be used together with start_on. Note: due_at must be present in the request when setting or unsetting the start_at parameter.

start_on: The day on which work begins for the task , or null if the task has no start date. This takes a date with YYYY-MM-DD format and should not be used together with start_at. Note: due_on or due_at must be present in the request when setting or unsetting the start_on parameter.

Enumerated Values

ParameterValue
approval_statuspending
approval_statusapproved
approval_statusrejected
approval_statuschanges_requested
assignee_statustoday
assignee_statusupcoming
assignee_statuslater
assignee_statusnew
assignee_statusinbox
resource_subtypedefault_task
resource_subtypemilestone
resource_subtypesection
resource_subtypeapproval

Responses

StatusDescription
200 TaskSuccessfully updated the specified task.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Delete a task

Code samples

curl -X DELETE https://app.asana.com/api/1.0/tasks/{task_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

DELETE /tasks/{task_gid}

A specific, existing task can be deleted by making a DELETE request on the URL for that task. Deleted tasks go into the “trash” of the user making the delete request. Tasks can be recovered from the trash within a period of 30 days; afterward they are completely removed from the system.

Returns an empty data record.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully deleted the specified task.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Duplicate a task

Code samples

curl -X POST https://app.asana.com/api/1.0/tasks/{task_gid}/duplicate \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "include": [
      "notes",
      "assignee"
    ],
    "name": "New Task Name"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "job",
    "new_project": {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    },
    "new_project_template": {
      "gid": "12345",
      "resource_type": "project_template",
      "name": "Packing list"
    },
    "new_task": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "resource_subtype": "duplicate_task",
    "status": "in_progress"
  }
}

See input/output options to include more fields in your response.

POST /tasks/{task_gid}/duplicate

Creates and returns a job that will asynchronously handle the duplication.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
body object
required
Describes the duplicate's name and the fields that will be duplicated.
data objectnone
include stringThe fields that will be duplicated to the new task.
name stringThe name of the new task.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Enumerated Values

ParameterValue
includenotes
includeassignee
includesubtasks
includeattachments
includetags
includefollowers
includeprojects
includedates
includedependencies
includeparent

Responses

StatusDescription
201 JobSuccessfully created the job to handle duplication.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get tasks from a project

Code samples

curl -X GET https://app.asana.com/api/1.0/projects/{project_gid}/tasks \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    }
  ]
}

See input/output options to include more fields in your response.

GET /projects/{project_gid}/tasks

Returns the compact task records for all tasks within the given project, ordered by their priority within the project. Tasks can exist in more than one project at a time.

Parameters

NameDescription
/project_gid string
required
Globally unique identifier for the project.
?completed_since stringOnly return tasks that are either incomplete or that have been completed since this time. Accepts a date-time string or the keyword now.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Detailed descriptions

completed_since: Only return tasks that are either incomplete or that have been completed since this time. Accepts a date-time string or the keyword now.

Responses

StatusDescription
200 TaskCompactSuccessfully retrieved the requested project's tasks.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get tasks from a section

Code samples

curl -X GET https://app.asana.com/api/1.0/sections/{section_gid}/tasks \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    }
  ]
}

See input/output options to include more fields in your response.

GET /sections/{section_gid}/tasks

Board view only: Returns the compact section records for all tasks within the given section.

Parameters

NameDescription
/section_gid string
required
The globally unique identifier for the section.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TaskCompactSuccessfully retrieved the section's tasks.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get tasks from a tag

Code samples

curl -X GET https://app.asana.com/api/1.0/tags/{tag_gid}/tasks \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    }
  ]
}

See input/output options to include more fields in your response.

GET /tags/{tag_gid}/tasks

Returns the compact task records for all tasks with the given tag. Tasks can have more than one tag at a time.

Parameters

NameDescription
/tag_gid string
required
Globally unique identifier for the tag.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TaskCompactSuccessfully retrieved the tasks associated with the specified tag.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get tasks from a user task list

Code samples

curl -X GET https://app.asana.com/api/1.0/user_task_lists/{user_task_list_gid}/tasks \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    }
  ]
}

See input/output options to include more fields in your response.

GET /user_task_lists/{user_task_list_gid}/tasks

Returns the compact list of tasks in a user’s My Tasks list. Note: Access control is enforced for this endpoint as with all Asana API endpoints, meaning a user’s private tasks will be filtered out if the API-authenticated user does not have access to them. Note: Both complete and incomplete tasks are returned by default unless they are filtered out (for example, setting completed_since=now will return only incomplete tasks, which is the default view for “My Tasks” in Asana.)

Parameters

NameDescription
/user_task_list_gid string
required
Globally unique identifier for the user task list.
?completed_since stringOnly return tasks that are either incomplete or that have been completed since this time. Accepts a date-time string or the keyword now.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Detailed descriptions

completed_since: Only return tasks that are either incomplete or that have been completed since this time. Accepts a date-time string or the keyword now.

Responses

StatusDescription
200 TaskCompactSuccessfully retrieved the user task list's tasks.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get subtasks from a task

Code samples

curl -X GET https://app.asana.com/api/1.0/tasks/{task_gid}/subtasks \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    }
  ]
}

See input/output options to include more fields in your response.

GET /tasks/{task_gid}/subtasks

Returns a compact representation of all of the subtasks of a task.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
?limit integerResults per page.
?offset stringOffset token.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TaskCompactSuccessfully retrieved the specified task's subtasks.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Create a subtask

Code samples

curl -X POST https://app.asana.com/api/1.0/tasks/{task_gid}/subtasks \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "approval_status": "pending",
    "assignee": "12345",
    "assignee_section": "12345",
    "assignee_status": "upcoming",
    "completed": false,
    "completed_by": {
      "name": "Greg Sanchez"
    },
    "custom_fields": {
      "4578152156": "Not Started",
      "5678904321": "On Hold"
    },
    "due_at": "2019-09-15T02:06:58.147Z",
    "due_on": "2019-09-15",
    "external": {
      "data": "A blob of information",
      "gid": "my_gid"
    },
    "followers": [
      "12345"
    ],
    "html_notes": "<body>Mittens <em>really</em> likes the stuff from Humboldt.</body>",
    "liked": true,
    "name": "Buy catnip",
    "notes": "Mittens really likes the stuff from Humboldt.",
    "parent": "12345",
    "projects": [
      "12345"
    ],
    "resource_subtype": "default_task",
    "start_at": "2019-09-14T02:06:58.147Z",
    "start_on": "2019-09-14",
    "tags": [
      "12345"
    ],
    "workspace": "12345"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "task",
    "actual_time_minutes": 200,
    "approval_status": "pending",
    "assignee_status": "upcoming",
    "completed": false,
    "completed_at": "2012-02-22T02:06:58.147Z",
    "completed_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_at": "2012-02-22T02:06:58.147Z",
    "dependencies": [
      {
        "gid": "12345",
        "resource_type": "task"
      }
    ],
    "dependents": [
      {
        "gid": "12345",
        "resource_type": "task"
      }
    ],
    "due_at": "2019-09-15T02:06:58.147Z",
    "due_on": "2019-09-15",
    "external": {
      "data": "A blob of information",
      "gid": "my_gid"
    },
    "hearted": true,
    "hearts": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "html_notes": "<body>Mittens <em>really</em> likes the stuff from Humboldt.</body>",
    "is_rendered_as_separator": false,
    "liked": true,
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "memberships": [
      {
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "section": {
          "gid": "12345",
          "resource_type": "section",
          "name": "Next Actions"
        }
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "name": "Buy catnip",
    "notes": "Mittens really likes the stuff from Humboldt.",
    "num_hearts": 5,
    "num_likes": 5,
    "num_subtasks": 3,
    "resource_subtype": "default_task",
    "start_at": "2019-09-14T02:06:58.147Z",
    "start_on": "2019-09-14",
    "assignee": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "assignee_section": {
      "gid": "12345",
      "resource_type": "section",
      "name": "Next Actions"
    },
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "asana_created_field": "priority",
        "created_by": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        },
        "currency_code": "EUR",
        "custom_label": "gold pieces",
        "custom_label_position": "suffix",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "description": "Development team priority",
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "format": "custom",
        "has_notifications_enabled": true,
        "is_global_to_workspace": true,
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "people_value": [
          {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          }
        ],
        "precision": 2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "parent": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "projects": [
      {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      }
    ],
    "tags": [
      {
        "gid": "59746",
        "name": "Grade A"
      }
    ],
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

POST /tasks/{task_gid}/subtasks

Creates a new subtask and adds it to the parent task. Returns the full record for the newly created subtask.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
body object
required
The new subtask to create.
data objectThe task is the basic object around which many operations in Asana are centered.
approval_status stringConditional Reflects the approval status of this task. This field is kept in sync with completed, meaning pending translates to false while approved, rejected, and changes_requested translate to true. If you set completed to true, this field will be set to approved.
assignee string¦nullGid of a user.
assignee_section string¦nullThe assignee section is a subdivision of a project that groups tasks together in the assignee's "My Tasks" list. It can either be a header above a list of tasks in a list view or a column in a board view of "My Tasks."
assignee_status stringDeprecated Scheduling status of this task for the user it is assigned to. This field can only be set if the assignee is non-null. Setting this field to "inbox" or "upcoming" inserts it at the top of the section, while the other options will insert at the bottom.
completed booleanTrue if the task is currently marked complete, false if not.
completed_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
name stringRead-only except when same user as requester. The user’s name.
custom_fields objectAn object where each key is a Custom Field GID and each value is an enum GID, string, number, object, or array.
due_at string(date)¦nullThe UTC date and time on which this task is due, or null if the task has no due time. This takes an ISO 8601 date string in UTC and should not be used together with due_on.
due_on string(date)¦nullThe localized date on which this task is due, or null if the task has no due date. This takes a date with YYYY-MM-DD format and should not be used together with due_at.
external objectOAuth Required. Conditional. This field is returned only if external values are set or included by using Opt In.
data stringnone
gid stringnone
followers [string]Create-Only An array of strings identifying users. These can either be the string "me", an email, or the gid of a user. In order to change followers on an existing task use addFollowers and removeFollowers.
html_notes stringOpt In. The notes of the text with formatting as HTML.
liked booleanTrue if the task is liked by the authorized user, false if not.
name stringName of the task. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
notes stringFree-form textual information associated with the task (i.e. its description).
parent string¦nullGid of a task.
projects [string]Create-Only Array of project gids. In order to change projects on an existing task use addProject and removeProject.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
start_at string(date)¦nullDate and time on which work begins for the task, or null if the task has no start time. This takes an ISO 8601 date string in UTC and should not be used together with start_on.
start_on string(date)¦nullThe day on which work begins for the task , or null if the task has no start date. This takes a date with YYYY-MM-DD format and should not be used together with start_at.
tags [string]Create-Only Array of tag gids. In order to change tags on an existing task use addTag and removeTag.
workspace stringGid of a workspace.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Detailed descriptions

assignee_section: The assignee section is a subdivision of a project that groups tasks together in the assignee's "My Tasks" list. It can either be a header above a list of tasks in a list view or a column in a board view of "My Tasks." The assignee_section property will be returned in the response only if the request was sent by the user who is the assignee of the task. Note that you can only write to assignee_section with the gid of an existing section visible in the user's "My Tasks" list.

external: OAuth Required. Conditional. This field is returned only if external values are set or included by using Opt In. The external field allows you to store app-specific metadata on tasks, including a gid that can be used to retrieve tasks and a data blob that can store app-specific character strings. Note that you will need to authenticate with Oauth to access or modify this data. Once an external gid is set, you can use the notation external:custom_gid to reference your object anywhere in the API where you may use the original object gid. See the page on Custom External Data for more details.

resource_subtype: The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning. The resource_subtype milestone represent a single moment in time. This means tasks with this subtype cannot have a start_date.

start_at: Date and time on which work begins for the task, or null if the task has no start time. This takes an ISO 8601 date string in UTC and should not be used together with start_on. Note: due_at must be present in the request when setting or unsetting the start_at parameter.

start_on: The day on which work begins for the task , or null if the task has no start date. This takes a date with YYYY-MM-DD format and should not be used together with start_at. Note: due_on or due_at must be present in the request when setting or unsetting the start_on parameter.

Enumerated Values

ParameterValue
approval_statuspending
approval_statusapproved
approval_statusrejected
approval_statuschanges_requested
assignee_statustoday
assignee_statusupcoming
assignee_statuslater
assignee_statusnew
assignee_statusinbox
resource_subtypedefault_task
resource_subtypemilestone
resource_subtypesection
resource_subtypeapproval

Responses

StatusDescription
201 TaskSuccessfully created the specified subtask.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Set the parent of a task

Code samples

curl -X POST https://app.asana.com/api/1.0/tasks/{task_gid}/setParent \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "insert_after": "null",
    "insert_before": "124816",
    "parent": "987654"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "task",
    "actual_time_minutes": 200,
    "approval_status": "pending",
    "assignee_status": "upcoming",
    "completed": false,
    "completed_at": "2012-02-22T02:06:58.147Z",
    "completed_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_at": "2012-02-22T02:06:58.147Z",
    "dependencies": [
      {
        "gid": "12345",
        "resource_type": "task"
      }
    ],
    "dependents": [
      {
        "gid": "12345",
        "resource_type": "task"
      }
    ],
    "due_at": "2019-09-15T02:06:58.147Z",
    "due_on": "2019-09-15",
    "external": {
      "data": "A blob of information",
      "gid": "my_gid"
    },
    "hearted": true,
    "hearts": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "html_notes": "<body>Mittens <em>really</em> likes the stuff from Humboldt.</body>",
    "is_rendered_as_separator": false,
    "liked": true,
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "memberships": [
      {
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "section": {
          "gid": "12345",
          "resource_type": "section",
          "name": "Next Actions"
        }
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "name": "Buy catnip",
    "notes": "Mittens really likes the stuff from Humboldt.",
    "num_hearts": 5,
    "num_likes": 5,
    "num_subtasks": 3,
    "resource_subtype": "default_task",
    "start_at": "2019-09-14T02:06:58.147Z",
    "start_on": "2019-09-14",
    "assignee": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "assignee_section": {
      "gid": "12345",
      "resource_type": "section",
      "name": "Next Actions"
    },
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "asana_created_field": "priority",
        "created_by": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        },
        "currency_code": "EUR",
        "custom_label": "gold pieces",
        "custom_label_position": "suffix",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "description": "Development team priority",
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "format": "custom",
        "has_notifications_enabled": true,
        "is_global_to_workspace": true,
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "people_value": [
          {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          }
        ],
        "precision": 2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "parent": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "projects": [
      {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      }
    ],
    "tags": [
      {
        "gid": "59746",
        "name": "Grade A"
      }
    ],
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

POST /tasks/{task_gid}/setParent

parent, or no parent task at all. Returns an empty data block. When using insert_before and insert_after, at most one of those two options can be specified, and they must already be subtasks of the parent.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
body object
required
The new parent of the subtask.
data objectnone
insert_after stringA subtask of the parent to insert the task after, or null to insert at the beginning of the list.
insert_before stringA subtask of the parent to insert the task before, or null to insert at the end of the list.
parent string
required
The new parent of the task, or null for no parent.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TaskSuccessfully changed the parent of the specified subtask.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get dependencies from a task

Code samples

curl -X GET https://app.asana.com/api/1.0/tasks/{task_gid}/dependencies \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    }
  ]
}

See input/output options to include more fields in your response.

GET /tasks/{task_gid}/dependencies

Returns the compact representations of all of the dependencies of a task.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TaskCompactSuccessfully retrieved the specified task's dependencies.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
402 ErrorThe request was valid, but the queried object or object mutation specified in the request is above your current premium level.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Set dependencies for a task

Code samples

curl -X POST https://app.asana.com/api/1.0/tasks/{task_gid}/addDependencies \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "dependencies": [
      "133713",
      "184253"
    ]
  }
}

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

POST /tasks/{task_gid}/addDependencies

Marks a set of tasks as dependencies of this task, if they are not already dependencies. A task can have at most 30 dependents and dependencies combined.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
body object
required
The list of tasks to set as dependencies.
data objectnone
dependencies [string]An array of task gids that a task depends on.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully set the specified dependencies on the task.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
402 ErrorThe request was valid, but the queried object or object mutation specified in the request is above your current premium level.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Code samples

curl -X POST https://app.asana.com/api/1.0/tasks/{task_gid}/removeDependencies \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "dependencies": [
      "133713",
      "184253"
    ]
  }
}

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

POST /tasks/{task_gid}/removeDependencies

Unlinks a set of dependencies from this task.

NameDescription
/task_gid string
required
The task to operate on.
body object
required
The list of tasks to unlink as dependencies.
data objectnone
dependencies [string]An array of task gids that a task depends on.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑
StatusDescription
200 InlineSuccessfully unlinked the dependencies from the specified task.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
402 ErrorThe request was valid, but the queried object or object mutation specified in the request is above your current premium level.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Get dependents from a task

Code samples

curl -X GET https://app.asana.com/api/1.0/tasks/{task_gid}/dependents \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    }
  ]
}

See input/output options to include more fields in your response.

GET /tasks/{task_gid}/dependents

Returns the compact representations of all of the dependents of a task.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TaskCompactSuccessfully retrieved the specified dependents of the task.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
402 ErrorThe request was valid, but the queried object or object mutation specified in the request is above your current premium level.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Set dependents for a task

Code samples

curl -X POST https://app.asana.com/api/1.0/tasks/{task_gid}/addDependents \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "dependents": [
      "133713",
      "184253"
    ]
  }
}

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

POST /tasks/{task_gid}/addDependents

Marks a set of tasks as dependents of this task, if they are not already dependents. A task can have at most 30 dependents and dependencies combined.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
body object
required
The list of tasks to add as dependents.
data objectA set of dependent tasks.
dependents [string]An array of task gids that are dependents of the given task.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully set the specified dependents on the given task.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
402 ErrorThe request was valid, but the queried object or object mutation specified in the request is above your current premium level.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Code samples

curl -X POST https://app.asana.com/api/1.0/tasks/{task_gid}/removeDependents \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "dependents": [
      "133713",
      "184253"
    ]
  }
}

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

POST /tasks/{task_gid}/removeDependents

Unlinks a set of dependents from this task.

NameDescription
/task_gid string
required
The task to operate on.
body object
required
The list of tasks to remove as dependents.
data objectA set of dependent tasks.
dependents [string]An array of task gids that are dependents of the given task.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑
StatusDescription
200 InlineSuccessfully unlinked the specified tasks as dependents.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
402 ErrorThe request was valid, but the queried object or object mutation specified in the request is above your current premium level.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Add a project to a task

Code samples

curl -X POST https://app.asana.com/api/1.0/tasks/{task_gid}/addProject \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "insert_after": "124816",
    "insert_before": "432134",
    "project": "13579",
    "section": "987654"
  }
}

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

POST /tasks/{task_gid}/addProject

Adds the task to the specified project, in the optional location specified. If no location arguments are given, the task will be added to the end of the project.

addProject can also be used to reorder a task within a project or section that already contains it.

At most one of insert_before, insert_after, or section should be specified. Inserting into a section in an non-order-dependent way can be done by specifying section, otherwise, to insert within a section in a particular place, specify insert_before or insert_after and a task within the section to anchor the position of this task.

Returns an empty data block.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
body object
required
The project to add the task to.
data objectnone
insert_after string¦nullA task in the project to insert the task after, or null to insert at the beginning of the list.
insert_before string¦nullA task in the project to insert the task before, or null to insert at the end of the list.
project string
required
The project to add the task to.
section string¦nullA section in the project to insert the task into. The task will be inserted at the bottom of the section.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully added the specified project to the task.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Remove a project from a task

Code samples

curl -X POST https://app.asana.com/api/1.0/tasks/{task_gid}/removeProject \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "project": "13579"
  }
}

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

POST /tasks/{task_gid}/removeProject

Removes the task from the specified project. The task will still exist in the system, but it will not be in the project anymore.

Returns an empty data block.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
body object
required
The project to remove the task from.
data objectnone
project string
required
The project to remove the task from.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully removed the specified project from the task.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Add a tag to a task

Code samples

curl -X POST https://app.asana.com/api/1.0/tasks/{task_gid}/addTag \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "tag": "13579"
  }
}

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

POST /tasks/{task_gid}/addTag

Adds a tag to a task. Returns an empty data block.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
body object
required
The tag to add to the task.
data objectnone
tag string
required
The tag to add to the task.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully added the specified tag to the task.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Remove a tag from a task

Code samples

curl -X POST https://app.asana.com/api/1.0/tasks/{task_gid}/removeTag \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "tag": "13579"
  }
}

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

POST /tasks/{task_gid}/removeTag

Removes a tag from a task. Returns an empty data block.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
body object
required
The tag to remove from the task.
data objectnone
tag string
required
The tag to remove from the task.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully removed the specified tag from the task.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Add followers to a task

Code samples

curl -X POST https://app.asana.com/api/1.0/tasks/{task_gid}/addFollowers \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "followers": [
      "13579",
      "321654"
    ]
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "task",
    "actual_time_minutes": 200,
    "approval_status": "pending",
    "assignee_status": "upcoming",
    "completed": false,
    "completed_at": "2012-02-22T02:06:58.147Z",
    "completed_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_at": "2012-02-22T02:06:58.147Z",
    "dependencies": [
      {
        "gid": "12345",
        "resource_type": "task"
      }
    ],
    "dependents": [
      {
        "gid": "12345",
        "resource_type": "task"
      }
    ],
    "due_at": "2019-09-15T02:06:58.147Z",
    "due_on": "2019-09-15",
    "external": {
      "data": "A blob of information",
      "gid": "my_gid"
    },
    "hearted": true,
    "hearts": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "html_notes": "<body>Mittens <em>really</em> likes the stuff from Humboldt.</body>",
    "is_rendered_as_separator": false,
    "liked": true,
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "memberships": [
      {
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "section": {
          "gid": "12345",
          "resource_type": "section",
          "name": "Next Actions"
        }
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "name": "Buy catnip",
    "notes": "Mittens really likes the stuff from Humboldt.",
    "num_hearts": 5,
    "num_likes": 5,
    "num_subtasks": 3,
    "resource_subtype": "default_task",
    "start_at": "2019-09-14T02:06:58.147Z",
    "start_on": "2019-09-14",
    "assignee": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "assignee_section": {
      "gid": "12345",
      "resource_type": "section",
      "name": "Next Actions"
    },
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "asana_created_field": "priority",
        "created_by": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        },
        "currency_code": "EUR",
        "custom_label": "gold pieces",
        "custom_label_position": "suffix",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "description": "Development team priority",
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "format": "custom",
        "has_notifications_enabled": true,
        "is_global_to_workspace": true,
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "people_value": [
          {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          }
        ],
        "precision": 2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "parent": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "projects": [
      {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      }
    ],
    "tags": [
      {
        "gid": "59746",
        "name": "Grade A"
      }
    ],
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

POST /tasks/{task_gid}/addFollowers

Adds followers to a task. Returns an empty data block. Each task can be associated with zero or more followers in the system. Requests to add/remove followers, if successful, will return the complete updated task record, described above.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
body object
required
The followers to add to the task.
data objectnone
followers [string]
required
An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TaskSuccessfully added the specified followers to the task.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Remove followers from a task

Code samples

curl -X POST https://app.asana.com/api/1.0/tasks/{task_gid}/removeFollowers \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "followers": [
      "13579",
      "321654"
    ]
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "task",
    "actual_time_minutes": 200,
    "approval_status": "pending",
    "assignee_status": "upcoming",
    "completed": false,
    "completed_at": "2012-02-22T02:06:58.147Z",
    "completed_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "created_at": "2012-02-22T02:06:58.147Z",
    "dependencies": [
      {
        "gid": "12345",
        "resource_type": "task"
      }
    ],
    "dependents": [
      {
        "gid": "12345",
        "resource_type": "task"
      }
    ],
    "due_at": "2019-09-15T02:06:58.147Z",
    "due_on": "2019-09-15",
    "external": {
      "data": "A blob of information",
      "gid": "my_gid"
    },
    "hearted": true,
    "hearts": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "html_notes": "<body>Mittens <em>really</em> likes the stuff from Humboldt.</body>",
    "is_rendered_as_separator": false,
    "liked": true,
    "likes": [
      {
        "gid": "12345",
        "user": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      }
    ],
    "memberships": [
      {
        "project": {
          "gid": "12345",
          "resource_type": "project",
          "name": "Stuff to buy"
        },
        "section": {
          "gid": "12345",
          "resource_type": "section",
          "name": "Next Actions"
        }
      }
    ],
    "modified_at": "2012-02-22T02:06:58.147Z",
    "name": "Buy catnip",
    "notes": "Mittens really likes the stuff from Humboldt.",
    "num_hearts": 5,
    "num_likes": 5,
    "num_subtasks": 3,
    "resource_subtype": "default_task",
    "start_at": "2019-09-14T02:06:58.147Z",
    "start_on": "2019-09-14",
    "assignee": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "assignee_section": {
      "gid": "12345",
      "resource_type": "section",
      "name": "Next Actions"
    },
    "custom_fields": [
      {
        "gid": "12345",
        "resource_type": "custom_field",
        "asana_created_field": "priority",
        "created_by": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        },
        "currency_code": "EUR",
        "custom_label": "gold pieces",
        "custom_label_position": "suffix",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "description": "Development team priority",
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "format": "custom",
        "has_notifications_enabled": true,
        "is_global_to_workspace": true,
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "people_value": [
          {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          }
        ],
        "precision": 2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      }
    ],
    "followers": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "parent": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "projects": [
      {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      }
    ],
    "tags": [
      {
        "gid": "59746",
        "name": "Grade A"
      }
    ],
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

POST /tasks/{task_gid}/removeFollowers

Removes each of the specified followers from the task if they are following. Returns the complete, updated record for the affected task.

Parameters

NameDescription
/task_gid string
required
The task to operate on.
body object
required
The followers to remove from the task.
data objectnone
followers [string]
required
An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TaskSuccessfully removed the specified followers from the task.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Search tasks in a workspace

Code samples

curl -X GET https://app.asana.com/api/1.0/workspaces/{workspace_gid}/tasks/search \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task",
      "resource_subtype": "default_task"
    }
  ]
}

See input/output options to include more fields in your response.

GET /workspaces/{workspace_gid}/tasks/search

To mirror the functionality of the Asana web app's advanced search feature, the Asana API has a task search endpoint that allows you to build complex filters to find and retrieve the exact data you need.

Premium access

Like the Asana web product's advance search feature, this search endpoint will only be available to premium Asana users. A user is premium if any of the following is true:

  • The workspace in which the search is being performed is a premium workspace - The user is a member of a premium team inside the workspace

Even if a user is only a member of a premium team inside a non-premium workspace, search will allow them to find data anywhere in the workspace, not just inside the premium team. Making a search request using credentials of a non-premium user will result in a 402 Payment Required error.

Pagination

Search results are not stable; repeating the same query multiple times may return the data in a different order, even if the data do not change. Because of this, the traditional pagination available elsewhere in the Asana API is not available here. However, you can paginate manually by sorting the search results by their creation time and then modifying each subsequent query to exclude data you have already seen. Page sizes are limited to a maximum of 100 items, and can be specified by the limit query parameter.

Eventual consistency

Changes in Asana (regardless of whether they’re made though the web product or the API) are forwarded to our search infrastructure to be indexed. This process can take between 10 and 60 seconds to complete under normal operation, and longer during some production incidents. Making a change to a task that would alter its presence in a particular search query will not be reflected immediately. This is also true of the advanced search feature in the web product.

Rate limits

You may receive a 429 Too Many Requests response if you hit any of our rate limits.

Custom field parameters

Parameter nameCustom field typeAccepted type
custom_fields.{gid}.is_setAllBoolean
custom_fields.{gid}.valueTextString
custom_fields.{gid}.valueNumberNumber
custom_fields.{gid}.valueEnumEnum option ID
custom_fields.{gid}.starts_withText onlyString
custom_fields.{gid}.ends_withText onlyString
custom_fields.{gid}.containsText onlyString
custom_fields.{gid}.less_thanNumber onlyNumber
custom_fields.{gid}.greater_thanNumber onlyNumber

For example, if the gid of the custom field is 12345, these query parameter to find tasks where it is set would be custom_fields.12345.is_set=true. To match an exact value for an enum custom field, use the gid of the desired enum option and not the name of the enum option: custom_fields.12345.value=67890.

Not Supported: searching for multiple exact matches of a custom field, searching for multi-enum custom field

Note: If you specify projects.any and sections.any, you will receive tasks for the project **and* tasks for the section. If you're looking for only tasks in a section, omit the projects.any from the request.*

Parameters

NameDescription
/workspace_gid string
required
Globally unique identifier for the workspace or organization.
?text stringPerforms full-text search on both task name and description
?resource_subtype stringFilters results by the task's resource_subtype
?assignee.any stringComma-separated list of user identifiers
?assignee.not stringComma-separated list of user identifiers
?portfolios.any stringComma-separated list of portfolio IDs
?projects.any stringComma-separated list of project IDs
?projects.not stringComma-separated list of project IDs
?projects.all stringComma-separated list of project IDs
?sections.any stringComma-separated list of section or column IDs
?sections.not stringComma-separated list of section or column IDs
?sections.all stringComma-separated list of section or column IDs
?tags.any stringComma-separated list of tag IDs
?tags.not stringComma-separated list of tag IDs
?tags.all stringComma-separated list of tag IDs
?teams.any stringComma-separated list of team IDs
?followers.not stringComma-separated list of user identifiers
?created_by.any stringComma-separated list of user identifiers
?created_by.not stringComma-separated list of user identifiers
?assigned_by.any stringComma-separated list of user identifiers
?assigned_by.not stringComma-separated list of user identifiers
?liked_by.not stringComma-separated list of user identifiers
?commented_on_by.not stringComma-separated list of user identifiers
?due_on.before string(date)ISO 8601 date string
?due_on.after string(date)ISO 8601 date string
?due_on string(date)ISO 8601 date string or null
?due_at.before string(date-time)ISO 8601 datetime string
?due_at.after string(date-time)ISO 8601 datetime string
?start_on.before string(date)ISO 8601 date string
?start_on.after string(date)ISO 8601 date string
?start_on string(date)ISO 8601 date string or null
?created_on.before string(date)ISO 8601 date string
?created_on.after string(date)ISO 8601 date string
?created_on string(date)ISO 8601 date string or null
?created_at.before string(date-time)ISO 8601 datetime string
?created_at.after string(date-time)ISO 8601 datetime string
?completed_on.before string(date)ISO 8601 date string
?completed_on.after string(date)ISO 8601 date string
?completed_on string(date)ISO 8601 date string or null
?completed_at.before string(date-time)ISO 8601 datetime string
?completed_at.after string(date-time)ISO 8601 datetime string
?modified_on.before string(date)ISO 8601 date string
?modified_on.after string(date)ISO 8601 date string
?modified_on string(date)ISO 8601 date string or null
?modified_at.before string(date-time)ISO 8601 datetime string
?modified_at.after string(date-time)ISO 8601 datetime string
?is_blocking booleanFilter to incomplete tasks with dependents
?is_blocked booleanFilter to tasks with incomplete dependencies
?has_attachment booleanFilter to tasks with attachments
?completed booleanFilter to completed tasks
?is_subtask booleanFilter to subtasks
?sort_by stringOne of due_date, created_at, completed_at, likes, or modified_at, defaults to modified_at
?sort_ascending booleanDefault false
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Enumerated Values

ParameterValue
resource_subtypedefault_task
resource_subtypemilestone
sort_bydue_date
sort_bycreated_at
sort_bycompleted_at
sort_bylikes
sort_bymodified_at

Responses

StatusDescription
200 TaskCompactSuccessfully retrieved the section's tasks.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Teams

POST /teams
PUT /teams
GET /teams/{team_gid}
GET /workspaces/{workspace_gid}/teams
GET /users/{user_gid}/teams
POST /teams/{team_gid}/addUser
POST /teams/{team_gid}/removeUser

A team is used to group related projects and people together within an organization. Each project in an organization is associated with a team.


Create a team

Code samples

curl -X POST https://app.asana.com/api/1.0/teams \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "description": "All developers should be members of this team.",
    "html_description": "<body><em>All</em> developers should be members of this team.</body>",
    "name": "Marketing",
    "organization": "123456789",
    "visibility": "secret"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "team",
    "name": "Marketing",
    "description": "All developers should be members of this team.",
    "html_description": "<body><em>All</em> developers should be members of this team.</body>",
    "organization": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "visibility": "secret"
  }
}

See input/output options to include more fields in your response.

POST /teams

Creates a team within the current workspace.

Parameters

NameDescription
body object
required
The team to create.
data objectA team is used to group related projects and people together within an organization. Each project in an organization is associated with a team.
description stringThe description of the team.
html_description stringThe description of the team with formatting as HTML.
name stringThe name of the team.
organization stringThe organization/workspace the team belongs to. This must be the same organization you are in and cannot be changed once set.
visibility stringThe visibility of the team to users in the same organization
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Enumerated Values

ParameterValue
visibilitysecret
visibilityrequest_to_join
visibilitypublic

Responses

StatusDescription
201 TeamSuccessfully created a new team.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Update a team

Code samples

curl -X PUT https://app.asana.com/api/1.0/teams \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "description": "All developers should be members of this team.",
    "html_description": "<body><em>All</em> developers should be members of this team.</body>",
    "name": "Marketing",
    "organization": "123456789",
    "visibility": "secret"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "team",
    "name": "Marketing",
    "description": "All developers should be members of this team.",
    "html_description": "<body><em>All</em> developers should be members of this team.</body>",
    "organization": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "visibility": "secret"
  }
}

See input/output options to include more fields in your response.

PUT /teams

Updates a team within the current workspace.

Parameters

NameDescription
body object
required
The team to update.
data objectA team is used to group related projects and people together within an organization. Each project in an organization is associated with a team.
description stringThe description of the team.
html_description stringThe description of the team with formatting as HTML.
name stringThe name of the team.
organization stringThe organization/workspace the team belongs to. This must be the same organization you are in and cannot be changed once set.
visibility stringThe visibility of the team to users in the same organization
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Enumerated Values

ParameterValue
visibilitysecret
visibilityrequest_to_join
visibilitypublic

Responses

StatusDescription
200 TeamSuccessfully updated the team.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get a team

Code samples

curl -X GET https://app.asana.com/api/1.0/teams/{team_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "team",
    "name": "Marketing",
    "description": "All developers should be members of this team.",
    "html_description": "<body><em>All</em> developers should be members of this team.</body>",
    "organization": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    },
    "permalink_url": "https://app.asana.com/0/resource/123456789/list",
    "visibility": "secret"
  }
}

See input/output options to include more fields in your response.

GET /teams/{team_gid}

Returns the full record for a single team.

Parameters

NameDescription
/team_gid string
required
Globally unique identifier for the team.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TeamSuccessfully retrieved the record for a single team.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get teams in a workspace

Code samples

curl -X GET https://app.asana.com/api/1.0/workspaces/{workspace_gid}/teams \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    }
  ]
}

See input/output options to include more fields in your response.

GET /workspaces/{workspace_gid}/teams

Returns the compact records for all teams in the workspace visible to the authorized user.

Parameters

NameDescription
/workspace_gid string
required
Globally unique identifier for the workspace or organization.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TeamCompactReturns the team records for all teams in the organization or workspace accessible to the authenticated user.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get teams for a user

Code samples

curl -X GET https://app.asana.com/api/1.0/users/{user_gid}/teams?organization=1331 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    }
  ]
}

See input/output options to include more fields in your response.

GET /users/{user_gid}/teams

Returns the compact records for all teams to which the given user is assigned.

Parameters

NameDescription
/user_gid string
required
A string identifying a user. This can either be the string "me", an email, or the gid of a user.
?organization string
required
The workspace or organization to filter teams on.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TeamCompactReturns the team records for all teams in the organization or workspace to which the given user is assigned.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Add a user to a team

Code samples

curl -X POST https://app.asana.com/api/1.0/teams/{team_gid}/addUser \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "user": "12345"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "team_membership",
    "is_guest": false,
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    },
    "user": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    }
  }
}

See input/output options to include more fields in your response.

POST /teams/{team_gid}/addUser

The user making this call must be a member of the team in order to add others. The user being added must exist in the same organization as the team.

Returns the complete team membership record for the newly added user.

Parameters

NameDescription
/team_gid string
required
Globally unique identifier for the team.
body object
required
The user to add to the team.
data objectA user identification object for specification with the addUser/removeUser endpoints.
user stringA string identifying a user. This can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TeamMembershipSuccessfully added user to the team.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Remove a user from a team

Code samples

curl -X POST https://app.asana.com/api/1.0/teams/{team_gid}/removeUser \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "user": "12345"
  }
}

204 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

POST /teams/{team_gid}/removeUser

The user making this call must be a member of the team in order to remove themselves or others.

Parameters

NameDescription
/team_gid string
required
Globally unique identifier for the team.
body object
required
The user to remove from the team.
data objectA user identification object for specification with the addUser/removeUser endpoints.
user stringA string identifying a user. This can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
204 InlineReturns an empty data record
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 204

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Team memberships

GET /team_memberships/{team_membership_gid}
GET /team_memberships
GET /teams/{team_gid}/team_memberships
GET /users/{user_gid}/team_memberships

This object determines if a user is a member of a team.


Get a team membership

Code samples

curl -X GET https://app.asana.com/api/1.0/team_memberships/{team_membership_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "team_membership",
    "is_guest": false,
    "team": {
      "gid": "12345",
      "resource_type": "team",
      "name": "Marketing"
    },
    "user": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    }
  }
}

See input/output options to include more fields in your response.

GET /team_memberships/{team_membership_gid}

Returns the complete team membership record for a single team membership.

Parameters

NameDescription
/team_membership_gid string
required
none
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TeamMembershipSuccessfully retrieved the requested team membership.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get team memberships

Code samples

curl -X GET https://app.asana.com/api/1.0/team_memberships \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "team_membership",
      "is_guest": false,
      "team": {
        "gid": "12345",
        "resource_type": "team",
        "name": "Marketing"
      },
      "user": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    }
  ]
}

See input/output options to include more fields in your response.

GET /team_memberships

Returns compact team membership records.

Parameters

NameDescription
?team stringGlobally unique identifier for the team.
?user stringA string identifying a user. This can either be the string "me", an email, or the gid of a user. This parameter must be used with the workspace parameter.
?workspace stringGlobally unique identifier for the workspace. This parameter must be used with the user parameter.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TeamMembershipCompactSuccessfully retrieved the requested team memberships.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get memberships from a team

Code samples

curl -X GET https://app.asana.com/api/1.0/teams/{team_gid}/team_memberships \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "team_membership",
      "is_guest": false,
      "team": {
        "gid": "12345",
        "resource_type": "team",
        "name": "Marketing"
      },
      "user": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    }
  ]
}

See input/output options to include more fields in your response.

GET /teams/{team_gid}/team_memberships

Returns the compact team memberships for the team.

Parameters

NameDescription
/team_gid string
required
Globally unique identifier for the team.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TeamMembershipCompactSuccessfully retrieved the requested team's memberships.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get memberships from a user

Code samples

curl -X GET https://app.asana.com/api/1.0/users/{user_gid}/team_memberships?workspace=31326 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "team_membership",
      "is_guest": false,
      "team": {
        "gid": "12345",
        "resource_type": "team",
        "name": "Marketing"
      },
      "user": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    }
  ]
}

See input/output options to include more fields in your response.

GET /users/{user_gid}/team_memberships

Returns the compact team membership records for the user.

Parameters

NameDescription
/user_gid string
required
A string identifying a user. This can either be the string "me", an email, or the gid of a user.
?workspace string
required
Globally unique identifier for the workspace.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TeamMembershipCompactSuccessfully retrieved the requested users's memberships.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Time periods

GET /time_periods/{time_period_gid}
GET /time_periods

A time period is an object that represents a domain-scoped date range that can be set on goals.


Get a time period

Code samples

curl -X GET https://app.asana.com/api/1.0/time_periods/{time_period_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "time_period",
    "display_name": "Q1 FY22",
    "end_on": "2019-09-14",
    "parent": {
      "gid": "12345",
      "resource_type": "time_period",
      "display_name": "Q1 FY22",
      "end_on": "2019-09-14",
      "period": "Q1",
      "start_on": "2019-09-13"
    },
    "period": "Q1",
    "start_on": "2019-09-13"
  }
}

See input/output options to include more fields in your response.

GET /time_periods/{time_period_gid}

Returns the full record for a single time period.

Parameters

NameDescription
/time_period_gid string
required
Globally unique identifier for the time period.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TimePeriodSuccessfully retrieved the record for a single time period.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get time periods

Code samples

curl -X GET https://app.asana.com/api/1.0/time_periods?workspace=31326 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "time_period",
      "display_name": "Q1 FY22",
      "end_on": "2019-09-14",
      "period": "Q1",
      "start_on": "2019-09-13"
    }
  ]
}

See input/output options to include more fields in your response.

GET /time_periods

Returns compact time period records.

Parameters

NameDescription
?start_on string(date)ISO 8601 date string
?end_on string(date)ISO 8601 date string
?workspace string
required
Globally unique identifier for the workspace.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 TimePeriodCompactSuccessfully retrieved the requested time periods.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Typeahead

GET /workspaces/{workspace_gid}/typeahead

The typeahead search API provides search for objects from a single workspace.


Get objects via typeahead

Code samples

curl -X GET https://app.asana.com/api/1.0/workspaces/{workspace_gid}/typeahead?resource_type=user \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task"
    }
  ]
}

See input/output options to include more fields in your response.

GET /workspaces/{workspace_gid}/typeahead

Retrieves objects in the workspace based via an auto-completion/typeahead search algorithm. This feature is meant to provide results quickly, so do not rely on this API to provide extremely accurate search results. The result set is limited to a single page of results with a maximum size, so you won’t be able to fetch large numbers of results.

The typeahead search API provides search for objects from a single workspace. This endpoint should be used to query for objects when creating an auto-completion/typeahead search feature. This API is meant to provide results quickly and should not be relied upon for accurate or exhaustive search results. The results sets are limited in size and cannot be paginated.

Queries return a compact representation of each object which is typically the gid and name fields. Interested in a specific set of fields or all of the fields?! Of course you are. Use field selectors to manipulate what data is included in a response.

Resources with type user are returned in order of most contacted to least contacted. This is determined by task assignments, adding the user to projects, and adding the user as a follower to tasks, messages, etc.

Resources with type project are returned in order of recency. This is determined when the user visits the project, is added to the project, and completes tasks in the project.

Resources with type task are returned with priority placed on tasks the user is following, but no guarantee on the order of those tasks.

Resources with type project_template are returned with priority placed on favorited project templates.

Leaving the query string empty or omitted will give you results, still following the resource ordering above. This could be used to list users or projects that are relevant for the requesting user's api token.

Parameters

NameDescription
/workspace_gid string
required
Globally unique identifier for the workspace or organization.
?resource_type string
required
The type of values the typeahead should return. You can choose from one of the following: custom_field, project, project_template, portfolio, tag, task, and user. Note that unlike in the names of endpoints, the types listed here are in singular form (e.g. task). Using multiple types is not yet supported.
?type stringDeprecated: new integrations should prefer the resource_type field.
?query stringThe string that will be used to search for relevant objects. If an empty string is passed in, the API will return results.
?count integerThe number of results to return. The default is 20 if this parameter is omitted, with a minimum of 1 and a maximum of 100. If there are fewer results found than requested, all will be returned.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Enumerated Values

ParameterValue
resource_typecustom_field
resource_typeproject
resource_typeproject_template
resource_typeportfolio
resource_typetag
resource_typetask
resource_typeuser
typecustom_field
typeportfolio
typeproject
typetag
typetask
typeuser

Responses

StatusDescription
200 AsanaNamedResourceSuccessfully retrieved objects via a typeahead search algorithm.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Users

GET /users
GET /users/{user_gid}
GET /users/{user_gid}/favorites
GET /teams/{team_gid}/users
GET /workspaces/{workspace_gid}/users

A user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.

Like other objects in the system, users are referred to by numerical IDs. However, the special string identifier me can be used anywhere a user ID is accepted, to refer to the current authenticated user (e.g, GET /users/me).


Get multiple users

Code samples

curl -X GET https://app.asana.com/api/1.0/users \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    }
  ]
}

See input/output options to include more fields in your response.

GET /users

Returns the user records for all users in all workspaces and organizations accessible to the authenticated user. Accepts an optional workspace ID parameter. Results are sorted by user ID.

Parameters

NameDescription
?workspace stringThe workspace or organization ID to filter users on.
?team stringThe team ID to filter users on.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 UserCompactSuccessfully retrieved the requested user records.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get a user

Code samples

curl -X GET https://app.asana.com/api/1.0/users/{user_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "user",
    "email": "gsanchez@example.com",
    "name": "Greg Sanchez",
    "photo": {
      "image_1024x1024": "https://...",
      "image_128x128": "https://...",
      "image_21x21": "https://...",
      "image_27x27": "https://...",
      "image_36x36": "https://...",
      "image_60x60": "https://..."
    },
    "workspaces": [
      {
        "gid": "12345",
        "resource_type": "workspace",
        "name": "My Company Workspace"
      }
    ]
  }
}

See input/output options to include more fields in your response.

GET /users/{user_gid}

Returns the full user record for the single user with the provided ID.

Parameters

NameDescription
/user_gid string
required
A string identifying a user. This can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 UserReturns the user specified.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get a user's favorites

Code samples

curl -X GET https://app.asana.com/api/1.0/users/{user_gid}/favorites?resource_type=project&workspace=1234 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task"
    }
  ]
}

See input/output options to include more fields in your response.

GET /users/{user_gid}/favorites

Returns all of a user's favorites in the given workspace, of the given type. Results are given in order (The same order as Asana's sidebar).

Parameters

NameDescription
/user_gid string
required
A string identifying a user. This can either be the string "me", an email, or the gid of a user.
?resource_type string
required
The resource type of favorites to be returned.
?workspace string
required
The workspace in which to get favorites.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Enumerated Values

ParameterValue
resource_typeportfolio
resource_typeproject
resource_typetag
resource_typetask
resource_typeuser
resource_typeproject_template

Responses

StatusDescription
200 AsanaNamedResourceReturns the specified user's favorites.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get users in a team

Code samples

curl -X GET https://app.asana.com/api/1.0/teams/{team_gid}/users \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    }
  ]
}

See input/output options to include more fields in your response.

GET /teams/{team_gid}/users

Returns the compact records for all users that are members of the team. Results are sorted alphabetically and limited to 2000. For more results use the /users endpoint.

Parameters

NameDescription
/team_gid string
required
Globally unique identifier for the team.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 UserCompactReturns the user records for all the members of the team, including guests and limited access users
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get users in a workspace or organization

Code samples

curl -X GET https://app.asana.com/api/1.0/workspaces/{workspace_gid}/users \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    }
  ]
}

See input/output options to include more fields in your response.

GET /workspaces/{workspace_gid}/users

Returns the compact records for all users in the specified workspace or organization. Results are sorted alphabetically and limited to 2000. For more results use the /users endpoint.

Parameters

NameDescription
/workspace_gid string
required
Globally unique identifier for the workspace or organization.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 UserCompactReturn the users in the specified workspace or org.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


User task lists

GET /user_task_lists/{user_task_list_gid}
GET /users/{user_gid}/user_task_list

A user task list represents the tasks assigned to a particular user. This list is the user's My Tasks list.


Get a user task list

Code samples

curl -X GET https://app.asana.com/api/1.0/user_task_lists/{user_task_list_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "user_task_list",
    "name": "My Tasks in My Workspace",
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

GET /user_task_lists/{user_task_list_gid}

Returns the full record for a user task list.

Parameters

NameDescription
/user_task_list_gid string
required
Globally unique identifier for the user task list.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 UserTaskListSuccessfully retrieved the user task list.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get a user's task list

Code samples

curl -X GET https://app.asana.com/api/1.0/users/{user_gid}/user_task_list?workspace=1234 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "user_task_list",
    "name": "My Tasks in My Workspace",
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  }
}

See input/output options to include more fields in your response.

GET /users/{user_gid}/user_task_list

Returns the full record for a user's task list.

Parameters

NameDescription
/user_gid string
required
A string identifying a user. This can either be the string "me", an email, or the gid of a user.
?workspace string
required
The workspace in which to get the user task list.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 UserTaskListSuccessfully retrieved the user's task list.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Webhooks

GET /webhooks
POST /webhooks
GET /webhooks/{webhook_gid}
PUT /webhooks/{webhook_gid}
DELETE /webhooks/{webhook_gid}

Webhooks allow you to subscribe to notifications about events that occur on Asana resources (e.g., tasks, projects, stories, etc.).

For a more detailed explanation of webhooks see the overview of webhooks.


Get multiple webhooks

Code samples

curl -X GET https://app.asana.com/api/1.0/webhooks?workspace=1331 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "webhook",
      "active": false,
      "resource": {
        "gid": "12345",
        "resource_type": "task",
        "name": "Bug Task"
      },
      "target": "https://example.com/receive-webhook/7654",
      "created_at": "2012-02-22T02:06:58.147Z",
      "filters": [
        {
          "action": "changed",
          "fields": [
            "due_at",
            "due_on",
            "dependencies"
          ],
          "resource_subtype": "milestone",
          "resource_type": "task"
        }
      ],
      "last_failure_at": "2012-02-22T02:06:58.147Z",
      "last_failure_content": "500 Server Error\\n\\nCould not complete the request",
      "last_success_at": "2012-02-22T02:06:58.147Z"
    }
  ]
}

See input/output options to include more fields in your response.

GET /webhooks

Get the compact representation of all webhooks your app has registered for the authenticated user in the given workspace.

Parameters

NameDescription
?workspace string
required
The workspace to query for webhooks in.
?resource stringOnly return webhooks for the given resource.
?limit integerResults per page.
?offset stringOffset token.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 WebhookSuccessfully retrieved the requested webhooks.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Establish a webhook

Code samples

curl -X POST https://app.asana.com/api/1.0/webhooks \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "filters": [
      {
        "action": "changed",
        "fields": [
          "due_at",
          "due_on",
          "dependencies"
        ],
        "resource_subtype": "milestone",
        "resource_type": "task"
      }
    ],
    "resource": "12345",
    "target": "https://example.com/receive-webhook/7654?app_specific_param=app_specific_value"
  }
}

201 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "webhook",
    "active": false,
    "resource": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task"
    },
    "target": "https://example.com/receive-webhook/7654",
    "created_at": "2012-02-22T02:06:58.147Z",
    "filters": [
      {
        "action": "changed",
        "fields": [
          "due_at",
          "due_on",
          "dependencies"
        ],
        "resource_subtype": "milestone",
        "resource_type": "task"
      }
    ],
    "last_failure_at": "2012-02-22T02:06:58.147Z",
    "last_failure_content": "500 Server Error\\n\\nCould not complete the request",
    "last_success_at": "2012-02-22T02:06:58.147Z"
  }
}

See input/output options to include more fields in your response.

POST /webhooks

Establishing a webhook is a two-part process. First, a simple HTTP POST request initiates the creation similar to creating any other resource.

Next, in the middle of this request comes the confirmation handshake. When a webhook is created, we will send a test POST to the target with an X-Hook-Secret header. The target must respond with a 200 OK or 204 No Content and a matching X-Hook-Secret header to confirm that this webhook subscription is indeed expected. We strongly recommend storing this secret to be used to verify future webhook event signatures.

The POST request to create the webhook will then return with the status of the request. If you do not acknowledge the webhook’s confirmation handshake it will fail to setup, and you will receive an error in response to your attempt to create it. This means you need to be able to receive and complete the webhook while the POST request is in-flight (in other words, have a server that can handle requests asynchronously).

Invalid hostnames like localhost will recieve a 403 Forbidden status code.

# Request
curl -H "Authorization: Bearer <personal_access_token>" \
-X POST https://app.asana.com/api/1.0/webhooks \
-d "resource=8675309" \
-d "target=https://example.com/receive-webhook/7654"
# Handshake sent to https://example.com/
POST /receive-webhook/7654
X-Hook-Secret: b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81
# Handshake response sent by example.com
HTTP/1.1 200
X-Hook-Secret: b537207f20cbfa02357cf448134da559e8bd39d61597dcd5631b8012eae53e81
# Response
HTTP/1.1 201
{
  "data": {
    "gid": "43214",
    "resource": {
      "gid": "8675309",
      "name": "Bugs"
    },
    "target": "https://example.com/receive-webhook/7654",
    "active": false,
    "last_success_at": null,
    "last_failure_at": null,
    "last_failure_content": null
  }
}

Parameters

NameDescription
body object
required
The webhook workspace and target.
data objectnone
filters [object]An array of WebhookFilter objects to specify a whitelist of filters to apply to events from this webhook. If a webhook event passes any of the filters the event will be delivered; otherwise no event will be sent to the receiving server.
action stringThe type of change on the resource to pass through the filter. For more information refer to Event.action in the Event schema. This can be one of changed, added, removed, deleted, and undeleted depending on the nature of what has occurred on the resource.
fields [string]Conditional. A whitelist of fields for events which will pass the filter when the resource is changed. These can be any combination of the fields on the resources themselves. This field is only valid for action of type changed
resource_subtype stringThe resource subtype of the resource that the filter applies to. This should be set to the same value as is returned on the resource_subtype field on the resources themselves.
resource_type stringThe type of the resource which created the event when modified; for example, to filter to changes on regular tasks this field should be set to task.
resource string
required
A resource ID to subscribe to. Many Asana resources are valid to create webhooks on, but higher-level resources require filters.
target string(uri)
required
The URL to receive the HTTP POST. The full URL will be used to deliver events from this webhook (including parameters) which allows encoding of application-specific state when the webhook is created.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
201 WebhookSuccessfully created the requested webhook.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get a webhook

Code samples

curl -X GET https://app.asana.com/api/1.0/webhooks/{webhook_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "webhook",
    "active": false,
    "resource": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task"
    },
    "target": "https://example.com/receive-webhook/7654",
    "created_at": "2012-02-22T02:06:58.147Z",
    "filters": [
      {
        "action": "changed",
        "fields": [
          "due_at",
          "due_on",
          "dependencies"
        ],
        "resource_subtype": "milestone",
        "resource_type": "task"
      }
    ],
    "last_failure_at": "2012-02-22T02:06:58.147Z",
    "last_failure_content": "500 Server Error\\n\\nCould not complete the request",
    "last_success_at": "2012-02-22T02:06:58.147Z"
  }
}

See input/output options to include more fields in your response.

GET /webhooks/{webhook_gid}

Returns the full record for the given webhook.

Parameters

NameDescription
/webhook_gid string
required
Globally unique identifier for the webhook.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 WebhookSuccessfully retrieved the requested webhook.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Update a webhook

Code samples

curl -X PUT https://app.asana.com/api/1.0/webhooks/{webhook_gid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "filters": [
      {
        "action": "changed",
        "fields": [
          "due_at",
          "due_on",
          "dependencies"
        ],
        "resource_subtype": "milestone",
        "resource_type": "task"
      }
    ]
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "webhook",
    "active": false,
    "resource": {
      "gid": "12345",
      "resource_type": "task",
      "name": "Bug Task"
    },
    "target": "https://example.com/receive-webhook/7654",
    "created_at": "2012-02-22T02:06:58.147Z",
    "filters": [
      {
        "action": "changed",
        "fields": [
          "due_at",
          "due_on",
          "dependencies"
        ],
        "resource_subtype": "milestone",
        "resource_type": "task"
      }
    ],
    "last_failure_at": "2012-02-22T02:06:58.147Z",
    "last_failure_content": "500 Server Error\\n\\nCould not complete the request",
    "last_success_at": "2012-02-22T02:06:58.147Z"
  }
}

See input/output options to include more fields in your response.

PUT /webhooks/{webhook_gid}

An existing webhook's filters can be updated by making a PUT request on the URL for that webhook. Note that the webhook's previous filters array will be completely overwritten by the filters sent in the PUT request.

Parameters

NameDescription
/webhook_gid string
required
Globally unique identifier for the webhook.
body object
required
The updated filters for the webhook.
data objectnone
filters [object]An array of WebhookFilter objects to specify a whitelist of filters to apply to events from this webhook. If a webhook event passes any of the filters the event will be delivered; otherwise no event will be sent to the receiving server.
action stringThe type of change on the resource to pass through the filter. For more information refer to Event.action in the Event schema. This can be one of changed, added, removed, deleted, and undeleted depending on the nature of what has occurred on the resource.
fields [string]Conditional. A whitelist of fields for events which will pass the filter when the resource is changed. These can be any combination of the fields on the resources themselves. This field is only valid for action of type changed
resource_subtype stringThe resource subtype of the resource that the filter applies to. This should be set to the same value as is returned on the resource_subtype field on the resources themselves.
resource_type stringThe type of the resource which created the event when modified; for example, to filter to changes on regular tasks this field should be set to task.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 WebhookSuccessfully updated the webhook.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Delete a webhook

Code samples

curl -X DELETE https://app.asana.com/api/1.0/webhooks/{webhook_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

DELETE /webhooks/{webhook_gid}

This method permanently removes a webhook. Note that it may be possible to receive a request that was already in flight after deleting the webhook, but no further requests will be issued.

Parameters

NameDescription
/webhook_gid string
required
Globally unique identifier for the webhook.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineSuccessfully retrieved the requested webhook.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Workspaces

GET /workspaces
GET /workspaces/{workspace_gid}
PUT /workspaces/{workspace_gid}
POST /workspaces/{workspace_gid}/addUser
POST /workspaces/{workspace_gid}/removeUser

A workspace is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace.

An organization is a special kind of workspace that represents a company. In an organization, you can group your projects into teams. You can read more about how organizations work on the Asana Guide. To tell if your workspace is an organization or not, check its is_organization property.

Over time, we intend to migrate most workspaces into organizations and to release more organization-specific functionality. We may eventually deprecate using workspace-based APIs for organizations. Currently, and until after some reasonable grace period following any further announcements, you can still reference organizations in any workspace parameter.


Get multiple workspaces

Code samples

curl -X GET https://app.asana.com/api/1.0/workspaces \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  ]
}

See input/output options to include more fields in your response.

GET /workspaces

Returns the compact records for all workspaces visible to the authorized user.

Parameters

NameDescription
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 WorkspaceCompactReturn all workspaces visible to the authorized user.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get a workspace

Code samples

curl -X GET https://app.asana.com/api/1.0/workspaces/{workspace_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "workspace",
    "name": "My Company Workspace",
    "email_domains": [
      "asana.com"
    ],
    "is_organization": false
  }
}

See input/output options to include more fields in your response.

GET /workspaces/{workspace_gid}

Returns the full workspace record for a single workspace.

Parameters

NameDescription
/workspace_gid string
required
Globally unique identifier for the workspace or organization.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 WorkspaceReturn the full workspace record.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Update a workspace

Code samples

curl -X PUT https://app.asana.com/api/1.0/workspaces/{workspace_gid} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "name": "My Company Workspace"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "workspace",
    "name": "My Company Workspace",
    "email_domains": [
      "asana.com"
    ],
    "is_organization": false
  }
}

See input/output options to include more fields in your response.

PUT /workspaces/{workspace_gid}

A specific, existing workspace can be updated by making a PUT request on the URL for that workspace. Only the fields provided in the data block will be updated; any unspecified fields will remain unchanged. Currently the only field that can be modified for a workspace is its name. Returns the complete, updated workspace record.

Parameters

NameDescription
/workspace_gid string
required
Globally unique identifier for the workspace or organization.
body object
required
The workspace object with all updated properties.
data objectA workspace is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace.
name stringThe name of the workspace.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 WorkspaceUpdate for the workspace was successful.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Add a user to a workspace or organization

Code samples

curl -X POST https://app.asana.com/api/1.0/workspaces/{workspace_gid}/addUser \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "user": "12345"
  }
}

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "user",
    "email": "gsanchez@example.com",
    "name": "Greg Sanchez",
    "photo": {
      "image_1024x1024": "https://...",
      "image_128x128": "https://...",
      "image_21x21": "https://...",
      "image_27x27": "https://...",
      "image_36x36": "https://...",
      "image_60x60": "https://..."
    }
  }
}

See input/output options to include more fields in your response.

POST /workspaces/{workspace_gid}/addUser

Add a user to a workspace or organization. The user can be referenced by their globally unique user ID or their email address. Returns the full user record for the invited user.

Parameters

NameDescription
/workspace_gid string
required
Globally unique identifier for the workspace or organization.
body object
required
The user to add to the workspace.
data objectA user identification object for specification with the addUser/removeUser endpoints.
user stringA string identifying a user. This can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 InlineThe user was added successfully to the workspace or organization.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 200

NameDescription
data UserBaseResponseA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
email string(email)The user's email address.
name stringRead-only except when same user as requester. The user’s name.
photo object¦nullA map of the user’s profile photo in various sizes, or null if no photo is set. Sizes provided are 21, 27, 36, 60, 128, and 1024. All images are in PNG format, except for 1024 (which is in JPEG format).
image_1024x1024 string(uri)none
image_128x128 string(uri)none
image_21x21 string(uri)none
image_27x27 string(uri)none
image_36x36 string(uri)none
image_60x60 string(uri)none


Remove a user from a workspace or organization

Code samples

curl -X POST https://app.asana.com/api/1.0/workspaces/{workspace_gid}/removeUser \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"data": {"field":"value","field":"value"} }'

Body parameter

{
  "data": {
    "user": "12345"
  }
}

204 Response

{
  "data": {}
}

See input/output options to include more fields in your response.

POST /workspaces/{workspace_gid}/removeUser

Remove a user from a workspace or organization. The user making this call must be an admin in the workspace. The user can be referenced by their globally unique user ID or their email address. Returns an empty data record.

Parameters

NameDescription
/workspace_gid string
required
Globally unique identifier for the workspace or organization.
body object
required
The user to remove from the workspace.
data objectA user identification object for specification with the addUser/removeUser endpoints.
user stringA string identifying a user. This can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
204 InlineThe user was removed successfully to the workspace or organization.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑

Response Schema

Status Code 204

NameDescription
data An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.


Workspace memberships

GET /workspace_memberships/{workspace_membership_gid}
GET /users/{user_gid}/workspace_memberships
GET /workspaces/{workspace_gid}/workspace_memberships

This object determines if a user is a member of a workspace.


Get a workspace membership

Code samples

curl -X GET https://app.asana.com/api/1.0/workspace_memberships/{workspace_membership_gid} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": {
    "gid": "12345",
    "resource_type": "workspace_membership",
    "user": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    },
    "is_active": true,
    "is_admin": true,
    "is_guest": true,
    "user_task_list": {
      "gid": "12345",
      "resource_type": "user_task_list",
      "name": "My Tasks in My Workspace",
      "owner": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "workspace": {
        "gid": "12345",
        "resource_type": "workspace",
        "name": "My Company Workspace"
      }
    },
    "vacation_dates": {
      "end_on": "2022-11-07",
      "start_on": "2022-11-05"
    }
  }
}

See input/output options to include more fields in your response.

GET /workspace_memberships/{workspace_membership_gid}

Returns the complete workspace record for a single workspace membership.

Parameters

NameDescription
/workspace_membership_gid string
required
none
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 WorkspaceMembershipSuccessfully retrieved the requested workspace membership.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get workspace memberships for a user

Code samples

curl -X GET https://app.asana.com/api/1.0/users/{user_gid}/workspace_memberships \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "workspace_membership",
      "user": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "workspace": {
        "gid": "12345",
        "resource_type": "workspace",
        "name": "My Company Workspace"
      }
    }
  ]
}

See input/output options to include more fields in your response.

GET /users/{user_gid}/workspace_memberships

Returns the compact workspace membership records for the user.

Parameters

NameDescription
/user_gid string
required
A string identifying a user. This can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 WorkspaceMembershipCompactSuccessfully retrieved the requested user's workspace memberships.
400 ErrorThis usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
401 ErrorA valid authentication token was not provided with the request, so the API could not associate a user with the request.
403 ErrorThe authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
404 ErrorEither the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
500 ErrorThere was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
↓ Show Common Responses ↓↑ Hide Common Responses ↑


Get the workspace memberships for a workspace

Code samples

curl -X GET https://app.asana.com/api/1.0/workspaces/{workspace_gid}/workspace_memberships \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

200 Response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "workspace_membership",
      "user": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "workspace": {
        "gid": "12345",
        "resource_type": "workspace",
        "name": "My Company Workspace"
      }
    }
  ]
}

See input/output options to include more fields in your response.

GET /workspaces/{workspace_gid}/workspace_memberships

Returns the compact workspace membership records for the workspace.

Parameters

NameDescription
/workspace_gid string
required
Globally unique identifier for the workspace or organization.
?user stringA string identifying a user. This can either be the string "me", an email, or the gid of a user.
?opt_pretty booleanProvides “pretty” output.
?opt_fields array[string]Defines fields to return.
?limit integerResults per page.
?offset stringOffset token.
↓ Show Common Parameters ↓↑ Hide Common Parameters ↑

Responses

StatusDescription
200 WorkspaceMembershipCompactSuccessfully retrieved the requested workspace's memberships.


Schemas

The schema definitions for each object requested or returned from Asana's API. Some fields are not returned by default and you'll need to use input/output options to include them.


AsanaNamedResource

{
  "gid": "12345",
  "resource_type": "task",
  "name": "Bug Task"
}

A generic Asana Resource, containing a globally unique identifier.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the object.


AsanaResource

{
  "gid": "12345",
  "resource_type": "task"
}

A generic Asana Resource, containing a globally unique identifier.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.


AttachmentCompact

{
  "gid": "12345",
  "resource_type": "attachment",
  "name": "Screenshot.png",
  "resource_subtype": "dropbox"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the file.
resource_subtype stringThe service hosting the attachment. Valid values are asana, dropbox, gdrive, onedrive, box, vimeo, and external.


Attachment

{
  "gid": "12345",
  "resource_type": "attachment",
  "name": "Screenshot.png",
  "resource_subtype": "dropbox",
  "connected_to_app": true,
  "created_at": "2012-02-22T02:06:58.147Z",
  "download_url": "https://s3.amazonaws.com/assets/123/Screenshot.png",
  "host": "dropbox",
  "parent": {
    "gid": "12345",
    "resource_type": "task",
    "name": "Bug Task",
    "resource_subtype": "default_task"
  },
  "permanent_url": "https://s3.amazonaws.com/assets/123/Screenshot.png",
  "size": 12345,
  "view_url": "https://www.dropbox.com/s/123/Screenshot.png"
}

An attachment object represents any file attached to a task in Asana, whether it’s an uploaded file or one associated via a third-party service such as Dropbox or Google Drive.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the file.
resource_subtype stringThe service hosting the attachment. Valid values are asana, dropbox, gdrive, onedrive, box, vimeo, and external.
connected_to_app booleanWhether the attachment is connected to the app making the request for the purposes of showing an app components widget. Only present when the resource_subtype is external or gdrive.
created_at string(date-time)The time at which this resource was created.
download_url string(uri)¦nullThe URL containing the content of the attachment.
Note: May be null if the attachment is hosted by Box and will be null if the attachment is a Video Message hosted by Vimeo. If present, this URL may only be valid for two minutes from the time of retrieval. You should avoid persisting this URL somewhere and just refresh it on demand to ensure you do not keep stale URLs.
host stringThe service hosting the attachment. Valid values are asana, dropbox, gdrive, box, and vimeo.
parent objectThe task this attachment is attached to.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the task.
resource_subtype string¦nullThe resource subtype of the parent resource that the filter applies to.
permanent_url string(uri)¦nullnone
size integerThe size of the attachment in bytes. Only present when the resource_subtype is asana.
view_url string(uri)¦nullThe URL where the attachment can be viewed, which may be friendlier to users in a browser than just directing them to a raw file. May be null if no view URL exists for the service.

Enumerated Values

PropertyValue
resource_subtypedefault_task
resource_subtypemilestone
resource_subtypesection
resource_subtypeapproval


AuditLogEvent

{
  "gid": "12345",
  "actor": {
    "actor_type": "user",
    "email": "gregsanchez@example.com",
    "gid": "1111",
    "name": "Greg Sanchez"
  },
  "context": {
    "api_authentication_method": "cookie",
    "client_ip_address": "1.1.1.1",
    "context_type": "web",
    "oauth_app_name": "string",
    "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
  },
  "created_at": "2021-01-01T00:00:00.000Z",
  "details": {},
  "event_category": "deletion",
  "event_type": "task_deleted",
  "resource": {
    "email": "string",
    "gid": "1111",
    "name": "Example Task",
    "resource_subtype": "milestone",
    "resource_type": "task"
  }
}

An object representing a single event within an Asana domain.

Every audit log event is comprised of an event_type, actor, resource, and context. Some events will include additional metadata about the event under details. See our currently supported list of events for more details.

Properties

NameDescription
gid stringGlobally unique identifier of the AuditLogEvent, as a string.
actor objectThe entity that triggered the event. Will typically be a user.
actor_type stringThe type of actor.
Can be one of user, asana, asana_support, anonymous, or external_administrator.
email stringThe email of the actor, if it is a user.
gid stringGlobally unique identifier of the actor, if it is a user.
name stringThe name of the actor, if it is a user.
context objectThe context from which this event originated.
api_authentication_method stringThe authentication method used in the context of an API request.
Only present if the context_type is api. Can be one of cookie, oauth, personal_access_token, or service_account.
client_ip_address stringThe IP address of the client that initiated the event, if applicable.
context_type stringThe type of context.
Can be one of web, desktop, mobile, asana_support, asana, email, or api.
oauth_app_name stringThe name of the OAuth App that initiated the event.
Only present if the api_authentication_method is oauth.
user_agent stringThe user agent of the client that initiated the event, if applicable.
created_at string(date-time)The time the event was created.
details objectEvent specific details. The schema will vary depending on the event_type.
event_category stringThe category that this event_type belongs to.
event_type stringThe type of the event.
resource objectThe primary object that was affected by this event.
email stringThe email of the resource, if applicable.
gid stringGlobally unique identifier of the resource.
name stringThe name of the resource.
resource_subtype stringThe subtype of resource. Most resources will not have a subtype.
resource_type stringThe type of resource.

Enumerated Values

PropertyValue
actor_typeuser
actor_typeasana
actor_typeasana_support
actor_typeanonymous
actor_typeexternal_administrator
api_authentication_methodcookie
api_authentication_methodoauth
api_authentication_methodpersonal_access_token
api_authentication_methodservice_account
context_typeweb
context_typedesktop
context_typemobile
context_typeasana_support
context_typeasana
context_typeemail
context_typeapi


Batch

{
  "body": {
    "data": {
      "completed": false,
      "gid": "1967",
      "name": "Hello, world!",
      "notes": "How are you today?"
    }
  },
  "headers": {
    "location": "/tasks/1234"
  },
  "status_code": 200
}

A response object returned from a batch request.

Properties

NameDescription
body objectThe JSON body that the invoked endpoint returned.
headers objectA map of HTTP headers specific to this result. This is primarily used for returning a Location header to accompany a 201 Created result. The parent HTTP response will contain all common headers.
status_code integerThe HTTP status code that the invoked endpoint returned.


CustomFieldCompact

{
  "gid": "12345",
  "resource_type": "custom_field",
  "date_value": {
    "date": "2024-08-23",
    "date_time": "2024-08-23T22:00:00.000Z"
  },
  "display_value": "blue",
  "enabled": true,
  "enum_options": [
    {
      "gid": "12345",
      "resource_type": "enum_option",
      "color": "blue",
      "enabled": true,
      "name": "Low"
    }
  ],
  "enum_value": {
    "gid": "12345",
    "resource_type": "enum_option",
    "color": "blue",
    "enabled": true,
    "name": "Low"
  },
  "multi_enum_values": [
    {
      "gid": "12345",
      "resource_type": "enum_option",
      "color": "blue",
      "enabled": true,
      "name": "Low"
    }
  ],
  "name": "Status",
  "number_value": 5.2,
  "resource_subtype": "text",
  "text_value": "Some Value",
  "type": "text"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
date_value objectConditional. Only relevant for custom fields of type date. This object reflects the chosen date (and optionally, time) value of a date custom field. If no date is selected, the value of date_value will be null.
date stringA string representing the date in YYYY-MM-DD format.
date_time stringA string representing the date in ISO 8601 format. If no time value is selected, the value of date-time will be null.
display_value string¦nullA string representation for the value of the custom field. Integrations that don't require the underlying type should use this field to read values. Using this field will future-proof an app against new custom field types.
enabled booleanConditional. Determines if the custom field is enabled or not.
enum_options [object]Conditional. Only relevant for custom fields of type enum. This array specifies the possible values which an enum custom field can adopt. To modify the enum options, refer to working with enum options.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
enum_value objectConditional. Only relevant for custom fields of type enum. This object is the chosen value of an enum custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
multi_enum_values [object]Conditional. Only relevant for custom fields of type multi_enum. This object is the chosen values of a multi_enum custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
name stringThe name of the custom field.
number_value numberConditional. This number is the value of a number custom field.
resource_subtype stringThe type of the custom field. Must be one of the given values.
text_value stringConditional. This string is the value of a text custom field.
type stringDeprecated: new integrations should prefer the resource_subtype field. The type of the custom field. Must be one of the given values.

Enumerated Values

PropertyValue
resource_subtypetext
resource_subtypeenum
resource_subtypemulti_enum
resource_subtypenumber
resource_subtypedate
resource_subtypepeople
typetext
typeenum
typemulti_enum
typenumber


CustomField

{
  "gid": "12345",
  "resource_type": "custom_field",
  "asana_created_field": "priority",
  "created_by": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "currency_code": "EUR",
  "custom_label": "gold pieces",
  "custom_label_position": "suffix",
  "date_value": {
    "date": "2024-08-23",
    "date_time": "2024-08-23T22:00:00.000Z"
  },
  "description": "Development team priority",
  "display_value": "blue",
  "enabled": true,
  "enum_options": [
    {
      "gid": "12345",
      "resource_type": "enum_option",
      "color": "blue",
      "enabled": true,
      "name": "Low"
    }
  ],
  "enum_value": {
    "gid": "12345",
    "resource_type": "enum_option",
    "color": "blue",
    "enabled": true,
    "name": "Low"
  },
  "format": "custom",
  "has_notifications_enabled": true,
  "is_global_to_workspace": true,
  "multi_enum_values": [
    {
      "gid": "12345",
      "resource_type": "enum_option",
      "color": "blue",
      "enabled": true,
      "name": "Low"
    }
  ],
  "name": "Status",
  "number_value": 5.2,
  "people_value": [
    {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    }
  ],
  "precision": 2,
  "resource_subtype": "text",
  "text_value": "Some Value",
  "type": "text"
}

Custom Fields store the metadata that is used in order to add user-specified information to tasks in Asana. Be sure to reference the Custom Fields developer documentation for more information about how custom fields relate to various resources in Asana.

Users in Asana can lock custom fields, which will make them read-only when accessed by other users. Attempting to edit a locked custom field will return HTTP error code 403 Forbidden.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
asana_created_field string¦nullConditional. A unique identifier to associate this field with the template source of truth.
created_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
currency_code string¦nullISO 4217 currency code to format this custom field. This will be null if the format is not currency.
custom_label string¦nullThis is the string that appears next to the custom field value. This will be null if the format is not custom.
custom_label_position stringOnly relevant for custom fields with custom format. This depicts where to place the custom label. This will be null if the format is not custom.
date_value objectConditional. Only relevant for custom fields of type date. This object reflects the chosen date (and optionally, time) value of a date custom field. If no date is selected, the value of date_value will be null.
date stringA string representing the date in YYYY-MM-DD format.
date_time stringA string representing the date in ISO 8601 format. If no time value is selected, the value of date-time will be null.
description stringOpt In. The description of the custom field.
display_value string¦nullA string representation for the value of the custom field. Integrations that don't require the underlying type should use this field to read values. Using this field will future-proof an app against new custom field types.
enabled booleanConditional. Determines if the custom field is enabled or not.
enum_options [object]Conditional. Only relevant for custom fields of type enum. This array specifies the possible values which an enum custom field can adopt. To modify the enum options, refer to working with enum options.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
enum_value objectConditional. Only relevant for custom fields of type enum. This object is the chosen value of an enum custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
format stringThe format of this custom field.
has_notifications_enabled booleanConditional. This flag describes whether a follower of a task with this field should receive inbox notifications from changes to this field.
is_global_to_workspace booleanThis flag describes whether this custom field is available to every container in the workspace. Before project-specific custom fields, this field was always true.
multi_enum_values [object]Conditional. Only relevant for custom fields of type multi_enum. This object is the chosen values of a multi_enum custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
name stringThe name of the custom field.
number_value numberConditional. This number is the value of a number custom field.
people_value [object]Conditional. Only relevant for custom fields of type people. This array of compact user objects reflects the values of a people custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
precision integerOnly relevant for custom fields of type ‘Number’. This field dictates the number of places after the decimal to round to, i.e. 0 is integer values, 1 rounds to the nearest tenth, and so on. Must be between 0 and 6, inclusive.
For percentage format, this may be unintuitive, as a value of 0.25 has a precision of 0, while a value of 0.251 has a precision of 1. This is due to 0.25 being displayed as 25%.
The identifier format will always have a precision of 0.
resource_subtype stringThe type of the custom field. Must be one of the given values.
text_value stringConditional. This string is the value of a text custom field.
type stringDeprecated: new integrations should prefer the resource_subtype field. The type of the custom field. Must be one of the given values.

Enumerated Values

PropertyValue
asana_created_fielda_v_requirements
asana_created_fieldaccount_name
asana_created_fieldactionable
asana_created_fieldalign_shipping_link
asana_created_fieldalign_status
asana_created_fieldallotted_time
asana_created_fieldappointment
asana_created_fieldapproval_stage
asana_created_fieldapproved
asana_created_fieldarticle_series
asana_created_fieldboard_committee
asana_created_fieldbrowser
asana_created_fieldcampaign_audience
asana_created_fieldcampaign_project_status
asana_created_fieldcampaign_regions
asana_created_fieldchannel_primary
asana_created_fieldclient_topic_type
asana_created_fieldcomplete_by
asana_created_fieldcontact
asana_created_fieldcontact_email_address
asana_created_fieldcontent_channels
asana_created_fieldcontent_channels_needed
asana_created_fieldcontent_stage
asana_created_fieldcontent_type
asana_created_fieldcontract
asana_created_fieldcontract_status
asana_created_fieldcost
asana_created_fieldcreation_stage
asana_created_fieldcreative_channel
asana_created_fieldcreative_needed
asana_created_fieldcreative_needs
asana_created_fielddata_sensitivity
asana_created_fielddeal_size
asana_created_fielddelivery_appt
asana_created_fielddelivery_appt_date
asana_created_fielddepartment
asana_created_fielddepartment_responsible
asana_created_fielddesign_request_needed
asana_created_fielddesign_request_type
asana_created_fielddiscussion_category
asana_created_fielddo_this_task
asana_created_fieldeditorial_content_status
asana_created_fieldeditorial_content_tag
asana_created_fieldeditorial_content_type
asana_created_fieldeffort
asana_created_fieldeffort_level
asana_created_fieldest_completion_date
asana_created_fieldestimated_time
asana_created_fieldestimated_value
asana_created_fieldexpected_cost
asana_created_fieldexternal_steps_needed
asana_created_fieldfavorite_idea
asana_created_fieldfeedback_type
asana_created_fieldfinancial
asana_created_fieldfunding_amount
asana_created_fieldgrant_application_process
asana_created_fieldhiring_candidate_status
asana_created_fieldidea_status
asana_created_fieldids_link
asana_created_fieldids_patient_link
asana_created_fieldimplementation_stage
asana_created_fieldinsurance
asana_created_fieldinterview_area
asana_created_fieldinterview_question_score
asana_created_fielditero_scan_link
asana_created_fieldjob_s_applied_to
asana_created_fieldlab
asana_created_fieldlaunch_status
asana_created_fieldlead_status
asana_created_fieldlocalization_language
asana_created_fieldlocalization_market_team
asana_created_fieldlocalization_status
asana_created_fieldmeeting_minutes
asana_created_fieldmeeting_needed
asana_created_fieldminutes
asana_created_fieldmrr
asana_created_fieldmust_localize
asana_created_fieldname_of_foundation
asana_created_fieldneed_to_follow_up
asana_created_fieldnext_appointment
asana_created_fieldnext_steps_sales
asana_created_fieldnum_people
asana_created_fieldnumber_of_user_reports
asana_created_fieldoffice_location
asana_created_fieldonboarding_activity
asana_created_fieldowner
asana_created_fieldparticipants_needed
asana_created_fieldpatient_date_of_birth
asana_created_fieldpatient_email
asana_created_fieldpatient_phone
asana_created_fieldpatient_status
asana_created_fieldphone_number
asana_created_fieldplanning_category
asana_created_fieldpoint_of_contact
asana_created_fieldposition
asana_created_fieldpost_format
asana_created_fieldprescription
asana_created_fieldpriority
asana_created_fieldpriority_level
asana_created_fieldproduct
asana_created_fieldproduct_stage
asana_created_fieldprogress
asana_created_fieldproject_size
asana_created_fieldproject_status
asana_created_fieldproposed_budget
asana_created_fieldpublish_status
asana_created_fieldreason_for_scan
asana_created_fieldreferral
asana_created_fieldrequest_type
asana_created_fieldresearch_status
asana_created_fieldresponsible_department
asana_created_fieldresponsible_team
asana_created_fieldrisk_assessment_status
asana_created_fieldroom_name
asana_created_fieldsales_counterpart
asana_created_fieldsentiment
asana_created_fieldshipping_link
asana_created_fieldsocial_channels
asana_created_fieldstage
asana_created_fieldstatus
asana_created_fieldstatus_design
asana_created_fieldstatus_of_initiative
asana_created_fieldsystem_setup
asana_created_fieldtask_progress
asana_created_fieldteam
asana_created_fieldteam_marketing
asana_created_fieldteam_responsible
asana_created_fieldtime_it_takes_to_complete_tasks
asana_created_fieldtimeframe
asana_created_fieldtreatment_type
asana_created_fieldtype_work_requests_it
asana_created_fielduse_agency
asana_created_fielduser_name
asana_created_fieldvendor_category
asana_created_fieldvendor_type
asana_created_fieldword_count
custom_label_positionprefix
custom_label_positionsuffix
formatcurrency
formatidentifier
formatpercentage
formatcustom
formatnone
resource_subtypetext
resource_subtypeenum
resource_subtypemulti_enum
resource_subtypenumber
resource_subtypedate
resource_subtypepeople
typetext
typeenum
typemulti_enum
typenumber


CustomFieldSettingCompact

{
  "gid": "12345",
  "resource_type": "custom_field_setting"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.


CustomFieldSetting

{
  "gid": "12345",
  "resource_type": "custom_field_setting",
  "custom_field": {
    "gid": "12345",
    "resource_type": "custom_field",
    "asana_created_field": "priority",
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "currency_code": "EUR",
    "custom_label": "gold pieces",
    "custom_label_position": "suffix",
    "date_value": {
      "date": "2024-08-23",
      "date_time": "2024-08-23T22:00:00.000Z"
    },
    "description": "Development team priority",
    "display_value": "blue",
    "enabled": true,
    "enum_options": [
      {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "enum_value": {
      "gid": "12345",
      "resource_type": "enum_option",
      "color": "blue",
      "enabled": true,
      "name": "Low"
    },
    "format": "custom",
    "has_notifications_enabled": true,
    "is_global_to_workspace": true,
    "multi_enum_values": [
      {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "name": "Status",
    "number_value": 5.2,
    "people_value": [
      {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    ],
    "precision": 2,
    "resource_subtype": "text",
    "text_value": "Some Value",
    "type": "text"
  },
  "is_important": false,
  "parent": {
    "gid": "12345",
    "resource_type": "project",
    "name": "Stuff to buy"
  },
  "project": {
    "gid": "12345",
    "resource_type": "project",
    "name": "Stuff to buy"
  }
}

Custom Fields Settings objects represent the many-to-many join of the Custom Field and Project as well as stores information that is relevant to that particular pairing.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
custom_field objectThe custom field that is applied to the parent.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
asana_created_field string¦nullConditional. A unique identifier to associate this field with the template source of truth.
created_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
currency_code string¦nullISO 4217 currency code to format this custom field. This will be null if the format is not currency.
custom_label string¦nullThis is the string that appears next to the custom field value. This will be null if the format is not custom.
custom_label_position stringOnly relevant for custom fields with custom format. This depicts where to place the custom label. This will be null if the format is not custom.
date_value objectConditional. Only relevant for custom fields of type date. This object reflects the chosen date (and optionally, time) value of a date custom field. If no date is selected, the value of date_value will be null.
date stringA string representing the date in YYYY-MM-DD format.
date_time stringA string representing the date in ISO 8601 format. If no time value is selected, the value of date-time will be null.
description stringOpt In. The description of the custom field.
display_value string¦nullA string representation for the value of the custom field. Integrations that don't require the underlying type should use this field to read values. Using this field will future-proof an app against new custom field types.
enabled booleanConditional. Determines if the custom field is enabled or not.
enum_options [object]Conditional. Only relevant for custom fields of type enum. This array specifies the possible values which an enum custom field can adopt. To modify the enum options, refer to working with enum options.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
enum_value objectConditional. Only relevant for custom fields of type enum. This object is the chosen value of an enum custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
format stringThe format of this custom field.
has_notifications_enabled booleanConditional. This flag describes whether a follower of a task with this field should receive inbox notifications from changes to this field.
is_global_to_workspace booleanThis flag describes whether this custom field is available to every container in the workspace. Before project-specific custom fields, this field was always true.
multi_enum_values [object]Conditional. Only relevant for custom fields of type multi_enum. This object is the chosen values of a multi_enum custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
name stringThe name of the custom field.
number_value numberConditional. This number is the value of a number custom field.
people_value [object]Conditional. Only relevant for custom fields of type people. This array of compact user objects reflects the values of a people custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
precision integerOnly relevant for custom fields of type ‘Number’. This field dictates the number of places after the decimal to round to, i.e. 0 is integer values, 1 rounds to the nearest tenth, and so on. Must be between 0 and 6, inclusive.
For percentage format, this may be unintuitive, as a value of 0.25 has a precision of 0, while a value of 0.251 has a precision of 1. This is due to 0.25 being displayed as 25%.
The identifier format will always have a precision of 0.
resource_subtype stringThe type of the custom field. Must be one of the given values.
text_value stringConditional. This string is the value of a text custom field.
type stringDeprecated: new integrations should prefer the resource_subtype field. The type of the custom field. Must be one of the given values.
is_important booleanis_important is used in the Asana web application to determine if this custom field is displayed in the list/grid view of a project or portfolio.
parent objectThe parent to which the custom field is applied. This can be a project or portfolio and indicates that the tasks or projects that the parent contains may be given custom field values for this custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
project objectDeprecated: new integrations should prefer the parent field. The id of the project that this custom field settings refers to.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.

Enumerated Values

PropertyValue
asana_created_fielda_v_requirements
asana_created_fieldaccount_name
asana_created_fieldactionable
asana_created_fieldalign_shipping_link
asana_created_fieldalign_status
asana_created_fieldallotted_time
asana_created_fieldappointment
asana_created_fieldapproval_stage
asana_created_fieldapproved
asana_created_fieldarticle_series
asana_created_fieldboard_committee
asana_created_fieldbrowser
asana_created_fieldcampaign_audience
asana_created_fieldcampaign_project_status
asana_created_fieldcampaign_regions
asana_created_fieldchannel_primary
asana_created_fieldclient_topic_type
asana_created_fieldcomplete_by
asana_created_fieldcontact
asana_created_fieldcontact_email_address
asana_created_fieldcontent_channels
asana_created_fieldcontent_channels_needed
asana_created_fieldcontent_stage
asana_created_fieldcontent_type
asana_created_fieldcontract
asana_created_fieldcontract_status
asana_created_fieldcost
asana_created_fieldcreation_stage
asana_created_fieldcreative_channel
asana_created_fieldcreative_needed
asana_created_fieldcreative_needs
asana_created_fielddata_sensitivity
asana_created_fielddeal_size
asana_created_fielddelivery_appt
asana_created_fielddelivery_appt_date
asana_created_fielddepartment
asana_created_fielddepartment_responsible
asana_created_fielddesign_request_needed
asana_created_fielddesign_request_type
asana_created_fielddiscussion_category
asana_created_fielddo_this_task
asana_created_fieldeditorial_content_status
asana_created_fieldeditorial_content_tag
asana_created_fieldeditorial_content_type
asana_created_fieldeffort
asana_created_fieldeffort_level
asana_created_fieldest_completion_date
asana_created_fieldestimated_time
asana_created_fieldestimated_value
asana_created_fieldexpected_cost
asana_created_fieldexternal_steps_needed
asana_created_fieldfavorite_idea
asana_created_fieldfeedback_type
asana_created_fieldfinancial
asana_created_fieldfunding_amount
asana_created_fieldgrant_application_process
asana_created_fieldhiring_candidate_status
asana_created_fieldidea_status
asana_created_fieldids_link
asana_created_fieldids_patient_link
asana_created_fieldimplementation_stage
asana_created_fieldinsurance
asana_created_fieldinterview_area
asana_created_fieldinterview_question_score
asana_created_fielditero_scan_link
asana_created_fieldjob_s_applied_to
asana_created_fieldlab
asana_created_fieldlaunch_status
asana_created_fieldlead_status
asana_created_fieldlocalization_language
asana_created_fieldlocalization_market_team
asana_created_fieldlocalization_status
asana_created_fieldmeeting_minutes
asana_created_fieldmeeting_needed
asana_created_fieldminutes
asana_created_fieldmrr
asana_created_fieldmust_localize
asana_created_fieldname_of_foundation
asana_created_fieldneed_to_follow_up
asana_created_fieldnext_appointment
asana_created_fieldnext_steps_sales
asana_created_fieldnum_people
asana_created_fieldnumber_of_user_reports
asana_created_fieldoffice_location
asana_created_fieldonboarding_activity
asana_created_fieldowner
asana_created_fieldparticipants_needed
asana_created_fieldpatient_date_of_birth
asana_created_fieldpatient_email
asana_created_fieldpatient_phone
asana_created_fieldpatient_status
asana_created_fieldphone_number
asana_created_fieldplanning_category
asana_created_fieldpoint_of_contact
asana_created_fieldposition
asana_created_fieldpost_format
asana_created_fieldprescription
asana_created_fieldpriority
asana_created_fieldpriority_level
asana_created_fieldproduct
asana_created_fieldproduct_stage
asana_created_fieldprogress
asana_created_fieldproject_size
asana_created_fieldproject_status
asana_created_fieldproposed_budget
asana_created_fieldpublish_status
asana_created_fieldreason_for_scan
asana_created_fieldreferral
asana_created_fieldrequest_type
asana_created_fieldresearch_status
asana_created_fieldresponsible_department
asana_created_fieldresponsible_team
asana_created_fieldrisk_assessment_status
asana_created_fieldroom_name
asana_created_fieldsales_counterpart
asana_created_fieldsentiment
asana_created_fieldshipping_link
asana_created_fieldsocial_channels
asana_created_fieldstage
asana_created_fieldstatus
asana_created_fieldstatus_design
asana_created_fieldstatus_of_initiative
asana_created_fieldsystem_setup
asana_created_fieldtask_progress
asana_created_fieldteam
asana_created_fieldteam_marketing
asana_created_fieldteam_responsible
asana_created_fieldtime_it_takes_to_complete_tasks
asana_created_fieldtimeframe
asana_created_fieldtreatment_type
asana_created_fieldtype_work_requests_it
asana_created_fielduse_agency
asana_created_fielduser_name
asana_created_fieldvendor_category
asana_created_fieldvendor_type
asana_created_fieldword_count
custom_label_positionprefix
custom_label_positionsuffix
formatcurrency
formatidentifier
formatpercentage
formatcustom
formatnone
resource_subtypetext
resource_subtypeenum
resource_subtypemulti_enum
resource_subtypenumber
resource_subtypedate
resource_subtypepeople
typetext
typeenum
typemulti_enum
typenumber


EnumOption

{
  "gid": "12345",
  "resource_type": "enum_option",
  "color": "blue",
  "enabled": true,
  "name": "Low"
}

Enum options are the possible values which an enum custom field can adopt. An enum custom field must contain at least 1 enum option but no more than 500.

You can add enum options to a custom field by using the POST /custom_fields/custom_field_gid/enum_options endpoint.

It is not possible to remove or delete an enum option. Instead, enum options can be disabled by updating the enabled field to false with the PUT /enum_options/enum_option_gid endpoint. Other attributes can be updated similarly.

On creation of an enum option, enabled is always set to true, meaning the enum option is a selectable value for the custom field. Setting enabled=false is equivalent to “trashing” the enum option in the Asana web app within the “Edit Fields” dialog. The enum option will no longer be selectable but, if the enum option value was previously set within a task, the task will retain the value.

Enum options are an ordered list and by default new enum options are inserted at the end. Ordering in relation to existing enum options can be specified on creation by using insert_before or insert_after to reference an existing enum option. Only one of insert_before and insert_after can be provided when creating a new enum option.

An enum options list can be reordered with the POST /custom_fields/custom_field_gid/enum_options/insert endpoint.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.


Error

{
  "errors": [
    {
      "help": "For more information on API status codes and how to handle them, read the docs on errors: https://asana.github.io/developer-docs/#errors'",
      "message": "project: Missing input",
      "phrase": "6 sad squid snuggle softly"
    }
  ]
}

Sadly, sometimes requests to the API are not successful. Failures can occur for a wide range of reasons. In all cases, the API should return an HTTP Status Code that indicates the nature of the failure, with a response body in JSON format containing additional information.

In the event of a server error the response body will contain an error phrase. These phrases are automatically generated using the node-asana-phrase library and can be used by Asana support to quickly look up the incident that caused the server error.

Properties

NameDescription
errors [object]none
help stringAdditional information directing developers to resources on how to address and fix the problem, if available.
message stringMessage providing more detail about the error that occurred, if available.
phrase string500 errors only. A unique error phrase which can be used when contacting developer support to help identify the exact occurrence of the problem in Asana’s logs.


Event

{
  "action": "changed",
  "change": {
    "action": "changed",
    "added_value": {
      "gid": "12345",
      "resource_type": "user"
    },
    "field": "assignee",
    "new_value": {
      "gid": "12345",
      "resource_type": "user"
    },
    "removed_value": {
      "gid": "12345",
      "resource_type": "user"
    }
  },
  "created_at": "2012-02-22T02:06:58.147Z",
  "parent": {
    "gid": "12345",
    "resource_type": "task",
    "name": "Bug Task"
  },
  "resource": {
    "gid": "12345",
    "resource_type": "task",
    "name": "Bug Task"
  },
  "type": "task",
  "user": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  }
}

An event is an object representing a change to a resource that was observed by an event subscription or delivered asynchronously to the target location of an active webhook.

The event may be triggered by a different user than the subscriber. For example, if user A subscribes to a task and user B modified it, the event’s user will be user B. Note: Some events are generated by the system, and will have null as the user. API consumers should make sure to handle this case.

The resource that triggered the event may be different from the one that the events were requested for or the webhook is subscribed to. For example, a subscription to a project will contain events for tasks contained within the project.

Note: pay close attention to the relationship between the fields Event.action and Event.change.action. Event.action represents the action taken on the resource itself, and Event.change.action represents how the information within the resource's fields have been modified.

For instance, consider these scenarios:

  • When at task is added to a project, Event.action will be added, Event.parent will be on object with the id and type of the project, and there will be no change field.

  • When an assignee is set on the task, Event.parent will be null, Event.action will be changed, Event.change.action will be changed, and new_value will be an object with the user's id and type.

  • When a collaborator is added to the task, Event.parent will be null, Event.action will be changed, Event.change.action will be added, and added_value will be an object with the user's id and type.

Properties

NameDescription
action stringThe type of action taken on the resource that triggered the event. This can be one of changed, added, removed, deleted, or undeleted depending on the nature of the event.
change objectInformation about the type of change that has occurred. This field is only present when the value of the property action, describing the action taken on the resource, is changed.
action stringThe type of action taken on the field which has been changed. This can be one of changed, added, or removed depending on the nature of the change.
added_value anyConditional. This property is only present when the field's action is added and the added_value is an Asana resource. This will be only the gid and resource_type of the resource when the events come from webhooks; this will be the compact representation (and can have fields expanded with opt_fields) when using the Events endpoint.
field stringThe name of the field that has changed in the resource.
new_value anyConditional. This property is only present when the field's action is changed and the new_value is an Asana resource. This will be only the gid and resource_type of the resource when the events come from webhooks; this will be the compact representation (and can have fields expanded with opt_fields) when using the Events endpoint.
removed_value anyConditional. This property is only present when the field's action is removed and the removed_value is an Asana resource. This will be only the gid and resource_type of the resource when the events come from webhooks; this will be the compact representation (and can have fields expanded with opt_fields) when using the Events endpoint.
created_at string(date-time)The timestamp when the event occurred.
parent objectFor added/removed events, the parent object that resource was added to or removed from. The parent will be null for other event types.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the object.
resource objectThe resource which has triggered the event by being modified in some way.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the object.
type stringDeprecated: Refer to the resource_type of the resource. The type of the resource that generated the event.
user objectThe user who triggered the event.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.


GoalCompact

{
  "gid": "12345",
  "resource_type": "goal",
  "name": "Grow web traffic by 30%",
  "owner": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  }
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the goal.
owner object¦nullA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.


GoalMembershipBase

{
  "gid": "12345",
  "resource_type": "goal_membership",
  "is_commenter": false,
  "is_editor": false,
  "member": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  }
}

This object represents a user's connection to a goal.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
is_commenter booleanDescribes if the user is comment only in goal.
is_editor booleanDescribes if the user is editor in goal.
member objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.


GoalMembershipCompact

{
  "gid": "12345",
  "resource_type": "goal_membership",
  "is_commenter": false,
  "is_editor": false,
  "member": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  }
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
is_commenter booleanDescribes if the user is comment only in goal.
is_editor booleanDescribes if the user is editor in goal.
member objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.


GoalMembership

{
  "gid": "12345",
  "resource_type": "goal_membership",
  "is_commenter": false,
  "is_editor": false,
  "member": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  }
}

This object represents a user's connection to a goal.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
is_commenter booleanDescribes if the user is comment only in goal.
is_editor booleanDescribes if the user is editor in goal.
member objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.


GoalRelationshipCompact

{
  "gid": "12345",
  "resource_type": "goal_relationship",
  "contribution_weight": 1,
  "resource_subtype": "subgoal",
  "supporting_resource": {
    "gid": "12345",
    "resource_type": "project",
    "name": "Stuff to buy"
  }
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
contribution_weight numberThe weight that the supporting resource's progress contributes to the supported goal's progress. This can only be 0 or 1.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
supporting_resource objectThe supporting resource that supports the goal. This can be either a project, portfolio, or goal.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.

Enumerated Values

PropertyValue
resource_subtypesubgoal
resource_subtypesupporting_work


GoalRelationship

{
  "gid": "12345",
  "resource_type": "goal_relationship",
  "contribution_weight": 1,
  "resource_subtype": "subgoal",
  "supported_goal": {
    "gid": "12345",
    "resource_type": "goal",
    "name": "Grow web traffic by 30%",
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    }
  },
  "supporting_resource": {
    "gid": "12345",
    "resource_type": "project",
    "name": "Stuff to buy"
  }
}

A goal relationship is an object representing the relationship between a goal and another goal, a project, or a portfolio.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
contribution_weight numberThe weight that the supporting resource's progress contributes to the supported goal's progress. This can only be 0 or 1.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
supported_goal objectThe goal that the supporting resource supports.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the goal.
owner object¦nullA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
supporting_resource objectThe supporting resource that supports the goal. This can be either a project, portfolio, or goal.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.

Enumerated Values

PropertyValue
resource_subtypesubgoal
resource_subtypesupporting_work


Goal

{
  "gid": "12345",
  "resource_type": "goal",
  "due_on": "2019-09-15",
  "html_notes": "<body>Start building brand awareness.</body>",
  "is_workspace_level": true,
  "liked": false,
  "name": "Grow web traffic by 30%",
  "notes": "Start building brand awareness.",
  "start_on": "2019-09-14",
  "status": "green",
  "current_status_update": {
    "gid": "12345",
    "resource_type": "status_update",
    "resource_subtype": "project_status_update",
    "title": "Status Update - Jun 15"
  },
  "followers": [
    {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    }
  ],
  "likes": [
    {
      "gid": "12345",
      "user": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    }
  ],
  "metric": {
    "gid": "12345",
    "resource_type": "task",
    "currency_code": "EUR",
    "current_display_value": "8.12",
    "current_number_value": 8.12,
    "initial_number_value": 5.2,
    "precision": 2,
    "progress_source": "manual",
    "resource_subtype": "number",
    "target_number_value": 10.2,
    "unit": "none",
    "can_manage": true
  },
  "num_likes": 5,
  "owner": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "team": {
    "gid": "12345",
    "resource_type": "team",
    "name": "Marketing"
  },
  "time_period": {
    "gid": "12345",
    "resource_type": "time_period",
    "display_name": "Q1 FY22",
    "end_on": "2019-09-14",
    "period": "Q1",
    "start_on": "2019-09-13"
  },
  "workspace": {
    "gid": "12345",
    "resource_type": "workspace",
    "name": "My Company Workspace"
  }
}

A generic Asana Resource, containing a globally unique identifier.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
due_on string¦nullThe localized day on which this goal is due. This takes a date with format YYYY-MM-DD.
html_notes stringThe notes of the goal with formatting as HTML.
is_workspace_level booleanConditional. This property is only present when the workspace provided is an organization. Whether the goal belongs to the workspace (and is listed as part of the workspace’s goals) or not. If it isn’t a workspace-level goal, it is a team-level goal, and is associated with the goal’s team.
liked booleanTrue if the goal is liked by the authorized user, false if not.
name stringThe name of the goal.
notes stringFree-form textual information associated with the goal (i.e. its description).
start_on string¦nullThe day on which work for this goal begins, or null if the goal has no start date. This takes a date with YYYY-MM-DD format, and cannot be set unless there is an accompanying due date.
status string¦nullThe current status of this goal. When the goal is open, its status can be green, yellow, and red to reflect "On Track", "At Risk", and "Off Track", respectively. When the goal is closed, the value can be missed, achieved, partial, or dropped.
Note you can only write to this property if metric is set.
current_status_update objectA status update is an update on the progress of a particular project, portfolio, or goal, and is sent out to all of its parent's followers when created. These updates include both text describing the update and a status_type intended to represent the overall state of the project.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
The resource_subtypes for status objects represent the type of their parent.
title stringThe title of the status update.
followers [object]Array of users who are members of this goal.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
likes [object]Array of likes for users who have liked this goal.
gid stringGlobally unique identifier of the object, as a string.
user objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
metric object¦nullA generic Asana Resource, containing a globally unique identifier.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
currency_code string¦nullISO 4217 currency code to format this custom field. This will be null if the unit is not currency.
current_display_value stringThis string is the current value of a goal metric of type string.
current_number_value numberThis number is the current value of a goal metric of type number.
initial_number_value numberThis number is the start value of a goal metric of type number.
precision integerConditional. Only relevant for goal metrics of type ‘Number’. This field dictates the number of places after the decimal to round to, i.e. 0 is integer values, 1 rounds to the nearest tenth, and so on. Must be between 0 and 6, inclusive.
For percentage format, this may be unintuitive, as a value of 0.25 has a precision of 0, while a value of 0.251 has a precision of 1. This is due to 0.25 being displayed as 25%.
progress_source stringThis field defines how the progress value of a goal metric is being calculated. A goal's progress can be provided manually by the user, calculated automatically from contributing subgoals or projects, or managed by an integration with an external data source, such as Salesforce.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
target_number_value numberThis number is the end value of a goal metric of type number. This number cannot equal initial_number_value.
unit stringA supported unit of measure for the goal metric, or none.
can_manage booleanConditional. Only relevant for progress_source of type external. This boolean indicates whether the requester has the ability to update the current value of this metric. This returns true if the external metric was created by the requester, false otherwise.
num_likes integerThe number of users who have liked this goal.
owner object¦nullA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
team object¦nullA team is used to group related projects and people together within an organization. Each project in an organization is associated with a team.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the team.
time_period object¦nullA generic Asana Resource, containing a globally unique identifier.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
display_name stringA string representing the cadence code and the fiscal year.
end_on stringThe localized end date of the time period in YYYY-MM-DD format.
period stringThe cadence and index of the time period. The value is one of: FY, H1, H2, Q1, Q2, Q3, or Q4.
start_on stringThe localized start date of the time period in YYYY-MM-DD format.
workspace objectA workspace is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the workspace.

Enumerated Values

PropertyValue
resource_subtypeproject_status_update
resource_subtypeportfolio_status_update
resource_subtypegoal_status_update
progress_sourcemanual
progress_sourcesubgoal_progress
progress_sourceproject_task_completion
progress_sourceproject_milestone_completion
progress_sourceexternal
resource_subtypenumber
unitnone
unitcurrency
unitpercentage
periodFY
periodH1
periodH2
periodQ1
periodQ2
periodQ3
periodQ4


JobCompact

{
  "gid": "12345",
  "resource_type": "job",
  "new_project": {
    "gid": "12345",
    "resource_type": "project",
    "name": "Stuff to buy"
  },
  "new_project_template": {
    "gid": "12345",
    "resource_type": "project_template",
    "name": "Packing list"
  },
  "new_task": {
    "gid": "12345",
    "resource_type": "task",
    "name": "Bug Task",
    "resource_subtype": "default_task"
  },
  "resource_subtype": "duplicate_task",
  "status": "in_progress"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
new_project objectA project represents a prioritized list of tasks in Asana or a board with columns of tasks represented as cards. It exists in a single workspace or organization and is accessible to a subset of users in that workspace or organization, depending on its permissions.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
new_project_template objectA project template is an object that allows new projects to be created with a predefined setup, which may include tasks, sections, Rules, etc. It simplifies the process of running a workflow that involves a similar set of work every time.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project template.
new_task objectThe task is the basic object around which many operations in Asana are centered.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the task.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
The resource_subtype milestone represent a single moment in time. This means tasks with this subtype cannot have a start_date.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
status stringThe current status of this job. The value is one of: not_started, in_progress, succeeded, or failed.

Enumerated Values

PropertyValue
resource_subtypedefault_task
resource_subtypemilestone
resource_subtypesection
resource_subtypeapproval
statusnot_started
statusin_progress
statussucceeded
statusfailed


Job

{
  "gid": "12345",
  "resource_type": "job",
  "new_project": {
    "gid": "12345",
    "resource_type": "project",
    "name": "Stuff to buy"
  },
  "new_project_template": {
    "gid": "12345",
    "resource_type": "project_template",
    "name": "Packing list"
  },
  "new_task": {
    "gid": "12345",
    "resource_type": "task",
    "name": "Bug Task",
    "resource_subtype": "default_task"
  },
  "resource_subtype": "duplicate_task",
  "status": "in_progress"
}

A job is an object representing a process that handles asynchronous work.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
new_project objectA project represents a prioritized list of tasks in Asana or a board with columns of tasks represented as cards. It exists in a single workspace or organization and is accessible to a subset of users in that workspace or organization, depending on its permissions.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
new_project_template objectA project template is an object that allows new projects to be created with a predefined setup, which may include tasks, sections, Rules, etc. It simplifies the process of running a workflow that involves a similar set of work every time.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project template.
new_task objectThe task is the basic object around which many operations in Asana are centered.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the task.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
The resource_subtype milestone represent a single moment in time. This means tasks with this subtype cannot have a start_date.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
status stringThe current status of this job. The value is one of: not_started, in_progress, succeeded, or failed.

Enumerated Values

PropertyValue
resource_subtypedefault_task
resource_subtypemilestone
resource_subtypesection
resource_subtypeapproval
statusnot_started
statusin_progress
statussucceeded
statusfailed


OrganizationExportCompact

{
  "gid": "12345",
  "resource_type": "organization_export",
  "created_at": "2012-02-22T02:06:58.147Z",
  "download_url": "https://asana-export.s3.amazonaws.com/export-4632784536274-20170127-43246.json.gz?AWSAccessKeyId=xxxxxxxx",
  "organization": {
    "gid": "12345",
    "resource_type": "workspace",
    "name": "My Company Workspace"
  },
  "state": "started"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
created_at string(date-time)The time at which this resource was created.
download_url string(uri)¦nullDownload this URL to retreive the full export of the organization
in JSON format. It will be compressed in a gzip (.gz) container.

Note: May be null if the export is still in progress or
failed. If present, this URL may only be valid for 1 hour from
the time of retrieval. You should avoid persisting this URL
somewhere and rather refresh on demand to ensure you do not keep
stale URLs.
organization objectA workspace is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the workspace.
state stringThe current state of the export.

Enumerated Values

PropertyValue
statepending
statestarted
statefinished
stateerror


OrganizationExport

{
  "gid": "12345",
  "resource_type": "organization_export",
  "created_at": "2012-02-22T02:06:58.147Z",
  "download_url": "https://asana-export.s3.amazonaws.com/export-4632784536274-20170127-43246.json.gz?AWSAccessKeyId=xxxxxxxx",
  "organization": {
    "gid": "12345",
    "resource_type": "workspace",
    "name": "My Company Workspace"
  },
  "state": "started"
}

An organization_export object represents a request to export the complete data of an Organization in JSON format.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
created_at string(date-time)The time at which this resource was created.
download_url string(uri)¦nullDownload this URL to retreive the full export of the organization
in JSON format. It will be compressed in a gzip (.gz) container.

Note: May be null if the export is still in progress or
failed. If present, this URL may only be valid for 1 hour from
the time of retrieval. You should avoid persisting this URL
somewhere and rather refresh on demand to ensure you do not keep
stale URLs.
organization objectA workspace is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the workspace.
state stringThe current state of the export.

Enumerated Values

PropertyValue
statepending
statestarted
statefinished
stateerror


PortfolioCompact

{
  "gid": "12345",
  "resource_type": "portfolio",
  "name": "Bug Portfolio"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the portfolio.


PortfolioMembershipCompact

{
  "gid": "12345",
  "resource_type": "portfolio_membership",
  "portfolio": {
    "gid": "12345",
    "resource_type": "portfolio",
    "name": "Bug Portfolio"
  },
  "user": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  }
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
portfolio objectA portfolio gives a high-level overview of the status of multiple initiatives in Asana. Portfolios provide a dashboard overview of the state of multiple projects, including a progress report and the most recent project status update.
Portfolios have some restrictions on size. Each portfolio has a max of 500 items and, like projects, a max of 20 custom fields.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the portfolio.
user objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.


PortfolioMembership

{
  "gid": "12345",
  "resource_type": "portfolio_membership",
  "portfolio": {
    "gid": "12345",
    "resource_type": "portfolio",
    "name": "Bug Portfolio"
  },
  "user": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  }
}

This object determines if a user is a member of a portfolio.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
portfolio objectA portfolio gives a high-level overview of the status of multiple initiatives in Asana. Portfolios provide a dashboard overview of the state of multiple projects, including a progress report and the most recent project status update.
Portfolios have some restrictions on size. Each portfolio has a max of 500 items and, like projects, a max of 20 custom fields.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the portfolio.
user objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.


Portfolio

{
  "gid": "12345",
  "resource_type": "portfolio",
  "color": "light-green",
  "name": "Bug Portfolio",
  "created_at": "2012-02-22T02:06:58.147Z",
  "created_by": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "current_status_update": {
    "gid": "12345",
    "resource_type": "status_update",
    "resource_subtype": "project_status_update",
    "title": "Status Update - Jun 15"
  },
  "custom_field_settings": [
    {
      "gid": "12345",
      "resource_type": "custom_field_setting",
      "custom_field": {
        "gid": "12345",
        "resource_type": "custom_field",
        "asana_created_field": "priority",
        "created_by": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        },
        "currency_code": "EUR",
        "custom_label": "gold pieces",
        "custom_label_position": "suffix",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "description": "Development team priority",
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "format": "custom",
        "has_notifications_enabled": true,
        "is_global_to_workspace": true,
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "people_value": [
          {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          }
        ],
        "precision": 2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      },
      "is_important": false,
      "parent": {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      },
      "project": {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      }
    }
  ],
  "custom_fields": [
    {
      "gid": "12345",
      "resource_type": "custom_field",
      "date_value": {
        "date": "2024-08-23",
        "date_time": "2024-08-23T22:00:00.000Z"
      },
      "display_value": "blue",
      "enabled": true,
      "enum_options": [
        {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        }
      ],
      "enum_value": {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      },
      "multi_enum_values": [
        {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        }
      ],
      "name": "Status",
      "number_value": 5.2,
      "resource_subtype": "text",
      "text_value": "Some Value",
      "type": "text"
    }
  ],
  "due_on": "2019-09-15",
  "members": [
    {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    }
  ],
  "owner": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "permalink_url": "https://app.asana.com/0/resource/123456789/list",
  "public": false,
  "start_on": "2019-09-14",
  "workspace": {
    "gid": "12345",
    "resource_type": "workspace",
    "name": "My Company Workspace"
  }
}

A portfolio gives a high-level overview of the status of multiple initiatives in Asana. Portfolios provide a dashboard overview of the state of multiple projects, including a progress report and the most recent project status update. Portfolios have some restrictions on size. Each portfolio has a max of 500 items and, like projects, a max of 20 custom fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringColor of the portfolio.
name stringThe name of the portfolio.
created_at string(date-time)The time at which this resource was created.
created_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
current_status_update objectA status update is an update on the progress of a particular project, portfolio, or goal, and is sent out to all of its parent's followers when created. These updates include both text describing the update and a status_type intended to represent the overall state of the project.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
The resource_subtypes for status objects represent the type of their parent.
title stringThe title of the status update.
custom_field_settings [object]Array of custom field settings applied to the portfolio.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
custom_field objectThe custom field that is applied to the parent.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
asana_created_field string¦nullConditional. A unique identifier to associate this field with the template source of truth.
created_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
currency_code string¦nullISO 4217 currency code to format this custom field. This will be null if the format is not currency.
custom_label string¦nullThis is the string that appears next to the custom field value. This will be null if the format is not custom.
custom_label_position stringOnly relevant for custom fields with custom format. This depicts where to place the custom label. This will be null if the format is not custom.
date_value objectConditional. Only relevant for custom fields of type date. This object reflects the chosen date (and optionally, time) value of a date custom field. If no date is selected, the value of date_value will be null.
date stringA string representing the date in YYYY-MM-DD format.
date_time stringA string representing the date in ISO 8601 format. If no time value is selected, the value of date-time will be null.
description stringOpt In. The description of the custom field.
display_value string¦nullA string representation for the value of the custom field. Integrations that don't require the underlying type should use this field to read values. Using this field will future-proof an app against new custom field types.
enabled booleanConditional. Determines if the custom field is enabled or not.
enum_options [object]Conditional. Only relevant for custom fields of type enum. This array specifies the possible values which an enum custom field can adopt. To modify the enum options, refer to working with enum options.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
enum_value objectConditional. Only relevant for custom fields of type enum. This object is the chosen value of an enum custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
format stringThe format of this custom field.
has_notifications_enabled booleanConditional. This flag describes whether a follower of a task with this field should receive inbox notifications from changes to this field.
is_global_to_workspace booleanThis flag describes whether this custom field is available to every container in the workspace. Before project-specific custom fields, this field was always true.
multi_enum_values [object]Conditional. Only relevant for custom fields of type multi_enum. This object is the chosen values of a multi_enum custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
name stringThe name of the custom field.
number_value numberConditional. This number is the value of a number custom field.
people_value [object]Conditional. Only relevant for custom fields of type people. This array of compact user objects reflects the values of a people custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
precision integerOnly relevant for custom fields of type ‘Number’. This field dictates the number of places after the decimal to round to, i.e. 0 is integer values, 1 rounds to the nearest tenth, and so on. Must be between 0 and 6, inclusive.
For percentage format, this may be unintuitive, as a value of 0.25 has a precision of 0, while a value of 0.251 has a precision of 1. This is due to 0.25 being displayed as 25%.
The identifier format will always have a precision of 0.
resource_subtype stringThe type of the custom field. Must be one of the given values.
text_value stringConditional. This string is the value of a text custom field.
type stringDeprecated: new integrations should prefer the resource_subtype field. The type of the custom field. Must be one of the given values.
is_important booleanis_important is used in the Asana web application to determine if this custom field is displayed in the list/grid view of a project or portfolio.
parent objectThe parent to which the custom field is applied. This can be a project or portfolio and indicates that the tasks or projects that the parent contains may be given custom field values for this custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
project objectDeprecated: new integrations should prefer the parent field. The id of the project that this custom field settings refers to.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
custom_fields [object]Array of Custom Fields.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
date_value objectConditional. Only relevant for custom fields of type date. This object reflects the chosen date (and optionally, time) value of a date custom field. If no date is selected, the value of date_value will be null.
date stringA string representing the date in YYYY-MM-DD format.
date_time stringA string representing the date in ISO 8601 format. If no time value is selected, the value of date-time will be null.
display_value string¦nullA string representation for the value of the custom field. Integrations that don't require the underlying type should use this field to read values. Using this field will future-proof an app against new custom field types.
enabled booleanConditional. Determines if the custom field is enabled or not.
enum_options [object]Conditional. Only relevant for custom fields of type enum. This array specifies the possible values which an enum custom field can adopt. To modify the enum options, refer to working with enum options.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
enum_value objectConditional. Only relevant for custom fields of type enum. This object is the chosen value of an enum custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
multi_enum_values [object]Conditional. Only relevant for custom fields of type multi_enum. This object is the chosen values of a multi_enum custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
name stringThe name of the custom field.
number_value numberConditional. This number is the value of a number custom field.
resource_subtype stringThe type of the custom field. Must be one of the given values.
text_value stringConditional. This string is the value of a text custom field.
type stringDeprecated: new integrations should prefer the resource_subtype field. The type of the custom field. Must be one of the given values.
due_on string(date-time)¦nullThe localized day on which this portfolio is due. This takes a date with format YYYY-MM-DD.
members [object]none
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
owner objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
permalink_url stringA url that points directly to the object within Asana.
public booleanTrue if the portfolio is public to its workspace members.
start_on string(date)¦nullThe day on which work for this portfolio begins, or null if the portfolio has no start date. This takes a date with YYYY-MM-DD format. Note: due_on must be present in the request when setting or unsetting the start_on parameter. Additionally, start_on and due_on cannot be the same date.
workspace objectCreate-only. The workspace or organization that the portfolio belongs to.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the workspace.

Enumerated Values

PropertyValue
colordark-pink
colordark-green
colordark-blue
colordark-red
colordark-teal
colordark-brown
colordark-orange
colordark-purple
colordark-warm-gray
colorlight-pink
colorlight-green
colorlight-blue
colorlight-red
colorlight-teal
colorlight-brown
colorlight-orange
colorlight-purple
colorlight-warm-gray
resource_subtypeproject_status_update
resource_subtypeportfolio_status_update
resource_subtypegoal_status_update
asana_created_fielda_v_requirements
asana_created_fieldaccount_name
asana_created_fieldactionable
asana_created_fieldalign_shipping_link
asana_created_fieldalign_status
asana_created_fieldallotted_time
asana_created_fieldappointment
asana_created_fieldapproval_stage
asana_created_fieldapproved
asana_created_fieldarticle_series
asana_created_fieldboard_committee
asana_created_fieldbrowser
asana_created_fieldcampaign_audience
asana_created_fieldcampaign_project_status
asana_created_fieldcampaign_regions
asana_created_fieldchannel_primary
asana_created_fieldclient_topic_type
asana_created_fieldcomplete_by
asana_created_fieldcontact
asana_created_fieldcontact_email_address
asana_created_fieldcontent_channels
asana_created_fieldcontent_channels_needed
asana_created_fieldcontent_stage
asana_created_fieldcontent_type
asana_created_fieldcontract
asana_created_fieldcontract_status
asana_created_fieldcost
asana_created_fieldcreation_stage
asana_created_fieldcreative_channel
asana_created_fieldcreative_needed
asana_created_fieldcreative_needs
asana_created_fielddata_sensitivity
asana_created_fielddeal_size
asana_created_fielddelivery_appt
asana_created_fielddelivery_appt_date
asana_created_fielddepartment
asana_created_fielddepartment_responsible
asana_created_fielddesign_request_needed
asana_created_fielddesign_request_type
asana_created_fielddiscussion_category
asana_created_fielddo_this_task
asana_created_fieldeditorial_content_status
asana_created_fieldeditorial_content_tag
asana_created_fieldeditorial_content_type
asana_created_fieldeffort
asana_created_fieldeffort_level
asana_created_fieldest_completion_date
asana_created_fieldestimated_time
asana_created_fieldestimated_value
asana_created_fieldexpected_cost
asana_created_fieldexternal_steps_needed
asana_created_fieldfavorite_idea
asana_created_fieldfeedback_type
asana_created_fieldfinancial
asana_created_fieldfunding_amount
asana_created_fieldgrant_application_process
asana_created_fieldhiring_candidate_status
asana_created_fieldidea_status
asana_created_fieldids_link
asana_created_fieldids_patient_link
asana_created_fieldimplementation_stage
asana_created_fieldinsurance
asana_created_fieldinterview_area
asana_created_fieldinterview_question_score
asana_created_fielditero_scan_link
asana_created_fieldjob_s_applied_to
asana_created_fieldlab
asana_created_fieldlaunch_status
asana_created_fieldlead_status
asana_created_fieldlocalization_language
asana_created_fieldlocalization_market_team
asana_created_fieldlocalization_status
asana_created_fieldmeeting_minutes
asana_created_fieldmeeting_needed
asana_created_fieldminutes
asana_created_fieldmrr
asana_created_fieldmust_localize
asana_created_fieldname_of_foundation
asana_created_fieldneed_to_follow_up
asana_created_fieldnext_appointment
asana_created_fieldnext_steps_sales
asana_created_fieldnum_people
asana_created_fieldnumber_of_user_reports
asana_created_fieldoffice_location
asana_created_fieldonboarding_activity
asana_created_fieldowner
asana_created_fieldparticipants_needed
asana_created_fieldpatient_date_of_birth
asana_created_fieldpatient_email
asana_created_fieldpatient_phone
asana_created_fieldpatient_status
asana_created_fieldphone_number
asana_created_fieldplanning_category
asana_created_fieldpoint_of_contact
asana_created_fieldposition
asana_created_fieldpost_format
asana_created_fieldprescription
asana_created_fieldpriority
asana_created_fieldpriority_level
asana_created_fieldproduct
asana_created_fieldproduct_stage
asana_created_fieldprogress
asana_created_fieldproject_size
asana_created_fieldproject_status
asana_created_fieldproposed_budget
asana_created_fieldpublish_status
asana_created_fieldreason_for_scan
asana_created_fieldreferral
asana_created_fieldrequest_type
asana_created_fieldresearch_status
asana_created_fieldresponsible_department
asana_created_fieldresponsible_team
asana_created_fieldrisk_assessment_status
asana_created_fieldroom_name
asana_created_fieldsales_counterpart
asana_created_fieldsentiment
asana_created_fieldshipping_link
asana_created_fieldsocial_channels
asana_created_fieldstage
asana_created_fieldstatus
asana_created_fieldstatus_design
asana_created_fieldstatus_of_initiative
asana_created_fieldsystem_setup
asana_created_fieldtask_progress
asana_created_fieldteam
asana_created_fieldteam_marketing
asana_created_fieldteam_responsible
asana_created_fieldtime_it_takes_to_complete_tasks
asana_created_fieldtimeframe
asana_created_fieldtreatment_type
asana_created_fieldtype_work_requests_it
asana_created_fielduse_agency
asana_created_fielduser_name
asana_created_fieldvendor_category
asana_created_fieldvendor_type
asana_created_fieldword_count
custom_label_positionprefix
custom_label_positionsuffix
formatcurrency
formatidentifier
formatpercentage
formatcustom
formatnone
resource_subtypetext
resource_subtypeenum
resource_subtypemulti_enum
resource_subtypenumber
resource_subtypedate
resource_subtypepeople
typetext
typeenum
typemulti_enum
typenumber
resource_subtypetext
resource_subtypeenum
resource_subtypemulti_enum
resource_subtypenumber
resource_subtypedate
resource_subtypepeople
typetext
typeenum
typemulti_enum
typenumber


ProjectBriefCompact

{
  "gid": "12345",
  "resource_type": "project_brief"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.


ProjectBrief

{
  "gid": "12345",
  "resource_type": "project_brief",
  "html_text": "<body>This is a <strong>project brief</strong>.</body>",
  "title": "Stuff to buy — Project Brief",
  "permalink_url": "https://app.asana.com/0/11111111/22222222",
  "project": {
    "gid": "12345",
    "resource_type": "project",
    "name": "Stuff to buy"
  },
  "text": "This is a project brief."
}

A Project Brief allows you to explain the what and why of the project to your team.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
html_text stringHTML formatted text for the project brief.
title stringThe title of the project brief.
permalink_url stringA url that points directly to the object within Asana.
project objectThe project with which this project brief is associated.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
text stringOpt In. The plain text of the project brief.


ProjectCompact

{
  "gid": "12345",
  "resource_type": "project",
  "name": "Stuff to buy"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.


ProjectMembershipCompact

{
  "gid": "12345",
  "resource_type": "project_membership",
  "user": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  }
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
user objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.


ProjectMembership

{
  "gid": "12345",
  "resource_type": "project_membership",
  "user": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "project": {
    "gid": "12345",
    "resource_type": "project",
    "name": "Stuff to buy"
  },
  "write_access": "full_write"
}

With the introduction of “comment-only” projects in Asana, a user’s membership in a project comes with associated permissions. These permissions (whether a user has full access to the project or comment-only access) are accessible through the project memberships endpoints described here.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
user objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
project objectA project represents a prioritized list of tasks in Asana or a board with columns of tasks represented as cards. It exists in a single workspace or organization and is accessible to a subset of users in that workspace or organization, depending on its permissions.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
write_access stringWhether the user has full access to the project or has comment-only access.

Enumerated Values

PropertyValue
write_accessfull_write
write_accesscomment_only


Project

{
  "gid": "12345",
  "resource_type": "project",
  "archived": false,
  "color": "light-green",
  "created_at": "2012-02-22T02:06:58.147Z",
  "current_status": {
    "gid": "12345",
    "resource_type": "project_status",
    "author": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "color": "green",
    "created_at": "2012-02-22T02:06:58.147Z",
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
    "modified_at": "2012-02-22T02:06:58.147Z",
    "text": "The project is moving forward according to plan...",
    "title": "Status Update - Jun 15"
  },
  "current_status_update": {
    "gid": "12345",
    "resource_type": "status_update",
    "resource_subtype": "project_status_update",
    "title": "Status Update - Jun 15"
  },
  "custom_field_settings": [
    {
      "gid": "12345",
      "resource_type": "custom_field_setting",
      "custom_field": {
        "gid": "12345",
        "resource_type": "custom_field",
        "asana_created_field": "priority",
        "created_by": {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        },
        "currency_code": "EUR",
        "custom_label": "gold pieces",
        "custom_label_position": "suffix",
        "date_value": {
          "date": "2024-08-23",
          "date_time": "2024-08-23T22:00:00.000Z"
        },
        "description": "Development team priority",
        "display_value": "blue",
        "enabled": true,
        "enum_options": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "enum_value": {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        },
        "format": "custom",
        "has_notifications_enabled": true,
        "is_global_to_workspace": true,
        "multi_enum_values": [
          {
            "gid": "12345",
            "resource_type": "enum_option",
            "color": "blue",
            "enabled": true,
            "name": "Low"
          }
        ],
        "name": "Status",
        "number_value": 5.2,
        "people_value": [
          {
            "gid": "12345",
            "resource_type": "user",
            "name": "Greg Sanchez"
          }
        ],
        "precision": 2,
        "resource_subtype": "text",
        "text_value": "Some Value",
        "type": "text"
      },
      "is_important": false,
      "parent": {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      },
      "project": {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      }
    }
  ],
  "default_view": "calendar",
  "due_date": "2019-09-15",
  "due_on": "2019-09-15",
  "html_notes": "<body>These are things we need to purchase.</body>",
  "is_template": false,
  "members": [
    {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    }
  ],
  "modified_at": "2012-02-22T02:06:58.147Z",
  "name": "Stuff to buy",
  "notes": "These are things we need to purchase.",
  "public": false,
  "start_on": "2019-09-14",
  "workspace": {
    "gid": "12345",
    "resource_type": "workspace",
    "name": "My Company Workspace"
  },
  "completed": false,
  "completed_at": "2012-02-22T02:06:58.147Z",
  "completed_by": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "created_from_template": {
    "gid": "12345",
    "resource_type": "project_template",
    "name": "Packing list"
  },
  "custom_fields": [
    {
      "gid": "12345",
      "resource_type": "custom_field",
      "date_value": {
        "date": "2024-08-23",
        "date_time": "2024-08-23T22:00:00.000Z"
      },
      "display_value": "blue",
      "enabled": true,
      "enum_options": [
        {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        }
      ],
      "enum_value": {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      },
      "multi_enum_values": [
        {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        }
      ],
      "name": "Status",
      "number_value": 5.2,
      "resource_subtype": "text",
      "text_value": "Some Value",
      "type": "text"
    }
  ],
  "followers": [
    {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    }
  ],
  "icon": "chat_bubbles",
  "owner": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "permalink_url": "https://app.asana.com/0/resource/123456789/list",
  "project_brief": {
    "gid": "12345",
    "resource_type": "project_brief"
  },
  "team": {
    "gid": "12345",
    "resource_type": "team",
    "name": "Marketing"
  }
}

A project represents a prioritized list of tasks in Asana or a board with columns of tasks represented as cards. It exists in a single workspace or organization and is accessible to a subset of users in that workspace or organization, depending on its permissions.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
archived booleanTrue if the project is archived, false if not. Archived projects do not show in the UI by default and may be treated differently for queries.
color string¦nullColor of the project.
created_at string(date-time)The time at which this resource was created.
current_status objectDeprecated: new integrations should prefer the status_update resource.
A project status is an update on the progress of a particular project, and is sent out to all project followers when created. These updates include both text describing the update and a color code intended to represent the overall state of the project: "green" for projects that are on track, "yellow" for projects at risk, and "red" for projects that are behind.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
author objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
color string
required
The color associated with the status update.
created_at string(date-time)The time at which this resource was created.
created_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
html_text stringOpt In. The text content of the status update with formatting as HTML.
modified_at string(date-time)The time at which this project status was last modified.
Note: This does not currently reflect any changes in associations such as comments that may have been added or removed from the project status.
text string
required
The text content of the status update.
title stringThe title of the project status update.
current_status_update objectA status update is an update on the progress of a particular project, portfolio, or goal, and is sent out to all of its parent's followers when created. These updates include both text describing the update and a status_type intended to represent the overall state of the project.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
The resource_subtypes for status objects represent the type of their parent.
title stringThe title of the status update.
custom_field_settings [object]Array of Custom Field Settings (in compact form).
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
custom_field objectThe custom field that is applied to the parent.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
asana_created_field string¦nullConditional. A unique identifier to associate this field with the template source of truth.
created_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
currency_code string¦nullISO 4217 currency code to format this custom field. This will be null if the format is not currency.
custom_label string¦nullThis is the string that appears next to the custom field value. This will be null if the format is not custom.
custom_label_position stringOnly relevant for custom fields with custom format. This depicts where to place the custom label. This will be null if the format is not custom.
date_value objectConditional. Only relevant for custom fields of type date. This object reflects the chosen date (and optionally, time) value of a date custom field. If no date is selected, the value of date_value will be null.
date stringA string representing the date in YYYY-MM-DD format.
date_time stringA string representing the date in ISO 8601 format. If no time value is selected, the value of date-time will be null.
description stringOpt In. The description of the custom field.
display_value string¦nullA string representation for the value of the custom field. Integrations that don't require the underlying type should use this field to read values. Using this field will future-proof an app against new custom field types.
enabled booleanConditional. Determines if the custom field is enabled or not.
enum_options [object]Conditional. Only relevant for custom fields of type enum. This array specifies the possible values which an enum custom field can adopt. To modify the enum options, refer to working with enum options.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
enum_value objectConditional. Only relevant for custom fields of type enum. This object is the chosen value of an enum custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
format stringThe format of this custom field.
has_notifications_enabled booleanConditional. This flag describes whether a follower of a task with this field should receive inbox notifications from changes to this field.
is_global_to_workspace booleanThis flag describes whether this custom field is available to every container in the workspace. Before project-specific custom fields, this field was always true.
multi_enum_values [object]Conditional. Only relevant for custom fields of type multi_enum. This object is the chosen values of a multi_enum custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
name stringThe name of the custom field.
number_value numberConditional. This number is the value of a number custom field.
people_value [object]Conditional. Only relevant for custom fields of type people. This array of compact user objects reflects the values of a people custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
precision integerOnly relevant for custom fields of type ‘Number’. This field dictates the number of places after the decimal to round to, i.e. 0 is integer values, 1 rounds to the nearest tenth, and so on. Must be between 0 and 6, inclusive.
For percentage format, this may be unintuitive, as a value of 0.25 has a precision of 0, while a value of 0.251 has a precision of 1. This is due to 0.25 being displayed as 25%.
The identifier format will always have a precision of 0.
resource_subtype stringThe type of the custom field. Must be one of the given values.
text_value stringConditional. This string is the value of a text custom field.
type stringDeprecated: new integrations should prefer the resource_subtype field. The type of the custom field. Must be one of the given values.
is_important booleanis_important is used in the Asana web application to determine if this custom field is displayed in the list/grid view of a project or portfolio.
parent objectThe parent to which the custom field is applied. This can be a project or portfolio and indicates that the tasks or projects that the parent contains may be given custom field values for this custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
project objectDeprecated: new integrations should prefer the parent field. The id of the project that this custom field settings refers to.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
default_view stringThe default view (list, board, calendar, or timeline) of a project.
due_date string(date-time)¦nullDeprecated: new integrations should prefer the due_on field.
due_on string(date-time)¦nullThe day on which this project is due. This takes a date with format YYYY-MM-DD.
html_notes stringOpt In. The notes of the project with formatting as HTML.
is_template booleanOpt In. Deprecated - please use a project template endpoint instead (more in this forum post). Determines if the project is a template.
members [object]Array of users who are members of this project.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
modified_at string(date-time)The time at which this project was last modified.
Note: This does not currently reflect any changes in associations such as tasks or comments that may have been added or removed from the project.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
notes stringFree-form textual information associated with the project (ie., its description).
public booleanTrue if the project is public to its team.
start_on string(date)¦nullThe day on which work for this project begins, or null if the project has no start date. This takes a date with YYYY-MM-DD format. Note: due_on or due_at must be present in the request when setting or unsetting the start_on parameter. Additionally, start_on and due_on cannot be the same date.
workspace objectCreate-only. The workspace or organization this project is associated with. Once created, projects cannot be moved to a different workspace. This attribute can only be specified at creation time.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the workspace.
completed booleanTrue if the project is currently marked complete, false if not.
completed_at string(date-time)¦nullThe time at which this project was completed, or null if the project is not completed.
completed_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
created_from_template object¦nullOpt In. The project template from which this project was created. If the project was not created from a template, this field will be null.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project template.
custom_fields [object]Array of Custom Fields.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
date_value objectConditional. Only relevant for custom fields of type date. This object reflects the chosen date (and optionally, time) value of a date custom field. If no date is selected, the value of date_value will be null.
date stringA string representing the date in YYYY-MM-DD format.
date_time stringA string representing the date in ISO 8601 format. If no time value is selected, the value of date-time will be null.
display_value string¦nullA string representation for the value of the custom field. Integrations that don't require the underlying type should use this field to read values. Using this field will future-proof an app against new custom field types.
enabled booleanConditional. Determines if the custom field is enabled or not.
enum_options [object]Conditional. Only relevant for custom fields of type enum. This array specifies the possible values which an enum custom field can adopt. To modify the enum options, refer to working with enum options.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
enum_value objectConditional. Only relevant for custom fields of type enum. This object is the chosen value of an enum custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
multi_enum_values [object]Conditional. Only relevant for custom fields of type multi_enum. This object is the chosen values of a multi_enum custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
name stringThe name of the custom field.
number_value numberConditional. This number is the value of a number custom field.
resource_subtype stringThe type of the custom field. Must be one of the given values.
text_value stringConditional. This string is the value of a text custom field.
type stringDeprecated: new integrations should prefer the resource_subtype field. The type of the custom field. Must be one of the given values.
followers [object]Array of users following this project. Followers are a subset of members who have opted in to receive "tasks added" notifications for a project.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
icon string¦nullThe icon for a project.
owner objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
permalink_url stringA url that points directly to the object within Asana.
project_brief object¦nullOpt In. The project brief associated with this project.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
team objectThe team that this project is shared with.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the team.

Enumerated Values

PropertyValue
colordark-pink
colordark-green
colordark-blue
colordark-red
colordark-teal
colordark-brown
colordark-orange
colordark-purple
colordark-warm-gray
colorlight-pink
colorlight-green
colorlight-blue
colorlight-red
colorlight-teal
colorlight-brown
colorlight-orange
colorlight-purple
colorlight-warm-gray
colorgreen
coloryellow
colorred
colorblue
resource_subtypeproject_status_update
resource_subtypeportfolio_status_update
resource_subtypegoal_status_update
asana_created_fielda_v_requirements
asana_created_fieldaccount_name
asana_created_fieldactionable
asana_created_fieldalign_shipping_link
asana_created_fieldalign_status
asana_created_fieldallotted_time
asana_created_fieldappointment
asana_created_fieldapproval_stage
asana_created_fieldapproved
asana_created_fieldarticle_series
asana_created_fieldboard_committee
asana_created_fieldbrowser
asana_created_fieldcampaign_audience
asana_created_fieldcampaign_project_status
asana_created_fieldcampaign_regions
asana_created_fieldchannel_primary
asana_created_fieldclient_topic_type
asana_created_fieldcomplete_by
asana_created_fieldcontact
asana_created_fieldcontact_email_address
asana_created_fieldcontent_channels
asana_created_fieldcontent_channels_needed
asana_created_fieldcontent_stage
asana_created_fieldcontent_type
asana_created_fieldcontract
asana_created_fieldcontract_status
asana_created_fieldcost
asana_created_fieldcreation_stage
asana_created_fieldcreative_channel
asana_created_fieldcreative_needed
asana_created_fieldcreative_needs
asana_created_fielddata_sensitivity
asana_created_fielddeal_size
asana_created_fielddelivery_appt
asana_created_fielddelivery_appt_date
asana_created_fielddepartment
asana_created_fielddepartment_responsible
asana_created_fielddesign_request_needed
asana_created_fielddesign_request_type
asana_created_fielddiscussion_category
asana_created_fielddo_this_task
asana_created_fieldeditorial_content_status
asana_created_fieldeditorial_content_tag
asana_created_fieldeditorial_content_type
asana_created_fieldeffort
asana_created_fieldeffort_level
asana_created_fieldest_completion_date
asana_created_fieldestimated_time
asana_created_fieldestimated_value
asana_created_fieldexpected_cost
asana_created_fieldexternal_steps_needed
asana_created_fieldfavorite_idea
asana_created_fieldfeedback_type
asana_created_fieldfinancial
asana_created_fieldfunding_amount
asana_created_fieldgrant_application_process
asana_created_fieldhiring_candidate_status
asana_created_fieldidea_status
asana_created_fieldids_link
asana_created_fieldids_patient_link
asana_created_fieldimplementation_stage
asana_created_fieldinsurance
asana_created_fieldinterview_area
asana_created_fieldinterview_question_score
asana_created_fielditero_scan_link
asana_created_fieldjob_s_applied_to
asana_created_fieldlab
asana_created_fieldlaunch_status
asana_created_fieldlead_status
asana_created_fieldlocalization_language
asana_created_fieldlocalization_market_team
asana_created_fieldlocalization_status
asana_created_fieldmeeting_minutes
asana_created_fieldmeeting_needed
asana_created_fieldminutes
asana_created_fieldmrr
asana_created_fieldmust_localize
asana_created_fieldname_of_foundation
asana_created_fieldneed_to_follow_up
asana_created_fieldnext_appointment
asana_created_fieldnext_steps_sales
asana_created_fieldnum_people
asana_created_fieldnumber_of_user_reports
asana_created_fieldoffice_location
asana_created_fieldonboarding_activity
asana_created_fieldowner
asana_created_fieldparticipants_needed
asana_created_fieldpatient_date_of_birth
asana_created_fieldpatient_email
asana_created_fieldpatient_phone
asana_created_fieldpatient_status
asana_created_fieldphone_number
asana_created_fieldplanning_category
asana_created_fieldpoint_of_contact
asana_created_fieldposition
asana_created_fieldpost_format
asana_created_fieldprescription
asana_created_fieldpriority
asana_created_fieldpriority_level
asana_created_fieldproduct
asana_created_fieldproduct_stage
asana_created_fieldprogress
asana_created_fieldproject_size
asana_created_fieldproject_status
asana_created_fieldproposed_budget
asana_created_fieldpublish_status
asana_created_fieldreason_for_scan
asana_created_fieldreferral
asana_created_fieldrequest_type
asana_created_fieldresearch_status
asana_created_fieldresponsible_department
asana_created_fieldresponsible_team
asana_created_fieldrisk_assessment_status
asana_created_fieldroom_name
asana_created_fieldsales_counterpart
asana_created_fieldsentiment
asana_created_fieldshipping_link
asana_created_fieldsocial_channels
asana_created_fieldstage
asana_created_fieldstatus
asana_created_fieldstatus_design
asana_created_fieldstatus_of_initiative
asana_created_fieldsystem_setup
asana_created_fieldtask_progress
asana_created_fieldteam
asana_created_fieldteam_marketing
asana_created_fieldteam_responsible
asana_created_fieldtime_it_takes_to_complete_tasks
asana_created_fieldtimeframe
asana_created_fieldtreatment_type
asana_created_fieldtype_work_requests_it
asana_created_fielduse_agency
asana_created_fielduser_name
asana_created_fieldvendor_category
asana_created_fieldvendor_type
asana_created_fieldword_count
custom_label_positionprefix
custom_label_positionsuffix
formatcurrency
formatidentifier
formatpercentage
formatcustom
formatnone
resource_subtypetext
resource_subtypeenum
resource_subtypemulti_enum
resource_subtypenumber
resource_subtypedate
resource_subtypepeople
typetext
typeenum
typemulti_enum
typenumber
default_viewlist
default_viewboard
default_viewcalendar
default_viewtimeline
resource_subtypetext
resource_subtypeenum
resource_subtypemulti_enum
resource_subtypenumber
resource_subtypedate
resource_subtypepeople
typetext
typeenum
typemulti_enum
typenumber
iconlist
iconboard
icontimeline
iconcalendar
iconrocket
iconpeople
icongraph
iconstar
iconbug
iconlight_bulb
iconglobe
icongear
iconnotebook
iconcomputer
iconcheck
icontarget
iconhtml
iconmegaphone
iconchat_bubbles
iconbriefcase
iconpage_layout
iconmountain_flag
iconpuzzle
iconpresentation
iconline_and_symbols
iconspeed_dial
iconribbon
iconshoe
iconshopping_basket
iconmap
iconticket
iconcoins


ProjectStatusCompact

{
  "gid": "12345",
  "resource_type": "project_status",
  "title": "Status Update - Jun 15"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
title stringThe title of the project status update.


ProjectStatus

{
  "gid": "12345",
  "resource_type": "project_status",
  "color": "green",
  "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
  "text": "The project is moving forward according to plan...",
  "title": "Status Update - Jun 15",
  "author": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "created_at": "2012-02-22T02:06:58.147Z",
  "created_by": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "modified_at": "2012-02-22T02:06:58.147Z"
}

Deprecated: new integrations should prefer the status_update resource. A project status is an update on the progress of a particular project, and is sent out to all project followers when created. These updates include both text describing the update and a color code intended to represent the overall state of the project: "green" for projects that are on track, "yellow" for projects at risk, and "red" for projects that are behind.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color string
required
The color associated with the status update.
html_text stringOpt In. The text content of the status update with formatting as HTML.
text string
required
The text content of the status update.
title stringThe title of the project status update.
author objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
created_at string(date-time)The time at which this resource was created.
created_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
modified_at string(date-time)The time at which this project status was last modified.
Note: This does not currently reflect any changes in associations such as comments that may have been added or removed from the project status.

Enumerated Values

PropertyValue
colorgreen
coloryellow
colorred
colorblue


ProjectTemplateCompact

{
  "gid": "12345",
  "resource_type": "project_template",
  "name": "Packing list"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project template.


ProjectTemplate

{
  "gid": "12345",
  "resource_type": "project_template",
  "color": "light-green",
  "description": "These are things we need to pack for a trip.",
  "html_description": "<body>These are things we need to pack for a trip.</body>",
  "name": "Packing list",
  "owner": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "public": false,
  "requested_dates": [
    {
      "description": "Choose a start date for your project.",
      "gid": "1",
      "name": "Start Date"
    }
  ],
  "team": {
    "gid": "12345",
    "resource_type": "team",
    "name": "Marketing"
  }
}

A project template is an object that allows new projects to be created with a predefined setup, which may include tasks, sections, Rules, etc. It simplifies the process of running a workflow that involves a similar set of work every time.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color string¦nullColor of the project template.
description stringFree-form textual information associated with the project template
html_description stringThe description of the project template with formatting as HTML.
name stringName of the project template.
owner objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
public booleanTrue if the project template is public to its team.
requested_dates [object]Array of date variables in this project template. Calendar dates must be provided for these variables when instantiating a project.
description stringThe description of what the date variable is used for when instantiating a project.
gid stringGlobally unique identifier of the date field in the project template. A value of 1 refers to the project start date, while 2 refers to the project due date.
name stringThe name of the date variable.
team objectA team is used to group related projects and people together within an organization. Each project in an organization is associated with a team.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the team.

Enumerated Values

PropertyValue
colordark-pink
colordark-green
colordark-blue
colordark-red
colordark-teal
colordark-brown
colordark-orange
colordark-purple
colordark-warm-gray
colorlight-pink
colorlight-green
colorlight-blue
colorlight-red
colorlight-teal
colorlight-brown
colorlight-orange
colorlight-purple
colorlight-warm-gray


SectionCompact

{
  "gid": "12345",
  "resource_type": "section",
  "name": "Next Actions"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the section (i.e. the text displayed as the section header).


Section

{
  "gid": "12345",
  "resource_type": "section",
  "name": "Next Actions",
  "created_at": "2012-02-22T02:06:58.147Z",
  "project": {
    "gid": "12345",
    "resource_type": "project",
    "name": "Stuff to buy"
  },
  "projects": [
    {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    }
  ]
}

A section is a subdivision of a project that groups tasks together. It can either be a header above a list of tasks in a list view or a column in a board view of a project.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the section (i.e. the text displayed as the section header).
created_at string(date-time)The time at which this resource was created.
project objectA project represents a prioritized list of tasks in Asana or a board with columns of tasks represented as cards. It exists in a single workspace or organization and is accessible to a subset of users in that workspace or organization, depending on its permissions.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
projects [object]Deprecated - please use project instead
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.


StatusUpdateCompact

{
  "gid": "12345",
  "resource_type": "status_update",
  "resource_subtype": "project_status_update",
  "title": "Status Update - Jun 15"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
The resource_subtypes for status objects represent the type of their parent.
title stringThe title of the status update.

Enumerated Values

PropertyValue
resource_subtypeproject_status_update
resource_subtypeportfolio_status_update
resource_subtypegoal_status_update


StatusUpdate

{
  "gid": "12345",
  "resource_type": "status_update",
  "html_text": "<body>The project <strong>is</strong> moving forward according to plan...</body>",
  "resource_subtype": "project_status_update",
  "status_type": "on_track",
  "text": "The project is moving forward according to plan...",
  "title": "Status Update - Jun 15",
  "author": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "created_at": "2012-02-22T02:06:58.147Z",
  "created_by": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "hearted": true,
  "hearts": [
    {
      "gid": "12345",
      "user": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    }
  ],
  "liked": true,
  "likes": [
    {
      "gid": "12345",
      "user": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    }
  ],
  "modified_at": "2012-02-22T02:06:58.147Z",
  "num_hearts": 5,
  "num_likes": 5,
  "parent": {
    "gid": "12345",
    "resource_type": "project",
    "name": "Stuff to buy"
  }
}

A status update is an update on the progress of a particular project, portfolio, or goal, and is sent out to all of its parent's followers when created. These updates include both text describing the update and a status_type intended to represent the overall state of the project.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
html_text stringOpt In. The text content of the status update with formatting as HTML.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
The resource_subtypes for status objects represent the type of their parent.
status_type string
required
The type associated with the status update. This represents the current state of the object this object is on.
text string
required
The text content of the status update.
title stringThe title of the status update.
author objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
created_at string(date-time)The time at which this resource was created.
created_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
hearted booleanDeprecated - please use liked instead True if the status is hearted by the authorized user, false if not.
hearts [object]Deprecated - please use likes instead Array of likes for users who have hearted this status.
gid stringGlobally unique identifier of the object, as a string.
user objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
liked booleanTrue if the status is liked by the authorized user, false if not.
likes [object]Array of likes for users who have liked this status.
gid stringGlobally unique identifier of the object, as a string.
user objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
modified_at string(date-time)The time at which this project status was last modified.
Note: This does not currently reflect any changes in associations such as comments that may have been added or removed from the status.
num_hearts integerDeprecated - please use likes instead The number of users who have hearted this status.
num_likes integerThe number of users who have liked this status.
parent objectThe parent of the status update. This can be a project, goal or portfolio, and indicates that this status was sent on that object.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.

Enumerated Values

PropertyValue
resource_subtypeproject_status_update
resource_subtypeportfolio_status_update
resource_subtypegoal_status_update
status_typeon_track
status_typeat_risk
status_typeoff_track
status_typeon_hold
status_typecomplete
status_typeachieved
status_typepartial
status_typemissed
status_typedropped


StoryCompact

{
  "gid": "12345",
  "resource_type": "story",
  "created_at": "2012-02-22T02:06:58.147Z",
  "created_by": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "resource_subtype": "comment_added",
  "text": "marked today"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
created_at string(date-time)The time at which this resource was created.
created_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
text stringCreate-only. Human-readable text for the story or comment.
This will not include the name of the creator.
Note: This is not guaranteed to be stable for a given type of story. For example, text for a reassignment may not always say “assigned to …” as the text for a story can both be edited and change based on the language settings of the user making the request.
Use the resource_subtype property to discover the action that created the story.


Story

{
  "gid": "12345",
  "resource_type": "story",
  "created_at": "2012-02-22T02:06:58.147Z",
  "html_text": "<body>This is a comment.</body>",
  "is_pinned": false,
  "resource_subtype": "comment_added",
  "sticker_name": "dancing_unicorn",
  "text": "This is a comment.",
  "assignee": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "created_by": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "custom_field": {
    "gid": "12345",
    "resource_type": "custom_field",
    "date_value": {
      "date": "2024-08-23",
      "date_time": "2024-08-23T22:00:00.000Z"
    },
    "display_value": "blue",
    "enabled": true,
    "enum_options": [
      {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "enum_value": {
      "gid": "12345",
      "resource_type": "enum_option",
      "color": "blue",
      "enabled": true,
      "name": "Low"
    },
    "multi_enum_values": [
      {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      }
    ],
    "name": "Status",
    "number_value": 5.2,
    "resource_subtype": "text",
    "text_value": "Some Value",
    "type": "text"
  },
  "dependency": {
    "gid": "12345",
    "resource_type": "task",
    "name": "Bug Task",
    "resource_subtype": "default_task"
  },
  "duplicate_of": {
    "gid": "12345",
    "resource_type": "task",
    "name": "Bug Task",
    "resource_subtype": "default_task"
  },
  "duplicated_from": {
    "gid": "12345",
    "resource_type": "task",
    "name": "Bug Task",
    "resource_subtype": "default_task"
  },
  "follower": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "hearted": false,
  "hearts": [
    {
      "gid": "12345",
      "user": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    }
  ],
  "is_editable": false,
  "is_edited": false,
  "liked": false,
  "likes": [
    {
      "gid": "12345",
      "user": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    }
  ],
  "new_approval_status": "approved",
  "new_date_value": {
    "due_at": "2019-09-15T02:06:58.158Z",
    "due_on": "2019-09-15",
    "start_on": "2019-09-14"
  },
  "new_dates": {
    "due_at": "2019-09-15T02:06:58.158Z",
    "due_on": "2019-09-15",
    "start_on": "2019-09-14"
  },
  "new_enum_value": {
    "gid": "12345",
    "resource_type": "enum_option",
    "color": "blue",
    "enabled": true,
    "name": "Low"
  },
  "new_multi_enum_values": [
    {
      "gid": "12345",
      "resource_type": "enum_option",
      "color": "blue",
      "enabled": true,
      "name": "Low"
    }
  ],
  "new_name": "This is the New Name",
  "new_number_value": 2,
  "new_people_value": [
    {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    }
  ],
  "new_resource_subtype": "milestone",
  "new_section": {
    "gid": "12345",
    "resource_type": "section",
    "name": "Next Actions"
  },
  "new_text_value": "This is the New Text",
  "num_hearts": 5,
  "num_likes": 5,
  "old_approval_status": "pending",
  "old_date_value": {
    "due_at": "2019-09-15T02:06:58.158Z",
    "due_on": "2019-09-15",
    "start_on": "2019-09-14"
  },
  "old_dates": {
    "due_at": "2019-09-15T02:06:58.158Z",
    "due_on": "2019-09-15",
    "start_on": "2019-09-14"
  },
  "old_enum_value": {
    "gid": "12345",
    "resource_type": "enum_option",
    "color": "blue",
    "enabled": true,
    "name": "Low"
  },
  "old_multi_enum_values": [
    {
      "gid": "12345",
      "resource_type": "enum_option",
      "color": "blue",
      "enabled": true,
      "name": "Low"
    }
  ],
  "old_name": "This was the Old Name",
  "old_number_value": 1,
  "old_people_value": [
    {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    }
  ],
  "old_resource_subtype": "default_task",
  "old_section": {
    "gid": "12345",
    "resource_type": "section",
    "name": "Next Actions"
  },
  "old_text_value": "This was the Old Text",
  "previews": [
    {
      "fallback": "Greg: Great! I like this idea.\\n\\nhttps//a_company.slack.com/archives/ABCDEFG/12345678",
      "footer": "Mar 17, 2019 1:25 PM",
      "header": "Asana for Slack",
      "header_link": "https://asana.comn/apps/slack",
      "html_text": "<body>Great! I like this idea.</body>",
      "text": "Great! I like this idea.",
      "title": "Greg",
      "title_link": "https://asana.slack.com/archives/ABCDEFG/12345678"
    }
  ],
  "project": {
    "gid": "12345",
    "resource_type": "project",
    "name": "Stuff to buy"
  },
  "source": "web",
  "story": {
    "gid": "12345",
    "resource_type": "story",
    "created_at": "2012-02-22T02:06:58.147Z",
    "created_by": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "resource_subtype": "comment_added",
    "text": "marked today"
  },
  "tag": {
    "gid": "12345",
    "resource_type": "tag",
    "name": "Stuff to buy"
  },
  "target": {
    "gid": "12345",
    "resource_type": "task",
    "name": "Bug Task",
    "resource_subtype": "default_task"
  },
  "task": {
    "gid": "12345",
    "resource_type": "task",
    "name": "Bug Task",
    "resource_subtype": "default_task"
  },
  "type": "comment"
}

A story represents an activity associated with an object in the Asana system.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
created_at string(date-time)The time at which this resource was created.
html_text stringOpt In. HTML formatted text for a comment. This will not include the name of the creator.
is_pinned booleanConditional. Whether the story should be pinned on the resource.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
sticker_name stringThe name of the sticker in this story. null if there is no sticker.
text stringThe plain text of the comment to add. Cannot be used with html_text.
assignee objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
created_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
custom_field objectCustom Fields store the metadata that is used in order to add user-specified information to tasks in Asana. Be sure to reference the Custom Fields developer documentation for more information about how custom fields relate to various resources in Asana.

Users in Asana can lock custom fields, which will make them read-only when accessed by other users. Attempting to edit a locked custom field will return HTTP error code 403 Forbidden.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
date_value objectConditional. Only relevant for custom fields of type date. This object reflects the chosen date (and optionally, time) value of a date custom field. If no date is selected, the value of date_value will be null.
date stringA string representing the date in YYYY-MM-DD format.
date_time stringA string representing the date in ISO 8601 format. If no time value is selected, the value of date-time will be null.
display_value string¦nullA string representation for the value of the custom field. Integrations that don't require the underlying type should use this field to read values. Using this field will future-proof an app against new custom field types.
enabled booleanConditional. Determines if the custom field is enabled or not.
enum_options [object]Conditional. Only relevant for custom fields of type enum. This array specifies the possible values which an enum custom field can adopt. To modify the enum options, refer to working with enum options.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
enum_value objectConditional. Only relevant for custom fields of type enum. This object is the chosen value of an enum custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
multi_enum_values [object]Conditional. Only relevant for custom fields of type multi_enum. This object is the chosen values of a multi_enum custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
name stringThe name of the custom field.
number_value numberConditional. This number is the value of a number custom field.
resource_subtype stringThe type of the custom field. Must be one of the given values.
text_value stringConditional. This string is the value of a text custom field.
type stringDeprecated: new integrations should prefer the resource_subtype field. The type of the custom field. Must be one of the given values.
dependency objectThe task is the basic object around which many operations in Asana are centered.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the task.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
The resource_subtype milestone represent a single moment in time. This means tasks with this subtype cannot have a start_date.
duplicate_of objectThe task is the basic object around which many operations in Asana are centered.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the task.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
The resource_subtype milestone represent a single moment in time. This means tasks with this subtype cannot have a start_date.
duplicated_from objectThe task is the basic object around which many operations in Asana are centered.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the task.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
The resource_subtype milestone represent a single moment in time. This means tasks with this subtype cannot have a start_date.
follower objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
hearted booleanDeprecated - please use likes instead
Conditional. True if the story is hearted by the authorized user, false if not.
hearts [object]Deprecated - please use likes instead

Conditional. Array of likes for users who have hearted this story.
gid stringGlobally unique identifier of the object, as a string.
user objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
is_editable booleanConditional. Whether the text of the story can be edited after creation.
is_edited booleanConditional. Whether the text of the story has been edited after creation.
liked booleanConditional. True if the story is liked by the authorized user, false if not.
likes [object]Conditional. Array of likes for users who have liked this story.
gid stringGlobally unique identifier of the object, as a string.
user objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
new_approval_status stringConditional. The new value of approval status.
new_date_value objectConditional The new value of a date custom field story.
due_at string(date-time)¦nullThe UTC date and time on which this task is due, or null if the task has no due time. This takes an ISO 8601 date string in UTC and should not be used together with due_on.
due_on string(date)The localized day on which this goal is due. This takes a date with format YYYY-MM-DD.
start_on string(date)¦nullThe day on which work for this goal begins, or null if the goal has no start date. This takes a date with YYYY-MM-DD format, and cannot be set unless there is an accompanying due date.
new_dates objectConditional
due_at string(date-time)¦nullThe UTC date and time on which this task is due, or null if the task has no due time. This takes an ISO 8601 date string in UTC and should not be used together with due_on.
due_on string(date)The localized day on which this goal is due. This takes a date with format YYYY-MM-DD.
start_on string(date)¦nullThe day on which work for this goal begins, or null if the goal has no start date. This takes a date with YYYY-MM-DD format, and cannot be set unless there is an accompanying due date.
new_enum_value objectEnum options are the possible values which an enum custom field can adopt. An enum custom field must contain at least 1 enum option but no more than 500.

You can add enum options to a custom field by using the POST /custom_fields/custom_field_gid/enum_options endpoint.

It is not possible to remove or delete an enum option. Instead, enum options can be disabled by updating the enabled field to false with the PUT /enum_options/enum_option_gid endpoint. Other attributes can be updated similarly.

On creation of an enum option, enabled is always set to true, meaning the enum option is a selectable value for the custom field. Setting enabled=false is equivalent to “trashing” the enum option in the Asana web app within the “Edit Fields” dialog. The enum option will no longer be selectable but, if the enum option value was previously set within a task, the task will retain the value.

Enum options are an ordered list and by default new enum options are inserted at the end. Ordering in relation to existing enum options can be specified on creation by using insert_before or insert_after to reference an existing enum option. Only one of insert_before and insert_after can be provided when creating a new enum option.

An enum options list can be reordered with the POST /custom_fields/custom_field_gid/enum_options/insert endpoint.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
new_multi_enum_values [object]Conditional. The new value of a multi-enum custom field story.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
new_name stringConditional
new_number_value integerConditional
new_people_value [object]Conditional. The new value of a people custom field story.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
new_resource_subtype stringConditional
new_section objectA section is a subdivision of a project that groups tasks together. It can either be a header above a list of tasks in a list view or a column in a board view of a project.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the section (i.e. the text displayed as the section header).
new_text_value stringConditional
num_hearts integerDeprecated - please use likes instead

Conditional. The number of users who have hearted this story.
num_likes integerConditional. The number of users who have liked this story.
old_approval_status stringConditional. The old value of approval status.
old_date_value objectConditional. The old value of a date custom field story.
due_at string(date-time)¦nullThe UTC date and time on which this task is due, or null if the task has no due time. This takes an ISO 8601 date string in UTC and should not be used together with due_on.
due_on string(date)The localized day on which this goal is due. This takes a date with format YYYY-MM-DD.
start_on string(date)¦nullThe day on which work for this goal begins, or null if the goal has no start date. This takes a date with YYYY-MM-DD format, and cannot be set unless there is an accompanying due date.
old_dates objectConditional
due_at string(date-time)¦nullThe UTC date and time on which this task is due, or null if the task has no due time. This takes an ISO 8601 date string in UTC and should not be used together with due_on.
due_on string(date)The localized day on which this goal is due. This takes a date with format YYYY-MM-DD.
start_on string(date)¦nullThe day on which work for this goal begins, or null if the goal has no start date. This takes a date with YYYY-MM-DD format, and cannot be set unless there is an accompanying due date.
old_enum_value objectEnum options are the possible values which an enum custom field can adopt. An enum custom field must contain at least 1 enum option but no more than 500.

You can add enum options to a custom field by using the POST /custom_fields/custom_field_gid/enum_options endpoint.

It is not possible to remove or delete an enum option. Instead, enum options can be disabled by updating the enabled field to false with the PUT /enum_options/enum_option_gid endpoint. Other attributes can be updated similarly.

On creation of an enum option, enabled is always set to true, meaning the enum option is a selectable value for the custom field. Setting enabled=false is equivalent to “trashing” the enum option in the Asana web app within the “Edit Fields” dialog. The enum option will no longer be selectable but, if the enum option value was previously set within a task, the task will retain the value.

Enum options are an ordered list and by default new enum options are inserted at the end. Ordering in relation to existing enum options can be specified on creation by using insert_before or insert_after to reference an existing enum option. Only one of insert_before and insert_after can be provided when creating a new enum option.

An enum options list can be reordered with the POST /custom_fields/custom_field_gid/enum_options/insert endpoint.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
old_multi_enum_values [object]Conditional. The old value of a multi-enum custom field story.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
old_name stringConditional'
old_number_value integerConditional
old_people_value [object]Conditional. The old value of a people custom field story.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
old_resource_subtype stringConditional
old_section objectA section is a subdivision of a project that groups tasks together. It can either be a header above a list of tasks in a list view or a column in a board view of a project.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the section (i.e. the text displayed as the section header).
old_text_value stringConditional
previews [object]Conditional. A collection of previews to be displayed in the story.

Note: This property only exists for comment stories.
fallback stringSome fallback text to display if unable to display the full preview.
footer stringText to display in the footer.
header stringText to display in the header.
header_link stringWhere the header will link to.
html_text stringHTML formatted text for the body of the preview.
text stringText for the body of the preview.
title stringText to display as the title.
title_link stringWhere to title will link to.
project objectA project represents a prioritized list of tasks in Asana or a board with columns of tasks represented as cards. It exists in a single workspace or organization and is accessible to a subset of users in that workspace or organization, depending on its permissions.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
source stringThe component of the Asana product the user used to trigger the story.
story objectA story represents an activity associated with an object in the Asana system.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
created_at string(date-time)The time at which this resource was created.
created_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
text stringCreate-only. Human-readable text for the story or comment.
This will not include the name of the creator.
Note: This is not guaranteed to be stable for a given type of story. For example, text for a reassignment may not always say “assigned to …” as the text for a story can both be edited and change based on the language settings of the user making the request.
Use the resource_subtype property to discover the action that created the story.
tag objectA tag is a label that can be attached to any task in Asana. It exists in a single workspace or organization.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the tag. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
target objectThe object this story is associated with. Currently may only be a task.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the task.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
The resource_subtype milestone represent a single moment in time. This means tasks with this subtype cannot have a start_date.
task objectThe task is the basic object around which many operations in Asana are centered.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the task.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
The resource_subtype milestone represent a single moment in time. This means tasks with this subtype cannot have a start_date.
type stringnone

Enumerated Values

PropertyValue
sticker_namegreen_checkmark
sticker_namepeople_dancing
sticker_namedancing_unicorn
sticker_nameheart
sticker_nameparty_popper
sticker_namepeople_waving_flags
sticker_namesplashing_narwhal
sticker_nametrophy
sticker_nameyeti_riding_unicorn
sticker_namecelebrating_people
sticker_namedetermined_climbers
sticker_namephoenix_spreading_love
resource_subtypetext
resource_subtypeenum
resource_subtypemulti_enum
resource_subtypenumber
resource_subtypedate
resource_subtypepeople
typetext
typeenum
typemulti_enum
typenumber
resource_subtypedefault_task
resource_subtypemilestone
resource_subtypesection
resource_subtypeapproval
resource_subtypedefault_task
resource_subtypemilestone
resource_subtypesection
resource_subtypeapproval
resource_subtypedefault_task
resource_subtypemilestone
resource_subtypesection
resource_subtypeapproval
sourceweb
sourceemail
sourcemobile
sourceapi
sourceunknown
resource_subtypedefault_task
resource_subtypemilestone
resource_subtypesection
resource_subtypeapproval
resource_subtypedefault_task
resource_subtypemilestone
resource_subtypesection
resource_subtypeapproval
typecomment
typesystem


TagCompact

{
  "gid": "12345",
  "resource_type": "tag",
  "name": "Stuff to buy"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the tag. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.


Tag

{
  "gid": "12345",
  "resource_type": "tag",
  "color": "light-green",
  "created_at": "2012-02-22T02:06:58.147Z",
  "followers": [
    {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    }
  ],
  "name": "Stuff to buy",
  "notes": "Mittens really likes the stuff from Humboldt.",
  "permalink_url": "https://app.asana.com/0/resource/123456789/list",
  "workspace": {
    "gid": "12345",
    "resource_type": "workspace",
    "name": "My Company Workspace"
  }
}

A tag is a label that can be attached to any task in Asana. It exists in a single workspace or organization.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color string¦nullColor of the tag.
created_at string(date-time)The time at which this resource was created.
followers [object]Array of users following this tag.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
name stringName of the tag. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
notes stringFree-form textual information associated with the tag (i.e. its description).
permalink_url stringA url that points directly to the object within Asana.
workspace objectA workspace is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the workspace.

Enumerated Values

PropertyValue
colordark-pink
colordark-green
colordark-blue
colordark-red
colordark-teal
colordark-brown
colordark-orange
colordark-purple
colordark-warm-gray
colorlight-pink
colorlight-green
colorlight-blue
colorlight-red
colorlight-teal
colorlight-brown
colorlight-orange
colorlight-purple
colorlight-warm-gray


TaskCompact

{
  "gid": "12345",
  "resource_type": "task",
  "name": "Bug Task",
  "resource_subtype": "default_task"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the task.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
The resource_subtype milestone represent a single moment in time. This means tasks with this subtype cannot have a start_date.

Enumerated Values

PropertyValue
resource_subtypedefault_task
resource_subtypemilestone
resource_subtypesection
resource_subtypeapproval


TaskCount

{
  "num_completed_milestones": 3,
  "num_completed_tasks": 150,
  "num_incomplete_milestones": 7,
  "num_incomplete_tasks": 50,
  "num_milestones": 10,
  "num_tasks": 200
}

A response object returned from the task count endpoint.

Properties

NameDescription
num_completed_milestones integerThe number of completed milestones in a project.
num_completed_tasks integerThe number of completed tasks in a project.
num_incomplete_milestones integerThe number of incomplete milestones in a project.
num_incomplete_tasks integerThe number of incomplete tasks in a project.
num_milestones integerThe number of milestones in a project.
num_tasks integerThe number of tasks in a project.


Task

{
  "gid": "12345",
  "resource_type": "task",
  "actual_time_minutes": 200,
  "approval_status": "pending",
  "assignee_status": "upcoming",
  "completed": false,
  "completed_at": "2012-02-22T02:06:58.147Z",
  "completed_by": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "created_at": "2012-02-22T02:06:58.147Z",
  "dependencies": [
    {
      "gid": "12345",
      "resource_type": "task"
    }
  ],
  "dependents": [
    {
      "gid": "12345",
      "resource_type": "task"
    }
  ],
  "due_at": "2019-09-15T02:06:58.147Z",
  "due_on": "2019-09-15",
  "external": {
    "data": "A blob of information",
    "gid": "my_gid"
  },
  "hearted": true,
  "hearts": [
    {
      "gid": "12345",
      "user": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    }
  ],
  "html_notes": "<body>Mittens <em>really</em> likes the stuff from Humboldt.</body>",
  "is_rendered_as_separator": false,
  "liked": true,
  "likes": [
    {
      "gid": "12345",
      "user": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      }
    }
  ],
  "memberships": [
    {
      "project": {
        "gid": "12345",
        "resource_type": "project",
        "name": "Stuff to buy"
      },
      "section": {
        "gid": "12345",
        "resource_type": "section",
        "name": "Next Actions"
      }
    }
  ],
  "modified_at": "2012-02-22T02:06:58.147Z",
  "name": "Buy catnip",
  "notes": "Mittens really likes the stuff from Humboldt.",
  "num_hearts": 5,
  "num_likes": 5,
  "num_subtasks": 3,
  "resource_subtype": "default_task",
  "start_at": "2019-09-14T02:06:58.147Z",
  "start_on": "2019-09-14",
  "assignee": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "assignee_section": {
    "gid": "12345",
    "resource_type": "section",
    "name": "Next Actions"
  },
  "custom_fields": [
    {
      "gid": "12345",
      "resource_type": "custom_field",
      "asana_created_field": "priority",
      "created_by": {
        "gid": "12345",
        "resource_type": "user",
        "name": "Greg Sanchez"
      },
      "currency_code": "EUR",
      "custom_label": "gold pieces",
      "custom_label_position": "suffix",
      "date_value": {
        "date": "2024-08-23",
        "date_time": "2024-08-23T22:00:00.000Z"
      },
      "description": "Development team priority",
      "display_value": "blue",
      "enabled": true,
      "enum_options": [
        {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        }
      ],
      "enum_value": {
        "gid": "12345",
        "resource_type": "enum_option",
        "color": "blue",
        "enabled": true,
        "name": "Low"
      },
      "format": "custom",
      "has_notifications_enabled": true,
      "is_global_to_workspace": true,
      "multi_enum_values": [
        {
          "gid": "12345",
          "resource_type": "enum_option",
          "color": "blue",
          "enabled": true,
          "name": "Low"
        }
      ],
      "name": "Status",
      "number_value": 5.2,
      "people_value": [
        {
          "gid": "12345",
          "resource_type": "user",
          "name": "Greg Sanchez"
        }
      ],
      "precision": 2,
      "resource_subtype": "text",
      "text_value": "Some Value",
      "type": "text"
    }
  ],
  "followers": [
    {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    }
  ],
  "parent": {
    "gid": "12345",
    "resource_type": "task",
    "name": "Bug Task",
    "resource_subtype": "default_task"
  },
  "permalink_url": "https://app.asana.com/0/resource/123456789/list",
  "projects": [
    {
      "gid": "12345",
      "resource_type": "project",
      "name": "Stuff to buy"
    }
  ],
  "tags": [
    {
      "gid": "59746",
      "name": "Grade A"
    }
  ],
  "workspace": {
    "gid": "12345",
    "resource_type": "workspace",
    "name": "My Company Workspace"
  }
}

The task is the basic object around which many operations in Asana are centered.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
actual_time_minutes number¦nullThis value represents the sum of all the Time Tracking entries in the Actual Time field on a given Task. It is represented as a nullable long value.
approval_status stringConditional Reflects the approval status of this task. This field is kept in sync with completed, meaning pending translates to false while approved, rejected, and changes_requested translate to true. If you set completed to true, this field will be set to approved.
assignee_status stringDeprecated Scheduling status of this task for the user it is assigned to. This field can only be set if the assignee is non-null. Setting this field to "inbox" or "upcoming" inserts it at the top of the section, while the other options will insert at the bottom.
completed booleanTrue if the task is currently marked complete, false if not.
completed_at string(date-time)¦nullThe time at which this task was completed, or null if the task is incomplete.
completed_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
created_at string(date-time)The time at which this resource was created.
dependencies [object]Opt In. Array of resources referencing tasks that this task depends on. The objects contain only the gid of the dependency.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
dependents [object]Opt In. Array of resources referencing tasks that depend on this task. The objects contain only the ID of the dependent.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
due_at string(date)¦nullThe UTC date and time on which this task is due, or null if the task has no due time. This takes an ISO 8601 date string in UTC and should not be used together with due_on.
due_on string(date)¦nullThe localized date on which this task is due, or null if the task has no due date. This takes a date with YYYY-MM-DD format and should not be used together with due_at.
external objectOAuth Required. Conditional. This field is returned only if external values are set or included by using Opt In.
The external field allows you to store app-specific metadata on tasks, including a gid that can be used to retrieve tasks and a data blob that can store app-specific character strings. Note that you will need to authenticate with Oauth to access or modify this data. Once an external gid is set, you can use the notation external:custom_gid to reference your object anywhere in the API where you may use the original object gid. See the page on Custom External Data for more details.
data stringnone
gid stringnone
hearted booleanDeprecated - please use liked instead True if the task is hearted by the authorized user, false if not.
hearts [object]Deprecated - please use likes instead Array of likes for users who have hearted this task.
gid stringGlobally unique identifier of the object, as a string.
user objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
html_notes stringOpt In. The notes of the text with formatting as HTML.
is_rendered_as_separator booleanOpt In. In some contexts tasks can be rendered as a visual separator; for instance, subtasks can appear similar to sections without being true section objects. If a task object is rendered this way in any context it will have the property is_rendered_as_separator set to true.
liked booleanTrue if the task is liked by the authorized user, false if not.
likes [object]Array of likes for users who have liked this task.
gid stringGlobally unique identifier of the object, as a string.
user objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
memberships [object]Create-only. Array of projects this task is associated with and the section it is in. At task creation time, this array can be used to add the task to specific sections. After task creation, these associations can be modified using the addProject and removeProject endpoints. Note that over time, more types of memberships may be added to this property.
project objectA project represents a prioritized list of tasks in Asana or a board with columns of tasks represented as cards. It exists in a single workspace or organization and is accessible to a subset of users in that workspace or organization, depending on its permissions.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
section objectA section is a subdivision of a project that groups tasks together. It can either be a header above a list of tasks in a list view or a column in a board view of a project.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the section (i.e. the text displayed as the section header).
modified_at string(date-time)The time at which this task was last modified.

Note: This does not currently reflect any changes in
associations such as projects or comments that may have been
added or removed from the task.
name stringName of the task. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
notes stringFree-form textual information associated with the task (i.e. its description).
num_hearts integerDeprecated - please use likes instead The number of users who have hearted this task.
num_likes integerThe number of users who have liked this task.
num_subtasks integerOpt In. The number of subtasks on this task.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
The resource_subtype milestone represent a single moment in time. This means tasks with this subtype cannot have a start_date.
start_at string(date)¦nullDate and time on which work begins for the task, or null if the task has no start time. This takes an ISO 8601 date string in UTC and should not be used together with start_on.
Note: due_at must be present in the request when setting or unsetting the start_at parameter.
start_on string(date)¦nullThe day on which work begins for the task , or null if the task has no start date. This takes a date with YYYY-MM-DD format and should not be used together with start_at.
Note: due_on or due_at must be present in the request when setting or unsetting the start_on parameter.
assignee objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
assignee_section objectThe assignee section is a subdivision of a project that groups tasks together in the assignee's "My Tasks" list. It can either be a header above a list of tasks in a list view or a column in a board view of "My Tasks."
The assignee_section property will be returned in the response only if the request was sent by the user who is the assignee of the task. Note that you can only write to assignee_section with the gid of an existing section visible in the user's "My Tasks" list.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the section (i.e. the text displayed as the section header).
custom_fields [object]Array of custom field values applied to the task. These represent the custom field values recorded on this project for a particular custom field. For example, these custom field values will contain an enum_value property for custom fields of type enum, a text_value property for custom fields of type text, and so on. Please note that the gid returned on each custom field value is identical to the gid of the custom field, which allows referencing the custom field metadata through the /custom_fields/custom_field-gid endpoint.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
asana_created_field string¦nullConditional. A unique identifier to associate this field with the template source of truth.
created_by objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
currency_code string¦nullISO 4217 currency code to format this custom field. This will be null if the format is not currency.
custom_label string¦nullThis is the string that appears next to the custom field value. This will be null if the format is not custom.
custom_label_position stringOnly relevant for custom fields with custom format. This depicts where to place the custom label. This will be null if the format is not custom.
date_value objectConditional. Only relevant for custom fields of type date. This object reflects the chosen date (and optionally, time) value of a date custom field. If no date is selected, the value of date_value will be null.
date stringA string representing the date in YYYY-MM-DD format.
date_time stringA string representing the date in ISO 8601 format. If no time value is selected, the value of date-time will be null.
description stringOpt In. The description of the custom field.
display_value string¦nullA string representation for the value of the custom field. Integrations that don't require the underlying type should use this field to read values. Using this field will future-proof an app against new custom field types.
enabled booleanConditional. Determines if the custom field is enabled or not.
enum_options [object]Conditional. Only relevant for custom fields of type enum. This array specifies the possible values which an enum custom field can adopt. To modify the enum options, refer to working with enum options.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
enum_value objectConditional. Only relevant for custom fields of type enum. This object is the chosen value of an enum custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
format stringThe format of this custom field.
has_notifications_enabled booleanConditional. This flag describes whether a follower of a task with this field should receive inbox notifications from changes to this field.
is_global_to_workspace booleanThis flag describes whether this custom field is available to every container in the workspace. Before project-specific custom fields, this field was always true.
multi_enum_values [object]Conditional. Only relevant for custom fields of type multi_enum. This object is the chosen values of a multi_enum custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
color stringThe color of the enum option. Defaults to ‘none’.
enabled booleanWhether or not the enum option is a selectable value for the custom field.
name stringThe name of the enum option.
name stringThe name of the custom field.
number_value numberConditional. This number is the value of a number custom field.
people_value [object]Conditional. Only relevant for custom fields of type people. This array of compact user objects reflects the values of a people custom field.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
precision integerOnly relevant for custom fields of type ‘Number’. This field dictates the number of places after the decimal to round to, i.e. 0 is integer values, 1 rounds to the nearest tenth, and so on. Must be between 0 and 6, inclusive.
For percentage format, this may be unintuitive, as a value of 0.25 has a precision of 0, while a value of 0.251 has a precision of 1. This is due to 0.25 being displayed as 25%.
The identifier format will always have a precision of 0.
resource_subtype stringThe type of the custom field. Must be one of the given values.
text_value stringConditional. This string is the value of a text custom field.
type stringDeprecated: new integrations should prefer the resource_subtype field. The type of the custom field. Must be one of the given values.
followers [object]Array of users following this task.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
parent object¦nullThe parent of this task, or null if this is not a subtask. This property cannot be modified using a PUT request but you can change it with the setParent endpoint. You can create subtasks by using the subtasks endpoint.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the task.
resource_subtype stringThe subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
The resource_subtype milestone represent a single moment in time. This means tasks with this subtype cannot have a start_date.
permalink_url stringA url that points directly to the object within Asana.
projects [object]Create-only. Array of projects this task is associated with. At task creation time, this array can be used to add the task to many projects at once. After task creation, these associations can be modified using the addProject and removeProject endpoints.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
tags [object]Array of tags associated with this task. In order to change tags on an existing task use addTag and removeTag.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringName of the tag. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.
workspace objectCreate-only. The workspace this task is associated with. Once created, task cannot be moved to a different workspace. This attribute can only be specified at creation time.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the workspace.

Enumerated Values

PropertyValue
approval_statuspending
approval_statusapproved
approval_statusrejected
approval_statuschanges_requested
assignee_statustoday
assignee_statusupcoming
assignee_statuslater
assignee_statusnew
assignee_statusinbox
resource_subtypedefault_task
resource_subtypemilestone
resource_subtypesection
resource_subtypeapproval
asana_created_fielda_v_requirements
asana_created_fieldaccount_name
asana_created_fieldactionable
asana_created_fieldalign_shipping_link
asana_created_fieldalign_status
asana_created_fieldallotted_time
asana_created_fieldappointment
asana_created_fieldapproval_stage
asana_created_fieldapproved
asana_created_fieldarticle_series
asana_created_fieldboard_committee
asana_created_fieldbrowser
asana_created_fieldcampaign_audience
asana_created_fieldcampaign_project_status
asana_created_fieldcampaign_regions
asana_created_fieldchannel_primary
asana_created_fieldclient_topic_type
asana_created_fieldcomplete_by
asana_created_fieldcontact
asana_created_fieldcontact_email_address
asana_created_fieldcontent_channels
asana_created_fieldcontent_channels_needed
asana_created_fieldcontent_stage
asana_created_fieldcontent_type
asana_created_fieldcontract
asana_created_fieldcontract_status
asana_created_fieldcost
asana_created_fieldcreation_stage
asana_created_fieldcreative_channel
asana_created_fieldcreative_needed
asana_created_fieldcreative_needs
asana_created_fielddata_sensitivity
asana_created_fielddeal_size
asana_created_fielddelivery_appt
asana_created_fielddelivery_appt_date
asana_created_fielddepartment
asana_created_fielddepartment_responsible
asana_created_fielddesign_request_needed
asana_created_fielddesign_request_type
asana_created_fielddiscussion_category
asana_created_fielddo_this_task
asana_created_fieldeditorial_content_status
asana_created_fieldeditorial_content_tag
asana_created_fieldeditorial_content_type
asana_created_fieldeffort
asana_created_fieldeffort_level
asana_created_fieldest_completion_date
asana_created_fieldestimated_time
asana_created_fieldestimated_value
asana_created_fieldexpected_cost
asana_created_fieldexternal_steps_needed
asana_created_fieldfavorite_idea
asana_created_fieldfeedback_type
asana_created_fieldfinancial
asana_created_fieldfunding_amount
asana_created_fieldgrant_application_process
asana_created_fieldhiring_candidate_status
asana_created_fieldidea_status
asana_created_fieldids_link
asana_created_fieldids_patient_link
asana_created_fieldimplementation_stage
asana_created_fieldinsurance
asana_created_fieldinterview_area
asana_created_fieldinterview_question_score
asana_created_fielditero_scan_link
asana_created_fieldjob_s_applied_to
asana_created_fieldlab
asana_created_fieldlaunch_status
asana_created_fieldlead_status
asana_created_fieldlocalization_language
asana_created_fieldlocalization_market_team
asana_created_fieldlocalization_status
asana_created_fieldmeeting_minutes
asana_created_fieldmeeting_needed
asana_created_fieldminutes
asana_created_fieldmrr
asana_created_fieldmust_localize
asana_created_fieldname_of_foundation
asana_created_fieldneed_to_follow_up
asana_created_fieldnext_appointment
asana_created_fieldnext_steps_sales
asana_created_fieldnum_people
asana_created_fieldnumber_of_user_reports
asana_created_fieldoffice_location
asana_created_fieldonboarding_activity
asana_created_fieldowner
asana_created_fieldparticipants_needed
asana_created_fieldpatient_date_of_birth
asana_created_fieldpatient_email
asana_created_fieldpatient_phone
asana_created_fieldpatient_status
asana_created_fieldphone_number
asana_created_fieldplanning_category
asana_created_fieldpoint_of_contact
asana_created_fieldposition
asana_created_fieldpost_format
asana_created_fieldprescription
asana_created_fieldpriority
asana_created_fieldpriority_level
asana_created_fieldproduct
asana_created_fieldproduct_stage
asana_created_fieldprogress
asana_created_fieldproject_size
asana_created_fieldproject_status
asana_created_fieldproposed_budget
asana_created_fieldpublish_status
asana_created_fieldreason_for_scan
asana_created_fieldreferral
asana_created_fieldrequest_type
asana_created_fieldresearch_status
asana_created_fieldresponsible_department
asana_created_fieldresponsible_team
asana_created_fieldrisk_assessment_status
asana_created_fieldroom_name
asana_created_fieldsales_counterpart
asana_created_fieldsentiment
asana_created_fieldshipping_link
asana_created_fieldsocial_channels
asana_created_fieldstage
asana_created_fieldstatus
asana_created_fieldstatus_design
asana_created_fieldstatus_of_initiative
asana_created_fieldsystem_setup
asana_created_fieldtask_progress
asana_created_fieldteam
asana_created_fieldteam_marketing
asana_created_fieldteam_responsible
asana_created_fieldtime_it_takes_to_complete_tasks
asana_created_fieldtimeframe
asana_created_fieldtreatment_type
asana_created_fieldtype_work_requests_it
asana_created_fielduse_agency
asana_created_fielduser_name
asana_created_fieldvendor_category
asana_created_fieldvendor_type
asana_created_fieldword_count
custom_label_positionprefix
custom_label_positionsuffix
formatcurrency
formatidentifier
formatpercentage
formatcustom
formatnone
resource_subtypetext
resource_subtypeenum
resource_subtypemulti_enum
resource_subtypenumber
resource_subtypedate
resource_subtypepeople
typetext
typeenum
typemulti_enum
typenumber
resource_subtypedefault_task
resource_subtypemilestone
resource_subtypesection
resource_subtypeapproval


TeamCompact

{
  "gid": "12345",
  "resource_type": "team",
  "name": "Marketing"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the team.


TeamMembershipCompact

{
  "gid": "12345",
  "resource_type": "team_membership",
  "is_guest": false,
  "team": {
    "gid": "12345",
    "resource_type": "team",
    "name": "Marketing"
  },
  "user": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  }
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
is_guest booleanDescribes if the user is a guest in the team.
team objectA team is used to group related projects and people together within an organization. Each project in an organization is associated with a team.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the team.
user objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.


TeamMembership

{
  "gid": "12345",
  "resource_type": "team_membership",
  "is_guest": false,
  "team": {
    "gid": "12345",
    "resource_type": "team",
    "name": "Marketing"
  },
  "user": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  }
}

This object represents a user's connection to a team.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
is_guest booleanDescribes if the user is a guest in the team.
team objectA team is used to group related projects and people together within an organization. Each project in an organization is associated with a team.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the team.
user objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.


Team

{
  "gid": "12345",
  "resource_type": "team",
  "name": "Marketing",
  "description": "All developers should be members of this team.",
  "html_description": "<body><em>All</em> developers should be members of this team.</body>",
  "organization": {
    "gid": "12345",
    "resource_type": "workspace",
    "name": "My Company Workspace"
  },
  "permalink_url": "https://app.asana.com/0/resource/123456789/list",
  "visibility": "secret"
}

A team is used to group related projects and people together within an organization. Each project in an organization is associated with a team.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the team.
description stringOpt In. The description of the team.
html_description stringOpt In. The description of the team with formatting as HTML.
organization objectThe organization/workspace the team belongs to.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the workspace.
permalink_url stringA url that points directly to the object within Asana.
visibility stringThe visibility of the team to users in the same organization

Enumerated Values

PropertyValue
visibilitysecret
visibilityrequest_to_join
visibilitypublic


TimePeriodCompact

{
  "gid": "12345",
  "resource_type": "time_period",
  "display_name": "Q1 FY22",
  "end_on": "2019-09-14",
  "period": "Q1",
  "start_on": "2019-09-13"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
display_name stringA string representing the cadence code and the fiscal year.
end_on stringThe localized end date of the time period in YYYY-MM-DD format.
period stringThe cadence and index of the time period. The value is one of: FY, H1, H2, Q1, Q2, Q3, or Q4.
start_on stringThe localized start date of the time period in YYYY-MM-DD format.

Enumerated Values

PropertyValue
periodFY
periodH1
periodH2
periodQ1
periodQ2
periodQ3
periodQ4


TimePeriod

{
  "gid": "12345",
  "resource_type": "time_period",
  "display_name": "Q1 FY22",
  "end_on": "2019-09-14",
  "parent": {
    "gid": "12345",
    "resource_type": "time_period",
    "display_name": "Q1 FY22",
    "end_on": "2019-09-14",
    "period": "Q1",
    "start_on": "2019-09-13"
  },
  "period": "Q1",
  "start_on": "2019-09-13"
}

A generic Asana Resource, containing a globally unique identifier.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
display_name stringA string representing the cadence code and the fiscal year.
end_on stringThe localized end date of the time period in YYYY-MM-DD format.
parent objectA generic Asana Resource, containing a globally unique identifier.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
display_name stringA string representing the cadence code and the fiscal year.
end_on stringThe localized end date of the time period in YYYY-MM-DD format.
period stringThe cadence and index of the time period. The value is one of: FY, H1, H2, Q1, Q2, Q3, or Q4.
start_on stringThe localized start date of the time period in YYYY-MM-DD format.
period stringThe cadence and index of the time period. The value is one of: FY, H1, H2, Q1, Q2, Q3, or Q4.
start_on stringThe localized start date of the time period in YYYY-MM-DD format.

Enumerated Values

PropertyValue
periodFY
periodH1
periodH2
periodQ1
periodQ2
periodQ3
periodQ4
periodFY
periodH1
periodH2
periodQ1
periodQ2
periodQ3
periodQ4


UserCompact

{
  "gid": "12345",
  "resource_type": "user",
  "name": "Greg Sanchez"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.


User

{
  "gid": "12345",
  "resource_type": "user",
  "email": "gsanchez@example.com",
  "name": "Greg Sanchez",
  "photo": {
    "image_1024x1024": "https://...",
    "image_128x128": "https://...",
    "image_21x21": "https://...",
    "image_27x27": "https://...",
    "image_36x36": "https://...",
    "image_60x60": "https://..."
  },
  "workspaces": [
    {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  ]
}

A user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
email string(email)The user's email address.
name stringRead-only except when same user as requester. The user’s name.
photo object¦nullA map of the user’s profile photo in various sizes, or null if no photo is set. Sizes provided are 21, 27, 36, 60, 128, and 1024. All images are in PNG format, except for 1024 (which is in JPEG format).
image_1024x1024 string(uri)none
image_128x128 string(uri)none
image_21x21 string(uri)none
image_27x27 string(uri)none
image_36x36 string(uri)none
image_60x60 string(uri)none
workspaces [object]Workspaces and organizations this user may access.
Note: The API will only return workspaces and organizations that also contain the authenticated user.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the workspace.


UserTaskListCompact

{
  "gid": "12345",
  "resource_type": "user_task_list",
  "name": "My Tasks in My Workspace",
  "owner": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "workspace": {
    "gid": "12345",
    "resource_type": "workspace",
    "name": "My Company Workspace"
  }
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the user task list.
owner objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
workspace objectA workspace is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the workspace.


UserTaskList

{
  "gid": "12345",
  "resource_type": "user_task_list",
  "name": "My Tasks in My Workspace",
  "owner": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "workspace": {
    "gid": "12345",
    "resource_type": "workspace",
    "name": "My Company Workspace"
  }
}

A user task list represents the tasks assigned to a particular user. It provides API access to a user’s My Tasks view in Asana.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the user task list.
owner objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
workspace objectA workspace is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the workspace.


WebhookCompact

{
  "gid": "12345",
  "resource_type": "webhook",
  "active": false,
  "resource": {
    "gid": "12345",
    "resource_type": "task",
    "name": "Bug Task"
  },
  "target": "https://example.com/receive-webhook/7654"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
active booleanIf true, the webhook will send events - if false it is considered inactive and will not generate events.
resource objectA generic Asana Resource, containing a globally unique identifier.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the object.
target string(uri)The URL to receive the HTTP POST.


WebhookFilter

{
  "action": "changed",
  "fields": [
    "due_at",
    "due_on",
    "dependencies"
  ],
  "resource_subtype": "milestone",
  "resource_type": "task"
}

A WebhookFilter can be passed on creation of a webhook in order to filter the types of actions that trigger delivery of an Event

Properties

NameDescription
action stringThe type of change on the resource to pass through the filter. For more information refer to Event.action in the Event schema. This can be one of changed, added, removed, deleted, and undeleted depending on the nature of what has occurred on the resource.
fields [string]Conditional. A whitelist of fields for events which will pass the filter when the resource is changed. These can be any combination of the fields on the resources themselves. This field is only valid for action of type changed
resource_subtype stringThe resource subtype of the resource that the filter applies to. This should be set to the same value as is returned on the resource_subtype field on the resources themselves.
resource_type stringThe type of the resource which created the event when modified; for example, to filter to changes on regular tasks this field should be set to task.


Webhook

{
  "gid": "12345",
  "resource_type": "webhook",
  "active": false,
  "resource": {
    "gid": "12345",
    "resource_type": "task",
    "name": "Bug Task"
  },
  "target": "https://example.com/receive-webhook/7654",
  "created_at": "2012-02-22T02:06:58.147Z",
  "filters": [
    {
      "action": "changed",
      "fields": [
        "due_at",
        "due_on",
        "dependencies"
      ],
      "resource_subtype": "milestone",
      "resource_type": "task"
    }
  ],
  "last_failure_at": "2012-02-22T02:06:58.147Z",
  "last_failure_content": "500 Server Error\\n\\nCould not complete the request",
  "last_success_at": "2012-02-22T02:06:58.147Z"
}

Webhook objects represent the state of an active subscription for a server to be updated with information from Asana. This schema represents the subscription itself, not the objects that are sent to the server. For information on those please refer to the Event schema.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
active booleanIf true, the webhook will send events - if false it is considered inactive and will not generate events.
resource objectA generic Asana Resource, containing a globally unique identifier.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the object.
target string(uri)The URL to receive the HTTP POST.
created_at string(date-time)The time at which this resource was created.
filters [object]Whitelist of filters to apply to events from this webhook. If a webhook event passes any of the filters the event will be delivered; otherwise no event will be sent to the receiving server.
action stringThe type of change on the resource to pass through the filter. For more information refer to Event.action in the Event schema. This can be one of changed, added, removed, deleted, and undeleted depending on the nature of what has occurred on the resource.
fields [string]Conditional. A whitelist of fields for events which will pass the filter when the resource is changed. These can be any combination of the fields on the resources themselves. This field is only valid for action of type changed
resource_subtype stringThe resource subtype of the resource that the filter applies to. This should be set to the same value as is returned on the resource_subtype field on the resources themselves.
resource_type stringThe type of the resource which created the event when modified; for example, to filter to changes on regular tasks this field should be set to task.
last_failure_at string(date-time)The timestamp when the webhook last received an error when sending an event to the target.
last_failure_content stringThe contents of the last error response sent to the webhook when attempting to deliver events to the target.
last_success_at string(date-time)The timestamp when the webhook last successfully sent an event to the target.


WorkspaceCompact

{
  "gid": "12345",
  "resource_type": "workspace",
  "name": "My Company Workspace"
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the workspace.


WorkspaceMembershipCompact

{
  "gid": "12345",
  "resource_type": "workspace_membership",
  "user": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "workspace": {
    "gid": "12345",
    "resource_type": "workspace",
    "name": "My Company Workspace"
  }
}

A Compact object is the same as the full response object, but with less fields included by default. See input/output options to include more fields.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
user objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
workspace objectA workspace is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the workspace.


WorkspaceMembership

{
  "gid": "12345",
  "resource_type": "workspace_membership",
  "user": {
    "gid": "12345",
    "resource_type": "user",
    "name": "Greg Sanchez"
  },
  "workspace": {
    "gid": "12345",
    "resource_type": "workspace",
    "name": "My Company Workspace"
  },
  "is_active": true,
  "is_admin": true,
  "is_guest": true,
  "user_task_list": {
    "gid": "12345",
    "resource_type": "user_task_list",
    "name": "My Tasks in My Workspace",
    "owner": {
      "gid": "12345",
      "resource_type": "user",
      "name": "Greg Sanchez"
    },
    "workspace": {
      "gid": "12345",
      "resource_type": "workspace",
      "name": "My Company Workspace"
    }
  },
  "vacation_dates": {
    "end_on": "2022-11-07",
    "start_on": "2022-11-05"
  }
}

This object determines if a user is a member of a workspace.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
user objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
workspace objectA workspace is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the workspace.
is_active booleanReflects if this user still a member of the workspace.
is_admin booleanReflects if this user is an admin of the workspace.
is_guest booleanReflects if this user is a guest of the workspace.
user_task_list objectA user task list represents the tasks assigned to a particular user. It provides API access to a user’s My Tasks view in Asana.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the user task list.
owner objectA user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringRead-only except when same user as requester. The user’s name.
workspace objectA workspace is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace.
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the workspace.
vacation_dates object¦nullContains keys start_on and end_on for the vacation dates for the user in this workspace. If start_on is null, the entire vacation_dates object will be null. If end_on is before today, the entire vacation_dates object will be null.
end_on string¦nullThe day on which the user's vacation in this workspace ends, or null if there is no end date. This is a date with YYYY-MM-DD format.
start_on stringThe day on which the user's vacation in this workspace starts. This is a date with YYYY-MM-DD format.


Workspace

{
  "gid": "12345",
  "resource_type": "workspace",
  "name": "My Company Workspace",
  "email_domains": [
    "asana.com"
  ],
  "is_organization": false
}

A workspace is the highest-level organizational unit in Asana. All projects and tasks have an associated workspace.

Properties

NameDescription
gid stringGlobally unique identifier of the resource, as a string.
resource_type stringThe base type of this resource.
name stringThe name of the workspace.
email_domains [string]The email domains that are associated with this workspace.
is_organization booleanWhether the workspace is an organization.