The Membership Resource

Attributes
  • account_id
    string
    includable

    ID of the account making the API request.

  • hub_id
    string
    includable

    The ID of the hub the membership belongs to.

  • role
    integer

    An integer that represents the permission this membership has.
    OWNER - 1
    ADMIN - 2
    DEVELOPER - 4
    ANALYST - 8

  • invitation
    object

    If there is a current invitation, information about it will be here.

    Show child fields
  • permissions
    object

    Information about this memberships environment access controls.

    Show child fields
  • preferences
    object

    The currently set preferences for this membership.

    Show child fields
  • cycle
    object
    optional

    Official Cycle employee accounts will return an ID in this object.

    Show child fields
  • events
    object

    A collection of timestamps for each event in the membership's lifetime.

    Show child fields
  • state
    object

    Information regarding the current state of the membership.

    Show child fields
  • meta
    object
    optional

    A list of meta fields that can be applied to this memberships. See the meta section for more details.

    Show child fields
Example Hub
{
"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"
}
},
"includes": {
"senders": {
"5f5939445e4112000165ccb6": {
"id": "5f5939445e4112000165ccb6",
"name": {
"first": "Demo",
"last": "User"
},
"events": {
"created": "2020-09-09T20:21:04.989Z",
"updated": "0001-01-01T00:00:00Z",
"deleted": "0001-01-01T00:00:00Z",
"last_login": "2020-09-16T04:12:27.849Z"
},
"email": {
"address": "demouser@cyberper.net",
"added": "2020-09-09T20:21:04.989Z",
"verified": true
}
}
},
"hubs": {
"HubResource": {
"id": "5cc78aa0db2ab000014a8b98",
"name": "MyHub",
"creator": {
"type": "account",
"id": "5cc78aa0db2ab000014a8b98"
},
"events": {
"created": "2019-11-22T02:15:52.091Z",
"updated": "0001-01-01T00:00:00Z",
"deleted": "0001-01-01T00:00:00Z"
},
"state": {
"changed": "2019-11-22T02:16:50.848Z",
"current": "live"
},
"integrations": {
"letsencrypt": null
},
"providers": {
"equinix_metal": {
"api_key": "3GR*****************************",
"project": "cdwqa510-7547-2s45-u8ui-q13wk9jh4u52"
},
"vultr": {
"api_key": "FHG*********************************"
},
"aws": {
"api_key": "IOP*****************",
"secret": "uYG*************************************"
}
},
"webhooks": {
"server_deployed": "https://demo.endpoint.com"
},
"billing": {
"term": {
"start": "2019-12-22T22:38:57.506Z",
"end": "2020-01-22T22:38:57.506Z",
"renew": "monthly"
},
"plans": {
"tier_id": "5cc78aa0db2ab000014a8b98",
"support_id": "5cc78aa0db2ab000014a8b98"
}
},
"meta": {
"membership": {
"id": "5cc78aa0db2ab000014a8b98",
"account_id": "5cc78aa0db2ab000014a8b98",
"hub_id": "5cc78aa0db2ab000014a8b98",
"preferences": {
"notifications": {
"api_keys": false
}
},
"events": {
"created": "2019-04-04T23:22:37.467Z",
"updated": "2019-04-11T08:11:34.992Z",
"deleted": "0001-01-01T00:00:00Z",
"joined": "2019-04-04T23:23:31.73Z"
},
"state": {
"changed": "2019-04-04T23:23:31.731Z",
"current": "accepted"
},
"role": 2,
"permissions": {
"all_environments": false,
"environments": [
{
"id": "5b9c2a77b6393d0001eb45fd",
"manage": false
}
]
},
"invitation": {
"sender": {
"id": "5cc78aa0db2ab000014a8b98",
"type": "account"
},
"recipient": "youremail@organization.net",
"events": {
"accepted": "2019-04-04T23:23:31.73Z",
"declined": "0001-01-01T00:00:00Z",
"revoked": "0001-01-01T00:00:00Z"
}
}
}
}
}
},
"accounts": {
"5f5939445e4112000165ccb6": {
"id": "5f5939445e4112000165ccb6",
"name": {
"first": "Demo",
"last": "User"
},
"events": {
"created": "2020-09-09T20:21:04.989Z",
"updated": "0001-01-01T00:00:00Z",
"deleted": "0001-01-01T00:00:00Z",
"last_login": "2020-09-16T04:12:27.849Z"
},
"email": {
"address": "demouser@cyberper.net",
"added": "2020-09-09T20:21:04.989Z",
"verified": true
}
}
}
}
}
}