> For the complete documentation index, see [llms.txt](https://docs.archera.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.archera.ai/api-reference/public-api/invites.md).

# Invites

API for inviting teammates into an organization and managing invites that have not been accepted yet. Every invite is addressed by the email it was sent to. Creating or resending an invite sends an email to that address.

## List invites

> Returns every invite for the organization, newest first, including invites that were already accepted or revoked. Check \`status\` to find the pending ones.

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"tags":[{"name":"Invites","description":"API for inviting teammates into an organization and managing invites that have not been accepted yet. Every invite is addressed by the email it was sent to. Creating or resending an invite sends an email to that address."}],"paths":{"/v1/org/{org_id}/invites":{"get":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicInvite"}}}},"headers":{"X-Pagination":{"$ref":"#/components/headers/PAGINATION"}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"$ref":"#/components/responses/UNPROCESSABLE_CONTENT"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"parameters":[{"in":"query","name":"page","schema":{"type":"integer","default":1,"minimum":1},"required":false},{"in":"query","name":"page_size","schema":{"type":"integer","default":500,"minimum":1,"maximum":1000},"required":false}],"tags":["Invites"],"summary":"List invites","description":"Returns every invite for the organization, newest first, including invites that were already accepted or revoked. Check `status` to find the pending ones."}}},"components":{"schemas":{"PublicInvite":{"type":"object","properties":{"org_id":{"type":"string","pattern":"[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\\Z","description":"Organization the invite belongs to"},"email":{"type":"string","description":"Address the invite was sent to, and its identifier in this API"},"role":{"type":"string","enum":["user","admin","support","cloud_rep","restricted_user"],"description":"Role the invitee holds in the organization"},"status":{"type":"string","enum":["invited","accepted","rejected","revoked"],"description":"'invited' is pending; 'accepted', 'rejected' and 'revoked' are final"},"invited_by":{"type":["string","null"],"description":"Email of the user who sent the invite"},"created_at":{"type":"string","format":"date-time","description":"When the invite was first created"}},"required":["created_at","email","invited_by","org_id","role","status"],"additionalProperties":false},"PaginationMetadata":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of items."},"total_pages":{"type":"integer","description":"Total number of pages."},"first_page":{"type":"integer","description":"First available page number."},"last_page":{"type":"integer","description":"Last available page number."},"page":{"type":"integer","description":"Current page number."},"previous_page":{"type":"integer","description":"Previous page number."},"next_page":{"type":"integer","description":"Next page number."}},"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{},"code":{"type":["string","null"]},"url":{"type":["string","null"]},"timestamp":{"type":"string"},"type":{"type":"string"}},"required":["message","timestamp","type"]},"Error":{"type":"object","properties":{"code":{"type":"integer","description":"Error code"},"status":{"type":"string","description":"Error name"},"message":{"type":"string","description":"Error message"},"errors":{"type":"object","description":"Errors","additionalProperties":{}}},"additionalProperties":false}},"headers":{"PAGINATION":{"description":"Pagination metadata","schema":{"$ref":"#/components/schemas/PaginationMetadata"}}},"responses":{"UNPROCESSABLE_CONTENT":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"DEFAULT_ERROR":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}
```

## Invite a teammate

> Sends an invitation email to the address. Returns 201 with the new invite. If the address already has an invite in this organization, no second invite is created: the existing one is resent and returned with 200, keeping its original role. A revoked or rejected invite is reinstated as pending. An address that already accepted its invite is a member, so this returns 409.

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"tags":[{"name":"Invites","description":"API for inviting teammates into an organization and managing invites that have not been accepted yet. Every invite is addressed by the email it was sent to. Creating or resending an invite sends an email to that address."}],"paths":{"/v1/org/{org_id}/invites":{"post":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInvite"}}}},"201":{"description":"A new invite was created and emailed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInvite"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"$ref":"#/components/responses/UNPROCESSABLE_CONTENT"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvite"}}}},"tags":["Invites"],"summary":"Invite a teammate","description":"Sends an invitation email to the address. Returns 201 with the new invite. If the address already has an invite in this organization, no second invite is created: the existing one is resent and returned with 200, keeping its original role. A revoked or rejected invite is reinstated as pending. An address that already accepted its invite is a member, so this returns 409."}}},"components":{"schemas":{"PublicInvite":{"type":"object","properties":{"org_id":{"type":"string","pattern":"[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\\Z","description":"Organization the invite belongs to"},"email":{"type":"string","description":"Address the invite was sent to, and its identifier in this API"},"role":{"type":"string","enum":["user","admin","support","cloud_rep","restricted_user"],"description":"Role the invitee holds in the organization"},"status":{"type":"string","enum":["invited","accepted","rejected","revoked"],"description":"'invited' is pending; 'accepted', 'rejected' and 'revoked' are final"},"invited_by":{"type":["string","null"],"description":"Email of the user who sent the invite"},"created_at":{"type":"string","format":"date-time","description":"When the invite was first created"}},"required":["created_at","email","invited_by","org_id","role","status"],"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{},"code":{"type":["string","null"]},"url":{"type":["string","null"]},"timestamp":{"type":"string"},"type":{"type":"string"}},"required":["message","timestamp","type"]},"Error":{"type":"object","properties":{"code":{"type":"integer","description":"Error code"},"status":{"type":"string","description":"Error name"},"message":{"type":"string","description":"Error message"},"errors":{"type":"object","description":"Errors","additionalProperties":{}}},"additionalProperties":false},"CreateInvite":{"type":"object","properties":{"email":{"type":"string","format":"email","maxLength":255,"description":"Address to send the invitation email to"},"role":{"type":"string","enum":["user","admin","support","cloud_rep","restricted_user"],"description":"Role to grant on acceptance. Defaults to the organization's default role. Ignored when the address already has an invite."}},"required":["email"],"additionalProperties":false}},"responses":{"UNPROCESSABLE_CONTENT":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"DEFAULT_ERROR":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}
```

## Revoke a pending invite

> Revokes a pending invite and removes the access it granted. The invite link stops working. Only a pending invite can be revoked. Unlike most deletes in this API this returns 200 and the invite, because the invite is not deleted: it stays on the list with status 'revoked', and the response is how the caller sees that.

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"tags":[{"name":"Invites","description":"API for inviting teammates into an organization and managing invites that have not been accepted yet. Every invite is addressed by the email it was sent to. Creating or resending an invite sends an email to that address."}],"paths":{"/v1/org/{org_id}/invites/{email}":{"delete":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInvite"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"tags":["Invites"],"summary":"Revoke a pending invite","description":"Revokes a pending invite and removes the access it granted. The invite link stops working. Only a pending invite can be revoked. Unlike most deletes in this API this returns 200 and the invite, because the invite is not deleted: it stays on the list with status 'revoked', and the response is how the caller sees that."}}},"components":{"schemas":{"PublicInvite":{"type":"object","properties":{"org_id":{"type":"string","pattern":"[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\\Z","description":"Organization the invite belongs to"},"email":{"type":"string","description":"Address the invite was sent to, and its identifier in this API"},"role":{"type":"string","enum":["user","admin","support","cloud_rep","restricted_user"],"description":"Role the invitee holds in the organization"},"status":{"type":"string","enum":["invited","accepted","rejected","revoked"],"description":"'invited' is pending; 'accepted', 'rejected' and 'revoked' are final"},"invited_by":{"type":["string","null"],"description":"Email of the user who sent the invite"},"created_at":{"type":"string","format":"date-time","description":"When the invite was first created"}},"required":["created_at","email","invited_by","org_id","role","status"],"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{},"code":{"type":["string","null"]},"url":{"type":["string","null"]},"timestamp":{"type":"string"},"type":{"type":"string"}},"required":["message","timestamp","type"]},"Error":{"type":"object","properties":{"code":{"type":"integer","description":"Error code"},"status":{"type":"string","description":"Error name"},"message":{"type":"string","description":"Error message"},"errors":{"type":"object","description":"Errors","additionalProperties":{}}},"additionalProperties":false}},"responses":{"DEFAULT_ERROR":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}
```

## Change a pending invite's role

> Changes the role the invitee will hold. Only a pending invite can be changed; use the organization's member management to change the role of someone who has already accepted.

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"tags":[{"name":"Invites","description":"API for inviting teammates into an organization and managing invites that have not been accepted yet. Every invite is addressed by the email it was sent to. Creating or resending an invite sends an email to that address."}],"paths":{"/v1/org/{org_id}/invites/{email}":{"patch":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInvite"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"422":{"$ref":"#/components/responses/UNPROCESSABLE_CONTENT"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInviteRole"}}}},"tags":["Invites"],"summary":"Change a pending invite's role","description":"Changes the role the invitee will hold. Only a pending invite can be changed; use the organization's member management to change the role of someone who has already accepted."}}},"components":{"schemas":{"PublicInvite":{"type":"object","properties":{"org_id":{"type":"string","pattern":"[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\\Z","description":"Organization the invite belongs to"},"email":{"type":"string","description":"Address the invite was sent to, and its identifier in this API"},"role":{"type":"string","enum":["user","admin","support","cloud_rep","restricted_user"],"description":"Role the invitee holds in the organization"},"status":{"type":"string","enum":["invited","accepted","rejected","revoked"],"description":"'invited' is pending; 'accepted', 'rejected' and 'revoked' are final"},"invited_by":{"type":["string","null"],"description":"Email of the user who sent the invite"},"created_at":{"type":"string","format":"date-time","description":"When the invite was first created"}},"required":["created_at","email","invited_by","org_id","role","status"],"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{},"code":{"type":["string","null"]},"url":{"type":["string","null"]},"timestamp":{"type":"string"},"type":{"type":"string"}},"required":["message","timestamp","type"]},"Error":{"type":"object","properties":{"code":{"type":"integer","description":"Error code"},"status":{"type":"string","description":"Error name"},"message":{"type":"string","description":"Error message"},"errors":{"type":"object","description":"Errors","additionalProperties":{}}},"additionalProperties":false},"UpdateInviteRole":{"type":"object","properties":{"role":{"type":"string","enum":["user","admin","support","cloud_rep","restricted_user"],"description":"New role for the pending invite"}},"required":["role"],"additionalProperties":false}},"responses":{"UNPROCESSABLE_CONTENT":{"description":"Unprocessable Content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"DEFAULT_ERROR":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}
```

## Resend a pending invite

> Sends the invitation email again, to the same address, with the same invite link. A revoked, rejected or accepted invite cannot be resent.

```json
{"openapi":"3.1.0","info":{"title":"Archera.ai API","version":"v1.0.0"},"tags":[{"name":"Invites","description":"API for inviting teammates into an organization and managing invites that have not been accepted yet. Every invite is addressed by the email it was sent to. Creating or resending an invite sends an email to that address."}],"paths":{"/v1/org/{org_id}/invites/{email}/resend":{"post":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInvite"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"tags":["Invites"],"summary":"Resend a pending invite","description":"Sends the invitation email again, to the same address, with the same invite link. A revoked, rejected or accepted invite cannot be resent."}}},"components":{"schemas":{"PublicInvite":{"type":"object","properties":{"org_id":{"type":"string","pattern":"[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\\Z","description":"Organization the invite belongs to"},"email":{"type":"string","description":"Address the invite was sent to, and its identifier in this API"},"role":{"type":"string","enum":["user","admin","support","cloud_rep","restricted_user"],"description":"Role the invitee holds in the organization"},"status":{"type":"string","enum":["invited","accepted","rejected","revoked"],"description":"'invited' is pending; 'accepted', 'rejected' and 'revoked' are final"},"invited_by":{"type":["string","null"],"description":"Email of the user who sent the invite"},"created_at":{"type":"string","format":"date-time","description":"When the invite was first created"}},"required":["created_at","email","invited_by","org_id","role","status"],"additionalProperties":false},"ApiErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"detail":{},"code":{"type":["string","null"]},"url":{"type":["string","null"]},"timestamp":{"type":"string"},"type":{"type":"string"}},"required":["message","timestamp","type"]},"Error":{"type":"object","properties":{"code":{"type":"integer","description":"Error code"},"status":{"type":"string","description":"Error name"},"message":{"type":"string","description":"Error message"},"errors":{"type":"object","description":"Errors","additionalProperties":{}}},"additionalProperties":false}},"responses":{"DEFAULT_ERROR":{"description":"Default error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.archera.ai/api-reference/public-api/invites.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
