Creates organization invitations
post
/v2/organizations/{slug}/members/invitationsCreates member invitations for an organization. Each invitation can have different role and project scope settings.
OAuth scopes
- organizations:write
This endpoint is only available on the following plans:
- Team
- Enterprise
The fine-grained token must include the following permissions to access this endpoint:
- members_write
Path parameters
- slugRequiredstring
Organization slug
Body
- dataRequiredArray<object>
Response codes
- 201
- 401
- 402
- 403
- 429
Response (201)
{ "error": { "id": "lorem", "code": "bad_request", "message": "lorem", "description": "lorem", "links": { "property1": { "href": "lorem", "rel": "lorem", "title": "lorem", "type": "lorem", "describedby": "lorem", "meta": { "property1": null, "property2": null } }, "property2": { "href": "lorem", "rel": "lorem", "title": "lorem", "type": "lorem", "describedby": "lorem", "meta": { "property1": null, "property2": null } } }, "meta": { "property1": null, "property2": null }, "issues": [ { "id": "lorem", "code": "lorem", "message": "lorem", "description": "lorem", "links": { "property1": { "href": "lorem", "rel": "lorem", "title": "lorem", "type": "lorem", "describedby": "lorem", "meta": { "property1": null, "property2": null } }, "property2": { "href": "lorem", "rel": "lorem", "title": "lorem", "type": "lorem", "describedby": "lorem", "meta": { "property1": null, "property2": null } } }, "meta": { "email": "hello@example.com" } } ] }, "data": [ { "type": "organization_invitation", "attributes": { "email": "hello@example.com" } } ]}{ "type": "object", "properties": { "error": { "type": "object", "properties": { "id": { "type": "string" }, "code": { "type": "string", "enum": [ "bad_request", "forbidden", "internal_server_error", "not_found", "payment_required", "rate_limit_exceeded", "request_timeout", "request_too_large", "unauthorized", "validation_failed", "agentic_credential_not_found", "backup_unsupported", "branch_admin_required", "compute_build_context_too_large", "compute_build_in_progress", "compute_deploy_rate_limit_exceeded", "compute_instance_limit_exceeded", "compute_instance_not_found", "compute_not_enabled", "compute_request_rejected", "compute_unavailable", "notebook_cell_duplicate", "notebook_cell_unknown", "notebook_disabled", "notebook_not_found", "notebook_sort_invalid", "organization_invitation_email_delivery_failed", "organization_invitations_partially_failed", "organization_role_name_invalid", "organization_role_not_entitled", "pagination_cursor_invalid", "project_branch_resync_unsupported", "project_not_found", "project_privatelink_disabled", "project_transfer_disabled", "delivery_not_found", "endpoint_disabled", "endpoint_event_type_not_subscribed", "endpoint_not_found", "endpoint_url_unresolvable", "webhooks_access_disabled" ] }, "message": { "type": "string" }, "description": { "type": "string" }, "links": { "type": "object", "additionalProperties": { "type": "object", "properties": { "href": { "type": "string" }, "rel": { "type": "string" }, "title": { "type": "string" }, "type": { "type": "string" }, "describedby": { "type": "string" }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "href" ] } }, "meta": { "type": "object", "additionalProperties": {} }, "issues": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "code": { "type": "string" }, "message": { "type": "string" }, "description": { "type": "string" }, "links": { "type": "object", "additionalProperties": { "type": "object", "properties": { "href": { "type": "string" }, "rel": { "type": "string" }, "title": { "type": "string" }, "type": { "type": "string" }, "describedby": { "type": "string" }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "href" ] } }, "meta": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", "description": "Email address of the invitation receipient.", "example": "hello@example.com" } }, "required": [ "email" ] } }, "required": [ "code", "message", "meta" ] } } }, "required": [ "code", "message" ] }, "data": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Resource type.", "enum": [ "organization_invitation" ] }, "attributes": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", "description": "Email address of the invitation receipient.", "example": "hello@example.com" } }, "required": [ "email" ] } }, "required": [ "type", "attributes" ] } } }, "required": [ "data" ]}