Indexhog - Search indexing and monitoring

Organizations API

Teams, members, and shared workspaces

2 min read

Team collaboration and organization management. Create organizations for team workspaces, invite members via email, assign roles with different permission levels (owner, admin, member), and manage team subscriptions. Organizations can own projects and share resources across team members.

Available Endpoints

MethodEndpointDescription
GET/api/user/organizations/{organizationId}/audit-logsGet audit logs
GET/api/user/organizations/{organizationId}/audit-logs/exportExport audit logs
GET/api/user/organizations/{organizationId}/audit-logs/actionsList available audit actions
GET/api/user/organizationsList organizations
POST/api/user/organizationsCreate organization
GET/api/user/organizations/{organizationId}Get organization
PUT/api/user/organizations/{organizationId}Update organization
GET/api/user/organizations/{organizationId}/membersList members
PUT/api/user/organizations/{organizationId}/members/{memberId}/roleUpdate member role
DELETE/api/user/organizations/{organizationId}/members/{memberId}Remove member
GET/api/user/organizations/{organizationId}/my-membershipGet my membership
GET/api/user/organizations/{organizationId}/invitesList organization invites
POST/api/user/organizations/{organizationId}/invitesSend invitations
DELETE/api/user/organizations/{organizationId}/invites/{memberId}Cancel invitation
POST/api/user/organizations/{organizationId}/invites/{memberId}/resendResend invitation
POST/api/user/invites/{token}/acceptAccept invitation
GET/api/user/organizations/{organizationId}/settings/billingGet billing settings
PUT/api/user/organizations/{organizationId}/settings/billingUpdate billing settings
GET/api/user/organizations/{organizationId}/mfaGet MFA settings
PUT/api/user/organizations/{organizationId}/mfaUpdate MFA settings
GET/api/user/organizations/{organizationId}/mfa/complianceGet MFA compliance status
GET/api/user/organizations/{organizationId}/settings/ssoGet SSO configuration
PUT/api/user/organizations/{organizationId}/settings/ssoUpdate SSO configuration
DELETE/api/user/organizations/{organizationId}/settings/ssoDisable SSO
POST/api/user/organizations/{organizationId}/settings/sso/testTest SSO configuration
GET/api/user/organizations/{organizationId}/domainsList organization domains
POST/api/user/organizations/{organizationId}/domainsAdd domain for verification
GET/api/user/organizations/{organizationId}/domains/{domainId}Get domain
DELETE/api/user/organizations/{organizationId}/domains/{domainId}Remove domain
POST/api/user/organizations/{organizationId}/domains/{domainId}/verifyVerify domain ownership
GET/api/user/organizations/{organizationId}/settings/securityGet security settings
PUT/api/user/organizations/{organizationId}/settings/securityUpdate security settings

Endpoints

GET/api/user/organizations/{organizationId}/audit-logs

Get audit logs

Get audit logs for the organization.

Bearer Token•Scopes: organization:manage-members

Request

curl -X GET "https://api.indexhog.com/api/user/organizations/{organizationId}/audit-logs" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Query Parameters

NameTypeDescription
offsetnumber | nullNumber of items to skip
0
limitnumberNumber of items to return (max 100)
20
actionAuditActionFilter by action type
resourceTypeAuditResourceTypeFilter by resource type
resourceIdstringFilter by resource ID
550e8400-e29b-41d4-a716-446655440000
userIdstringFilter by user ID
550e8400-e29b-41d4-a716-446655440000
startDatestringFilter logs after this date
2024-01-01T00:00:00.000Z
endDatestringFilter logs before this date
2024-12-31T23:59:59.000Z

Response 200

Audit logs retrieved successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Items fetched successfully",
"data": [
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "createdAt": "2024-01-15T10:30:00.000Z",
    "organizationId": "550e8400-e29b-41d4-a716-446655440001",
    "userId": "507f1f77bcf86cd799439013",
    "actor": {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "email": "[email protected]"
    },
    "action": "member.invited",
    "resourceType": "member",
    "resourceId": "507f1f77bcf86cd799439014",
    "metadata": {},
    "ipAddress": "192.168.1.1",
    "userAgent": "Mozilla/5.0...",
    "auditSessionId": "sess_xxx",
    "traceId": "string"
  }
],
"meta": {
  "total": 100,
  "offset": 0,
  "limit": 10,
  "hasMore": true
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
GET/api/user/organizations/{organizationId}/audit-logs/export

Export audit logs

Export audit logs as CSV or JSON.

Bearer Token•Scopes: organization:manage-members

Request

curl -X GET "https://api.indexhog.com/api/user/organizations/{organizationId}/audit-logs/export" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Query Parameters

NameTypeDescription
actionAuditActionFilter by action type
resourceTypeAuditResourceTypeFilter by resource type
userIdstringFilter by user ID
550e8400-e29b-41d4-a716-446655440000
startDatestringFilter logs after this date
endDatestringFilter logs before this date
formatAuditExportFormat

Response 200

Audit logs exported successfully

[
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "2024-01-15T10:30:00.000Z",
  "organizationId": "550e8400-e29b-41d4-a716-446655440001",
  "userId": "507f1f77bcf86cd799439013",
  "actor": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "[email protected]"
  },
  "action": "member.invited",
  "resourceType": "member",
  "resourceId": "507f1f77bcf86cd799439014",
  "metadata": {},
  "ipAddress": "192.168.1.1",
  "userAgent": "Mozilla/5.0...",
  "auditSessionId": "sess_xxx",
  "traceId": "string"
}
]

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
GET/api/user/organizations/{organizationId}/audit-logs/actions

List available audit actions

List audit action values that can be used to filter organization audit logs.

Bearer Token•Scopes: organization:read

Request

curl -X GET "https://api.indexhog.com/api/user/organizations/{organizationId}/audit-logs/actions" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Response 200

Audit actions fetched successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "actions": [
    "string"
  ]
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
GET/api/user/organizations

List organizations

Get all organizations the authenticated user belongs to.

Bearer Token•Scopes: user:read

Request

curl -X GET "https://api.indexhog.com/api/user/organizations" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Response 200

Organizations retrieved successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": [
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Acme Corporation",
    "slug": "acme-corp",
    "status": "active",
    "type": "team",
    "workspaceAccess": {
      "plan": "solo",
      "memberCap": 1,
      "membersUsed": 0,
      "entitlements": [
        "api_access"
      ],
      "subscription": {
        "externalSubscriptionId": "sub_xxx",
        "provider": "stripe",
        "status": "active",
        "interval": "monthly",
        "currentPeriodEnd": "2024-12-31T23:59:59.000Z",
        "cancelAt": null,
        "memberCap": 1
      }
    },
    "isPersonal": false
  }
]
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
POST/api/user/organizations

Create organization

Create a new organization. The authenticated user becomes the owner.

Bearer Token•Scopes: user:write

Request

curl -X POST "https://api.indexhog.com/api/user/organizations" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"name":"Acme Corporation","slug":"acme-corp"}'

Body Parameters

NameTypeDescription
namerequiredstringOrganization name
Acme Corporation
slugstringURL-friendly slug (auto-generated if not provided)
acme-corp

Response 201

Organization created successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z",
  "name": "Acme Corporation",
  "slug": "acme-corp",
  "status": "active",
  "type": "team",
  "workspaceAccess": {
    "plan": "solo",
    "memberCap": 1,
    "membersUsed": 0,
    "entitlements": [
      "api_access"
    ],
    "subscription": {
      "externalSubscriptionId": "sub_xxx",
      "provider": "stripe",
      "status": "active",
      "interval": "monthly",
      "currentPeriodEnd": "2024-12-31T23:59:59.000Z",
      "cancelAt": null,
      "memberCap": 1
    }
  },
  "creditBalance": 1500,
  "requireMfa": false,
  "ssoEnabled": false,
  "isPersonal": false,
  "timezone": "Europe/Vilnius"
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
GET/api/user/organizations/{organizationId}

Get organization

Get organization details.

Bearer Token•Scopes: organization:read

Request

curl -X GET "https://api.indexhog.com/api/user/organizations/{organizationId}" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Response 200

Organization retrieved successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z",
  "name": "Acme Corporation",
  "slug": "acme-corp",
  "status": "active",
  "type": "team",
  "workspaceAccess": {
    "plan": "solo",
    "memberCap": 1,
    "membersUsed": 0,
    "entitlements": [
      "api_access"
    ],
    "subscription": {
      "externalSubscriptionId": "sub_xxx",
      "provider": "stripe",
      "status": "active",
      "interval": "monthly",
      "currentPeriodEnd": "2024-12-31T23:59:59.000Z",
      "cancelAt": null,
      "memberCap": 1
    }
  },
  "creditBalance": 1500,
  "requireMfa": false,
  "ssoEnabled": false,
  "isPersonal": false,
  "timezone": "Europe/Vilnius"
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
PUT/api/user/organizations/{organizationId}

Update organization

Update organization details. Requires owner + admin.

Bearer Token•Scopes: organization:manage-members

Request

curl -X PUT "https://api.indexhog.com/api/user/organizations/{organizationId}" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"name":"Acme Inc","slug":"acme-inc","timezone":"America/Los_Angeles"}'

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Body Parameters

NameTypeDescription
namestring
Acme Inc
slugstring
acme-inc
timezonestring | nullIANA timezone for issue digests; null clears (no digest)
America/Los_Angeles

Response 200

Organization updated successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z",
  "name": "Acme Corporation",
  "slug": "acme-corp",
  "status": "active",
  "type": "team",
  "workspaceAccess": {
    "plan": "solo",
    "memberCap": 1,
    "membersUsed": 0,
    "entitlements": [
      "api_access"
    ],
    "subscription": {
      "externalSubscriptionId": "sub_xxx",
      "provider": "stripe",
      "status": "active",
      "interval": "monthly",
      "currentPeriodEnd": "2024-12-31T23:59:59.000Z",
      "cancelAt": null,
      "memberCap": 1
    }
  },
  "creditBalance": 1500,
  "requireMfa": false,
  "ssoEnabled": false,
  "isPersonal": false,
  "timezone": "Europe/Vilnius"
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
GET/api/user/organizations/{organizationId}/members

List members

Get all members of the organization.

Bearer Token•Scopes: organization:read

Request

curl -X GET "https://api.indexhog.com/api/user/organizations/{organizationId}/members" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Response 200

Members retrieved successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": [
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "createdAt": "2024-01-01T00:00:00.000Z",
    "updatedAt": "2024-01-15T10:30:00.000Z",
    "organizationId": "550e8400-e29b-41d4-a716-446655440001",
    "role": "admin",
    "status": "active",
    "invitedAt": "2024-01-01T00:00:00.000Z",
    "joinedAt": "2024-01-02T00:00:00.000Z",
    "user": {
      "id": "507f1f77bcf86cd799439013",
      "email": "[email protected]"
    },
    "invitedBy": {
      "id": "507f1f77bcf86cd799439013",
      "email": "[email protected]"
    },
    "canManageMembers": true,
    "canManageProjects": true,
    "canManageBilling": false
  }
]
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
PUT/api/user/organizations/{organizationId}/members/{memberId}/role

Update member role

Change a member's role. Requires owner + admin.

Bearer Token•Scopes: organization:manage-members

Request

curl -X PUT "https://api.indexhog.com/api/user/organizations/{organizationId}/members/{memberId}/role" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"role":"admin"}'

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000
memberIdrequiredstringMember/Membership ID
550e8400-e29b-41d4-a716-446655440000

Body Parameters

NameTypeDescription
rolerequiredAssignableRole

Response 200

Member role updated successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z",
  "organizationId": "550e8400-e29b-41d4-a716-446655440001",
  "role": "admin",
  "status": "active",
  "invitedAt": "2024-01-01T00:00:00.000Z",
  "joinedAt": "2024-01-02T00:00:00.000Z",
  "user": {
    "id": "507f1f77bcf86cd799439013",
    "email": "[email protected]"
  },
  "invitedBy": {
    "id": "507f1f77bcf86cd799439013",
    "email": "[email protected]"
  },
  "canManageMembers": true,
  "canManageProjects": true,
  "canManageBilling": false
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
DELETE/api/user/organizations/{organizationId}/members/{memberId}

Remove member

Remove a member from the organization. Requires owner + admin.

Bearer Token•Scopes: organization:manage-members

Request

curl -X DELETE "https://api.indexhog.com/api/user/organizations/{organizationId}/members/{memberId}" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000
memberIdrequiredstringMember/Membership ID
550e8400-e29b-41d4-a716-446655440000

Response 200

Member removed successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
GET/api/user/organizations/{organizationId}/my-membership

Get my membership

Get the authenticated user's membership details in the organization.

Bearer Token•Scopes: organization:read

Request

curl -X GET "https://api.indexhog.com/api/user/organizations/{organizationId}/my-membership" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Response 200

Membership retrieved successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z",
  "organizationId": "550e8400-e29b-41d4-a716-446655440001",
  "role": "admin",
  "status": "active",
  "invitedAt": "2024-01-01T00:00:00.000Z",
  "joinedAt": "2024-01-02T00:00:00.000Z",
  "user": {
    "id": "507f1f77bcf86cd799439013",
    "email": "[email protected]"
  },
  "invitedBy": {
    "id": "507f1f77bcf86cd799439013",
    "email": "[email protected]"
  },
  "canManageMembers": true,
  "canManageProjects": true,
  "canManageBilling": false
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
GET/api/user/organizations/{organizationId}/invites

List organization invites

Get all pending invites for the organization.

Bearer Token•Scopes: organization:manage-members

Request

curl -X GET "https://api.indexhog.com/api/user/organizations/{organizationId}/invites" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Response 200

Invites retrieved successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": [
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "createdAt": "2024-01-01T00:00:00.000Z",
    "updatedAt": "2024-01-15T10:30:00.000Z",
    "organizationId": "550e8400-e29b-41d4-a716-446655440001",
    "role": "admin",
    "status": "active",
    "invitedAt": "2024-01-01T00:00:00.000Z",
    "joinedAt": "2024-01-02T00:00:00.000Z",
    "user": {
      "id": "507f1f77bcf86cd799439013",
      "email": "[email protected]"
    },
    "invitedBy": {
      "id": "507f1f77bcf86cd799439013",
      "email": "[email protected]"
    },
    "canManageMembers": true,
    "canManageProjects": true,
    "canManageBilling": false
  }
]
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
POST/api/user/organizations/{organizationId}/invites

Send invitations

Invite new members to the organization.

Bearer Token•Scopes: organization:manage-members

Request

curl -X POST "https://api.indexhog.com/api/user/organizations/{organizationId}/invites" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"emails":["[email protected]"],"role":"member"}'

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Body Parameters

NameTypeDescription
emailsrequiredstring[]Email addresses to invite
rolerequiredAssignableRole

Response 201

Invites sent successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "sent": [
    "[email protected]"
  ],
  "alreadyMembers": [
    "[email protected]"
  ],
  "alreadyInvited": [
    "[email protected]"
  ],
  "invalidEmails": [
    "string"
  ]
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
DELETE/api/user/organizations/{organizationId}/invites/{memberId}

Cancel invitation

Cancel a pending invitation.

Bearer Token•Scopes: organization:manage-members

Request

curl -X DELETE "https://api.indexhog.com/api/user/organizations/{organizationId}/invites/{memberId}" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000
memberIdrequiredstringMember/Membership ID
550e8400-e29b-41d4-a716-446655440000

Response 200

Invite cancelled successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
POST/api/user/organizations/{organizationId}/invites/{memberId}/resend

Resend invitation

Resend an invitation email to a pending member.

Bearer Token•Scopes: organization:manage-members

Request

curl -X POST "https://api.indexhog.com/api/user/organizations/{organizationId}/invites/{memberId}/resend" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000
memberIdrequiredstringMember/Membership ID
550e8400-e29b-41d4-a716-446655440000

Response 200

Invite resent successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z",
  "organizationId": "550e8400-e29b-41d4-a716-446655440001",
  "role": "admin",
  "status": "active",
  "invitedAt": "2024-01-01T00:00:00.000Z",
  "joinedAt": "2024-01-02T00:00:00.000Z",
  "user": {
    "id": "507f1f77bcf86cd799439013",
    "email": "[email protected]"
  },
  "invitedBy": {
    "id": "507f1f77bcf86cd799439013",
    "email": "[email protected]"
  },
  "canManageMembers": true,
  "canManageProjects": true,
  "canManageBilling": false
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
POST/api/user/invites/{token}/accept

Accept invitation

Accept an organization invitation using the invite token.

Bearer Token•Scopes: user:write

Request

curl -X POST "https://api.indexhog.com/api/user/invites/{token}/accept" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
tokenrequiredstringInvitation token

Response 201

Invitation accepted successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "2024-01-01T00:00:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z",
  "organizationId": "550e8400-e29b-41d4-a716-446655440001",
  "role": "admin",
  "status": "active",
  "invitedAt": "2024-01-01T00:00:00.000Z",
  "joinedAt": "2024-01-02T00:00:00.000Z",
  "user": {
    "id": "507f1f77bcf86cd799439013",
    "email": "[email protected]"
  },
  "invitedBy": {
    "id": "507f1f77bcf86cd799439013",
    "email": "[email protected]"
  },
  "canManageMembers": true,
  "canManageProjects": true,
  "canManageBilling": false
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
GET/api/user/organizations/{organizationId}/settings/billing

Get billing settings

Get billing settings for the organization. Requires owner.

Bearer Token•Scopes: organization:manage-billing

Request

curl -X GET "https://api.indexhog.com/api/user/organizations/{organizationId}/settings/billing" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Response 200

Billing settings retrieved successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "billingEmail": "[email protected]",
  "effectiveEmail": "[email protected]"
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
PUT/api/user/organizations/{organizationId}/settings/billing

Update billing settings

Update billing settings for the organization. Requires owner.

Bearer Token•Scopes: organization:manage-billing

Request

curl -X PUT "https://api.indexhog.com/api/user/organizations/{organizationId}/settings/billing" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"billingEmail":"[email protected]"}'

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Body Parameters

NameTypeDescription
billingEmailrequiredstring | nullCustom billing email, or null to use the current owner email.

Response 200

Billing settings updated successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "billingEmail": "[email protected]",
  "effectiveEmail": "[email protected]"
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
GET/api/user/organizations/{organizationId}/mfa

Get MFA settings

Get MFA settings for the organization.

Bearer Token•Scopes: organization:read

Request

curl -X GET "https://api.indexhog.com/api/user/organizations/{organizationId}/mfa" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Response 200

MFA settings retrieved successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "requireMfa": true,
  "gracePeriodDays": 7,
  "gracePeriodEndsAt": "2024-01-15T00:00:00.000Z"
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
PUT/api/user/organizations/{organizationId}/mfa

Update MFA settings

Update MFA requirements for the organization. Requires owner + admin.

Bearer Token•Scopes: organization:manage-members

Request

curl -X PUT "https://api.indexhog.com/api/user/organizations/{organizationId}/mfa" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"requireMfa":true,"gracePeriodDays":7}'

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Body Parameters

NameTypeDescription
requireMfarequiredbooleanWhether to require MFA
true
gracePeriodDaysnumberGrace period in days
7

Response 200

MFA settings updated successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "requireMfa": true,
  "gracePeriodDays": 7,
  "gracePeriodEndsAt": "2024-01-15T00:00:00.000Z"
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
GET/api/user/organizations/{organizationId}/mfa/compliance

Get MFA compliance status

Get MFA compliance status across organization members.

Bearer Token•Scopes: organization:read

Request

curl -X GET "https://api.indexhog.com/api/user/organizations/{organizationId}/mfa/compliance" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Response 200

MFA compliance status retrieved successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "isCompliant": true,
  "compliancePercentage": 85,
  "totalMembers": 10,
  "compliantMembers": 8,
  "nonCompliantMembers": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "userId": "550e8400-e29b-41d4-a716-446655440001",
      "email": "[email protected]"
    }
  ],
  "gracePeriodActive": false,
  "gracePeriodEndsAt": "2024-01-15T00:00:00.000Z"
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
GET/api/user/organizations/{organizationId}/settings/sso

Get SSO configuration

Get SSO configuration for the organization.

Bearer Token•Scopes: organization:manage-members

Request

curl -X GET "https://api.indexhog.com/api/user/organizations/{organizationId}/settings/sso" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Response 200

SSO configuration retrieved successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "enabled": true,
  "provider": "okta",
  "domain": "acme.com",
  "issuerUrl": "https://acme.okta.com",
  "clientId": "0oa..."
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
PUT/api/user/organizations/{organizationId}/settings/sso

Update SSO configuration

Update organization SSO configuration. Requires owner.

Bearer Token•Scopes: organization:manage-billing

Request

curl -X PUT "https://api.indexhog.com/api/user/organizations/{organizationId}/settings/sso" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"provider":"okta","issuerUrl":"https://acme.okta.com","clientId":"string","clientSecret":"string"}'

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Body Parameters

NameTypeDescription
providerrequiredSsoProvider
issuerUrlrequiredstringOIDC issuer URL
https://acme.okta.com
clientIdrequiredstringOAuth client ID
clientSecretrequiredstringOAuth client secret

Response 200

SSO configuration updated successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "enabled": true,
  "provider": "okta",
  "domain": "acme.com",
  "issuerUrl": "https://acme.okta.com",
  "clientId": "0oa..."
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
DELETE/api/user/organizations/{organizationId}/settings/sso

Disable SSO

Remove SSO configuration from the organization.

Bearer Token•Scopes: organization:manage-billing

Request

curl -X DELETE "https://api.indexhog.com/api/user/organizations/{organizationId}/settings/sso" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Response 200

SSO configuration deleted successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
POST/api/user/organizations/{organizationId}/settings/sso/test

Test SSO configuration

Test the SSO configuration by attempting a connection.

Bearer Token•Scopes: organization:manage-members

Request

curl -X POST "https://api.indexhog.com/api/user/organizations/{organizationId}/settings/sso/test" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Response 200

SSO test completed

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "success": true,
  "connectionSuccessful": true,
  "message": "string",
  "error": "string"
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
GET/api/user/organizations/{organizationId}/domains

List organization domains

Get all domains associated with the organization.

Bearer Token•Scopes: organization:read

Request

curl -X GET "https://api.indexhog.com/api/user/organizations/{organizationId}/domains" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Response 200

Domains retrieved successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "domains": [
    {
      "id": "string",
      "domain": "acme.com",
      "status": "pending",
      "verificationMethod": "dns_txt",
      "dnsRecordName": "_indexhog-verify.acme.com",
      "dnsRecordValue": "abc123...",
      "verifiedAt": "string",
      "lastVerificationAttempt": "string",
      "verificationError": "string",
      "createdAt": "string",
      "organizationId": "550e8400-e29b-41d4-a716-446655440000",
      "updatedAt": "2024-01-15T10:30:00.000Z"
    }
  ]
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
POST/api/user/organizations/{organizationId}/domains

Add domain for verification

Add a new domain to verify. Returns a verification token for DNS TXT record.

Bearer Token•Scopes: organization:manage-billing

Request

curl -X POST "https://api.indexhog.com/api/user/organizations/{organizationId}/domains" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"domain":"acme.com"}'

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Body Parameters

NameTypeDescription
domainrequiredstringDomain to add for verification
acme.com

Response 201

Domain added, verification pending

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "id": "string",
  "domain": "acme.com",
  "status": "pending",
  "verificationMethod": "dns_txt",
  "dnsRecordName": "_indexhog-verify.acme.com",
  "dnsRecordValue": "abc123...",
  "verifiedAt": "string",
  "lastVerificationAttempt": "string",
  "verificationError": "string",
  "createdAt": "string",
  "organizationId": "550e8400-e29b-41d4-a716-446655440000",
  "updatedAt": "2024-01-15T10:30:00.000Z"
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
GET/api/user/organizations/{organizationId}/domains/{domainId}

Get domain

Get a specific domain for the organization.

Bearer Token•Scopes: organization:read

Request

curl -X GET "https://api.indexhog.com/api/user/organizations/{organizationId}/domains/{domainId}" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000
domainIdrequiredstringDomain ID
550e8400-e29b-41d4-a716-446655440001

Response 200

Domain retrieved successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "id": "string",
  "domain": "acme.com",
  "status": "pending",
  "verificationMethod": "dns_txt",
  "dnsRecordName": "_indexhog-verify.acme.com",
  "dnsRecordValue": "abc123...",
  "verifiedAt": "string",
  "lastVerificationAttempt": "string",
  "verificationError": "string",
  "createdAt": "string",
  "organizationId": "550e8400-e29b-41d4-a716-446655440000",
  "updatedAt": "2024-01-15T10:30:00.000Z"
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
DELETE/api/user/organizations/{organizationId}/domains/{domainId}

Remove domain

Remove a domain from the organization.

Bearer Token•Scopes: organization:manage-billing

Request

curl -X DELETE "https://api.indexhog.com/api/user/organizations/{organizationId}/domains/{domainId}" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000
domainIdrequiredstringDomain ID
550e8400-e29b-41d4-a716-446655440001

Response 200

Domain removed successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
POST/api/user/organizations/{organizationId}/domains/{domainId}/verify

Verify domain ownership

Attempt to verify domain ownership by checking DNS TXT record.

Bearer Token•Scopes: organization:manage-billing

Request

curl -X POST "https://api.indexhog.com/api/user/organizations/{organizationId}/domains/{domainId}/verify" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000
domainIdrequiredstringDomain ID
550e8400-e29b-41d4-a716-446655440001

Response 200

Verification attempted

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "id": "string",
  "domain": "acme.com",
  "status": "pending",
  "verificationMethod": "dns_txt",
  "dnsRecordName": "_indexhog-verify.acme.com",
  "dnsRecordValue": "abc123...",
  "verifiedAt": "string",
  "lastVerificationAttempt": "string",
  "verificationError": "string",
  "createdAt": "string",
  "organizationId": "550e8400-e29b-41d4-a716-446655440000",
  "updatedAt": "2024-01-15T10:30:00.000Z"
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
GET/api/user/organizations/{organizationId}/settings/security

Get security settings

Get security settings for the organization.

Bearer Token•Scopes: organization:read

Request

curl -X GET "https://api.indexhog.com/api/user/organizations/{organizationId}/settings/security" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Response 200

Security settings retrieved successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "authRequired": "any",
  "requireMfa": false
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
PUT/api/user/organizations/{organizationId}/settings/security

Update security settings

Update security settings for the organization. Requires owner.

Bearer Token•Scopes: organization:manage-security

Request

curl -X PUT "https://api.indexhog.com/api/user/organizations/{organizationId}/settings/security" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"authRequired":"mfa","requireMfa":true}'

Path Parameters

NameTypeDescription
organizationIdrequiredstringOrganization ID
550e8400-e29b-41d4-a716-446655440000

Body Parameters

NameTypeDescription
authRequiredAuthRequired
requireMfabooleanWhether MFA is required for all members
true

Response 200

Security settings updated successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": {
  "authRequired": "any",
  "requireMfa": false
}
}

Error Responses

401— Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403— Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}