Organization
Create and manage organizations and members (Architect JWT).
All 5 endpoints on this page require a Cognito JWT from Architect. An organization secret returns 401 on every one.
/v1/organizations Create an organization for the signed-in user who has no tenant yet.
Auth Cognito JWT
Path parameters
None.
Query parameters
None.This endpoint does not read query parameters.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Required | Display name. |
Request
{
"name": "Acme Engineering"
} Response
201 Success
{
"organizationId": "org_abc123",
"name": "Acme Engineering",
"slug": "acme-engineering",
"status": "active",
"ownerUserId": "usr_xyz789",
"createdAt": "2026-08-28T12:00:00.000Z",
"updatedAt": "2026-08-28T12:00:00.000Z"
} Status codes
curl
curl -X POST 'https://api.dev.relay.oprag.ai/v1/organizations' \
-H 'Authorization: Bearer <Cognito JWT>' \
-H 'Content-Type: application/json' \
-d '{"name": "Acme Engineering"}' /v1/organizations/me Return the caller's organization.
Auth Cognito JWT member+
Path parameters
None.
Query parameters
None.This endpoint does not read query parameters.
Body parameters
None.This endpoint does not read a request body.
Response
200 Success
{
"organizationId": "org_abc123",
"name": "Acme Engineering",
"status": "active",
"ownerUserId": "usr_xyz789",
"createdAt": "2026-08-28T12:00:00.000Z",
"updatedAt": "2026-08-28T12:00:00.000Z"
} Status codes
curl
curl -X GET 'https://api.dev.relay.oprag.ai/v1/organizations/me' \
-H 'Authorization: Bearer <Cognito JWT>' /v1/organizations/me Replace the organization display name.
Auth Cognito JWT admin+
Before you call it
- Requires
namein the body (full replace, not partial patch).
Path parameters
None.
Query parameters
None.This endpoint does not read query parameters.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Required | Display name. |
Request
{
"name": "Acme Corp"
} Response
200 Success
{
"organizationId": "org_abc123",
"name": "Acme Corp",
"status": "active",
"ownerUserId": "usr_xyz789",
"createdAt": "2026-08-28T12:00:00.000Z",
"updatedAt": "2026-08-28T13:00:00.000Z"
} Status codes
curl
curl -X PATCH 'https://api.dev.relay.oprag.ai/v1/organizations/me' \
-H 'Authorization: Bearer <Cognito JWT>' \
-H 'Content-Type: application/json' \
-d '{"name": "Acme Corp"}' /v1/organizations/me/members List active and invited organization members.
Auth Cognito JWT member+
Path parameters
None.
Query parameters
None.This endpoint does not read query parameters.
Body parameters
None.This endpoint does not read a request body.
Response
200 Success
{
"users": [
{
"organizationId": "org_abc123",
"userId": "usr_xyz789",
"email": "owner@example.com",
"role": "owner",
"status": "active",
"joinedAt": "2026-08-28T12:00:00.000Z",
"createdAt": "2026-08-28T12:00:00.000Z",
"updatedAt": "2026-08-28T12:00:00.000Z"
}
]
} Status codes
curl
curl -X GET 'https://api.dev.relay.oprag.ai/v1/organizations/me/members' \
-H 'Authorization: Bearer <Cognito JWT>' /v1/organizations/me/members Invite a user to the organization by email.
Auth Cognito JWT admin+
Path parameters
None.
Query parameters
None.This endpoint does not read query parameters.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
email | string | Required | Email address for the invite. |
role | string | Optional | Member role: owner, admin, or member. |
Request
{
"email": "dev@example.com",
"role": "member"
} Response
201 Success
{
"userId": "usr_inv001",
"email": "dev@example.com",
"role": "member",
"status": "invited"
} Status codes
curl
curl -X POST 'https://api.dev.relay.oprag.ai/v1/organizations/me/members' \
-H 'Authorization: Bearer <Cognito JWT>' \
-H 'Content-Type: application/json' \
-d '{"email": "dev@example.com","role": "member"}' Ready to ship?
Get started free