← Back to API Reference
/invitations
Tag: invitations
getThe invitations for an account
Parameters
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
id | query | string | — | — | — |
email | query | string | — | — | The email of the user being invited |
account_id | query | string | — | — | The account the invitation is for |
invited_by | query | string | — | — | The user who invited the user |
role | query | string | — | — | The role for the invitation |
invite_token | query | string | — | — | The token for the invitation |
created_at | query | string | — | — | — |
updated_at | query | string | — | — | — |
expires_at | query | string | — | — | The expiry date for the invitation |
select | query | string | — | — | Filtering Columns |
order | query | string | — | — | Ordering |
Range | header | string | — | — | Limiting and Pagination |
Range-Unit | header | string | — | — | Limiting and Pagination |
offset | query | string | — | — | Limiting and Pagination |
limit | query | string | — | — | Limiting and Pagination |
Prefer | header | string | — | — | Preference |
Example
bash
curl "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/invitations?select=*&limit=10" \
-H "apikey: YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Responses
200OK
206Partial Content
postThe invitations for an account
Parameters
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
invitations | body | object | — | — | invitations |
select | query | string | — | — | Filtering Columns |
Prefer | header | string | — | — | Preference |
Example
bash
curl -X POST "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/invitations" \
-H "apikey: YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: return=representation" \
-d '{
"email": "example",
"account_id": "00000000-0000-0000-0000-000000000000",
"invited_by": "00000000-0000-0000-0000-000000000000",
"role": "example",
"invite_token": "example"
}'Responses
201Created
patchThe invitations for an account
Parameters
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
id | query | string | — | — | — |
email | query | string | — | — | The email of the user being invited |
account_id | query | string | — | — | The account the invitation is for |
invited_by | query | string | — | — | The user who invited the user |
role | query | string | — | — | The role for the invitation |
invite_token | query | string | — | — | The token for the invitation |
created_at | query | string | — | — | — |
updated_at | query | string | — | — | — |
expires_at | query | string | — | — | The expiry date for the invitation |
invitations | body | object | — | — | invitations |
Prefer | header | string | — | — | Preference |
Example
bash
curl -X PATCH "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/invitations?id=eq.YOUR_ID" \
-H "apikey: YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: return=representation" \
-d '{"email": "example"}'Responses
204No Content
deleteThe invitations for an account
Parameters
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
id | query | string | — | — | — |
email | query | string | — | — | The email of the user being invited |
account_id | query | string | — | — | The account the invitation is for |
invited_by | query | string | — | — | The user who invited the user |
role | query | string | — | — | The role for the invitation |
invite_token | query | string | — | — | The token for the invitation |
created_at | query | string | — | — | — |
updated_at | query | string | — | — | — |
expires_at | query | string | — | — | The expiry date for the invitation |
Prefer | header | string | — | — | Preference |
Example
bash
curl -X DELETE "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/invitations?id=eq.YOUR_ID" \
-H "apikey: YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Responses
204No Content
Schema
The invitations for an account
| Column | Type | Format | Nullable | Default | Notes |
|---|---|---|---|---|---|
idPK | integer | integer | — | — | This is a Primary Key. |
email | string | character varying | — | — | The email of the user being invited |
account_id | string | uuid | — | — | FK → accounts.id |
invited_by | string | uuid | — | — | The user who invited the user |
role | string | character varying | — | — | FK → roles.name |
invite_token | string | character varying | — | — | The token for the invitation |
created_at | string | timestamp with time zone | — | CURRENT_TIMESTAMP | — |
updated_at | string | timestamp with time zone | — | CURRENT_TIMESTAMP | — |
expires_at | string | timestamp with time zone | — | (CURRENT_TIMESTAMP + '7 days'::interval) | The expiry date for the invitation |