Manage Grants

Return all grants

Returns all grants in your Nylas application.

get/v3/grants

Query parameters

account_idstring

Returns grants with a matching v2 Nylas account ID. Only applicable for grants migrated from Nylas v2.

account_idsstring

Returns grants with a matching list of v2 Nylas account IDs. Only applicable for grants migrated from Nylas v2.

beforeinteger

Returns grants whose created_at value is less than or equal to the defined value, in seconds using the Unix timestamp format.

emailstring
Example:nyla@example.com

Returns grants with a matching email.

grant_status'invalid' | 'valid'

Filters for only valid or invalid grants.

ipstring

Returns grants with a matching IP address.

limitinteger

The maximum number of grants to return. See Pagination for more information.

offsetinteger

The offset value for the request. See Pagination for more information.

order_by'asc' | 'desc'

The order in which Nylas should sort results for the request.

providerstring

Returns grants with a matching provider.

sinceinteger

Returns grants whose created_at value is greater than or equal to the defined value, in seconds using the Unix timestamp format.

sort_by'created_at' | 'updated_at'

The field Nylas should use to sort results for the request.

workspace_idstring

Returns grants in the specified workspace.

Response

Success. Returns an array of Grant objects.

request_idstring

The request ID.

limitinteger
offsetinteger

Example response

{
  "request_id": "5967ca40-a2d8-4ee0-a0e0-6f18ace39a90",
  "data": [
    {
      "account_id": "df0yq6c9okc6t9j4ejd5nyrt7",
      "created_at": 1617817109,
      "email": "nyla@example.com",
      "grant_status": "valid",
      "id": "e19f8e1a-eb1c-41c0-b6a6-d2e59daf7f47",
      "ip": "1.1.1.1",
      "name": "Nyla",
      "provider": "microsoft",
      "provider_user_id": "b16f171c-6640-4edd-a598-e507b546d841",
      "scope": [
        "Mail.Read",
        "User.Read",
        "offline_access"
      ],
      "email_aliases": [
        "email_alias1@example.com",
        "email_alias2@example.com"
      ],
      "state": "my-state",
      "updated_at": 1617817109,
      "workspace_id": "abf6ff99-05ad-4c0a-aaf8-400aacf2470a",
      "credential_id": "c123f8e1a-eb1c-41c0-b6a6-d2e59daf7f47"
    }
  ],
  "limit": 10
}

Changes