API reference
Team
The owner of an X account can share it with other Gemlead users. Each member works on it with the owner's plan and credits, and their role decides what they may change, zone by zone. Billing and the X account's connection stay the owner's.
The owner and the admins invite and change members. Only the owner makes someone an admin or changes an admin. An X account has 50 members at most, invites included.
A member whose role edits the settings can make their own API key or connect an AI app. That key works with the member's role, never more, and stops once they leave the team.
The team object
Who works on the X account in Gemlead, its owner first, and what the key's own user may do there.
Attributes
- objectstringAlways
team. - account_idstringThe X account's ID, as in the account object.
- your_rolestringThe role of the key's user.
ownerfor the owner's keys.ownerviewersettereditoradmincustom - your_member_idstring or nullThe key's user as a member, null for the owner.
- ownerobjectThe Gemlead user who connected the X account and pays for it.
- membersarray of objectsThe members and the invites, as team member objects.
- max_membersintegerHow many members an X account has at most, invites included.
{
"object": "team",
"account_id": "a9PzK2vRtM",
"your_role": "owner",
"your_member_id": null,
"owner": {
"name": "Alex Moreau",
"email": "alex@acme.com",
"profile_image_url": "https://pbs.twimg.com/profile_images/1180044592/acme_400x400.jpg"
},
"members": [
{
"id": "Tm4kQ9wZrB",
"object": "team_member",
"email": "sara@acme.com",
"name": "Sara Kim",
"profile_image_url": "https://pbs.twimg.com/profile_images/1733920571/sara_400x400.jpg",
"role": "setter",
"zones": {
"personas": "view",
"campaigns": "view",
"chat": "edit",
"leads": "edit",
"settings": "view"
},
"status": "active",
"created_at": "2026-09-14T09:21:05.300Z"
},
{
"id": "Tm8vX2pLnC",
"object": "team_member",
"email": "dev@acme.com",
"name": null,
"profile_image_url": null,
"role": "custom",
"zones": {
"personas": "edit",
"campaigns": "view",
"chat": "view",
"leads": "edit",
"settings": "view"
},
"status": "invited",
"created_at": "2026-11-06T07:45:12.904Z"
}
],
"max_members": 50
}Retrieve the team
Returns the X account's owner, then each member and invite with their role and zones, and the role of the key's own user.
Returns
The team object.
curl https://gemlead.ai/api/v1/team \
-H "Authorization: Bearer $GEMLEAD_API_KEY"{
"object": "team",
"account_id": "a9PzK2vRtM",
"your_role": "owner",
"your_member_id": null,
"owner": {
"name": "Alex Moreau",
"email": "alex@acme.com",
"profile_image_url": "https://pbs.twimg.com/profile_images/1180044592/acme_400x400.jpg"
},
"members": [
{
"id": "Tm4kQ9wZrB",
"object": "team_member",
"email": "sara@acme.com",
"name": "Sara Kim",
"profile_image_url": "https://pbs.twimg.com/profile_images/1733920571/sara_400x400.jpg",
"role": "setter",
"zones": {
"personas": "view",
"campaigns": "view",
"chat": "edit",
"leads": "edit",
"settings": "view"
},
"status": "active",
"created_at": "2026-09-14T09:21:05.300Z"
},
{
"id": "Tm8vX2pLnC",
"object": "team_member",
"email": "dev@acme.com",
"name": null,
"profile_image_url": null,
"role": "custom",
"zones": {
"personas": "edit",
"campaigns": "view",
"chat": "view",
"leads": "edit",
"settings": "view"
},
"status": "invited",
"created_at": "2026-11-06T07:45:12.904Z"
}
],
"max_members": 50
}The team member object
Someone the owner shares the X account with, or an invite they have not taken yet.
Attributes
- idstringUnique identifier for the member.
- objectstringAlways
team_member. - emailstringThe email the invite went to.
- namestring or nullTheir name in Gemlead. Null until they join.
- profile_image_urlstring or nullTheir profile picture's URL.
- rolestring
viewersees everything and changes nothing.setterworks the chat and the leads.editorchanges everything but the settings.adminchanges everything and runs the team.customchanges the zones you pick.viewersettereditoradmincustom - zonesobjectWhat the member may change, zone by zone, each
vieworedit. The role sets them, andcustomkeeps the ones you pick. - statusstring
activeonce they have a Gemlead account at this email,inviteduntil then.invitedactive - created_atstringWhen the invite was sent, ISO 8601.
{
"id": "Tm4kQ9wZrB",
"object": "team_member",
"email": "sara@acme.com",
"name": "Sara Kim",
"profile_image_url": "https://pbs.twimg.com/profile_images/1733920571/sara_400x400.jpg",
"role": "setter",
"zones": {
"personas": "view",
"campaigns": "view",
"chat": "edit",
"leads": "edit",
"settings": "view"
},
"status": "active",
"created_at": "2026-09-14T09:21:05.300Z"
}Invite a member
Invites someone to the X account's team by email, with a role, and sends them an email. Someone with a Gemlead account at this email joins at once, anyone else once they sign up with it.
Body parameters
- emailstringRequiredThe person's email, up to 200 characters.
- rolestringRequiredWhat the member may do. See
rolein the team member object.viewersettereditoradmincustom - zonesobjectWith the
customrole only, what the member may change, zone by zone, eachvieworedit. A zone left out isview.
Returns
The new team member object, its status at active when they have a Gemlead account, else invited.
Errors
- A required parameter is missing.
paramnames it. - A parameter has a value the API does not accept, like
zoneswith a role other thancustomor the owner's own email.paramnames it. - The body has a field this endpoint does not take.
- 403forbiddenThe key's user may not change the team. The owner and the admins can, and only the owner makes or changes an admin.
- This email is in the team already, as a member or an invite.
- The X account has 50 members already, invites included.
curl -X POST https://gemlead.ai/api/v1/team/members \
-H "Authorization: Bearer $GEMLEAD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "dev@acme.com",
"role": "custom",
"zones": {
"personas": "edit",
"leads": "edit"
}
}'{
"id": "Tm8vX2pLnC",
"object": "team_member",
"email": "dev@acme.com",
"name": null,
"profile_image_url": null,
"role": "custom",
"zones": {
"personas": "edit",
"campaigns": "view",
"chat": "view",
"leads": "edit",
"settings": "view"
},
"status": "invited",
"created_at": "2026-11-06T07:45:12.904Z"
}Update a member
Changes a member's role, or what they may change zone by zone. Sending zones makes the role custom, and only the zones you send change.
Path parameters
- member_idstringRequiredThe team member's ID.
Body parameters
- rolestringWhat the member may do. See
rolein the team member object.viewersettereditoradmincustom - zonesobjectThe zones to change, each
vieworedit. The others stay as they are.
Returns
The updated team member object.
Errors
- No team member with this ID on the key's account.
- A parameter has a value the API does not accept.
paramnames it. - The body has a field this endpoint does not take.
- 403forbiddenThe key's user may not change the team. The owner and the admins can, and only the owner makes or changes an admin.
curl -X PATCH \
https://gemlead.ai/api/v1/team/members/Tm4kQ9wZrB \
-H "Authorization: Bearer $GEMLEAD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"role": "editor"
}'{
"id": "Tm4kQ9wZrB",
"object": "team_member",
"email": "sara@acme.com",
"name": "Sara Kim",
"profile_image_url": "https://pbs.twimg.com/profile_images/1733920571/sara_400x400.jpg",
"role": "editor",
"zones": {
"personas": "edit",
"campaigns": "edit",
"chat": "edit",
"leads": "edit",
"settings": "view"
},
"status": "active",
"created_at": "2026-09-14T09:21:05.300Z"
}Remove a member
Removes a member from the team, or cancels an invite. They lose access to the X account at once.
Path parameters
- member_idstringRequiredThe team member's ID.
Returns
An object with the member's id and deleted set to true.
Errors
- No team member with this ID on the key's account.
- 403forbiddenThe key's user may not change the team. The owner and the admins can, and only the owner makes or changes an admin.
curl -X DELETE \
https://gemlead.ai/api/v1/team/members/Tm8vX2pLnC \
-H "Authorization: Bearer $GEMLEAD_API_KEY"{
"id": "Tm8vX2pLnC",
"object": "team_member",
"deleted": true
}Leave the team
Takes the key's own user out of the X account's team. It works with a member's key, never with the owner's.
Returns
An object with the member's id and deleted set to true.
Errors
- The key is the owner's. The owner removes members instead.
curl -X POST https://gemlead.ai/api/v1/team/leave \
-H "Authorization: Bearer $GEMLEAD_API_KEY"{
"id": "Tm4kQ9wZrB",
"object": "team_member",
"deleted": true
}