Skip to content
Skip to Content
DevelopersAPI referenceLists

Invite someone to a list by email

POST
/v1/lists/{id}/members

Owner only. The invitation goes to an email address. It is accepted by the signed-in user who holds that address (GET /v1/invitations), and only a verified address can accept (one the sign-in provider has confirmed). The answer is the same whether or not the address has an account. Inviting an address that is already invited changes its role. A list can have at most 50 collaborators and invitations together.

Authorization

bearer
headerAuthorizationBearer <token>

A personal API key (ga_…), sent as Authorization: Bearer ga_…. A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Path Parameters

id*string

Request Body

application/json
  1. body
email*string
Formatemail
role*string
Value in"viewer""editor"

Response Body

The invitation

application/json
  1. response
id*string
email*string

The address the invitation was sent to, in lower case

role*string
Value in"viewer""editor"
status*string
Value in"pending""accepted"
created_at*string
Formatdate-time
accepted_at?|
Formatdate-time
Example Request
curl -X POST 'https://example.com/v1/lists/string/members' \  -H 'Content-Type: application/json' \  -d '{  "email": "[email protected]",  "role": "viewer"}'
Example Response
{  "id": "string",  "email": "string",  "role": "viewer",  "status": "pending",  "created_at": "2019-08-24T14:15:22Z",  "accepted_at": "2019-08-24T14:15:22Z"}