update organization details to accept an invitation.md
Update organization details (to accept an invitation).
PATCH https://app.mk.io/api/v1/user/organizations/{organization_id}
The only field that can be modified is the invite state, and that should be set to 'accepted' to accept a 'pending' invitation to work with a new organization. To decline a pending invitation, use the DELETE method instead.
Requires authentication; no additional RBAC permissions required.
Authentication
Authorizationheader — Bearer authentication of the formBearer <token>.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
organization_id |
string | Yes | format: uuid |
Request body
Content type: application/json
spec· object · Optional — Specification.invite· object · Optional — Pending invitation to work with this organization.state· enum · Required — State of the invite.- Allowed values:
accepted,pending
- Allowed values:
Example request
curl -X PATCH "https://app.mk.io/api/v1/user/organizations/{organization_id}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"spec": {
"invite": {
"state": "accepted"
}
}
}'
Responses
200 — OK
kind· string · Optional — The kind of record.metadata· object · Optional — Metadata.id· string · Required · format: uuid — ID of the organization.name· string · Required — Name of the organization.
spec· object · Optional — Specification.invite· object · Optional — Pending invitation to work with this organization.comment· string · Required — Comment from the inviter.invitedBy· string or null · Required — Email of the user who sent the invite.state· enum · Required — State of the invite.- Allowed values:
accepted,pending
- Allowed values:
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
401 — Unauthorized
- ... (similar structure for other status codes) ...
Source spec: management-api · operationId: [patch]_/api/v1/user/organizations/{organization_id}