Sample - Asana API
POST/projects/{project_gid}/sections

Create a section in a project

Creates a new section in the specified project. Supply a non-empty name and optionally position the section with insert_before or insert_after, but not both. A 201 response returns the complete newly created section record.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter · 1 body field
opt_fieldsarray<string>optional
Comma-separated list of optional fields to include in the response, such as `name`, `project.name`, or `project.resource_subtype`; nested fields are supported.

The section to create, including its name and optional insertion position.

dataobjectoptional

6 status codes
201Returns the newly created section object with its available resource fields.
dataobjectoptional
400Returned when a parameter is missing or malformed, including an empty `name` or conflicting insertion fields.
errorsarray<object>optional
401Returned when a valid authentication token was not provided with the request.
errorsarray<object>optional
403Returned when the authenticated user does not have access to the project or section operation.
errorsarray<object>optional
404Returned when the specified project or another referenced object does not exist.
errorsarray<object>optional
500Returned when a server-side problem prevents the request from completing.
errorsarray<object>optional

Error handling

A 400 is returned when the request is missing or malformed. A 401 is returned when no valid authentication token is provided, and a 403 is returned when the authenticated user lacks access to the project or section operation. A 404 is returned when the project does not exist, while a 500 indicates a server-side failure; name must be non-empty, and insert_before and insert_after cannot be supplied together.