# Invites

## GET /organization/v1/invitees/{invitee\_id}

> get invitations by invitee ID

```json
{"openapi":"3.1.1","info":{"title":"MariaDB Cloud DBaaS API","version":"1.0"},"servers":[{"url":"https://api.skysql.com/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"dto.Invite":{"type":"object","properties":{"created_on":{"type":"integer"},"expire_on":{"type":"integer"},"id":{"type":"string"},"invitees":{"type":"array","items":{"$ref":"#/components/schemas/dto.Invitee"}},"issuer":{"$ref":"#/components/schemas/dto.User"},"org_id":{"type":"string"},"updated_on":{"type":"integer"}}},"dto.Invitee":{"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"url":{"type":"string"}}},"dto.User":{"type":"object","properties":{"created_by":{"type":"string"},"created_on":{"type":"integer"},"email":{"type":"string"},"first_name":{"type":"string"},"id":{"type":"string"},"invited":{"type":"boolean"},"is_active":{"type":"boolean"},"is_deleted":{"type":"boolean"},"last_name":{"type":"string"},"mfa_enabled":{"type":"boolean"},"org":{"$ref":"#/components/schemas/dto.Org"},"org_id":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"updated_by":{"type":"string"},"updated_on":{"type":"integer"}}},"dto.Org":{"type":"object","properties":{"created_by":{"type":"string"},"created_on":{"type":"integer"},"current_owner":{"type":"string"},"id":{"type":"string"},"is_active":{"type":"boolean"},"is_deleted":{"type":"boolean"},"name":{"type":"string"},"tier":{"type":"string"},"updated_by":{"type":"string"},"updated_on":{"type":"integer"}}}}},"paths":{"/organization/v1/invitees/{invitee_id}":{"get":{"tags":["Invites"],"summary":"get invitations by invitee ID","parameters":[{"schema":{"type":"string"},"description":"Invitee identifier","name":"invitee_id","in":"path","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.Invite"}}}}}}}}}
```

## DELETE /organization/v1/invitees/{invitee\_id}

> cancel invitations by invitee ID

```json
{"openapi":"3.1.1","info":{"title":"MariaDB Cloud DBaaS API","version":"1.0"},"servers":[{"url":"https://api.skysql.com/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}}},"paths":{"/organization/v1/invitees/{invitee_id}":{"delete":{"tags":["Invites"],"summary":"cancel invitations by invitee ID","parameters":[{"schema":{"type":"string"},"description":"Invitee identifier","name":"invitee_id","in":"path","required":true}],"responses":{"200":{"description":"OK"}}}}}}
```

## GET /organization/v1/invites

> list invitations

```json
{"openapi":"3.1.1","info":{"title":"MariaDB Cloud DBaaS API","version":"1.0"},"servers":[{"url":"https://api.skysql.com/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"dto.Invite":{"type":"object","properties":{"created_on":{"type":"integer"},"expire_on":{"type":"integer"},"id":{"type":"string"},"invitees":{"type":"array","items":{"$ref":"#/components/schemas/dto.Invitee"}},"issuer":{"$ref":"#/components/schemas/dto.User"},"org_id":{"type":"string"},"updated_on":{"type":"integer"}}},"dto.Invitee":{"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"url":{"type":"string"}}},"dto.User":{"type":"object","properties":{"created_by":{"type":"string"},"created_on":{"type":"integer"},"email":{"type":"string"},"first_name":{"type":"string"},"id":{"type":"string"},"invited":{"type":"boolean"},"is_active":{"type":"boolean"},"is_deleted":{"type":"boolean"},"last_name":{"type":"string"},"mfa_enabled":{"type":"boolean"},"org":{"$ref":"#/components/schemas/dto.Org"},"org_id":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"updated_by":{"type":"string"},"updated_on":{"type":"integer"}}},"dto.Org":{"type":"object","properties":{"created_by":{"type":"string"},"created_on":{"type":"integer"},"current_owner":{"type":"string"},"id":{"type":"string"},"is_active":{"type":"boolean"},"is_deleted":{"type":"boolean"},"name":{"type":"string"},"tier":{"type":"string"},"updated_by":{"type":"string"},"updated_on":{"type":"integer"}}}}},"paths":{"/organization/v1/invites":{"get":{"consumes":["application/json"],"tags":["Invites"],"summary":"list invitations","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/dto.Invite"}}}}}}}}}}
```

## POST /organization/v1/invites

> Create user on-boarding invitations

```json
{"openapi":"3.1.1","info":{"title":"MariaDB Cloud DBaaS API","version":"1.0"},"servers":[{"url":"https://api.skysql.com/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"dto.CreateInviteResponse":{"type":"object","properties":{"failed":{"type":"object","additionalProperties":{"type":"string"}},"invite":{"$ref":"#/components/schemas/dto.Invite"}}},"dto.Invite":{"type":"object","properties":{"created_on":{"type":"integer"},"expire_on":{"type":"integer"},"id":{"type":"string"},"invitees":{"type":"array","items":{"$ref":"#/components/schemas/dto.Invitee"}},"issuer":{"$ref":"#/components/schemas/dto.User"},"org_id":{"type":"string"},"updated_on":{"type":"integer"}}},"dto.Invitee":{"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"url":{"type":"string"}}},"dto.User":{"type":"object","properties":{"created_by":{"type":"string"},"created_on":{"type":"integer"},"email":{"type":"string"},"first_name":{"type":"string"},"id":{"type":"string"},"invited":{"type":"boolean"},"is_active":{"type":"boolean"},"is_deleted":{"type":"boolean"},"last_name":{"type":"string"},"mfa_enabled":{"type":"boolean"},"org":{"$ref":"#/components/schemas/dto.Org"},"org_id":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"updated_by":{"type":"string"},"updated_on":{"type":"integer"}}},"dto.Org":{"type":"object","properties":{"created_by":{"type":"string"},"created_on":{"type":"integer"},"current_owner":{"type":"string"},"id":{"type":"string"},"is_active":{"type":"boolean"},"is_deleted":{"type":"boolean"},"name":{"type":"string"},"tier":{"type":"string"},"updated_by":{"type":"string"},"updated_on":{"type":"integer"}}}}},"paths":{"/organization/v1/invites":{"post":{"tags":["Invites"],"summary":"Create user on-boarding invitations","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.CreateInviteResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}}}}}}},"description":"Request Body","required":true}}}}}
```

## PUT /organization/v1/invites

> Create user on-boarding invitations

```json
{"openapi":"3.1.1","info":{"title":"MariaDB Cloud DBaaS API","version":"1.0"},"servers":[{"url":"https://api.skysql.com/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"dto.CreateInviteResponse":{"type":"object","properties":{"failed":{"type":"object","additionalProperties":{"type":"string"}},"invite":{"$ref":"#/components/schemas/dto.Invite"}}},"dto.Invite":{"type":"object","properties":{"created_on":{"type":"integer"},"expire_on":{"type":"integer"},"id":{"type":"string"},"invitees":{"type":"array","items":{"$ref":"#/components/schemas/dto.Invitee"}},"issuer":{"$ref":"#/components/schemas/dto.User"},"org_id":{"type":"string"},"updated_on":{"type":"integer"}}},"dto.Invitee":{"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"url":{"type":"string"}}},"dto.User":{"type":"object","properties":{"created_by":{"type":"string"},"created_on":{"type":"integer"},"email":{"type":"string"},"first_name":{"type":"string"},"id":{"type":"string"},"invited":{"type":"boolean"},"is_active":{"type":"boolean"},"is_deleted":{"type":"boolean"},"last_name":{"type":"string"},"mfa_enabled":{"type":"boolean"},"org":{"$ref":"#/components/schemas/dto.Org"},"org_id":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"updated_by":{"type":"string"},"updated_on":{"type":"integer"}}},"dto.Org":{"type":"object","properties":{"created_by":{"type":"string"},"created_on":{"type":"integer"},"current_owner":{"type":"string"},"id":{"type":"string"},"is_active":{"type":"boolean"},"is_deleted":{"type":"boolean"},"name":{"type":"string"},"tier":{"type":"string"},"updated_by":{"type":"string"},"updated_on":{"type":"integer"}}}}},"paths":{"/organization/v1/invites":{"put":{"tags":["Invites"],"summary":"Create user on-boarding invitations","deprecated":true,"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.CreateInviteResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}}}}}}},"description":"Request Body","required":true}}}}}
```

## POST /organization/v1/invites/check

> validate invitation

```json
{"openapi":"3.1.1","info":{"title":"MariaDB Cloud DBaaS API","version":"1.0"},"servers":[{"url":"https://api.skysql.com/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"dto.Invite":{"type":"object","properties":{"created_on":{"type":"integer"},"expire_on":{"type":"integer"},"id":{"type":"string"},"invitees":{"type":"array","items":{"$ref":"#/components/schemas/dto.Invitee"}},"issuer":{"$ref":"#/components/schemas/dto.User"},"org_id":{"type":"string"},"updated_on":{"type":"integer"}}},"dto.Invitee":{"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"url":{"type":"string"}}},"dto.User":{"type":"object","properties":{"created_by":{"type":"string"},"created_on":{"type":"integer"},"email":{"type":"string"},"first_name":{"type":"string"},"id":{"type":"string"},"invited":{"type":"boolean"},"is_active":{"type":"boolean"},"is_deleted":{"type":"boolean"},"last_name":{"type":"string"},"mfa_enabled":{"type":"boolean"},"org":{"$ref":"#/components/schemas/dto.Org"},"org_id":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"updated_by":{"type":"string"},"updated_on":{"type":"integer"}}},"dto.Org":{"type":"object","properties":{"created_by":{"type":"string"},"created_on":{"type":"integer"},"current_owner":{"type":"string"},"id":{"type":"string"},"is_active":{"type":"boolean"},"is_deleted":{"type":"boolean"},"name":{"type":"string"},"tier":{"type":"string"},"updated_by":{"type":"string"},"updated_on":{"type":"integer"}}},"errr.ErrorResponse":{"type":"object","properties":{"code":{"type":"integer"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/errr.ErrorDetails"}},"exception":{"type":"string"},"metadata":{"type":"object","additionalProperties":true},"path":{"type":"string"},"timestamp":{"type":"integer"},"trace_id":{"type":"string"}}},"errr.ErrorDetails":{"type":"object","properties":{"error":{"type":"string"},"location":{"type":"string"},"message":{"type":"string"},"metadata":{"type":"object","additionalProperties":true},"solution":{"type":"string"},"type":{"$ref":"#/components/schemas/errr.Type"}}},"errr.Type":{"type":"string","enum":["fatal","error","warning"]}}},"paths":{"/organization/v1/invites/check":{"post":{"consumes":["application/json"],"tags":["Invites"],"summary":"validate invitation","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/dto.Invite"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errr.ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errr.ErrorResponse"}}}}}}}}}
```

## GET /organization/v1/invites/{invite\_id}

> get invitations by invite ID

```json
{"openapi":"3.1.1","info":{"title":"MariaDB Cloud DBaaS API","version":"1.0"},"servers":[{"url":"https://api.skysql.com/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"dto.Invite":{"type":"object","properties":{"created_on":{"type":"integer"},"expire_on":{"type":"integer"},"id":{"type":"string"},"invitees":{"type":"array","items":{"$ref":"#/components/schemas/dto.Invitee"}},"issuer":{"$ref":"#/components/schemas/dto.User"},"org_id":{"type":"string"},"updated_on":{"type":"integer"}}},"dto.Invitee":{"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"url":{"type":"string"}}},"dto.User":{"type":"object","properties":{"created_by":{"type":"string"},"created_on":{"type":"integer"},"email":{"type":"string"},"first_name":{"type":"string"},"id":{"type":"string"},"invited":{"type":"boolean"},"is_active":{"type":"boolean"},"is_deleted":{"type":"boolean"},"last_name":{"type":"string"},"mfa_enabled":{"type":"boolean"},"org":{"$ref":"#/components/schemas/dto.Org"},"org_id":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"updated_by":{"type":"string"},"updated_on":{"type":"integer"}}},"dto.Org":{"type":"object","properties":{"created_by":{"type":"string"},"created_on":{"type":"integer"},"current_owner":{"type":"string"},"id":{"type":"string"},"is_active":{"type":"boolean"},"is_deleted":{"type":"boolean"},"name":{"type":"string"},"tier":{"type":"string"},"updated_by":{"type":"string"},"updated_on":{"type":"integer"}}}}},"paths":{"/organization/v1/invites/{invite_id}":{"get":{"tags":["Invites"],"summary":"get invitations by invite ID","parameters":[{"schema":{"type":"string"},"description":"Invite identifier","name":"invite_id","in":"path","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.Invite"}}}}}}}}}
```

## GET /public/services/ous/public-key/{key\_version}

> get public key

```json
{"openapi":"3.1.1","info":{"title":"MariaDB Cloud DBaaS API","version":"1.0"},"servers":[{"url":"https://api.skysql.com/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"dto.PubKey":{"type":"object","properties":{"algo":{"type":"string"},"data":{"type":"string"},"id":{"type":"string"},"version":{"type":"string"}}}}},"paths":{"/public/services/ous/public-key/{key_version}":{"get":{"tags":["Invites"],"summary":"get public key","parameters":[{"schema":{"type":"string"},"description":"Key version","name":"key_version","in":"path","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.PubKey"}}}}}}}}}
```
