{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"<b>Required scope: </b><code>records:write</code>\n\nCreates a new record in a table.\n\nReturns the full record of the newly created record.","properties":{"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":["comment_count","created_at","created_by","created_by.name","custom_fields","custom_fields.asana_created_field","custom_fields.created_by","custom_fields.created_by.name","custom_fields.currency_code","custom_fields.custom_label","custom_fields.custom_label_position","custom_fields.date_value","custom_fields.date_value.date","custom_fields.date_value.date_time","custom_fields.default_access_level","custom_fields.description","custom_fields.display_value","custom_fields.enabled","custom_fields.enum_options","custom_fields.enum_options.color","custom_fields.enum_options.enabled","custom_fields.enum_options.name","custom_fields.enum_value","custom_fields.enum_value.color","custom_fields.enum_value.enabled","custom_fields.enum_value.name","custom_fields.format","custom_fields.has_notifications_enabled","custom_fields.html_text_value","custom_fields.id_prefix","custom_fields.input_restrictions","custom_fields.is_formula_field","custom_fields.is_global_to_workspace","custom_fields.is_lookup_field","custom_fields.is_value_read_only","custom_fields.multi_enum_values","custom_fields.multi_enum_values.color","custom_fields.multi_enum_values.enabled","custom_fields.multi_enum_values.name","custom_fields.name","custom_fields.number_value","custom_fields.people_value","custom_fields.people_value.name","custom_fields.precision","custom_fields.privacy_setting","custom_fields.reference_value","custom_fields.reference_value.name","custom_fields.representation_type","custom_fields.resource_subtype","custom_fields.text_value","custom_fields.type","default_access_level","deleted_at","is_in_archived_table","modified_at","name","permalink_url","table","table.name","workspace","workspace.name"]},"examples":[["comment_count","created_at","created_by","created_by.name","custom_fields","custom_fields.asana_created_field","custom_fields.created_by","custom_fields.created_by.name","custom_fields.currency_code","custom_fields.custom_label","custom_fields.custom_label_position","custom_fields.date_value","custom_fields.date_value.date","custom_fields.date_value.date_time","custom_fields.default_access_level","custom_fields.description","custom_fields.display_value","custom_fields.enabled","custom_fields.enum_options","custom_fields.enum_options.color","custom_fields.enum_options.enabled","custom_fields.enum_options.name","custom_fields.enum_value","custom_fields.enum_value.color","custom_fields.enum_value.enabled","custom_fields.enum_value.name","custom_fields.format","custom_fields.has_notifications_enabled","custom_fields.html_text_value","custom_fields.id_prefix","custom_fields.input_restrictions","custom_fields.is_formula_field","custom_fields.is_global_to_workspace","custom_fields.is_lookup_field","custom_fields.is_value_read_only","custom_fields.multi_enum_values","custom_fields.multi_enum_values.color","custom_fields.multi_enum_values.enabled","custom_fields.multi_enum_values.name","custom_fields.name","custom_fields.number_value","custom_fields.people_value","custom_fields.people_value.name","custom_fields.precision","custom_fields.privacy_setting","custom_fields.reference_value","custom_fields.reference_value.name","custom_fields.representation_type","custom_fields.resource_subtype","custom_fields.text_value","custom_fields.type","default_access_level","deleted_at","is_in_archived_table","modified_at","name","permalink_url","table","table.name","workspace","workspace.name"]],"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/RecordItemRequest"}}}},"required":["body"],"additionalProperties":false,"definitions":{"RecordItemRequest":{"allOf":[{"$ref":"#/definitions/RecordItemBase"},{"type":"object","required":["name","table"],"properties":{"table":{"description":"The table in which this record will be created.","type":"string","examples":["1337"]},"custom_fields":{"description":"An object where each key is the GID of a custom field and its corresponding value is either an enum GID, string, number, or object (depending on the custom field type). See the [custom fields guide](/docs/custom-fields-guide) for details on creating and updating custom field values. Only fields already associated with the record's table (i.e. already present in the table's custom field settings) can be written this way; unlike tasks and projects, records do not support force-writing a value for a custom field that is not yet on the table.","type":"object","additionalProperties":{"type":"string","description":"\"{custom_field_gid}\" => Value (can be text, enum GID, a number, etc.). For date, use format \"YYYY-MM-DD\" (e.g., 2019-09-15). For date-time, use ISO 8601 date string in UTC (e.g., 2019-09-15T02:06:58.147Z)."},"examples":[{"5678904321":"On Hold","4578152156":"Not Started"}]},"unique_fingerprint":{"description":"An optional client-provided identifier used to deduplicate record creation within a table. If a record already exists in the table with the same `unique_fingerprint`, the request fails with a `409 Conflict` error rather than creating a duplicate.","type":"string","examples":["sfdc-opportunity-0061"]},"default_access_level":{"description":"The default access level for users who join or are added as members of the record. This isn't applied when the record is private.","type":"string","enum":["admin","editor","commenter","viewer"],"examples":["viewer"]}}}]},"RecordItemBase":{"$ref":"#/definitions/RecordItemCompact"},"RecordItemCompact":{"description":"A *record* is a single row in a table. Fields on a record are backed by the table's custom field settings.","type":"object","properties":{"name":{"description":"The name of the record.","type":"string","examples":["Q3 renewal"]}}}}},"name":"Create a record","id":"asana.createrecord","example":{"body":{}},"maxRequests":1,"summary":false}}