Share Groups

A ShareGroup is a way for you to store and name groups of email contacts to be used for sending share and inbox invitations.

List Share Groups

Endpoint

GET/share_groups

Return Object

ShareGroup[]

Authorization Requirement

Available to all authenticated keys or sessions.

Request Parameters

ParameterDescription
user_id
int64
User ID. Provide a value of 0 to operate the current session's user.

Additional Arguments

Example Request

curl "https://app.files.com/api/rest/v1/share_groups.json?user_id=1" \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

[
  {
    "id": 1,
    "name": "Test group 1",
    "notes": "This group is defined for testing purposes",
    "user_id": 1,
    "members": [
      {
        "name": "John Doe",
        "company": "Acme Ltd",
        "email": "johndoe@gmail.com"
      }
    ]
  }
]

Show Share Group

Endpoint

GET/share_groups/{id}

Return Object

ShareGroup

Authorization Requirement

Available to all authenticated keys or sessions.

Request Parameters

ParameterDescription
id
int64
Required
Share Group ID.

Example Request

curl https://app.files.com/api/rest/v1/share_groups/{id}.json \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

{
  "id": 1,
  "name": "Test group 1",
  "notes": "This group is defined for testing purposes",
  "user_id": 1,
  "members": [
    {
      "name": "John Doe",
      "company": "Acme Ltd",
      "email": "johndoe@gmail.com"
    }
  ]
}

Create Share Group

Endpoint

POST/share_groups

Return Object

ShareGroup

Authorization Requirement

Available to all authenticated keys or sessions.

Request Parameters

ParameterDescription
user_id
int64
User ID. Provide a value of 0 to operate the current session's user.
notes
string
Additional notes of the share group
name
string
Required
Name of the share group
members
array(object)
Required
A list of share group members.

Example Request

curl https://app.files.com/api/rest/v1/share_groups.json \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{"user_id":1,"notes":"This group is defined for testing purposes","name":"Test group 1","members":[{"name":"John Doe","company":"Acme Ltd","email":"johndoe@gmail.com"}]}' \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

{
  "id": 1,
  "name": "Test group 1",
  "notes": "This group is defined for testing purposes",
  "user_id": 1,
  "members": [
    {
      "name": "John Doe",
      "company": "Acme Ltd",
      "email": "johndoe@gmail.com"
    }
  ]
}

Update Share Group

Endpoint

PATCH/share_groups/{id}

Return Object

ShareGroup

Authorization Requirement

Available to all authenticated keys or sessions.

Request Parameters

ParameterDescription
id
int64
Required
Share Group ID.
notes
string
Additional notes of the share group
name
string
Name of the share group
members
array(object)
A list of share group members.

Example Request

curl https://app.files.com/api/rest/v1/share_groups/{id}.json \
  -X PATCH \
  -H 'Content-Type: application/json' \
  -d '{"notes":"This group is defined for testing purposes","name":"Test group 1","members":[{"name":"John Doe","company":"Acme Ltd","email":"johndoe@gmail.com"}]}' \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

{
  "id": 1,
  "name": "Test group 1",
  "notes": "This group is defined for testing purposes",
  "user_id": 1,
  "members": [
    {
      "name": "John Doe",
      "company": "Acme Ltd",
      "email": "johndoe@gmail.com"
    }
  ]
}

Delete Share Group

Endpoint

DELETE/share_groups/{id}

Return Object

No return value.

Authorization Requirement

Available to all authenticated keys or sessions.

Request Parameters

ParameterDescription
id
int64
Required
Share Group ID.

Example Request

curl https://app.files.com/api/rest/v1/share_groups/{id}.json \
  -X DELETE \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

The ShareGroup Object

Some of the endpoints above return a ShareGroup object. The attributes of this object are listed below.

AttributeDescription
id
int64
Share Group ID
name
string
Name of the share group
notes
string
Additional notes of the share group
user_id
int64
Owner User ID
members
array(object)
A list of share group members

Example ShareGroup Object

{
  "id": 1,
  "name": "Test group 1",
  "notes": "This group is defined for testing purposes",
  "user_id": 1,
  "members": [
    {
      "name": "John Doe",
      "company": "Acme Ltd",
      "email": "johndoe@gmail.com"
    }
  ]
}