Skip to content

Bulk Create Activities

POST https://api.copper.com/developer_api/v1/activities/bulk_create

BETA Disclaimer ⚠️

Please note that our new bulk create/update APIs (including this one) are still undergoing final testing before their official release. We reserve the right to increase or decrease the maximum request size of these APIs (see the Request Size Limit section). Should you encounter any issues, please let us know so we can diagnose and resolve them. Your help in this regard is greatly appreciated.

Request Size Limit

This is a bulk-create endpoint with a maximum request size of 10. If you sent a request larger than that limit, you will receive a 422 back with response:

1
2
3
{
  "error": "Request size too large, limit is 10"
}

Responses

All valid requests (JSON is formatted correctly on request) will result in a 200 OK. Bulk APIs guarantee the same response object ordering as the request objects meaning you can match each response object up to the request's objects easily.

If an object is created successfully, it will be returned in the response array in the same JSON structure you would expect from the single-create endpoint. The key thing to look for is a present and numeric "id" value.

If an object fails to create, it's response object (within the response array) will look like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "success": false,
  "message": {
    "name": [
      {
        "error": "invalid"
      }
    ]
  }
}

Notes

Some other notes about this bulk API: * Our bulk APIs have an additional rate limit of 3 requests per second. You may receive 429 error responses if you exceed this limit.

Request Body

The request body is just an array of single-create JSON Request objects within an array with a key of "activities", as seen below:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
{
  "activities": [
    {
      "parent": {
        "type": "person",
        "id": 27140359
      },
      "type": {
        "category": "user",
        "id": 0
      },
      "details": "This is the description of this note"
    }
  ]
}

Example Requests

Bulk Create Activities

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
curl --location --request POST "https://api.copper.com/developer_api/v1/activities/bulk_create" \
  --header "X-PW-AccessToken: YOUR_TOKEN_HERE" \
  --header "X-PW-Application: developer_api" \
  --header "X-PW-UserEmail: " YOUR_EMAIL_HERE \
  --header "Content-Type: application/json" \
  --data '{
      "activities": [
        {
          "parent": {
            "type": "person",
            "id": 27140359
          },
          "type": {
            "category": "user",
            "id": 0
          },
          "details": "Note description for a person record"
        },
        {
          "parent": {
            "type": "lead",
            "id": 875693
          },
          "type": {
            "category": "user",
            "id": 0
          },
          "details": "Note description for a lead record"
        }
      ]
  }'
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
[
  {
    "id": 3064242278,
    "parent": {
      "id": 27140359,
      "type": "person"
    },
    "type": {
      "id": 0,
      "category": "user"
    },
    "user_id": 137658,
    "details": "Note description for a person record",
    "activity_date": 1496772355,
    "old_value": null,
    "new_value": null,
    "date_created": 1496772355,
    "date_modified": 1496772355
  }, {
    "id": 3064242299,
    "parent": {
      "id": 875693,
      "type": "lead"
    },
    "type": {
      "id": 0,
      "category": "user"
    },
    "user_id": 137658,
    "details": "Note description for a lead record",
    "activity_date": 1496772355,
    "old_value": null,
    "new_value": null,
    "date_created": 1496772355,
    "date_modified": 1496772355
  }
]