> For the complete documentation index, see [llms.txt](https://docs.bindplane.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bindplane.com/cli-and-api/api/users.md).

# Users

## GET /marketing-consent

> Returns whether the calling user still needs to answer the one-time marketing email prompt

```json
{"openapi":"3.1.1","info":{"title":"","version":"0.0.1"},"servers":[{"url":"/v1"}],"paths":{"/marketing-consent":{"get":{"tags":["users"],"summary":"Returns whether the calling user still needs to answer the one-time marketing email prompt","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.MarketingConsentResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}}}}}},"components":{"schemas":{"model.MarketingConsentResponse":{"description":"Whether the user still needs to answer the one-time marketing email prompt","type":"object","properties":{"required":{"type":"boolean"}}},"model.ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}}}}}
```

## PUT /marketing-consent

> Answers the calling user's one-time marketing email prompt and sends the answer to Boomi

```json
{"openapi":"3.1.1","info":{"title":"","version":"0.0.1"},"servers":[{"url":"/v1"}],"paths":{"/marketing-consent":{"put":{"tags":["users"],"summary":"Answers the calling user's one-time marketing email prompt and sends the answer to Boomi","responses":{"204":{"description":"Successful answer, no content"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"502":{"description":"Bad Gateway","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.MarketingConsentPayload"}}},"description":"The user's answer","required":true}}}},"components":{"schemas":{"model.ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}},"model.MarketingConsentPayload":{"description":"Body of the request to answer the one-time marketing email prompt","type":"object","properties":{"optIn":{"description":"OptIn is true if the user wants to receive marketing emails.","type":"boolean"}}}}}}
```

## GET /users

> List users

```json
{"openapi":"3.1.1","info":{"title":"","version":"0.0.1"},"servers":[{"url":"/v1"}],"paths":{"/users":{"get":{"tags":["users"],"summary":"List users","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.UsersResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}}}}}},"components":{"schemas":{"model.UsersResponse":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/model.User"}}}},"model.User":{"type":"object","properties":{"apiVersion":{"type":"string"},"kind":{"allOf":[{"$ref":"#/components/schemas/model.Kind"}]},"metadata":{"$ref":"#/components/schemas/model.Metadata"},"spec":{"$ref":"#/components/schemas/model.UserSpec"},"status":{"$ref":"#/components/schemas/model.NoStatus"}}},"model.Kind":{"type":"string","enum":["Configuration","Agent","AgentType","AgentVersion","Source","Processor","Connector","Destination","Extension","SourceType","ProcessorType","ConnectorType","DestinationType","ExtensionType","RecommendationType","Unknown","Rollout","RolloutType","Organization","Account","Invitation","Login","User","AccountOrganizationBinding","UserOrganizationBinding","UserAccountBinding","AuditTrail","AvailableComponents","SecretsManagerType","SecretsManager","Recording","Credential","CredentialType","Fleet","Gateway","Integration","IntegrationType","ConfigurationType","Notification","Recommendation","PublicProcessor","Blueprint","PrometheusRule","APIKey","ResourcePreset","LogTypeMatcher","SchemaPolicy"]},"model.Metadata":{"type":"object","properties":{"additionalInfo":{"$ref":"#/components/schemas/model.AdditionalInfo"},"blueprintTags":{"description":"BlueprintTags holds categorized tags for blueprints (e.g., use-case, destination).\nUnlike Labels, this supports multiple values per category.","allOf":[{"$ref":"#/components/schemas/model.BlueprintTags"}]},"dateModified":{"type":"string"},"deprecated":{"description":"Deprecated indicates that this resource is deprecated and should not be used. Deprecated resources should contain\nadditional information about why the resource is deprecated and what should be used instead.\nNote: Ironically, the Deprecated field is itself deprecated. Use Stability instead.","type":"boolean"},"description":{"type":"string"},"displayName":{"type":"string"},"hash":{"description":"Hash is a hex formatted sha256 Hash of the json-encoded spec that is used to determine if the spec has changed.","type":"string"},"icon":{"type":"string"},"id":{"type":"string"},"labels":{"$ref":"#/components/schemas/model.Labels"},"name":{"type":"string"},"resourceDocLink":{"type":"string"},"stability":{"description":"Stability is the stability of the resource, one of development, alpha, beta, stable, or\ndeprecated. This should be used instead of the Deprecated field.","allOf":[{"$ref":"#/components/schemas/model.Stability"}]},"version":{"description":"Version is a 1-based integer that is incremented each time the spec is changed.","type":"integer"},"warning":{"description":"Warning is an optional message that is displayed to the user when the resource is configured. Currently used for IntegrationTypes.","type":"string"}}},"model.AdditionalInfo":{"type":"object","properties":{"documentation":{"type":"array","items":{"$ref":"#/components/schemas/model.DocumentationLink"}},"message":{"type":"string"}}},"model.DocumentationLink":{"type":"object","properties":{"text":{"type":"string"},"url":{"type":"string"}}},"model.BlueprintTags":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"model.Labels":{"type":"object"},"model.Stability":{"type":"string","enum":["development","alpha","beta","stable","deprecated","legacy",""]},"model.UserSpec":{"type":"object","properties":{"activeAccount":{"type":"string"},"email":{"type":"string"},"marketingPromptPending":{"description":"MarketingPromptPending is true until a new SaaS user with an email answers the one-time marketing email\nprompt. The answer itself is never stored.","type":"boolean"},"nextLoginAccount":{"type":"string"},"requestedMFA":{"description":"RequestedMFA is true if the user has opted-in for multi-factor authentication. This is only supported when Auth0\nis configured as the authentication type.","type":"boolean"}}},"model.NoStatus":{"type":"object"},"model.ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}}}}}
```

## Add User to Current Project

> The /users route will add a new user to an existing project.\
> If the create flag is set, and the user doesn't already exist, it will create the user and\
> add a new login in addition to the the project binding.

```json
{"openapi":"3.1.1","info":{"title":"","version":"0.0.1"},"servers":[{"url":"/v1"}],"paths":{"/users":{"post":{"description":"The /users route will add a new user to an existing project.\nIf the create flag is set, and the user doesn't already exist, it will create the user and\nadd a new login in addition to the the project binding.","tags":["users"],"summary":"Add User to Current Project","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ApplyResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"422":{"description":"Tried to update a non-existing user, use the create flag to create a new user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.AddUserPayload"}}},"description":"Add User Payload"}}}},"components":{"schemas":{"model.ApplyResponse":{"type":"object","properties":{"updates":{"type":"array","items":{"$ref":"#/components/schemas/model.ResourceStatus"}}}},"model.ResourceStatus":{"type":"object","properties":{"before":{"description":"Before is the resource before the update, currently only used for audit events and omitted from API responses"},"reason":{"description":"Reason will be set if status is invalid or error","type":"string"},"resource":{"description":"Resource is the resource that was updated"},"status":{"description":"Status is the status of the resource after the update","allOf":[{"$ref":"#/components/schemas/model.UpdateStatus"}]}}},"model.UpdateStatus":{"type":"string","enum":["unchanged","configured","created","deleted","not-found","invalid","error","in-use","forbidden","deprecated"]},"model.ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}},"model.AddUserPayload":{"description":"Body of the request to add a user to an account","type":"object","properties":{"create":{"description":"Create should be true if the user should be created if they do not exist","type":"boolean"},"email":{"description":"Email address of the user to add","type":"string"},"name":{"description":"Name of the user to add","type":"string"}}}}}}
```

## GET /users/{id}

> Get user by id

```json
{"openapi":"3.1.1","info":{"title":"","version":"0.0.1"},"servers":[{"url":"/v1"}],"paths":{"/users/{id}":{"get":{"tags":["users"],"summary":"Get user by id","parameters":[{"schema":{"type":"string"},"description":"the id of the user","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.UserResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}}}}}},"components":{"schemas":{"model.UserResponse":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/model.User"}}},"model.User":{"type":"object","properties":{"apiVersion":{"type":"string"},"kind":{"allOf":[{"$ref":"#/components/schemas/model.Kind"}]},"metadata":{"$ref":"#/components/schemas/model.Metadata"},"spec":{"$ref":"#/components/schemas/model.UserSpec"},"status":{"$ref":"#/components/schemas/model.NoStatus"}}},"model.Kind":{"type":"string","enum":["Configuration","Agent","AgentType","AgentVersion","Source","Processor","Connector","Destination","Extension","SourceType","ProcessorType","ConnectorType","DestinationType","ExtensionType","RecommendationType","Unknown","Rollout","RolloutType","Organization","Account","Invitation","Login","User","AccountOrganizationBinding","UserOrganizationBinding","UserAccountBinding","AuditTrail","AvailableComponents","SecretsManagerType","SecretsManager","Recording","Credential","CredentialType","Fleet","Gateway","Integration","IntegrationType","ConfigurationType","Notification","Recommendation","PublicProcessor","Blueprint","PrometheusRule","APIKey","ResourcePreset","LogTypeMatcher","SchemaPolicy"]},"model.Metadata":{"type":"object","properties":{"additionalInfo":{"$ref":"#/components/schemas/model.AdditionalInfo"},"blueprintTags":{"description":"BlueprintTags holds categorized tags for blueprints (e.g., use-case, destination).\nUnlike Labels, this supports multiple values per category.","allOf":[{"$ref":"#/components/schemas/model.BlueprintTags"}]},"dateModified":{"type":"string"},"deprecated":{"description":"Deprecated indicates that this resource is deprecated and should not be used. Deprecated resources should contain\nadditional information about why the resource is deprecated and what should be used instead.\nNote: Ironically, the Deprecated field is itself deprecated. Use Stability instead.","type":"boolean"},"description":{"type":"string"},"displayName":{"type":"string"},"hash":{"description":"Hash is a hex formatted sha256 Hash of the json-encoded spec that is used to determine if the spec has changed.","type":"string"},"icon":{"type":"string"},"id":{"type":"string"},"labels":{"$ref":"#/components/schemas/model.Labels"},"name":{"type":"string"},"resourceDocLink":{"type":"string"},"stability":{"description":"Stability is the stability of the resource, one of development, alpha, beta, stable, or\ndeprecated. This should be used instead of the Deprecated field.","allOf":[{"$ref":"#/components/schemas/model.Stability"}]},"version":{"description":"Version is a 1-based integer that is incremented each time the spec is changed.","type":"integer"},"warning":{"description":"Warning is an optional message that is displayed to the user when the resource is configured. Currently used for IntegrationTypes.","type":"string"}}},"model.AdditionalInfo":{"type":"object","properties":{"documentation":{"type":"array","items":{"$ref":"#/components/schemas/model.DocumentationLink"}},"message":{"type":"string"}}},"model.DocumentationLink":{"type":"object","properties":{"text":{"type":"string"},"url":{"type":"string"}}},"model.BlueprintTags":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"model.Labels":{"type":"object"},"model.Stability":{"type":"string","enum":["development","alpha","beta","stable","deprecated","legacy",""]},"model.UserSpec":{"type":"object","properties":{"activeAccount":{"type":"string"},"email":{"type":"string"},"marketingPromptPending":{"description":"MarketingPromptPending is true until a new SaaS user with an email answers the one-time marketing email\nprompt. The answer itself is never stored.","type":"boolean"},"nextLoginAccount":{"type":"string"},"requestedMFA":{"description":"RequestedMFA is true if the user has opted-in for multi-factor authentication. This is only supported when Auth0\nis configured as the authentication type.","type":"boolean"}}},"model.NoStatus":{"type":"object"},"model.ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}}}}}
```

## DELETE /users/{id}

> Remove User from Current Project

```json
{"openapi":"3.1.1","info":{"title":"","version":"0.0.1"},"servers":[{"url":"/v1"}],"paths":{"/users/{id}":{"delete":{"tags":["users"],"summary":"Remove User from Current Project","parameters":[{"schema":{"type":"string"},"description":"the id of the user to remove from the current project","name":"id","in":"path","required":true}],"responses":{"204":{"description":"Successful removal, no content"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}}}}}},"components":{"schemas":{"model.ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}}}}}
```

## POST /users/{id}/demote-org-admin

> Demote a user from organization admin

```json
{"openapi":"3.1.1","info":{"title":"","version":"0.0.1"},"servers":[{"url":"/v1"}],"paths":{"/users/{id}/demote-org-admin":{"post":{"tags":["users"],"summary":"Demote a user from organization admin","parameters":[{"schema":{"type":"string"},"description":"the id of the user","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}}}}}},"components":{"schemas":{"model.ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}}}}}
```

## Set a user's project role

> Sets the role of a user within the current project

```json
{"openapi":"3.1.1","info":{"title":"","version":"0.0.1"},"servers":[{"url":"/v1"}],"paths":{"/users/{id}/project-role":{"put":{"description":"Sets the role of a user within the current project","tags":["users"],"summary":"Set a user's project role","parameters":[{"schema":{"type":"string"},"description":"the id of the user","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ApplyResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.SetProjectRolePayload"}}},"description":"Set Project Role Payload","required":true}}}},"components":{"schemas":{"model.ApplyResponse":{"type":"object","properties":{"updates":{"type":"array","items":{"$ref":"#/components/schemas/model.ResourceStatus"}}}},"model.ResourceStatus":{"type":"object","properties":{"before":{"description":"Before is the resource before the update, currently only used for audit events and omitted from API responses"},"reason":{"description":"Reason will be set if status is invalid or error","type":"string"},"resource":{"description":"Resource is the resource that was updated"},"status":{"description":"Status is the status of the resource after the update","allOf":[{"$ref":"#/components/schemas/model.UpdateStatus"}]}}},"model.UpdateStatus":{"type":"string","enum":["unchanged","configured","created","deleted","not-found","invalid","error","in-use","forbidden","deprecated"]},"model.ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}},"model.SetProjectRolePayload":{"description":"Body of the request to set a user's project role","type":"object","properties":{"role":{"description":"Role is the new project role for the user (admin, user, or viewer)","allOf":[{"$ref":"#/components/schemas/auth.Role"}]}}},"auth.Role":{"type":"string","enum":["admin","user","viewer","agent",""]}}}}
```

## POST /users/{id}/promote-org-admin

> Promote a user to organization admin

```json
{"openapi":"3.1.1","info":{"title":"","version":"0.0.1"},"servers":[{"url":"/v1"}],"paths":{"/users/{id}/promote-org-admin":{"post":{"tags":["users"],"summary":"Promote a user to organization admin","parameters":[{"schema":{"type":"string"},"description":"the id of the user","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}}}}}},"components":{"schemas":{"model.ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}}}}}
```

## Remove a user from the current organization

> Removes the user from all organization projects and deletes the organization binding

```json
{"openapi":"3.1.1","info":{"title":"","version":"0.0.1"},"servers":[{"url":"/v1"}],"paths":{"/users/{id}/remove-from-org":{"post":{"description":"Removes the user from all organization projects and deletes the organization binding","tags":["users"],"summary":"Remove a user from the current organization","parameters":[{"schema":{"type":"string"},"description":"the id of the user","name":"id","in":"path","required":true}],"responses":{"200":{"description":"OK"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.ErrorResponse"}}}}}}}},"components":{"schemas":{"model.ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bindplane.com/cli-and-api/api/users.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
