---
title: "Invites user to the defined contract and workspace, if last one is specified"
method: POST
path: "/contracts/{contract_id}/invites"
tags: ["contracts"]
---

# Invites user to the defined contract and workspace, if last one is specified

`POST /contracts/{contract_id}/invites`

You need have `contracts.membership.edit` permission or to be a user with `TenantAdmin` role to access this resource. To provide the `workspase_id` as an additional parameter user has to have permission `workspaces.workspace.edit` and belong to the provided workspace.

## Path parameters

- `contract_id` string, required

## Request body

- object
  - `data` object, required
    - `type` 'contract-invite', required — A value should be `contract-invite`.
    - `attributes` object, required
      - `email` string, required — Email of the invited person
      - `roles` string[], required — Set of roles of the invited person in the specified contract. The very first member of a contract must have `owner` role.
      - `workspace_id` string — Workspace identifier
      - `workspace_roles` string[] — Set of roles of the invited person in the specified workspace

## Response `201`

Created

- object
  - `data` object, required
    - `type` 'contract-invite', required — A value should be `contract-invite`.
    - `attributes` object, required
      - `email` string, required — Email of the invited person
      - `roles` string[], required — Set of roles of the invited person in the specified contract. The very first member of a contract must have `owner` role.
      - `workspace_id` string — Workspace identifier
      - `workspace_roles` string[] — Set of roles of the invited person in the specified workspace
  - `meta` object, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict

---

[API](https://skmtc.net/elastic/apis/elastic-io-rest-api-documentation-v2.md) · [All operations](https://skmtc.net/elastic/apis/elastic-io-rest-api-documentation-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/elastic-io-rest-api-documentation-v2/revisions/411f9f98c01e/schema)
