{"servers":[{"url":"https://api.usecrouton.com","description":"Production"}],"info":{"title":"Crouton API","version":"0.1.0","description":"Crouton API for custom integrations.\n\nAuthenticate with a Crouton organization API key using either `Authorization: Bearer <api_key>` or `X-Api-Key: <api_key>`.\nKeys are created in Organization Settings → Integrations → API keys.\n\nEach key is scoped to one or more resources (`directory`, `org_views`, `people_views`, `open_headcount`) and an access level (`read` or `read_write`).\nEach endpoint documents the resource and access it requires.","contact":{"name":"Crouton","url":"https://usecrouton.com","email":"support@usecrouton.com"}},"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":[{"name":"profiles","x-displayName":"Profiles","description":"Profile directory endpoints. Requires the `directory` resource."},{"name":"teams","x-displayName":"Teams","description":"Team directory endpoints. Requires the `directory` resource."},{"name":"locations","x-displayName":"Locations","description":"Location directory endpoints. Requires the `directory` resource."},{"name":"badges","x-displayName":"Badges","description":"Badge catalog endpoints. Requires the `directory` resource."},{"name":"org-views","x-displayName":"Org views","description":"Org view and assignment endpoints. Requires the `org_views` resource."},{"name":"people-views","x-displayName":"People views","description":"People relationship view endpoints. Requires the `people_views` resource."},{"name":"open-headcount","x-displayName":"Open headcount","description":"Open headcount administration endpoints. Requires the `open_headcount` resource. Team link endpoints also require `org_views`."},{"name":"organization","x-displayName":"Organization","description":"Organization metadata endpoints. Available to any valid API key."}],"x-tagGroups":[{"name":"Directory","tags":["profiles","teams","locations","badges"]},{"name":"Views","tags":["org-views","people-views"]},{"name":"Open headcount","tags":["open-headcount"]},{"name":"Organization","tags":["organization"]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Use your Crouton organization API key as a bearer token, for example: `Bearer crouton_sk_live_...`."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Alternative to bearer auth: send the Crouton organization API key in the `X-Api-Key` header."}}},"openapi":"3.1.1","paths":{"/profiles":{"get":{"operationId":"listProfiles","summary":"List profiles","description":"Returns profiles for the authenticated organization with cursor-based pagination and directory filters.","tags":["profiles"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page.","example":50},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous page response.","example":"cursor_next_123"},{"name":"query","in":"query","required":false,"description":"Free-text match across profile names and emails.","example":"ada"},{"name":"email","in":"query","required":false,"description":"Filter by exact email address.","example":"ada@usecrouton.com"},{"name":"title","in":"query","required":false,"description":"Filter by job title.","example":"Engineering Manager"},{"name":"location","in":"query","required":false,"description":"Filter by location name.","example":"New York, NY"},{"name":"employeeType","in":"query","required":false,"description":"Filter by employee type.","example":"full-time"},{"name":"isActive","in":"query","required":false,"description":"Filter to active or inactive profiles.","example":true},{"name":"startDateFrom","in":"query","required":false,"description":"Filter to profiles with a start date on or after this ISO date.","example":"2024-01-01"},{"name":"startDateTo","in":"query","required":false,"description":"Filter to profiles with a start date before this ISO date (exclusive upper bound).","example":"2024-07-01"},{"name":"endDateFrom","in":"query","required":false,"description":"Filter to profiles with an end date on or after this ISO date.","example":"2024-01-01"},{"name":"endDateTo","in":"query","required":false,"description":"Filter to profiles with an end date before this ISO date (exclusive upper bound).","example":"2024-07-01"}],"responses":{"200":{"description":"A page of profiles.","content":{"application/json":{"example":{"items":[{"profileId":"12345678-9012-3456-7890-123456789012","userId":"12345678-9012-3456-7890-123456789012","fullName":"Ada Lovelace","email":"ada@usecrouton.com","title":"Engineering Manager","location":"New York, NY","permanentWorkLocation":"Austin, TX","employeeType":"full-time","startDate":"2023-01-09","imgUrl":"https://cdn.usecrouton.com/avatars/ada.png"}],"nextCursor":"cursor_next_123","previousCursor":"cursor_prev_123"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["directory"],"x-required-access":"read"}},"/profiles/{profileId}":{"get":{"operationId":"getProfile","summary":"Get profile","description":"Returns a single profile for the authenticated organization.","tags":["profiles"],"parameters":[{"name":"profileId","in":"path","required":true,"description":"The profile identifier.","example":"12345678-9012-3456-7890-123456789012"}],"responses":{"200":{"description":"A profile.","content":{"application/json":{"example":{"profileId":"12345678-9012-3456-7890-123456789012","userId":"12345678-9012-3456-7890-123456789012","fullName":"Ada Lovelace","email":"ada@usecrouton.com","title":"Engineering Manager","location":"New York, NY","permanentWorkLocation":"Austin, TX","employeeType":"full-time","startDate":"2023-01-09","imgUrl":"https://cdn.usecrouton.com/avatars/ada.png"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"Profile not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"Profile not found"}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["directory"],"x-required-access":"read"}},"/profiles/for-user/{userId}":{"get":{"operationId":"getProfileForUser","summary":"Get profile for user","description":"Returns a single profile for the authenticated organization by user identifier.","tags":["profiles"],"parameters":[{"name":"userId","in":"path","required":true,"description":"The user identifier.","example":"12345678-9012-3456-7890-123456789012"}],"responses":{"200":{"description":"A profile.","content":{"application/json":{"example":{"profileId":"12345678-9012-3456-7890-123456789012","userId":"12345678-9012-3456-7890-123456789012","fullName":"Ada Lovelace","email":"ada@usecrouton.com","title":"Engineering Manager","location":"New York, NY","permanentWorkLocation":"Austin, TX","employeeType":"full-time","startDate":"2023-01-09","imgUrl":"https://cdn.usecrouton.com/avatars/ada.png"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"Profile not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"Profile not found"}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["directory"],"x-required-access":"read"}},"/teams":{"get":{"operationId":"listTeams","summary":"List teams","description":"Returns teams for the authenticated organization with cursor-based pagination and hierarchy filters.","tags":["teams"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page.","example":50},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous page response.","example":"cursor_next_123"},{"name":"query","in":"query","required":false,"description":"Free-text match across team names.","example":"Engineering"},{"name":"parentTeamId","in":"query","required":false,"description":"Filter to teams under a parent team.","example":"12345678-9012-3456-7890-123456789012"}],"responses":{"200":{"description":"A page of teams.","content":{"application/json":{"example":{"items":[{"teamId":"12345678-9012-3456-7890-123456789012","name":"Engineering","parentTeamId":"12345678-9012-3456-7890-123456789012","description":"Builds and operates the platform.","imgUrl":"https://cdn.usecrouton.com/teams/engineering.png"}],"nextCursor":"cursor_next_123","previousCursor":"cursor_prev_123"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["directory"],"x-required-access":"read"}},"/teams/{teamId}":{"get":{"operationId":"getTeam","summary":"Get team","description":"Returns a single team for the authenticated organization.","tags":["teams"],"parameters":[{"name":"teamId","in":"path","required":true,"description":"The team identifier.","example":"12345678-9012-3456-7890-123456789012"}],"responses":{"200":{"description":"A team.","content":{"application/json":{"example":{"teamId":"12345678-9012-3456-7890-123456789012","name":"Engineering","parentTeamId":"12345678-9012-3456-7890-123456789012","description":"Builds and operates the platform.","imgUrl":"https://cdn.usecrouton.com/teams/engineering.png"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"Team not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"Team not found"}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["directory"],"x-required-access":"read"}},"/locations":{"get":{"operationId":"listLocations","summary":"List locations","description":"Returns locations for the authenticated organization with cursor-based pagination.","tags":["locations"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page.","example":50},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous page response.","example":"cursor_next_123"},{"name":"query","in":"query","required":false,"description":"Free-text match across location names.","example":"New York"}],"responses":{"200":{"description":"A page of locations.","content":{"application/json":{"example":{"items":[{"locationId":"12345678-9012-3456-7890-123456789012","name":"New York, NY","displayName":"New York","description":"Primary East Coast hub.","imgUrl":"https://cdn.usecrouton.com/locations/nyc.png"}],"nextCursor":"cursor_next_123","previousCursor":"cursor_prev_123"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"Locations feature is disabled for this organization.","content":{"application/json":{"example":{"code":"UNPROCESSABLE_CONTENT","message":"Locations feature is disabled for this organization."}}}}},"x-required-resources":["directory"],"x-required-access":"read"}},"/locations/{locationId}":{"get":{"operationId":"getLocation","summary":"Get location","description":"Returns a single location for the authenticated organization.","tags":["locations"],"parameters":[{"name":"locationId","in":"path","required":true,"description":"The location identifier.","example":"12345678-9012-3456-7890-123456789012"}],"responses":{"200":{"description":"A location.","content":{"application/json":{"example":{"locationId":"12345678-9012-3456-7890-123456789012","name":"New York, NY","displayName":"New York","description":"Primary East Coast hub.","imgUrl":"https://cdn.usecrouton.com/locations/nyc.png"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"Location not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"Location not found"}}}},"422":{"description":"Locations feature is disabled for this organization.","content":{"application/json":{"example":{"code":"UNPROCESSABLE_CONTENT","message":"Locations feature is disabled for this organization."}}}}},"x-required-resources":["directory"],"x-required-access":"read"}},"/badges":{"get":{"operationId":"listBadges","summary":"List badges","description":"Returns badges for the authenticated organization with cursor-based pagination and ownership filters.","tags":["badges"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page.","example":50},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous page response.","example":"cursor_next_123"},{"name":"query","in":"query","required":false,"description":"Free-text match across badge names.","example":"impact"},{"name":"managerUserId","in":"query","required":false,"description":"Filter to badges managed by a specific user.","example":"12345678-9012-3456-7890-123456789012"},{"name":"awardedToUserId","in":"query","required":false,"description":"Filter to badges awarded to a specific user.","example":"12345678-9012-3456-7890-123456789012"},{"name":"includeUnpublished","in":"query","required":false,"description":"Include unpublished badges. Requires the API key to be associated with a badge administrator.","example":false}],"responses":{"200":{"description":"A page of badges.","content":{"application/json":{"example":{"items":[{"badgeId":"12345678-9012-3456-7890-123456789012","badgeName":"Impact","description":"Recognizes outsized business impact.","imgUrl":"https://cdn.usecrouton.com/badges/impact.png","discoverMessage":"Great work, go get em!","managerUserIds":["12345678-9012-3456-7890-123456789012","12345678-9012-3456-7890-123456789012"],"published":true}],"nextCursor":"cursor_next_123","previousCursor":"cursor_prev_123"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["directory"],"x-required-access":"read"},"post":{"operationId":"createBadge","summary":"Create badge","description":"Creates a badge for the authenticated organization. The API key's associated user must be a badge administrator.","tags":["badges"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"badgeName":{"type":"string","minLength":1},"description":{"type":"string","minLength":1,"maxLength":2000},"discoverMessage":{"type":"string"},"managerUserIds":{"type":"array","items":{"type":"string","format":"uuid"},"default":[]},"publishImmediately":{"type":"boolean","default":false}},"required":["badgeName"]}}}},"responses":{"200":{"description":"The created badge.","content":{"application/json":{"example":{"badgeId":"12345678-9012-3456-7890-123456789012","badgeName":"Impact","description":"Recognizes outsized business impact.","imgUrl":"https://cdn.usecrouton.com/badges/impact.png","discoverMessage":"Great work, go get em!","managerUserIds":["12345678-9012-3456-7890-123456789012","12345678-9012-3456-7890-123456789012"],"published":true}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"parameters":[],"x-required-resources":["directory"],"x-required-access":"write"}},"/badges/{badgeId}":{"get":{"operationId":"getBadge","summary":"Get badge","description":"Returns a single badge for the authenticated organization.","tags":["badges"],"parameters":[{"name":"badgeId","in":"path","required":true,"description":"The badge identifier.","example":"12345678-9012-3456-7890-123456789012"}],"responses":{"200":{"description":"A badge.","content":{"application/json":{"example":{"badgeId":"12345678-9012-3456-7890-123456789012","badgeName":"Impact","description":"Recognizes outsized business impact.","imgUrl":"https://cdn.usecrouton.com/badges/impact.png","discoverMessage":"Great work, go get em!","managerUserIds":["12345678-9012-3456-7890-123456789012","12345678-9012-3456-7890-123456789012"],"published":true}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"Badge not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"Badge not found"}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["directory"],"x-required-access":"read"}},"/badges/{badgeId}/publish":{"post":{"operationId":"publishBadge","summary":"Publish badge","description":"Publishes a badge so it is visible and awardable. The API key's associated user must be a badge administrator.","tags":["badges"],"parameters":[{"name":"badgeId","in":"path","required":true,"description":"The badge identifier.","example":"12345678-9012-3456-7890-123456789012"}],"responses":{"200":{"description":"The published badge.","content":{"application/json":{"example":{"badgeId":"12345678-9012-3456-7890-123456789012","badgeName":"Impact","description":"Recognizes outsized business impact.","imgUrl":"https://cdn.usecrouton.com/badges/impact.png","discoverMessage":"Great work, go get em!","managerUserIds":["12345678-9012-3456-7890-123456789012","12345678-9012-3456-7890-123456789012"],"published":true}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"Badge not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"Badge not found"}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["directory"],"x-required-access":"write"}},"/badges/{badgeId}/unpublish":{"post":{"operationId":"unpublishBadge","summary":"Unpublish badge","description":"Unpublishes a badge so it is hidden and no longer awardable. Existing awards remain attached internally. The API key's associated user must be a badge administrator.","tags":["badges"],"parameters":[{"name":"badgeId","in":"path","required":true,"description":"The badge identifier.","example":"12345678-9012-3456-7890-123456789012"}],"responses":{"200":{"description":"The unpublished badge.","content":{"application/json":{"example":{"badgeId":"12345678-9012-3456-7890-123456789012","badgeName":"Impact","description":"Recognizes outsized business impact.","imgUrl":"https://cdn.usecrouton.com/badges/impact.png","discoverMessage":"Great work, go get em!","managerUserIds":["12345678-9012-3456-7890-123456789012","12345678-9012-3456-7890-123456789012"],"published":true}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"Badge not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"Badge not found"}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["directory"],"x-required-access":"write"}},"/badges/{badgeId}/awards":{"get":{"operationId":"listBadgeAwards","summary":"List badge awards","description":"Returns awards for a specific badge with cursor-based pagination and recipient filters.","tags":["badges"],"parameters":[{"name":"badgeId","in":"path","required":true,"description":"The badge identifier.","example":"12345678-9012-3456-7890-123456789012"},{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page.","example":50},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous page response.","example":"cursor_next_123"},{"name":"awardedToUserId","in":"query","required":false,"description":"Filter to awards received by a user.","example":"12345678-9012-3456-7890-123456789012"},{"name":"awardedByUserId","in":"query","required":false,"description":"Filter to awards granted by a user.","example":"12345678-9012-3456-7890-123456789012"}],"responses":{"200":{"description":"A page of badge awards.","content":{"application/json":{"example":{"items":[{"badgeAwardId":"12345678-9012-3456-7890-123456789012","badgeId":"12345678-9012-3456-7890-123456789012","awardedToUserId":"12345678-9012-3456-7890-123456789012","awardedByUserId":"12345678-9012-3456-7890-123456789012","awardedAt":"2024-06-01T12:00:00.000Z"}],"nextCursor":"cursor_next_123","previousCursor":"cursor_prev_123"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"Badge not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"Badge not found"}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["directory"],"x-required-access":"read"},"post":{"operationId":"awardBadge","summary":"Award badge","description":"Awards a badge to a user. The API key's associated user must be a badge administrator or one of the badge managers.","tags":["badges"],"parameters":[{"name":"badgeId","in":"path","required":true,"description":"The badge identifier.","example":"12345678-9012-3456-7890-123456789012"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"awardedToUserId":{"type":"string","format":"uuid"}},"required":["awardedToUserId"]}}}},"responses":{"200":{"description":"The created badge award.","content":{"application/json":{"example":{"badgeAwardId":"12345678-9012-3456-7890-123456789012","badgeId":"12345678-9012-3456-7890-123456789012","awardedToUserId":"12345678-9012-3456-7890-123456789012","awardedByUserId":"12345678-9012-3456-7890-123456789012","awardedAt":"2024-06-01T12:00:00.000Z"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"Badge not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"Badge not found"}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["directory"],"x-required-access":"write"}},"/badge-awards/for-user/{userId}":{"get":{"operationId":"listBadgeAwardsForUser","summary":"List badge awards for user","description":"Returns badge awards received by a specific user with cursor-based pagination and badge filters.","tags":["badges"],"parameters":[{"name":"userId","in":"path","required":true,"description":"The user identifier.","example":"12345678-9012-3456-7890-123456789012"},{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page.","example":50},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous page response.","example":"cursor_next_123"},{"name":"badgeId","in":"query","required":false,"description":"Filter to awards for a badge.","example":"12345678-9012-3456-7890-123456789012"},{"name":"awardedByUserId","in":"query","required":false,"description":"Filter to awards granted by a user.","example":"12345678-9012-3456-7890-123456789012"}],"responses":{"200":{"description":"A page of badge awards for the user.","content":{"application/json":{"example":{"items":[{"badgeAwardId":"12345678-9012-3456-7890-123456789012","badgeId":"12345678-9012-3456-7890-123456789012","awardedToUserId":"12345678-9012-3456-7890-123456789012","awardedByUserId":"12345678-9012-3456-7890-123456789012","awardedAt":"2024-06-01T12:00:00.000Z"}],"nextCursor":"cursor_next_123","previousCursor":"cursor_prev_123"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["directory"],"x-required-access":"read"}},"/org-views":{"get":{"operationId":"listOrgViews","summary":"List org views","description":"Returns org views for the authenticated organization with cursor-based pagination.","tags":["org-views"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page.","example":50},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous page response.","example":"cursor_next_123"},{"name":"query","in":"query","required":false,"description":"Free-text match across org view names.","example":"go-to-market"}],"responses":{"200":{"description":"A page of org views.","content":{"application/json":{"example":{"items":[{"orgViewId":"12345678-9012-3456-7890-123456789012","name":"Go-To-Market","description":"Sales, marketing, and customer success structure.","icon":"briefcase","showInProfileHeader":true,"showMembershipTimelineTab":true,"membershipTimelineView":"six-months","visible":true,"startDate":null,"alertConfig":{"requireFullAllocationForActivePeople":true,"requireEveryActivePersonInOrgView":false,"clampAssignmentDatesToProfiles":true,"requireHistoricalFullAllocation":false,"requireHistoricalPresence":false,"flagActiveTeamsWithInactiveParent":false},"visibilityConfig":{"headcount":{"enabled":true,"startMonth":"2025-07","endMonth":"2026-06"},"viewExperience":{"showPastMembers":true,"teamChartEnabled":false}},"pages":[{"pageId":"12345678-9012-3456-7890-123456789012","name":"Revenue","description":"Revenue-generating functions.","icon":"briefcase","visible":true,"isDefault":true,"filterMode":"include","functionalTypeIds":["12345678-9012-3456-7890-123456789012"],"includeUncategorized":false}],"createdAt":"2026-01-01T00:00:00.000Z","updatedAt":"2026-01-02T00:00:00.000Z"}],"nextCursor":"cursor_next_123","previousCursor":"cursor_prev_123"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["org_views"],"x-required-access":"read"}},"/org-views/{orgViewId}":{"get":{"operationId":"getOrgView","summary":"Get org view","description":"Returns a single org view for the authenticated organization.","tags":["org-views"],"parameters":[{"name":"orgViewId","in":"path","required":true,"description":"The org view identifier.","example":"12345678-9012-3456-7890-123456789012"}],"responses":{"200":{"description":"An org view.","content":{"application/json":{"example":{"orgViewId":"12345678-9012-3456-7890-123456789012","name":"Go-To-Market","description":"Sales, marketing, and customer success structure.","icon":"briefcase","showInProfileHeader":true,"showMembershipTimelineTab":true,"membershipTimelineView":"six-months","visible":true,"startDate":null,"alertConfig":{"requireFullAllocationForActivePeople":true,"requireEveryActivePersonInOrgView":false,"clampAssignmentDatesToProfiles":true,"requireHistoricalFullAllocation":false,"requireHistoricalPresence":false,"flagActiveTeamsWithInactiveParent":false},"visibilityConfig":{"headcount":{"enabled":true,"startMonth":"2025-07","endMonth":"2026-06"},"viewExperience":{"showPastMembers":true,"teamChartEnabled":false}},"pages":[{"pageId":"12345678-9012-3456-7890-123456789012","name":"Revenue","description":"Revenue-generating functions.","icon":"briefcase","visible":true,"isDefault":true,"filterMode":"include","functionalTypeIds":["12345678-9012-3456-7890-123456789012"],"includeUncategorized":false}],"createdAt":"2026-01-01T00:00:00.000Z","updatedAt":"2026-01-02T00:00:00.000Z"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"Org view not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"Org view not found"}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["org_views"],"x-required-access":"read"}},"/org-views/{orgViewId}/teams":{"get":{"operationId":"listOrgViewTeams","summary":"List org view teams","description":"Returns teams within a specific org view with cursor-based pagination and hierarchy filters.","tags":["org-views"],"parameters":[{"name":"orgViewId","in":"path","required":true,"description":"The org view identifier.","example":"12345678-9012-3456-7890-123456789012"},{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page.","example":50},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous page response.","example":"cursor_next_123"},{"name":"query","in":"query","required":false,"description":"Free-text match across team names.","example":"Sales"},{"name":"parentTeamId","in":"query","required":false,"description":"Filter to teams under a parent team.","example":"12345678-9012-3456-7890-123456789012"},{"name":"teamStatus","in":"query","required":false,"description":"Filter by team status.","example":"active"}],"responses":{"200":{"description":"A page of org view teams.","content":{"application/json":{"example":{"items":[{"teamId":"12345678-9012-3456-7890-123456789012","name":"Sales","parentTeamId":"12345678-9012-3456-7890-123456789012","functionalTypeId":"12345678-9012-3456-7890-123456789012","description":"Revenue-generating team.","imgUrl":"https://cdn.usecrouton.com/teams/sales.png","teamStatus":"active"}],"nextCursor":"cursor_next_123","previousCursor":"cursor_prev_123"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["org_views"],"x-required-access":"read"}},"/org-views/{orgViewId}/teams/{teamId}/headcount-summary":{"get":{"operationId":"getOrgViewTeamHeadcountSummary","summary":"Get org view team headcount summary","description":"Returns monthly headcount summary counts for a team in an org view. The range defaults to 12 months starting at startMonth and cannot exceed 12 months.","tags":["org-views"],"parameters":[{"name":"orgViewId","in":"path","required":true,"description":"The org view identifier.","example":"12345678-9012-3456-7890-123456789012"},{"name":"teamId","in":"path","required":true,"description":"The org view team identifier.","example":"12345678-9012-3456-7890-123456789012"},{"name":"startMonth","in":"query","required":false,"description":"First month to include, formatted as YYYY-MM.","example":"2025-07"},{"name":"endMonth","in":"query","required":false,"description":"Last month to include, formatted as YYYY-MM. Defaults to an inclusive 12-month range.","example":"2026-06"}],"responses":{"200":{"description":"Monthly headcount summary counts for the org view team.","content":{"application/json":{"example":{"orgViewId":"12345678-9012-3456-7890-123456789012","teamId":"12345678-9012-3456-7890-123456789012","startMonth":"2025-07","endMonth":"2026-06","rows":[{"monthKey":"2025-07","count":12.5,"directCount":8.5}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"Org view or team not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"Org view or team not found"}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["org_views"],"x-required-access":"read"}},"/org-views/{orgViewId}/teams/{teamId}/headcount-details":{"get":{"operationId":"listOrgViewTeamHeadcountDetails","summary":"List org view team headcount details","description":"Returns cursor-paginated detail rows for the details drawer behind a specific org view team and month cell.","tags":["org-views"],"parameters":[{"name":"orgViewId","in":"path","required":true,"description":"The org view identifier.","example":"12345678-9012-3456-7890-123456789012"},{"name":"teamId","in":"path","required":true,"description":"The org view team identifier.","example":"12345678-9012-3456-7890-123456789012"},{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page.","example":50},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous page response.","example":"cursor_next_123"},{"name":"monthKey","in":"query","required":false,"description":"The month cell to inspect, formatted as YYYY-MM.","example":"2025-07"}],"responses":{"200":{"description":"A page of headcount detail rows.","content":{"application/json":{"example":{"items":[{"assignmentId":"12345678-9012-3456-7890-123456789012","employeeName":"Ada Lovelace","employeeUrl":"http://localhost:5051/bio/profile/12345678-9012-3456-7890-123456789012","parentTeamName":"Go-To-Market","teamName":"Sales","teamFunction":"Revenue","isOpenSeat":false,"role":"Account Executive","allocation":100,"profileStartDate":"2023-01-09","assignmentStartDate":"2025-01-01"}],"nextCursor":"cursor_next_123","previousCursor":"cursor_prev_123","count":12.5,"directCount":8.5}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"Org view or team not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"Org view or team not found"}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["org_views"],"x-required-access":"read"}},"/org-views/{orgViewId}/assignments":{"get":{"operationId":"listOrgViewAssignments","summary":"List org view assignments","description":"Returns assignments within a specific org view with cursor-based pagination and assignment filters.","tags":["org-views"],"parameters":[{"name":"orgViewId","in":"path","required":true,"description":"The org view identifier.","example":"12345678-9012-3456-7890-123456789012"},{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page.","example":50},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous page response.","example":"cursor_next_123"},{"name":"teamId","in":"query","required":false,"description":"Filter to assignments for a team.","example":"12345678-9012-3456-7890-123456789012"},{"name":"userId","in":"query","required":false,"description":"Filter to assignments for a user.","example":"12345678-9012-3456-7890-123456789012"},{"name":"role","in":"query","required":false,"description":"Filter by assignment role.","example":"Account Executive"},{"name":"activeOn","in":"query","required":false,"description":"Filter to assignments active on an ISO date.","example":"2024-06-01"}],"responses":{"200":{"description":"A page of org view assignments.","content":{"application/json":{"example":{"items":[{"assignmentId":"12345678-9012-3456-7890-123456789012","teamId":"12345678-9012-3456-7890-123456789012","teamName":"Sales","userId":"12345678-9012-3456-7890-123456789012","role":"Account Executive","startDate":"2024-01-01","allocation":1,"isLead":false}],"nextCursor":"cursor_next_123","previousCursor":"cursor_prev_123"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["org_views"],"x-required-access":"read"}},"/org-views/{orgViewId}/users/{userId}/assignments":{"get":{"operationId":"listOrgViewAssignmentsForUser","summary":"List org view assignments for user","description":"Returns assignments for a specific user inside an org view with cursor-based pagination.","tags":["org-views"],"parameters":[{"name":"orgViewId","in":"path","required":true,"description":"The org view identifier.","example":"12345678-9012-3456-7890-123456789012"},{"name":"userId","in":"path","required":true,"description":"The user identifier.","example":"12345678-9012-3456-7890-123456789012"},{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page.","example":50},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous page response.","example":"cursor_next_123"},{"name":"activeOn","in":"query","required":false,"description":"Filter to assignments active on an ISO date.","example":"2024-06-01"}],"responses":{"200":{"description":"A page of org view assignments for the user.","content":{"application/json":{"example":{"items":[{"assignmentId":"12345678-9012-3456-7890-123456789012","teamId":"12345678-9012-3456-7890-123456789012","teamName":"Sales","userId":"12345678-9012-3456-7890-123456789012","role":"Account Executive","startDate":"2024-01-01","allocation":1,"isLead":false}],"nextCursor":"cursor_next_123","previousCursor":"cursor_prev_123"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["org_views"],"x-required-access":"read"}},"/people-views":{"get":{"operationId":"listPeopleViews","summary":"List people views","description":"Returns people views for the authenticated organization with cursor-based pagination and visibility filters.","tags":["people-views"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page.","example":50},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous page response.","example":"cursor_next_123"},{"name":"query","in":"query","required":false,"description":"Free-text match across people view names.","example":"mentor"},{"name":"showInProfile","in":"query","required":false,"description":"Filter to people views shown on profiles.","example":true}],"responses":{"200":{"description":"A page of people views.","content":{"application/json":{"example":{"items":[{"peopleViewId":"12345678-9012-3456-7890-123456789012","name":"Mentorship","leftWord":"Mentor","rightWord":"Mentee","uniqueLeftConstraint":false,"uniqueRightConstraint":true,"showInProfile":true}],"nextCursor":"cursor_next_123","previousCursor":"cursor_prev_123"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["people_views"],"x-required-access":"read"}},"/people-views/{peopleViewId}":{"get":{"operationId":"getPeopleView","summary":"Get people view","description":"Returns a single people view for the authenticated organization.","tags":["people-views"],"parameters":[{"name":"peopleViewId","in":"path","required":true,"description":"The people view identifier.","example":"12345678-9012-3456-7890-123456789012"}],"responses":{"200":{"description":"A people view.","content":{"application/json":{"example":{"peopleViewId":"12345678-9012-3456-7890-123456789012","name":"Mentorship","leftWord":"Mentor","rightWord":"Mentee","uniqueLeftConstraint":false,"uniqueRightConstraint":true,"showInProfile":true}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"People view not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"People view not found"}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["people_views"],"x-required-access":"read"}},"/people-views/{peopleViewId}/users/{userId}/relationships":{"get":{"operationId":"listPeopleViewRelationshipsForUser","summary":"List people view relationships for user","description":"Returns person-to-person relationships for a specific user within a people view using cursor-based pagination.","tags":["people-views"],"parameters":[{"name":"peopleViewId","in":"path","required":true,"description":"The people view identifier.","example":"12345678-9012-3456-7890-123456789012"},{"name":"userId","in":"path","required":true,"description":"The user identifier.","example":"12345678-9012-3456-7890-123456789012"},{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page.","example":50},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous page response.","example":"cursor_next_123"},{"name":"relatedUserId","in":"query","required":false,"description":"Filter to relationships with a specific related user.","example":"12345678-9012-3456-7890-123456789012"},{"name":"direction","in":"query","required":false,"description":"Filter by relationship direction.","example":"incoming"},{"name":"activeOn","in":"query","required":false,"description":"Filter to relationships active on an ISO date.","example":"2024-06-01"}],"responses":{"200":{"description":"A page of relationships for the user.","content":{"application/json":{"example":{"items":[{"relationshipId":"12345678-9012-3456-7890-123456789012","peopleViewId":"12345678-9012-3456-7890-123456789012","peopleViewName":"Mentorship","leftUserId":"12345678-9012-3456-7890-123456789012","rightUserId":"12345678-9012-3456-7890-123456789012","leftWord":"Mentor","rightWord":"Mentee","startDate":"2024-02-01"}],"nextCursor":"cursor_next_123","previousCursor":"cursor_prev_123"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"People view not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"People view not found"}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["people_views"],"x-required-access":"read"}},"/open-headcount":{"get":{"operationId":"listOpenHeadcount","summary":"List open headcount","description":"Returns open headcount rows for the authenticated organization with cursor-based pagination.","tags":["open-headcount"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return per page.","example":50},{"name":"cursor","in":"query","required":false,"description":"Opaque cursor from a previous page response.","example":"cursor_next_123"},{"name":"search","in":"query","required":false,"description":"Free-text match across display names and external IDs.","example":"REQ-1234"},{"name":"externalId","in":"query","required":false,"description":"Filter to an exact external ID.","example":"REQ-1234"},{"name":"openStatus","in":"query","required":false,"description":"Filter by open headcount status.","example":"open"}],"responses":{"200":{"description":"A page of open headcount rows.","content":{"application/json":{"example":{"items":[{"headcountId":"12345678-9012-3456-7890-123456789012","externalId":"REQ-1234","displayName":"Senior Account Executive","openStatus":"open","openSince":"2025-01-01","targetStartDate":"2025-04-01","createdAt":"2026-01-01T00:00:00.000Z","updatedAt":"2026-01-02T00:00:00.000Z","linkedTeamLinksCount":1,"linkedTeamLinks":[{"teamLinkId":"12345678-9012-3456-7890-123456789012","orgViewId":"12345678-9012-3456-7890-123456789012","orgViewTeamId":"12345678-9012-3456-7890-123456789012","orgViewName":"Go-To-Market","orgViewTeamName":"Sales","role":"Account Executive","allocation":1,"startDate":"2025-01-01"}]}],"nextCursor":"cursor_next_123","previousCursor":"cursor_prev_123","totalCount":1}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["open_headcount"],"x-required-access":"read"},"post":{"operationId":"createOpenHeadcount","summary":"Create open headcount","description":"Creates an open headcount row for the authenticated organization. The API key's associated user must be a team administrator.","tags":["open-headcount"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"externalId":{"type":"string","minLength":1},"displayName":{"type":"string","minLength":1},"openStatus":{"enum":["open","filled","closed_unfilled","started"],"type":"string","default":"open"},"openSince":{"type":"string","format":"date"},"targetStartDate":{"type":"string","format":"date"},"actualStartDate":{"type":"string","format":"date"}},"required":["externalId","displayName"]}}}},"responses":{"200":{"description":"The created open headcount row.","content":{"application/json":{"example":{"headcountId":"12345678-9012-3456-7890-123456789012","externalId":"REQ-1234","displayName":"Senior Account Executive","openStatus":"open","openSince":"2025-01-01","targetStartDate":"2025-04-01","createdAt":"2026-01-01T00:00:00.000Z","updatedAt":"2026-01-02T00:00:00.000Z","linkedTeamLinksCount":1,"linkedTeamLinks":[{"teamLinkId":"12345678-9012-3456-7890-123456789012","orgViewId":"12345678-9012-3456-7890-123456789012","orgViewTeamId":"12345678-9012-3456-7890-123456789012","orgViewName":"Go-To-Market","orgViewTeamName":"Sales","role":"Account Executive","allocation":1,"startDate":"2025-01-01"}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"Open headcount status transition is not allowed.","content":{"application/json":{"example":{"code":"UNPROCESSABLE_CONTENT","message":"Open headcount status transition is not allowed."}}}}},"parameters":[],"x-required-resources":["open_headcount"],"x-required-access":"write"}},"/open-headcount/{headcountId}":{"get":{"operationId":"getOpenHeadcount","summary":"Get open headcount","description":"Returns a single open headcount row for the authenticated organization.","tags":["open-headcount"],"parameters":[{"name":"headcountId","in":"path","required":true,"description":"The open headcount identifier.","example":"12345678-9012-3456-7890-123456789012"}],"responses":{"200":{"description":"An open headcount row.","content":{"application/json":{"example":{"headcountId":"12345678-9012-3456-7890-123456789012","externalId":"REQ-1234","displayName":"Senior Account Executive","openStatus":"open","openSince":"2025-01-01","targetStartDate":"2025-04-01","createdAt":"2026-01-01T00:00:00.000Z","updatedAt":"2026-01-02T00:00:00.000Z","linkedTeamLinksCount":1,"linkedTeamLinks":[{"teamLinkId":"12345678-9012-3456-7890-123456789012","orgViewId":"12345678-9012-3456-7890-123456789012","orgViewTeamId":"12345678-9012-3456-7890-123456789012","orgViewName":"Go-To-Market","orgViewTeamName":"Sales","role":"Account Executive","allocation":1,"startDate":"2025-01-01"}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"Open headcount not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"Open headcount not found"}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["open_headcount"],"x-required-access":"read"},"post":{"operationId":"updateOpenHeadcount","summary":"Update open headcount","description":"Updates fields on an open headcount row. The API key's associated user must be a team administrator.","tags":["open-headcount"],"parameters":[{"name":"headcountId","in":"path","required":true,"description":"The open headcount identifier.","example":"12345678-9012-3456-7890-123456789012"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"externalId":{"type":"string","minLength":1},"displayName":{"type":"string","minLength":1},"openSince":{"type":"string","format":"date"},"targetStartDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]},"actualStartDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"The updated open headcount row.","content":{"application/json":{"example":{"headcountId":"12345678-9012-3456-7890-123456789012","externalId":"REQ-1234","displayName":"Senior Account Executive","openStatus":"open","openSince":"2025-01-01","targetStartDate":"2025-04-01","createdAt":"2026-01-01T00:00:00.000Z","updatedAt":"2026-01-02T00:00:00.000Z","linkedTeamLinksCount":1,"linkedTeamLinks":[{"teamLinkId":"12345678-9012-3456-7890-123456789012","orgViewId":"12345678-9012-3456-7890-123456789012","orgViewTeamId":"12345678-9012-3456-7890-123456789012","orgViewName":"Go-To-Market","orgViewTeamName":"Sales","role":"Account Executive","allocation":1,"startDate":"2025-01-01"}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"Open headcount not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"Open headcount not found"}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["open_headcount"],"x-required-access":"write"}},"/open-headcount/{headcountId}/status":{"post":{"operationId":"updateOpenHeadcountStatus","summary":"Update open headcount status","description":"Updates the status of an open headcount row. The API key's associated user must be a team administrator.","tags":["open-headcount"],"parameters":[{"name":"headcountId","in":"path","required":true,"description":"The open headcount identifier.","example":"12345678-9012-3456-7890-123456789012"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"openStatus":{"enum":["open","filled","closed_unfilled","started"],"type":"string"},"actualStartDate":{"type":"string","format":"date"}},"required":["openStatus"]}}}},"responses":{"200":{"description":"The updated open headcount row.","content":{"application/json":{"example":{"headcountId":"12345678-9012-3456-7890-123456789012","externalId":"REQ-1234","displayName":"Senior Account Executive","openStatus":"open","openSince":"2025-01-01","targetStartDate":"2025-04-01","createdAt":"2026-01-01T00:00:00.000Z","updatedAt":"2026-01-02T00:00:00.000Z","linkedTeamLinksCount":1,"linkedTeamLinks":[{"teamLinkId":"12345678-9012-3456-7890-123456789012","orgViewId":"12345678-9012-3456-7890-123456789012","orgViewTeamId":"12345678-9012-3456-7890-123456789012","orgViewName":"Go-To-Market","orgViewTeamName":"Sales","role":"Account Executive","allocation":1,"startDate":"2025-01-01"}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"Open headcount not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"Open headcount not found"}}}},"422":{"description":"Open headcount status transition is not allowed.","content":{"application/json":{"example":{"code":"UNPROCESSABLE_CONTENT","message":"Open headcount status transition is not allowed."}}}}},"x-required-resources":["open_headcount"],"x-required-access":"write"}},"/open-headcount/{headcountId}/team-links":{"post":{"operationId":"upsertOpenHeadcountTeamLink","summary":"Upsert open headcount team link","description":"Creates or updates a linked org view team assignment for an open headcount row. Requires `open_headcount` and `org_views` resources. The API key's associated user must be a team administrator.","tags":["open-headcount"],"parameters":[{"name":"headcountId","in":"path","required":true,"description":"The open headcount identifier.","example":"12345678-9012-3456-7890-123456789012"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"orgViewId":{"type":"string","format":"uuid"},"orgViewTeamId":{"type":"string","format":"uuid"},"role":{"anyOf":[{"type":"string"},{"type":"null"}]},"allocation":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["orgViewId","orgViewTeamId"]}}}},"responses":{"200":{"description":"The linked org view team assignment.","content":{"application/json":{"example":{"teamLinkId":"12345678-9012-3456-7890-123456789012","orgViewId":"12345678-9012-3456-7890-123456789012","orgViewTeamId":"12345678-9012-3456-7890-123456789012","orgViewName":"Go-To-Market","orgViewTeamName":"Sales","role":"Account Executive","allocation":1,"startDate":"2025-01-01"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"Open headcount or org view team not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"Open headcount or org view team not found"}}}},"422":{"description":"Linked assignments can only be created for open headcount rows.","content":{"application/json":{"example":{"code":"UNPROCESSABLE_CONTENT","message":"Linked assignments can only be created for open headcount rows."}}}}},"x-required-resources":["open_headcount","org_views"],"x-required-access":"write"}},"/open-headcount/{headcountId}/team-links/{teamLinkId}/delete":{"post":{"operationId":"deleteOpenHeadcountTeamLink","summary":"Delete open headcount team link","description":"Deletes a linked org view team assignment for an open headcount row. Requires `open_headcount` and `org_views` resources. The API key's associated user must be a team administrator.","tags":["open-headcount"],"parameters":[{"name":"headcountId","in":"path","required":true,"description":"The open headcount identifier.","example":"12345678-9012-3456-7890-123456789012"},{"name":"teamLinkId","in":"path","required":true,"description":"The linked team assignment identifier.","example":"12345678-9012-3456-7890-123456789012"}],"responses":{"200":{"description":"The team link was deleted.","content":{"application/json":{"example":{"deleted":true}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"Open headcount team link not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"Open headcount team link not found"}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["open_headcount","org_views"],"x-required-access":"write"}},"/open-headcount/{headcountId}/delete":{"post":{"operationId":"deleteOpenHeadcount","summary":"Delete open headcount","description":"Deletes an open headcount row and its linked team assignments. The API key's associated user must be a team administrator.","tags":["open-headcount"],"parameters":[{"name":"headcountId","in":"path","required":true,"description":"The open headcount identifier.","example":"12345678-9012-3456-7890-123456789012"}],"responses":{"200":{"description":"The open headcount row was deleted.","content":{"application/json":{"example":{"deleted":true}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"Open headcount not found","content":{"application/json":{"example":{"code":"NOT_FOUND","message":"Open headcount not found"}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-resources":["open_headcount"],"x-required-access":"write"}},"/organization":{"get":{"operationId":"getCurrentOrganization","summary":"Get current organization","description":"Returns organization metadata associated with the authenticated API key.","tags":["organization"],"responses":{"200":{"description":"The authenticated organization.","content":{"application/json":{"example":{"organizationId":"12345678-9012-3456-7890-123456789012","name":"Crouton"}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"Missing, invalid, revoked, or expired API key.","content":{"application/json":{"example":{"code":"UNAUTHORIZED","message":"Missing API key (Bearer or X-Api-Key)"}}}},"403":{"description":"API key lacks the required resource or access level.","content":{"application/json":{"example":{"code":"FORBIDDEN","message":"This endpoint requires the directory resource."}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"422":{"description":"422","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string","default":"Unprocessable Content"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}},"x-required-access":"read"}}}}