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

Move a section within a project

Moves an existing section relative to another section in the same project. Supply section and one of before_section or after_section to control the new position. Sections cannot be moved between projects, and the successful response contains an empty data block.

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

1 body field

The section move action, including the section to reorder and its target position.

dataobjectoptional

6 status codes
200Returns an empty `data` object confirming that the section was moved.
dataobjectoptional
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.
400Returned when a required value is missing or a request parameter is malformed, including when neither target position is supplied.
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 reorder the sections.
errorsarray<object>optional
404Returned when the specified section or target section does not exist.
errorsarray<object>optional
500Returned when a server-side problem prevents the section from being moved.
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 permission to reorder the sections. A 404 is returned when a referenced section does not exist, while a 500 indicates a server-side failure; section must identify the section to move, and one of before_section or after_section must be provided.