Batch create

Description

Batch subscribe users to a case.

Request

HTTP Method: POST

Parameter Description
user_emails An array emails of the users to subscribe. Max length of 50.
Path Parameter Description
case_id The ID of the case.

Sample request

curl -X POST \
  https://<<META.tenant.domain>>/api/v2/cases/<<case_id>>/subscribers/batch \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>' \
  -d '{
        "user_emails": ["jane@tines.io", "john@tines.io"]
      }'

Response

A successful request will return a JSON object with the case id & subscribers.

Field description

Parameter Description
case_id The ID of the case.
id The ID of the case subscriber.
subscribers Array of users subscribed. ID of subscriber & user object including user ID, first name, last name, email & avatar URL.

Sample response

{
  "case_id": 7508,
  "subscribers": [
    {
      "id": 1,
      "user": {
        "user_id": 1,
        "first_name": "Jane",
        "last_name": "Doe",
        "email": "jane@tines.io",
        "avatar_url": "example.com/avatar"
      }
    },
    {
      "id": 2,
      "user": {
        "user_id": 2,
        "first_name": "John",
        "last_name": "Doe",
        "email": "john@tines.io",
        "avatar_url": "example.com/avatar"
      }
    }
  ]
}
Was this helpful?