create an invite.md
Create an invite
Management API · User Management
POST https://app.mk.io/api/v1/organization/invites
This endpoint allows you to create a new invitation which will grant a user access to this organization's resources within MK.IO.
You can include a comment which will be visible against this user's record when they accept the invitation, e.g. "Contractor for project Delphi".
RBAC Capability Required: core.invite.create
Authentication
Authorizationheader — Bearer authentication of the formBearer <token>.
Request body
Content type: application/json
spec· object · Required — Specificationcomment· string · Required — Comment to explain why the user has been invited to collaborate with your organizationemail· string · Required — Email of the user to be invitedteams· list of strings · Optional — List of team names to add this user to when they accept.- Array items (string):
Example request
curl -X POST "https://app.mk.io/api/v1/organization/invites" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"spec": {
"comment": "string",
"email": "string",
"teams": [
"string"
]
}
}'
Responses
201 — OK
kind· string · Optional — The kind of record.metadata· object · Optional — Metadatacreated· string · Optional · format: date-time — The time when the resource was createdid· string · Required · format: uuid — The ID of the resource
spec· object · Required — Specificationcomment· string · Required — Comment to explain why the user has been invited to collaborate with your organizationemail· string · Required — Email of the user to be invitedinvitedByEmail· string · Required — Contact email of user who made the inviteinvitedByName· string · Required — Name of user who made the inviteorganizationName· string · Required — Name of the organization the invite refers toteams· list of strings · Optional — List of team names to add this user to when they accept.- Array items (string):
400 — Bad Request
error· object · Required — Pertinent information about the errorcode· string · Required — The error code.detail· string · Required — The error message.extraDetail· map from strings to any · Optional — Extra information regarding this error.[any key]· any — map of additional properties
ref· string · Required — A reference to the request that caused the error.status· integer · Required — The HTTP status code