{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Creates a time tracking entry on a given task.\n\nReturns the record of the newly created time tracking entry.\n\n#### Access requirements\n\nAccess to this endpoint has two levels:\n\n- **Endpoint access** requires time tracking to be available through the domain's plan\nor add-ons. A request from a domain without time tracking access returns a\n`402 Payment Required` error for every request to this endpoint.\n\n- **Field access** for some request fields requires the Timesheets and Budgets add-on.\nFields with this requirement are noted in the request schema. Including one of these\nfields without the add-on returns a `402 Payment Required` error, even when the rest of\nthe request is valid.\n\nBecause the field-level requirement is separate, the same endpoint may return `201` or\n`402` for the same domain depending on which fields are sent: a request that only uses\nfields available with endpoint access succeeds on any domain that meets the endpoint\nrequirement, while a request that includes a field requiring the add-on also requires\nthe add-on.","properties":{"path":{"type":"object","properties":{"task_gid":{"type":"string","examples":["321654"],"description":"The task to operate on."}},"required":["task_gid"],"additionalProperties":false},"query":{"type":"object","properties":{"opt_pretty":{"type":"boolean","examples":[true],"description":"Provides “pretty” output.\nProvides the response in a “pretty” format. 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."},"opt_fields":{"type":"array","items":{"type":"string","enum":["approval_status","assignee","assignee.name","attributable_to","attributable_to.name","attributable_to.resource_subtype","billable_status","categories","categories.color","categories.name","created_at","created_by","created_by.name","description","duration_minutes","entered_on","task","task.created_by","task.name","task.resource_subtype"]},"examples":[["approval_status","assignee","assignee.name","attributable_to","attributable_to.name","attributable_to.resource_subtype","billable_status","categories","categories.color","categories.name","created_at","created_by","created_by.name","description","duration_minutes","entered_on","task","task.created_by","task.name","task.resource_subtype"]],"description":"This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. Properties can include nested fields. To learn more, see the [input/output options guide](/docs/inputoutput-options#selecting-nested-fields)."}},"required":[],"additionalProperties":false},"body":{"type":"object","properties":{"data":{"$ref":"#/definitions/CreateTimeTrackingEntryRequest"}}}},"required":["path","body"],"additionalProperties":false,"definitions":{"CreateTimeTrackingEntryRequest":{"type":"object","properties":{"duration_minutes":{"description":"Time in minutes tracked by the entry. Must be greater than 0","type":"integer","examples":[12]},"entered_on":{"description":"*Optional*. The day that this entry is logged on. Defaults to today if not specified","type":"string","format":"date","examples":["2023-03-19"]},"attributable_to":{"type":"string","description":"*Optional*. The gid of the project which the time is attributable to.","examples":["987654"]},"assignee":{"type":"string","description":"*Optional*. The gid of the user this entry's logged time is attributed to. Defaults to the current user; can only be set to another user if you're their time reviewer or an admin. Reviewer-submitter relationships require the Timesheets and Budgets add-on.","examples":["12345"]},"billable_status":{"description":"*Optional*. The current billable status of the entry. This field requires the Timesheets and Budgets add-on; including it without the add-on returns a `402 Payment Required` error.","type":"string","enum":["billable","nonBillable","notApplicable"],"examples":["billable"]},"description":{"description":"*Optional*. The description of the entry. This field requires the Timesheets and Budgets add-on; including it without the add-on returns a `402 Payment Required` error.","type":"string","examples":["My description of work done on this entry"]},"categories":{"description":"*Optional*. The gids of time tracking categories to assign to this time tracking entry. Existing categories will be overridden. Currently limited to a maximum of 1 category. This field requires the Timesheets and Budgets add-on; including it without the add-on returns a `402 Payment Required` error.","type":"array","items":{"type":"string"},"examples":[["12345"]]}}}}},"name":"Create a time tracking entry","id":"asana.createtimetrackingentry","example":{"path":{"task_gid":"321654"},"body":{}},"maxRequests":1,"summary":false}}