# Invitation

Invite users and handle onboarding flows.

## Get organizations invitations

> Get organizations invitations by organization user

```json
{"openapi":"3.0.3","info":{"title":"AppMaker API - OAS 3.0","version":"1.0.0"},"tags":[{"name":"settings","description":"Organization level settings and policy configuration."},{"name":"invitation","description":"Invite users and handle onboarding flows."}],"servers":[{"url":"https://abp-api.akinon.net/api/v1","description":"Production server"},{"url":"https://abptest-api.akinon.net/api/v1","description":"Test server"},{"url":"http://localhost:5001/api/v1","description":"Local server"}],"security":[{"bearerAuth":[]},{"accessToken":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"accessToken":{"type":"apiKey","in":"header","name":"x-access-token"}},"parameters":{"OrganizationIdPathParam":{"name":"organizationId","in":"path","required":true,"description":"Organization ID","schema":{"$ref":"#/components/schemas/MongoId"}},"LimitQueryParam":{"name":"limit","in":"query","required":false,"description":"The limit of per page","schema":{"type":"integer","default":10}},"PageQueryParam":{"name":"page","in":"query","required":false,"description":"Current page number","schema":{"type":"integer","default":1}},"SortQueryParam":{"name":"sort","in":"query","required":false,"description":"Sort","schema":{"type":"string"}},"StatusQueryParam":{"name":"status","in":"query","required":false,"description":"Status","schema":{"type":"string"}}},"schemas":{"MongoId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","description":"Entity ID"},"Pagination":{"type":"object","required":["totalDocs","limit","page","totalPages","pagingCounter","hasPrevPage","hasNextPage","prevPage","nextPage","docs"],"properties":{"totalDocs":{"type":"integer","description":"The total number of users"},"limit":{"type":"integer","description":"The limit of users per page","default":10},"page":{"type":"integer","description":"Current page","default":1},"totalPages":{"type":"integer","description":"The total number of pages"},"pagingCounter":{"type":"integer","description":"Current page number"},"hasPrevPage":{"type":"boolean","description":"Has previous page"},"hasNextPage":{"type":"boolean","description":"Has next page"},"prevPage":{"type":"integer","description":"Previous page number"},"nextPage":{"type":"integer","description":"Next page number"},"docs":{"description":"Items"}}},"Invitation":{"type":"object","required":["email","token","organization"],"properties":{"email":{"type":"string","description":"Invitation email"},"token":{"type":"string","description":"Invitation token"},"organization":{"$ref":"#/components/schemas/Organization"},"user":{"$ref":"#/components/schemas/ReadOnlyMongoId"},"registered":{"type":"object","properties":{"completedAt":{"$ref":"#/components/schemas/ReadOnlyDate"},"user":{"$ref":"#/components/schemas/ReadOnlyMongoId"}}},"status":{"type":"string","description":"Invitation status","default":"pending","enum":["pending","success","suspended"]},"validatedAt":{"$ref":"#/components/schemas/ReadOnlyDate"},"_id":{"$ref":"#/components/schemas/ReadOnlyMongoId"},"createdAt":{"$ref":"#/components/schemas/ReadOnlyDate"},"updatedAt":{"$ref":"#/components/schemas/ReadOnlyDate"}}},"Organization":{"type":"object","required":["_id","name","slug","description","owner","isExecutive","status","privileges"],"properties":{"_id":{"$ref":"#/components/schemas/MongoId"},"name":{"type":"string","minLength":2,"maxLength":100,"description":"Organization name"},"slug":{"$ref":"#/components/schemas/Slug"},"description":{"type":"string","minLength":2,"maxLength":255,"description":"Organization description"},"owner":{"$ref":"#/components/schemas/MongoId"},"isExecutive":{"type":"boolean","description":"Organization is executive","default":false,"readOnly":true},"status":{"$ref":"#/components/schemas/Status"},"privileges":{"type":"array","items":{"type":"string"},"description":"Organization privileges, formatted as (<domain>:<action>)","default":[]},"imageUrl":{"type":"string","description":"Organization image URL"},"createdAt":{"$ref":"#/components/schemas/ReadOnlyDate"},"updatedAt":{"$ref":"#/components/schemas/ReadOnlyDate"}}},"Slug":{"type":"string","pattern":"^[a-z0-9-]{2,100}$","minLength":2,"maxLength":100,"description":"Slug"},"Status":{"type":"integer","description":"Status","enum":[0,1]},"ReadOnlyDate":{"type":"string","format":"date-time","readOnly":true,"description":"Date"},"ReadOnlyMongoId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","description":"Entity ID","readOnly":true},"UnauthorizedError":{"type":"object","properties":{"apiError":{"type":"array","items":{"type":"string"},"description":"Error message"}}},"ForbiddenError":{"type":"object","properties":{"apiError":{"type":"array","items":{"type":"string"},"description":"Error message"}}}},"responses":{"GetInvitationsResponse":{"description":"OK","content":{"application/json":{"schema":{"required":["docs"],"allOf":[{"$ref":"#/components/schemas/Pagination"},{"properties":{"docs":{"type":"array","items":{"$ref":"#/components/schemas/Invitation"}}}}]}}}},"UnauthorizedErrorResponse":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"ForbiddenErrorResponse":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}}}},"paths":{"/organizations/{organizationId}/invitations":{"get":{"tags":["invitation","settings"],"summary":"Get organizations invitations","description":"Get organizations invitations by organization user","operationId":"getOrgInvitations","parameters":[{"$ref":"#/components/parameters/OrganizationIdPathParam"},{"$ref":"#/components/parameters/LimitQueryParam"},{"$ref":"#/components/parameters/PageQueryParam"},{"$ref":"#/components/parameters/SortQueryParam"},{"$ref":"#/components/parameters/StatusQueryParam"}],"responses":{"200":{"$ref":"#/components/responses/GetInvitationsResponse"},"401":{"$ref":"#/components/responses/UnauthorizedErrorResponse"},"403":{"$ref":"#/components/responses/ForbiddenErrorResponse"}}}}}}
```

## Create a organization invitation

> Create a organization invitation by organization user

```json
{"openapi":"3.0.3","info":{"title":"AppMaker API - OAS 3.0","version":"1.0.0"},"tags":[{"name":"settings","description":"Organization level settings and policy configuration."},{"name":"invitation","description":"Invite users and handle onboarding flows."}],"servers":[{"url":"https://abp-api.akinon.net/api/v1","description":"Production server"},{"url":"https://abptest-api.akinon.net/api/v1","description":"Test server"},{"url":"http://localhost:5001/api/v1","description":"Local server"}],"security":[{"bearerAuth":[]},{"accessToken":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"accessToken":{"type":"apiKey","in":"header","name":"x-access-token"}},"parameters":{"OrganizationIdPathParam":{"name":"organizationId","in":"path","required":true,"description":"Organization ID","schema":{"$ref":"#/components/schemas/MongoId"}}},"schemas":{"MongoId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","description":"Entity ID"},"Date":{"type":"string","format":"date-time","description":"Date"},"Invitation":{"type":"object","required":["email","token","organization"],"properties":{"email":{"type":"string","description":"Invitation email"},"token":{"type":"string","description":"Invitation token"},"organization":{"$ref":"#/components/schemas/Organization"},"user":{"$ref":"#/components/schemas/ReadOnlyMongoId"},"registered":{"type":"object","properties":{"completedAt":{"$ref":"#/components/schemas/ReadOnlyDate"},"user":{"$ref":"#/components/schemas/ReadOnlyMongoId"}}},"status":{"type":"string","description":"Invitation status","default":"pending","enum":["pending","success","suspended"]},"validatedAt":{"$ref":"#/components/schemas/ReadOnlyDate"},"_id":{"$ref":"#/components/schemas/ReadOnlyMongoId"},"createdAt":{"$ref":"#/components/schemas/ReadOnlyDate"},"updatedAt":{"$ref":"#/components/schemas/ReadOnlyDate"}}},"Organization":{"type":"object","required":["_id","name","slug","description","owner","isExecutive","status","privileges"],"properties":{"_id":{"$ref":"#/components/schemas/MongoId"},"name":{"type":"string","minLength":2,"maxLength":100,"description":"Organization name"},"slug":{"$ref":"#/components/schemas/Slug"},"description":{"type":"string","minLength":2,"maxLength":255,"description":"Organization description"},"owner":{"$ref":"#/components/schemas/MongoId"},"isExecutive":{"type":"boolean","description":"Organization is executive","default":false,"readOnly":true},"status":{"$ref":"#/components/schemas/Status"},"privileges":{"type":"array","items":{"type":"string"},"description":"Organization privileges, formatted as (<domain>:<action>)","default":[]},"imageUrl":{"type":"string","description":"Organization image URL"},"createdAt":{"$ref":"#/components/schemas/ReadOnlyDate"},"updatedAt":{"$ref":"#/components/schemas/ReadOnlyDate"}}},"Slug":{"type":"string","pattern":"^[a-z0-9-]{2,100}$","minLength":2,"maxLength":100,"description":"Slug"},"Status":{"type":"integer","description":"Status","enum":[0,1]},"ReadOnlyDate":{"type":"string","format":"date-time","readOnly":true,"description":"Date"},"ReadOnlyMongoId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","description":"Entity ID","readOnly":true},"UnauthorizedError":{"type":"object","properties":{"apiError":{"type":"array","items":{"type":"string"},"description":"Error message"}}}},"requestBodies":{"CreateOrgInvitationRequest":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","validatedAt"],"properties":{"email":{"type":"string","minLength":3,"maxLength":255,"description":"Invitation email"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/MongoId"}},"validatedAt":{"$ref":"#/components/schemas/Date"}}}}}}},"responses":{"CreateInvitationResponse":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invitation"}}}},"ValidationErrorResponse":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"validationError":{"type":"object","properties":{}}}}}}},"UnauthorizedErrorResponse":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}}}},"paths":{"/organizations/{organizationId}/invitations":{"post":{"tags":["invitation","settings"],"summary":"Create a organization invitation","description":"Create a organization invitation by organization user","operationId":"createOrgInvitation","parameters":[{"$ref":"#/components/parameters/OrganizationIdPathParam"}],"requestBody":{"$ref":"#/components/requestBodies/CreateOrgInvitationRequest"},"responses":{"201":{"$ref":"#/components/responses/CreateInvitationResponse"},"400":{"$ref":"#/components/responses/ValidationErrorResponse"},"401":{"$ref":"#/components/responses/UnauthorizedErrorResponse"}}}}}}
```

## Get a invitation

> Get a invitation code status

```json
{"openapi":"3.0.3","info":{"title":"AppMaker API - OAS 3.0","version":"1.0.0"},"tags":[{"name":"settings","description":"Organization level settings and policy configuration."},{"name":"invitation","description":"Invite users and handle onboarding flows."}],"servers":[{"url":"https://abp-api.akinon.net/api/v1","description":"Production server"},{"url":"https://abptest-api.akinon.net/api/v1","description":"Test server"},{"url":"http://localhost:5001/api/v1","description":"Local server"}],"security":[{"bearerAuth":[]},{"accessToken":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"accessToken":{"type":"apiKey","in":"header","name":"x-access-token"}},"parameters":{"InvitationTokenPathParam":{"name":"token","in":"path","required":true,"description":"Invitation token","schema":{"type":"string"}}},"responses":{"CheckInvitationResponse":{"description":"OK","content":{"application/json":{"schema":{"type":"string","enum":["registered","expired","not_found","valid"]}}}}}},"paths":{"/public/invitations/{token}/check":{"get":{"tags":["invitation","settings"],"summary":"Get a invitation","description":"Get a invitation code status","operationId":"getInvitation","parameters":[{"$ref":"#/components/parameters/InvitationTokenPathParam"}],"responses":{"200":{"$ref":"#/components/responses/CheckInvitationResponse"}}}}}}
```


---

# Agent Instructions: 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:

```
GET https://apidocs.akinon.com/app-maker-open-apis/settings/invitation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
