POST
/
auth
/
organization-invitations
curl --request POST \
  --url https://api.pxyz.dev/api/v0/auth/organization-invitations \
  --header 'Content-Type: application/json' \
  --data '{
  "organizationId": "<string>",
  "email": "jsmith@example.com",
  "roleId": "<string>",
  "userId": "<string>"
}'
{
  "id": "<string>",
  "organizationId": "<string>",
  "roleId": "<string>",
  "email": "jsmith@example.com",
  "role": {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "permissions": [
      "<string>"
    ],
    "tenantId": "<string>",
    "_count": {
      "users": 123,
      "members": 123
    },
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "acceptedAt": "2023-11-07T05:31:56Z",
  "declinedAt": "2023-11-07T05:31:56Z",
  "user": {
    "id": "<string>",
    "name": "<string>",
    "identifier": "<string>",
    "imageUri": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "publicMeta": "<any>",
  "privateMeta": "<any>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Body

application/json
organizationId
string
required
email
string
required
roleId
string | null
userId
string | null

Response

200
application/json
Successful response
id
string
required
organizationId
string
required
createdAt
string
required
updatedAt
string
required
roleId
string | null
email
string | null
role
object | null
acceptedAt
string | null
declinedAt
string | null
user
object | null
publicMeta
any
privateMeta
any