> For the complete documentation index, see [llms.txt](https://support.turngate.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.turngate.io/api-documentation/accounts.md).

# Accounts

## GET /accounts/analysts/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"Analyst":{"required":["user","organization"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"user":{"$ref":"#/components/schemas/User"},"organization":{"title":"Organization","type":"integer"},"name":{"title":"Name","type":"string","readOnly":true}}},"User":{"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"email":{"title":"Email","type":"string","format":"email","maxLength":254},"first_name":{"title":"First name","type":"string","maxLength":150},"last_name":{"title":"Last name","type":"string","maxLength":150},"groups":{"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups.","type":"array","items":{"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups.","type":"integer"},"uniqueItems":true},"is_active":{"title":"Active","description":"Designates whether this user should be treated as active. Unselect this instead of deleting accounts.","type":"boolean"}}}}},"paths":{"/accounts/analysts/":{"get":{"operationId":"accounts_analysts_list","description":"","parameters":[{"name":"search","in":"query","description":"A search term.","required":false,"type":"string"},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"type":"integer"},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"type":"integer"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"required":["count","results"],"type":"object","properties":{"count":{"type":"integer"},"next":{"type":"string","format":"uri"},"previous":{"type":"string","format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Analyst"}}}}}}}},"tags":["accounts"]}}}}
```

## GET /accounts/analysts/current/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"CurrentUser":{"required":["user_progress"],"type":"object","properties":{"consent_given":{"title":"Consent given","type":"boolean"},"user_progress":{"$ref":"#/components/schemas/UserProgress"},"user_uuid":{"title":"User uuid","type":"string","format":"uuid","readOnly":true}}},"UserProgress":{"type":"object","properties":{"integrations":{"type":"array","items":{"type":"string","minLength":1}},"filters":{"type":"array","items":{"type":"string","minLength":1}},"onboarding":{"type":"array","items":{"type":"string","minLength":1}}}}}},"paths":{"/accounts/analysts/current/":{"get":{"operationId":"accounts_analysts_current_read","description":"","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUser"}}}}},"tags":["accounts"]}}}}
```

## PATCH /accounts/analysts/current/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"CurrentUser":{"required":["user_progress"],"type":"object","properties":{"consent_given":{"title":"Consent given","type":"boolean"},"user_progress":{"$ref":"#/components/schemas/UserProgress"},"user_uuid":{"title":"User uuid","type":"string","format":"uuid","readOnly":true}}},"UserProgress":{"type":"object","properties":{"integrations":{"type":"array","items":{"type":"string","minLength":1}},"filters":{"type":"array","items":{"type":"string","minLength":1}},"onboarding":{"type":"array","items":{"type":"string","minLength":1}}}},"CurrentUserPatch":{"type":"object","properties":{"consent_given":{"title":"Consent given","type":"boolean"},"user_progress":{"$ref":"#/components/schemas/UserProgress"},"user_uuid":{"title":"User uuid","type":"string","format":"uuid","readOnly":true}}}}},"paths":{"/accounts/analysts/current/":{"patch":{"operationId":"accounts_analysts_current_partial_update","description":"","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUser"}}}}},"tags":["accounts"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUserPatch"}}},"required":true}}}}}
```

## GET /accounts/groups/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"Group":{"required":["name"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"name":{"title":"Name","type":"string","maxLength":150,"minLength":1}}}}},"paths":{"/accounts/groups/":{"get":{"operationId":"accounts_groups_list","description":"","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"type":"integer"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"required":["count","results"],"type":"object","properties":{"count":{"type":"integer"},"next":{"type":"string","format":"uri"},"previous":{"type":"string","format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}}}}}}},"tags":["accounts"]}}}}
```

## List invitations

> List the invitations for the organizaton.

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"OrganizationInvitation":{"required":["invitee_identifier"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"invitee_identifier":{"title":"Invitee identifier","type":"string","minLength":1},"role":{"title":"Role","type":"string","enum":["Analyst","IntegrationAdmin","OrganizationAdmin"]},"invited_by":{"title":"Invited by","type":"string","format":"uuid","readOnly":true},"sent_at":{"title":"Sent at","type":"string","format":"date-time","readOnly":true},"valid_until":{"title":"Valid until","type":"string","format":"date-time","readOnly":true}}}}},"paths":{"/accounts/invite/":{"get":{"operationId":"accounts_invite_list","summary":"List invitations","description":"List the invitations for the organizaton.","parameters":[{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"type":"integer"},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"type":"integer"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"required":["count","results"],"type":"object","properties":{"count":{"type":"integer"},"next":{"type":"string","format":"uri"},"previous":{"type":"string","format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationInvitation"}}}}}}}},"tags":["accounts"]}}}}
```

## Create an invitation for a user to join an organization.

> Create an invitation for a user to join an organization.

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"OrganizationInvitation":{"required":["invitee_identifier"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"invitee_identifier":{"title":"Invitee identifier","type":"string","minLength":1},"role":{"title":"Role","type":"string","enum":["Analyst","IntegrationAdmin","OrganizationAdmin"]},"invited_by":{"title":"Invited by","type":"string","format":"uuid","readOnly":true},"sent_at":{"title":"Sent at","type":"string","format":"date-time","readOnly":true},"valid_until":{"title":"Valid until","type":"string","format":"date-time","readOnly":true}}}}},"paths":{"/accounts/invite/":{"post":{"operationId":"accounts_invite_create","summary":"Create an invitation for a user to join an organization.","description":"Create an invitation for a user to join an organization.","responses":{"201":{"description":"Invitation created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInvitation"}}}},"303":{"description":"Invite aready exists, try resending invitation.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"redirrect_url":{"type":"string"},"method":{"type":"string"}}}}}},"400":{"description":"Bad request"},"403":{"description":"You do not have permission to perform this action."}},"tags":["accounts"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationInvitation"}}},"required":true}}}}}
```

## GET /accounts/invite/{uuid}/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"OrganizationInvitation":{"required":["invitee_identifier"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"invitee_identifier":{"title":"Invitee identifier","type":"string","minLength":1},"role":{"title":"Role","type":"string","enum":["Analyst","IntegrationAdmin","OrganizationAdmin"]},"invited_by":{"title":"Invited by","type":"string","format":"uuid","readOnly":true},"sent_at":{"title":"Sent at","type":"string","format":"date-time","readOnly":true},"valid_until":{"title":"Valid until","type":"string","format":"date-time","readOnly":true}}}}},"paths":{"/accounts/invite/{uuid}/":{"get":{"operationId":"accounts_invite_read","description":"","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationInvitation"}}}}}},"tags":["accounts"]}}}}
```

## Resend invitation to a user to join an organization.

> Resend an invitation to a user to join an organization.

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"OrganizationInvitation":{"required":["invitee_identifier"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"invitee_identifier":{"title":"Invitee identifier","type":"string","minLength":1},"role":{"title":"Role","type":"string","enum":["Analyst","IntegrationAdmin","OrganizationAdmin"]},"invited_by":{"title":"Invited by","type":"string","format":"uuid","readOnly":true},"sent_at":{"title":"Sent at","type":"string","format":"date-time","readOnly":true},"valid_until":{"title":"Valid until","type":"string","format":"date-time","readOnly":true}}}}},"paths":{"/accounts/invite/{uuid}/":{"post":{"operationId":"accounts_invite_resend","summary":"Resend invitation to a user to join an organization.","description":"Resend an invitation to a user to join an organization.","responses":{"200":{"description":"Invitation resent successfully","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationInvitation"}}}}},"400":{"description":"Bad request"},"403":{"description":"You do not have permission to perform this action."},"404":{"description":"Invitation not found"},"409":{"description":"Failed to resend invite via external identity provider."}},"tags":["accounts"],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationInvitation"}}}},"required":true}}}}}
```

## Revoke invitation to a user to join an organization.

> Revoke an invitation to a user to join an organization.

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}}},"paths":{"/accounts/invite/{uuid}/":{"delete":{"operationId":"accounts_invite_destroy","summary":"Revoke invitation to a user to join an organization.","description":"Revoke an invitation to a user to join an organization.","responses":{"204":{"description":"Invitation revoked successfully"},"400":{"description":"Bad request"},"403":{"description":"You do not have permission to perform this action."},"409":{"description":"Failed to revoke invite via external identity provider."}},"tags":["accounts"]}}}}
```

On POST attempt to generate and return login params containing the login hint url\
and the account identifier (email).
-----------------------------------

> The following cases are handled:\
> \- If an email address does not pass the serializer EmailField validation, return an error.\
> \- If a there are multiple users associated with the same email address. Return a route indicating\
> manual entry is required.\
> \- If a valid email is provided, fetch the Org's striviactiy metdata and use that to build a login hint and return the\
> correct value.

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"Email":{"required":["email"],"type":"object","properties":{"email":{"title":"Email","type":"string","format":"email","minLength":1}}}}},"paths":{"/accounts/login_url/":{"post":{"operationId":"accounts_login_url_create","summary":"On POST attempt to generate and return login params containing the login hint url\nand the account identifier (email).","description":"The following cases are handled:\n- If an email address does not pass the serializer EmailField validation, return an error.\n- If a there are multiple users associated with the same email address. Return a route indicating\nmanual entry is required.\n- If a valid email is provided, fetch the Org's striviactiy metdata and use that to build a login hint and return the\ncorrect value.","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","properties":{"params":{"type":"string"}}}}}},"400":{"description":"Invalid Input"}},"tags":["accounts"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Email"}}},"required":true}}}}}
```

## GET /accounts/organizations/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"Organization":{"required":["name","slug"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"name":{"title":"Name","description":"The name of the organization","type":"string","maxLength":200,"minLength":1},"slug":{"title":"Slug","description":"The name in all lowercase, suitable for URL identification","type":"string","format":"slug","pattern":"^[-a-zA-Z0-9_]+$","maxLength":200,"minLength":1},"account_portal_url":{"title":"Account portal url","type":"string","readOnly":true},"rate_limit":{"$ref":"#/components/schemas/RateLimit"}}},"RateLimit":{"type":"object","properties":{"limit":{"title":"Limit","type":"integer","readOnly":true},"usage":{"title":"Usage","type":"integer","readOnly":true},"remaining":{"title":"Remaining","type":"integer","readOnly":true},"overriden":{"title":"Overriden","type":"boolean","readOnly":true}}}}},"paths":{"/accounts/organizations/":{"get":{"operationId":"accounts_organizations_list","description":"","parameters":[{"name":"id","in":"query","description":"id","required":false,"type":"string"},{"name":"uuid","in":"query","description":"uuid","required":false,"type":"string"},{"name":"name","in":"query","description":"name","required":false,"type":"string"},{"name":"slug","in":"query","description":"slug","required":false,"type":"string"},{"name":"search","in":"query","description":"A search term.","required":false,"type":"string"},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"type":"integer"},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"type":"integer"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"required":["count","results"],"type":"object","properties":{"count":{"type":"integer"},"next":{"type":"string","format":"uri"},"previous":{"type":"string","format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}}}}}}}},"tags":["accounts"]}}}}
```

## POST /accounts/organizations/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"Organization":{"required":["name","slug"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"name":{"title":"Name","description":"The name of the organization","type":"string","maxLength":200,"minLength":1},"slug":{"title":"Slug","description":"The name in all lowercase, suitable for URL identification","type":"string","format":"slug","pattern":"^[-a-zA-Z0-9_]+$","maxLength":200,"minLength":1},"account_portal_url":{"title":"Account portal url","type":"string","readOnly":true},"rate_limit":{"$ref":"#/components/schemas/RateLimit"}}},"RateLimit":{"type":"object","properties":{"limit":{"title":"Limit","type":"integer","readOnly":true},"usage":{"title":"Usage","type":"integer","readOnly":true},"remaining":{"title":"Remaining","type":"integer","readOnly":true},"overriden":{"title":"Overriden","type":"boolean","readOnly":true}}}}},"paths":{"/accounts/organizations/":{"post":{"operationId":"accounts_organizations_create","description":"","responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}}},"tags":["accounts"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}},"required":true}}}}}
```

## GET /accounts/organizations/{uuid}/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"Organization":{"required":["name","slug"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"name":{"title":"Name","description":"The name of the organization","type":"string","maxLength":200,"minLength":1},"slug":{"title":"Slug","description":"The name in all lowercase, suitable for URL identification","type":"string","format":"slug","pattern":"^[-a-zA-Z0-9_]+$","maxLength":200,"minLength":1},"account_portal_url":{"title":"Account portal url","type":"string","readOnly":true},"rate_limit":{"$ref":"#/components/schemas/RateLimit"}}},"RateLimit":{"type":"object","properties":{"limit":{"title":"Limit","type":"integer","readOnly":true},"usage":{"title":"Usage","type":"integer","readOnly":true},"remaining":{"title":"Remaining","type":"integer","readOnly":true},"overriden":{"title":"Overriden","type":"boolean","readOnly":true}}}}},"paths":{"/accounts/organizations/{uuid}/":{"get":{"operationId":"accounts_organizations_read","description":"","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}}},"tags":["accounts"]}}}}
```

## PUT /accounts/organizations/{uuid}/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"Organization":{"required":["name","slug"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"name":{"title":"Name","description":"The name of the organization","type":"string","maxLength":200,"minLength":1},"slug":{"title":"Slug","description":"The name in all lowercase, suitable for URL identification","type":"string","format":"slug","pattern":"^[-a-zA-Z0-9_]+$","maxLength":200,"minLength":1},"account_portal_url":{"title":"Account portal url","type":"string","readOnly":true},"rate_limit":{"$ref":"#/components/schemas/RateLimit"}}},"RateLimit":{"type":"object","properties":{"limit":{"title":"Limit","type":"integer","readOnly":true},"usage":{"title":"Usage","type":"integer","readOnly":true},"remaining":{"title":"Remaining","type":"integer","readOnly":true},"overriden":{"title":"Overriden","type":"boolean","readOnly":true}}}}},"paths":{"/accounts/organizations/{uuid}/":{"put":{"operationId":"accounts_organizations_update","description":"","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}}},"tags":["accounts"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}},"required":true}}}}}
```

## DELETE /accounts/organizations/{uuid}/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}}},"paths":{"/accounts/organizations/{uuid}/":{"delete":{"operationId":"accounts_organizations_delete","description":"","responses":{"204":{"description":""}},"tags":["accounts"]}}}}
```

## PATCH /accounts/organizations/{uuid}/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"Organization":{"required":["name","slug"],"type":"object","properties":{"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"name":{"title":"Name","description":"The name of the organization","type":"string","maxLength":200,"minLength":1},"slug":{"title":"Slug","description":"The name in all lowercase, suitable for URL identification","type":"string","format":"slug","pattern":"^[-a-zA-Z0-9_]+$","maxLength":200,"minLength":1},"account_portal_url":{"title":"Account portal url","type":"string","readOnly":true},"rate_limit":{"$ref":"#/components/schemas/RateLimit"}}},"RateLimit":{"type":"object","properties":{"limit":{"title":"Limit","type":"integer","readOnly":true},"usage":{"title":"Usage","type":"integer","readOnly":true},"remaining":{"title":"Remaining","type":"integer","readOnly":true},"overriden":{"title":"Overriden","type":"boolean","readOnly":true}}}}},"paths":{"/accounts/organizations/{uuid}/":{"patch":{"operationId":"accounts_organizations_partial_update","description":"","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}}},"tags":["accounts"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}},"required":true}}}}}
```

## POST /accounts/organizations/{uuid}/increment/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"RateLimit":{"type":"object","properties":{"limit":{"title":"Limit","type":"integer","readOnly":true},"usage":{"title":"Usage","type":"integer","readOnly":true},"remaining":{"title":"Remaining","type":"integer","readOnly":true},"overriden":{"title":"Overriden","type":"boolean","readOnly":true}}}}},"paths":{"/accounts/organizations/{uuid}/increment/":{"post":{"operationId":"accounts_organizations_increment_create","description":"","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimit"}}}}},"tags":["accounts"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"usage":{"type":"integer"}}}}},"required":true}}}}}
```

## GET /accounts/portal/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}}},"paths":{"/accounts/portal/":{"get":{"operationId":"accounts_portal_list","description":"","responses":{"200":{"description":""}},"tags":["accounts"]}}}}
```

## GET /accounts/users/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"User":{"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"email":{"title":"Email","type":"string","format":"email","maxLength":254},"first_name":{"title":"First name","type":"string","maxLength":150},"last_name":{"title":"Last name","type":"string","maxLength":150},"groups":{"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups.","type":"array","items":{"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups.","type":"integer"},"uniqueItems":true},"is_active":{"title":"Active","description":"Designates whether this user should be treated as active. Unselect this instead of deleting accounts.","type":"boolean"}}}}},"paths":{"/accounts/users/":{"get":{"operationId":"accounts_users_list","description":"","parameters":[{"name":"search","in":"query","description":"A search term.","required":false,"type":"string"},{"name":"page","in":"query","description":"A page number within the paginated result set.","required":false,"type":"integer"},{"name":"page_size","in":"query","description":"Number of results to return per page.","required":false,"type":"integer"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"required":["count","results"],"type":"object","properties":{"count":{"type":"integer"},"next":{"type":"string","format":"uri"},"previous":{"type":"string","format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}}}},"tags":["accounts"]}}}}
```

## POST /accounts/users/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"User":{"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"email":{"title":"Email","type":"string","format":"email","maxLength":254},"first_name":{"title":"First name","type":"string","maxLength":150},"last_name":{"title":"Last name","type":"string","maxLength":150},"groups":{"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups.","type":"array","items":{"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups.","type":"integer"},"uniqueItems":true},"is_active":{"title":"Active","description":"Designates whether this user should be treated as active. Unselect this instead of deleting accounts.","type":"boolean"}}}}},"paths":{"/accounts/users/":{"post":{"operationId":"accounts_users_create","description":"","responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["accounts"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"required":true}}}}}
```

## GET /accounts/users/{uuid}/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"User":{"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"email":{"title":"Email","type":"string","format":"email","maxLength":254},"first_name":{"title":"First name","type":"string","maxLength":150},"last_name":{"title":"Last name","type":"string","maxLength":150},"groups":{"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups.","type":"array","items":{"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups.","type":"integer"},"uniqueItems":true},"is_active":{"title":"Active","description":"Designates whether this user should be treated as active. Unselect this instead of deleting accounts.","type":"boolean"}}}}},"paths":{"/accounts/users/{uuid}/":{"get":{"operationId":"accounts_users_read","description":"","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["accounts"]}}}}
```

## PUT /accounts/users/{uuid}/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"User":{"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"email":{"title":"Email","type":"string","format":"email","maxLength":254},"first_name":{"title":"First name","type":"string","maxLength":150},"last_name":{"title":"Last name","type":"string","maxLength":150},"groups":{"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups.","type":"array","items":{"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups.","type":"integer"},"uniqueItems":true},"is_active":{"title":"Active","description":"Designates whether this user should be treated as active. Unselect this instead of deleting accounts.","type":"boolean"}}}}},"paths":{"/accounts/users/{uuid}/":{"put":{"operationId":"accounts_users_update","description":"","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["accounts"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"required":true}}}}}
```

## DELETE /accounts/users/{uuid}/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}}},"paths":{"/accounts/users/{uuid}/":{"delete":{"operationId":"accounts_users_delete","description":"","responses":{"204":{"description":""}},"tags":["accounts"]}}}}
```

## PATCH /accounts/users/{uuid}/

>

```json
{"openapi":"3.1.1","info":{"title":"Turngate API","version":"v1"},"servers":[{"url":"https://api.turngate.io/"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"User":{"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"email":{"title":"Email","type":"string","format":"email","maxLength":254},"first_name":{"title":"First name","type":"string","maxLength":150},"last_name":{"title":"Last name","type":"string","maxLength":150},"groups":{"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups.","type":"array","items":{"description":"The groups this user belongs to. A user will get all permissions granted to each of their groups.","type":"integer"},"uniqueItems":true},"is_active":{"title":"Active","description":"Designates whether this user should be treated as active. Unselect this instead of deleting accounts.","type":"boolean"}}}}},"paths":{"/accounts/users/{uuid}/":{"patch":{"operationId":"accounts_users_partial_update","description":"","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["accounts"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"required":true}}}}}
```
