Skip to main content
GET
/
organizations
Get User Organizations
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"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Use a valid Bearer token to authenticate.

Response

Success - returns list of organizations

status
boolean

Status of response

data
object