openapi: 3.2.0 info: title: Latitude Members API version: v1 description: Open-source AI agent monitoring platform. Full observability into what's failing in production. Discover underlying issues, get alerts when something breaks and verify your fix worked. servers: - url: https://api.latitude.so description: Production servers: - url: https://api.latitude.so tags: - name: Members paths: /v1/members: get: tags: - Members x-fern-sdk-group-name: members x-fern-sdk-method-name: list summary: List members description: Returns every active member of the caller's organization with their role and user details. security: - ApiKeyAuth: [] operationId: listMembers responses: '200': description: List of members content: application/json: schema: $ref: '#/components/schemas/MemberList' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' post: tags: - Members x-fern-sdk-group-name: members x-fern-sdk-method-name: invite summary: Invite a member description: Signals an invitation to join the caller's organization. The invitee receives an accept link by email and becomes a member once they accept. The response is the pending invitation record. Requires OAuth authentication (API-key callers can't act on behalf of a specific user). Only organization owners and admins can invite members. security: - ApiKeyAuth: [] operationId: inviteMember requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/InviteMemberBody' responses: '201': description: Invitation created content: application/json: schema: $ref: '#/components/schemas/InvitedMember' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' /v1/members/{memberId}: get: tags: - Members x-fern-sdk-group-name: members x-fern-sdk-method-name: get summary: Get member description: Returns a single member of the caller's organization, including their role and user details. security: - ApiKeyAuth: [] operationId: getMember parameters: - schema: type: string minLength: 1 description: Membership identifier. required: true description: Membership identifier. name: memberId in: path responses: '200': description: Member content: application/json: schema: $ref: '#/components/schemas/ActiveMember' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' patch: tags: - Members x-fern-sdk-group-name: members x-fern-sdk-method-name: update summary: Update a member description: Updates a member of the caller's organization. Today only the role is mutable. The caller must be an admin or owner; owners cannot be demoted via this endpoint. Requires OAuth authentication. security: - ApiKeyAuth: [] operationId: updateMember parameters: - schema: type: string minLength: 1 description: Membership identifier. required: true description: Membership identifier. name: memberId in: path requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateMemberRoleBody' responses: '200': description: Member with the updated role content: application/json: schema: $ref: '#/components/schemas/ActiveMember' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' delete: tags: - Members x-fern-sdk-group-name: members x-fern-sdk-method-name: remove summary: Remove a member description: Removes a member from the caller's organization. Self-removal and removing the organization owner are rejected — transfer ownership first. Requires OAuth authentication. Only organization owners and admins can remove members. security: - ApiKeyAuth: [] operationId: removeMember parameters: - schema: type: string minLength: 1 description: Membership identifier. required: true description: Membership identifier. name: memberId in: path responses: '204': description: Member removed '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Only organization owners and admins can remove members content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' components: schemas: Error: type: object properties: error: type: string required: - error Member: oneOf: - $ref: '#/components/schemas/ActiveMember' - $ref: '#/components/schemas/InvitedMember' discriminator: propertyName: status mapping: active: '#/components/schemas/ActiveMember' invited: '#/components/schemas/InvitedMember' UpdateMemberRoleBody: type: object properties: role: type: string enum: - admin - member description: New role. Owners cannot be changed via this endpoint — owner-transfer happens on the web. required: - role InvitedMember: type: object properties: status: type: string enum: - invited description: Discriminator for pending invitations — the invitee hasn't accepted yet, so no user record exists. id: type: string description: Stable invitation identifier. Distinct from membership ids. organizationId: type: string description: Organization the invitation grants access to. userId: nullable: true description: Always `null` — no user record exists until the invitation is accepted. role: type: string nullable: true enum: - owner - admin - member - null description: Role the invitee will get once they accept. `null` means the default (`member`). name: nullable: true description: Always `null` — no user record exists yet. email: type: string description: Email address the invitation was sent to. image: nullable: true description: Always `null` — no user record exists yet. invitedAt: type: string description: ISO-8601 timestamp at which the invitation was created. expiresAt: type: string description: ISO-8601 timestamp at which the invitation expires. inviterId: type: string description: User id of the member who issued the invitation. required: - status - id - organizationId - userId - role - name - email - image - invitedAt - expiresAt - inviterId MemberList: type: object properties: members: type: array items: $ref: '#/components/schemas/Member' required: - members InviteMemberBody: type: object properties: email: type: string format: email description: Email address to invite. The invitee receives an accept link by email. role: type: string enum: - owner - admin - member description: Role to grant on acceptance. Defaults to `member` when omitted. required: - email ActiveMember: type: object properties: status: type: string enum: - active description: Discriminator for confirmed members — the user has accepted their invitation and joined the org. id: type: string description: Stable membership identifier. Use this to address the row in update/remove endpoints. organizationId: type: string description: Organization this membership belongs to. userId: type: string description: Identifier of the user the membership represents. role: type: string enum: - owner - admin - member description: Member's role within the organization. name: type: string nullable: true description: Display name of the user. `null` if the user hasn't completed onboarding. email: type: string description: User's email address, verified at signup. image: type: string nullable: true description: User's profile image URL, when set. joinedAt: type: string description: ISO-8601 timestamp at which the user joined the organization. required: - status - id - organizationId - userId - role - name - email - image - joinedAt securitySchemes: ApiKeyAuth: type: http scheme: bearer bearerFormat: API key description: 'Organization-scoped API key, sent as `Authorization: Bearer `.' x-fern-bearer: name: apiKey env: LATITUDE_API_KEY