cURL
curl --request GET \ --url https://apiweb.mile.app/api/v3/organizations \ --header 'Authorization: Bearer <token>'
{ "status": true, "data": { "currentOrganization": { "userId": "507f1f77bcf86cd799439011", "organizationId": "507f1f77bcf86cd799439022", "organizationName": "Acme Corp" }, "organizations": [ { "userId": "507f1f77bcf86cd799439011", "organizationId": "507f1f77bcf86cd799439022", "organizationName": "Acme Corp", "organizationLogo": "https://storage.mile.app/logos/acme.png", "roleName": "owner", "lastLogin": "2024-01-15T10:30:00+07:00", "isCurrent": true }, { "userId": "507f1f77bcf86cd799439012", "organizationId": "507f1f77bcf86cd799439023", "organizationName": "Beta Inc", "organizationLogo": null, "roleName": "admin", "lastLogin": "2024-01-10T08:00:00+07:00", "isCurrent": false } ], "pendingInvitations": [ { "userId": "507f1f77bcf86cd799439015", "organizationId": "507f1f77bcf86cd799439024", "organizationName": "Gamma Inc", "organizationLogo": null, "invitedAt": "2024-01-14T09:00:00+07:00" } ] } }
Retrieve the list of organizations the current user belongs to. This endpoint returns all organizations where the user’s email is registered, along with pending invitations.
Use Case:
Use a valid Bearer token to authenticate.
Success - returns list of organizations
Status of response
Show child attributes