Create an Invite

Create an invite to a hub and invite your friends!

Requires the hubs-members-manage permission.

query
  • include

    Accepted Values: sendershubs

  • meta

    Accepted Values: capabilities

  • sort

    Sorts can be performed on any field - see sorting

  • filter

    Collections of resources can be filtered based on certain criteria - see filtering 

Arguments
  • recipient
    string

    The recipient email address.

  • role
    string

    The role being offered in the invite to the hub.

Returns

Returns a membership resource, otherwise returns an Error.

POST /v1/hubs/current/invites

Example Request
$ curl https://api.cycle.io/v1/hubs/current \
-H
'Authorization: Bearer API_KEY'
\
-H
'X-Hub-Id: HUB_ID'
\
-H 'Content-Type: application/json' \
-d '{"recipient":"dev@developer.io","role":"developer"}' \
-X POST
Example Response
{
"data": {
"id": "5b9c2a77b6393d0001eb45fd",
"account_id": "5a232a77b6393d0001ac2df2",
"hub_id": "5ccc2a2226393d1231eb4abd",
"events": {
"created": "2021-04-06T18:32:21.783Z",
"updated": "2021-04-12T19:57:49.767Z",
"deleted": "0001-01-01T00:00:00Z",
"joined": "2021-04-06T18:32:27.02Z"
},
"state": {
"changed": "2021-04-06T18:32:27.092Z",
"current": "accepted"
},
"role": 2,
"permissions": {
"all_environments": true,
"environments": []
},
"preferences": {
"notifications": {
"api_keys": false
}
},
"invitation": {
"sender": {
"id": "5ccc2a2226393d1231eb4abd",
"type": "account"
},
"recipient": "demouser@cycleplatform.io",
"events": {
"accepted": "2021-04-06T18:32:27.02Z",
"declined": "0001-01-01T00:00:00Z",
"revoked": "0001-01-01T00:00:00Z"
}
}
}
}