# Batch Create Records

Creates multiple records

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/apaas/v1/applications/:namespace/objects/:object_api_name/records/batch_create
HTTP Method | POST
Rate Limit | [1000 per minute、50 per second](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
Supported app types | Custom App、Store App
Required scopes<br>**To use this API, you must have at least 1 of the listed scopes.** | Create, update, delete object record(app_engine:object.record:write)

### Request header

Parameter | Type | Required | Description
---|---|---|---
Authorization | string | Yes | `tenant_access_token`<br>**Value format**: "Bearer `access_token`"<br>**Example value**: "Bearer t-7f1bcd13fc57d46bac21793a18e560"<br>[How to choose and get access token](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)
Content-Type | string | Yes | **Fixed value**: "application/json; charset=utf-8"

### Path parameters

Parameter | Type | Description
---|---|---
namespace | string | **Example value**: "package_test__c"<br>**Data validation rules**:<br>- Length range: `0` ～ `255` characters
object_api_name | string | **Example value**: "user"<br>**Data validation rules**:<br>- Length range: `0` ～ `256` characters

### Request body

Parameter | Type | Required | Description
---|---|---|---
records | string | Yes | The list to be created, create up to 500 records at a time<br>**Example value**: "[{\"book_name\":\"name21\",\"book_count\":2}]"

### Request body example
```json
{
    "records": "[{\"book_name\":\"name21\",\"book_count\":2}]"
}
```

## Response

### Response body

Parameter | Type | Description
---|---|---
code | int | Error codes, fail if not zero
msg | string | Error descriptions
data | \- | \-
items | record_result\[\] | Create result
success | boolean | Is success
id | string | ID of the record
errors | record_result_error\[\] | Error info
code | string | Error code
message | string | success
sub_code | string | Sub error code
fields | string\[\] | Error fields

### Response body example
```json
{
    "code": 0,
    "msg": "success",
    "data": {
        "items": [
            {
                "success": true,
                "id": "1801464965461024",
                "errors": [
                    {
                        "code": "0",
                        "message": "success",
                        "sub_code": "k_ec_00001",
                        "fields": [
                            "_id"
                        ]
                    }
                ]
            }
        ]
    }
}
```

### Error code

HTTP status code | Error code | Description | Troubleshooting suggestions
---|---|---|---
400 | 2320001 | param is invalid | Please check the input parameters

