For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
      • POSTAdd a member to teams
      • DELDelete account member
      • GETGet account member
      • POSTInvite new members
      • GETList account members
      • PATCHModify account members
      • PATCHModify an account member
    • Account Usage Beta
    • AI Configs
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
    • Audit Log
    • Code References
    • Contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
    • Environments
    • Experiments
    • Feature Flags
    • Feature Flags Beta
    • Flag Import Configurations Beta
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
    • Insights Flag Events Beta
    • Insights Pull Requests Beta
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
    • Metrics
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
REST API overviewAccount Members

Add a member to teams

POST
/api/v2/members/:id/teams
POST
/api/v2/members/:id/teams
$curl -X POST https://app.launchdarkly.com/api/v2/members/id/teams \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "teamKeys": [
> "team1",
> "team2"
> ]
>}'
1{
2 "_links": {},
3 "_id": "507f1f77bcf86cd799439011",
4 "role": "reader",
5 "email": "ariel@acme.com",
6 "_pendingInvite": false,
7 "_verified": true,
8 "customRoles": [
9 "devOps",
10 "backend-devs"
11 ],
12 "mfa": "string",
13 "_lastSeen": 1608260796147,
14 "creationDate": 1628001602644,
15 "firstName": "Ariel",
16 "lastName": "Flores",
17 "_pendingEmail": "string",
18 "excludedDashboards": [
19 "string"
20 ],
21 "_lastSeenMetadata": {
22 "tokenId": "5b52207f8ca8e631d31fdb2b"
23 },
24 "_integrationMetadata": {
25 "externalId": "string",
26 "externalStatus": {
27 "display": "string",
28 "value": "string"
29 },
30 "externalUrl": "string",
31 "lastChecked": 1
32 },
33 "teams": [
34 {
35 "customRoleKeys": [
36 "access-to-test-projects"
37 ],
38 "key": "team-key-123abc",
39 "name": "QA Team",
40 "_links": {}
41 }
42 ],
43 "permissionGrants": [
44 {
45 "resource": "team/qa-team",
46 "actionSet": "string",
47 "actions": [
48 "maintainTeam"
49 ]
50 }
51 ],
52 "oauthProviders": [
53 "string"
54 ],
55 "version": 1,
56 "roleAttributes": {}
57}
Add one member to one or more teams.
Was this page helpful?
Previous

Delete account member

Next
Built with

Authentication

Authorizationstring
API Key authentication via header

Path parameters

idstringRequiredformat: "string"
The member ID

Request

This endpoint expects an object.
teamKeyslist of stringsRequired
List of team keys

Response

Member response
_linksmap from strings to objects
The location and content type of related resources
_idstring
The member's ID
rolestring
The member's base role. If the member has no additional roles, this role will be in effect.
emailstring
The member's email address
_pendingInviteboolean
Whether the member has a pending invitation
_verifiedboolean
Whether the member's email address has been verified
customRoleslist of strings
The set of additional roles, besides the base role, assigned to the member
mfastring

Whether multi-factor authentication is enabled for this member

_lastSeenlong

The member’s last session date (as Unix milliseconds since epoch)

creationDatelong
Timestamp of when the member was created
firstNamestring
The member's first name
lastNamestring
The member's last name
_pendingEmailstring
The member's email address before it has been verified, for accounts where email verification is required
excludedDashboardslist of strings
Default dashboards that the member has chosen to ignore
_lastSeenMetadataobject
Additional metadata associated with the member's last session, for example, whether a token was used
_integrationMetadataobject
Details on the member account in an external source, if this member is provisioned externally
teamslist of objects
Details on the teams this member is assigned to
permissionGrantslist of objects
A list of permission grants. Permission grants allow a member to have access to a specific action, without having to create or update a custom role.
oauthProviderslist of strings
A list of OAuth providers
versioninteger
Version of the current configuration
roleAttributesmap from strings to lists of strings
The role attributes for the member

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error